CPCWiki forum

General Category => Applications => Topic started by: pelrun on 21:41, 04 April 14

Title: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 21:41, 04 April 14

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:
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 21:52, 04 April 14
Maybe next I should write the inverse - a program that dumps a dsk image out to tape.  :P
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: jrodriguezv on 22:54, 04 April 14
Thanks for this tool! Good work!!
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: Gryzor on 11: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?
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 12:01, 15 April 14
You pretty much answered your question. Also because I could, and it was kinda funny. :D
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: Gryzor on 12:03, 15 April 14
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!
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: arnoldemu on 15:10, 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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: jbaudrand on 12:43, 04 May 14
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...
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 15:12, 04 May 14
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.)
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 15:27, 04 May 14
Aaaand it looks like at least one of the dumps of Defender of the Crown on CPC Power uses 8k sectors. Yuck.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: ralferoo on 18:14, 04 May 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! :)
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: steve on 03:50, 05 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)
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: Gryzor on 10:05, 05 May 14
Also, tape is awesome, obviously! :)


Amen to that!


/me loves his tapes
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: cngsoft on 21:56, 13 May 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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: Gryzor on 20:07, 14 May 14
For real??
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 16:50, 02 April 16
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!)
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: AMSDOS on 01:18, 03 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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: khaz on 02:28, 03 April 16
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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 06: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.

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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: khaz on 10:27, 03 April 16
Oh ok. I thought it would automatically convert that cdt to wav and play it. That would have been neat actually.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: AMSDOS on 12:05, 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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 12: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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: AMSDOS on 13:03, 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?
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 13:56, 03 April 16
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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: khaz on 14:21, 03 April 16
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.

Code: [Select]
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)

Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: pelrun on 15:12, 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.
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: khaz on 17:11, 11 April 16
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".
Title: DSK2CDT2DISC made my day!
Post by: cpcitor on 21:14, 16 October 17
pelrun made my day with DSK2CDT2DISC!  8)

Before DSK2CDT2DISC I had:

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:


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!


Kudos to pelrun!  :D
Title: Re: DSK2CDT2DISC - get disc images onto your CPC via... a tape?!
Post by: Bryce on 23:20, 16 October 17
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).

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.