I wanted to copy the contents of my many tapes on to SD card so I had a look about for a utility to do that. I couldn't find one so I've written tape2disk.
What it can do:
Read program files from tape and save them to disk
Read data files from tape and save them as sequential files on disk
Name unnamed tape files as 'unnamed1', 'unnamed2' automatically
What it can't do:
Cope with fast loaders
Handle files with duplicate names
Handle errors very well
I'm using it to work through my collection. Feedback welcome.
Mayhem wrote:What size files can the utility handle? Can you transfer up to 16k files for example?
I forgot to mention how it works.
The program runs from the 3K expansion block. It is easy to relocate (but you will have to re-assemble).
For program files the entire file has to be read into memory. So for a 16K file you'll need a 16K expansion. Memory doesn't have to exist where the program would be loaded, the utility dumps the file at the start of memory then writes it to disk. Fixing this to work differently would require duplicating big sections of the tape interrupt code.
For data files any size can be handled, each 192 byte block is loaded and written in turn.
srowe wrote:The program runs from the 3K expansion block. It is easy to relocate (but you will have to re-assemble).
For program files the entire file has to be read into memory. So for a 16K file you'll need a 16K expansion. Memory doesn't have to exist where the program would be loaded, the utility dumps the file at the start of memory then writes it to disk. Fixing this to work differently would require duplicating big sections of the tape interrupt code.
It cannot do sequential tape files, but it dumps the header blocks in addition to the program files.
I have a version for expanded machines sitting somewhere unreleased IIRC.
srowe wrote:Interesting, could you explain how it works?
In retrospect I realize the post might have been kind of confusing.
It does full unexpanded files on an unexpanded vic by keeping all of the actual transfer code in the area $0000-$03ff. For large files the screen is temporarily overwritten but the transfer should be correct.
Do you use KERNAL code or have you written your own tape handling code? I couldn't see how to intercept the KERNAL tape load functions to send the data to disk rather than load/verify.
srowe wrote:Do you use KERNAL code or have you written your own tape handling code? I couldn't see how to intercept the KERNAL tape load functions to send the data to disk rather than load/verify.
I use parts of the kernal code to load blocks from tape. It does load the full file into ram before writing it to floppy. For a file targeted for an unexpanded machine that can never be larger than $1000-$1fff which is free using my approach.
Ah, that sounds the same as my approach. I'm not sure it's worth trying to avoid writing the complete file to memory, the tape and serial code shares some zero page locations so interleaving calls to them will probably result in problems.
I've now transferred all my old tapes to SD card. I'm amazed how successful I was, many of the tapes are about 35 years old and were very poor quality. I had a few errors which I fixed up by hand but it's a testament to the solid design of the tape protocol that I was able to copy so much after such a long time.