avatar_pelrun

DSK2CDT2DISC - get disc images onto your CPC via... a tape?!

Started by pelrun, 19:41, 04 April 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pelrun


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


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:

pelrun

Maybe next I should write the inverse - a program that dumps a dsk image out to tape.  :P

jrodriguezv


Gryzor

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?

pelrun

You pretty much answered your question. Also because I could, and it was kinda funny. :D

Gryzor

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!

arnoldemu

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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

jbaudrand

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...

pelrun

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.)

pelrun

Aaaand it looks like at least one of the dumps of Defender of the Crown on CPC Power uses 8k sectors. Yuck.

ralferoo

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! :)

steve

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

Gryzor

Quote from: ralferoo on 16:14, 04 May 14
Also, tape is awesome, obviously! :)


Amen to that!


* Gryzor loves his tapes

cngsoft

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.
(if you can't see the banner right now my server is currently offline)

Gryzor


pelrun

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!)

AMSDOS


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.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

khaz

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.

pelrun

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.

khaz

Oh ok. I thought it would automatically convert that cdt to wav and play it. That would have been neat actually.

AMSDOS

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.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

pelrun

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.

AMSDOS

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?
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

pelrun

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.

khaz

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
- http://www.worldofspectrum.org/pub/sinclair/tools/pc/TZX2WAV_02b.zip
optional
- VideoLAN - Official page for VLC media player, the Open Source video framework!
- sounder.exe - play a wav file from the command line


Powered by SMFPacks Menu Editor Mod