tape2disk - transcription utility

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

tape2disk - transcription utility

Post by srowe »

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.
Attachments
tape2disk.zip
(2.02 KiB) Downloaded 75 times
User avatar
Mayhem
High Bidder
Posts: 3026
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Re: tape2disk - transcription utility

Post by Mayhem »

What size files can the utility handle? Can you transfer up to 16k files for example?
Lie with passion and be forever damned...
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: tape2disk - transcription utility

Post by srowe »

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.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Re: tape2disk - transcription utility

Post by Boray »

So it automatically hacks the program to load the data from disk instead?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: tape2disk - transcription utility

Post by srowe »

It makes no changes to the contents of the program. If the program has code to access files from tape it will continue to do so.

What this utility does is automate

Code: Select all

LOAD "FILE.PRG",1
SAVE "FILE.PRG",8
or

Code: Select all

OPEN 1,1,0,"FILE.SEQ"
OPEN 2,8,2,"FILE.SEQ"
INPUT#1,A$
PRINT#2,A$;
...
CLOSE 1
CLOSE 2
except it automatically determines whether the tape file is PRG or SEQ.
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: tape2disk - transcription utility

Post by tlr »

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.
If you're on an unexpanded vic there's this: Raw tape transfer 1.0 (tape to disk).

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.
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: tape2disk - transcription utility

Post by srowe »

Interesting, could you explain how it works?
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: tape2disk - transcription utility

Post by tlr »

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.
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: tape2disk - transcription utility

Post by srowe »

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.
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: tape2disk - transcription utility

Post by tlr »

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.
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: tape2disk - transcription utility

Post by srowe »

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