Here's the initial release of my silly disc imaging tool, DSK2CDT2DISC.
Given a disc image, it'll give you a tape image that writes the disc to your A drive when you load it on your CPC.
pelrun/dsk2cdt2disc · GitHub (https://github.com/pelrun/dsk2cdt2disc)
I'm sure it might be of use to somebody. :D
PS: it uses high baud rates to reduce the time taken to spool out the disc image, so it'll probably not work if you record it to an actual tape. But playback from your PC or tapdancer should work.
PPS: I haven't actually tested it outside an emulator yet :laugh:
Maybe next I should write the inverse - a program that dumps a dsk image out to tape. :P
Thanks for this tool! Good work!!
In what scenarios would that be of use? Only thing I can think is if you load the tape image through a mp3 tape or other audio output/input and you have a disk drive but no way to transfer a dsk onto a real disk?
You pretty much answered your question. Also because I could, and it was kinda funny. :D
Ha, actually the second part was the first that came to mind :D
Be it as it may, I think some will find it useful!
Quote from: Gryzor on 09:46, 15 April 14
In what scenarios would that be of use? Only thing I can think is if you load the tape image through a mp3 tape or other audio output/input and you have a disk drive but no way to transfer a dsk onto a real disk?
Exactly e.g.
1. You have a CPC6128 with no 3.5" drive.
2. You have a CPC with a 3" or 3.5" drive but you don't have a PC with a 3.5" drive (e.g. a new pc).
3. You have a 3.5" USB drive on the PC but you want to write a copy protected cpc disc.
I haven't cable to test it, but I'm curious: is it working with original dsk? like strange copy protected format (defender of the crow...) If yes it can be worthing restore my original disc...
I've had mixed results on my actual CPC (compared to the emulator), although that's largely because there's still a few bugs in it.
There will be formats that it can't write; it's limited by what the CPC can do (e.g. those 8k sector discs that an unmodified CPC can't write successfully.)
Aaaand it looks like at least one of the dumps of Defender of the Crown on CPC Power uses 8k sectors. Yuck.
Quote from: Gryzor on 09:46, 15 April 14
In what scenarios would that be of use? Only thing I can think is if you load the tape image through a mp3 tape or other audio output/input and you have a disk drive but no way to transfer a dsk onto a real disk?
This would be exactly why I'd find it useful. I have one working 6128 but no easy way to get data onto the disk.
Also, tape is awesome, obviously! :)
Quote from: ralferoo on 16:14, 04 May 14
Also, tape is awesome, obviously! :)
Sony have developed a way of putting 185TB of data onto a cassette tape. (special tape and drive, obviously) ;D .
Sony Crams 3,700 Blu-Rays' Worth of Storage in a Single Cassette Tape (http://gizmodo.com/sony-crams-3-700-blu-rays-worth-of-storage-in-a-single-1571508568)
Quote from: ralferoo on 16:14, 04 May 14
Also, tape is awesome, obviously! :)
Amen to that!
/me loves his tapes
Quote from: pelrun on 19:52, 04 April 14
Maybe next I should write the inverse - a program that dumps a dsk image out to tape. :P
Someday, once I'm done with the final exams and papers, I'll have to write the counterpart to CALLBCA1: CALLBC9E, the firmware-compatible tape saver; and so you'll have the code required to dump discs on tape at 4000 baud.
For real??
I just got alerted that the download on the github page was creating bogus CDTs; turns out the CPC wants dos line endings when loading ASCII basic files! When I built dsk2cdt locally (under windows) it was fine, but the online download was built on a linux box, and the loader program got checked out with unix line endings. Whoops!
(I guess nobody was using it, since this has been broken for everyone but me for a couple of years. But it's fixed now!)
Quote from: pelrun on 14:50, 02 April 16
(I guess nobody was using it, since this has been broken for everyone but me for a couple of years. But it's fixed now!)
Sadly there's always a risk of writing something that no-one may use
But the idea is interesting.
No that's cool, I'm trying it right now.
DSK2CDT2DISC
Ok, I get the DSK2CDT part, I have a side1.cdt. But CDT2DISC? I still need to use a CDT to WAV and an audio player now.
I didn't think it was that confusing - if you load that cdt it'll write the disc image to the A drive.
This is only a niche tool that I wrote as a joke - it's useful if you don't have any other way of getting images into discs, but that's about it.
Oh ok. I thought it would automatically convert that cdt to wav and play it. That would have been neat actually.
Quote from: pelrun on 04:35, 03 April 16
I didn't think it was that confusing - if you load that cdt it'll write the disc image to the A drive.
So the 1st program to load would be a Transfer to Disc program like the one found when AA first had regular monthly Covertapes, I think the 1st tape to have that was Tape 3 which had Spindizzy & Wizards Lair on it.
I recall a similar sort of program being published in the AA type-ins around that time called Archiver (in AA65), but I think it was very specific in what operations it would carry out.
Now I'm getting confused. This has nothing to do with existing tape software. This is just a way to get disc images from the PC over to the CPC if all you have is a tape cable.
Quote from: pelrun on 10:43, 03 April 16
Now I'm getting confused. This has nothing to do with existing tape software. This is just a way to get disc images from the PC over to the CPC if all you have is a tape cable.
Yep, so your program takes a DSK image, makes a CDT, the CDT can be loaded on the CPC, so the 1st file on the CDT will take the remaining Files and transfer to Disc?
Ah now I understand - I thought you were talking about using other tape utilities :picard:
You're pretty much correct - but the tape doesn't contain the files from the dsk image, it contains the compressed image itself.
Here is a small windows batch script that converts a dsk into a cdt, then into a wav, then plays it, and close. Just drag and drop the dsk on it, or use the command line.
It's using powershell to play the sound, so Windows 7 and onwards by default. For older Windows, you need to install it, or modify the script to use your favourite player, like vlc.exe --play-and-exit side1.wav or the small command-line sounder.exe.
dsk2cdt.exe %1
TZX2WAV.EXE side1.cdt
powershell -c (New-Object Media.SoundPlayer side1.wav).PlaySync();
DEL side1.*
IF EXIST side2.cdt (
TZX2WAV.EXE side2.cdt
ECHO SIDE 2 is about to play. Is your CPC ready?
PAUSE
powershell -c (New-Object Media.SoundPlayer side2.wav).PlaySync();
DEL side2.*
)
(Can't wait for cmd.exe to be deprecated in favour of bash)
software used:
- Downloads | dsk2cdt2disc (https://drone.io/github.com/pelrun/dsk2cdt2disc/files)
- http://www.worldofspectrum.org/pub/sinclair/tools/pc/TZX2WAV_02b.zip (http://www.worldofspectrum.org/pub/sinclair/tools/pc/TZX2WAV_02b.zip)
optional
- VideoLAN - Official page for VLC media player, the Open Source video framework! (http://www.videolan.org/vlc/)
- sounder.exe - play a wav file from the command line (http://www.elifulkerson.com/projects/commandline-wav-player.php)
Quote from: khaz on 12:21, 03 April 16
(Can't wait for cmd.exe to be deprecated in favour of bash)
It wouldn't help - you can't actually run windows binaries from the bash prompt, which is astonishingly stupid. You have to compile linux versions of everything.
Ok I tried to transfer a few discs, many work, but quite a few don't.
The Untouchables Face A fails at Track 1 sector C6, with "overflow in 670".
pelrun made my day with DSK2CDT2DISC! 8)
Before DSK2CDT2DISC I had:
- 3-inch drive and a few floppies, but no formatting software.
- 3.5-inch drive that I can't fully test because no CPC-formatted floppy!
- Tough issues like "can I format floppies with a modern PC, my laptop, a USB-flopy". Probably just not possible.
DSK2CDT2DISC was able to format and write useful software to both 3-inch and 3.5-inch floppies using a "cheap" audio cable as only additional hardware! No more USB, hardware or OS issues!
After DSK2CDT2DISC I have:
- 3-inch floppy with interesting software from the net, that I can load in seconds instead of minutes
- I can e.g. save an interrupted Sapiens game on a local disk. My kids might love that (they played Sapiens with caprice32 on Linux so far).
- CPC-formatted regular 3.5-inch floppy that the CPC can use reliably independently from a PC.
- My second CPC-6128 with a dead 3-inch drive now becomes interesting again.
- Soon, a disk formatting tool running on a CPC, stored on 3.5-inch floppy.
- The software itself is fully open-source, is an interesting mix that loads quickly by small parts. All this suggests more dev hacks.
What makes DSK2CDT2DISC powerful is that you don't need to plug a CPC drive on a PC, or hope your current PC OS can write CPC-formatted images to 3-inch disks (I did that 20 years ago on a tower PC and DOS software).
To be fair, before being able to use it, I had to fix some portability issues to compile it for Linux. Thanks pelrun for merging my pull request into the project on github!
- Portable source code on pelrun/dsk2cdt2disc: Convert CPC DSK files to a tape image that will rebuild the disk when loaded. (https://github.com/pelrun/dsk2cdt2disc)
- My github fork of the project with latest changes as some are not yet merged: cpcitor/dsk2cdt2disc: Convert CPC DSK files to a tape image that will rebuild the disk when loaded. (https://github.com/cpcitor/dsk2cdt2disc)
- issues on Issues · pelrun/dsk2cdt2disc (https://github.com/pelrun/dsk2cdt2disc/issues?utf8=%E2%9C%93&q=%20is%3Aissue%20author%3Acpcitor%20)
Kudos to pelrun! :D
Quote from: cpcitor on 19:14, 16 October 17What makes DSK2CDT2DISC powerful is that you don't need to plug a CPC drive on a PC, or hope your current PC OS can write CPC-formatted images to 3-inch disks (I did that 20 years ago on a tower PC and DOS software).
Most people have some sort of HxC or Gotek connected to their CPC, which is the fastest PC <--> CPC transfer you could hope for.
Bryce.