THE TAPEDIT PROGRAM

TAPEDIT V1.1

This is a small utility to enable easier cassette file handling. Using this program and a disassembler I have managed to transfer all my tape based games to disk (including auto-run programs.) To use it simply CLEAR memory down and load it: (the program is position independent)

eg.
   CLEAR 200,32000
   LOAD "TAPEDIT.BIN",32000
   EXEC

You are first prompted with 'ABORT ON ERROR(Y/N)?' This will determine the action to take on a checksum error. If you answer 'N' to this question, the error will be displayed on the screen and loading will continue. Pressing any other key will cause the loading to abort on detection of a checksum error. Not aborting on cassette errors can be useful as it can enable BASIC programs which may have 1 byte wrong to be easily corrected later. However it could also make a program totally unreadable if it is a BASIC pointer that is corrupt. (N.B. loading will always abort if a memory error occurs.)

Following this you are asked for the start address of the buffer into which the file will be loaded. This is to be a 4 digit hex number. There is no need to press ENTER on completion. Note: if a 3 digit number is to be entered it should be preceded by a zero(0) eg. C00=0C00 If you are loading a BASIC program you should first NEW any existing program and set the buffer to be the start of BASIC workspace (normally $2401 for disk systems - however it can be checked by PEEK(25)*256+PEEK(26).)

Once this has been entered the tape is started and a 'SEARCHING' message is displayed. On encountering a valid namefile block, the tape will stop and show the namefile details. For data and BASIC programs this will consist of the name, followed by a DOS type extension to indicate the type (.DAT for data, .BAS for BASIC). For example, if the tape file is a BASIC program called 'GAME', it will be displayed as 'GAME.BAS'. If however the program is a machine code file, a .BIN extension is produced and additional information is displayed: the default load address (load address if called by CLOADM) and the default exec address (address called by EXEC after program has loaded). Pressing any key will resume loading. Subsequent data will then be loaded into memory from the start buffer address until an EOF block is encountered or an error occurs (unless you are not aborting on an error in which case the message 'CHECKSUM FAILURE' is produced on an error occuring.)

On completion of loading, the location of the end of the buffer is displayed and control is passed back to BASIC. However, if a BASIC program has just been loaded, in addition to this the end of BASIC pointer (27/28) becomes set to (end of buffer-1) and a number of BASIC setup vectors are called.

This program will load tape files without namefile header blocks. However, since this information is used to determine the file type, if it is a BASIC program, then the BASIC vectors will not be set up. This can be done manually however by POKEing the hex number of (end of buffer-1) into locations 27 & 28 and EXEC &H83E7.

It is worth noting that some games have, as part of their protection, deliberate checksum failures included on the tapes, (usually the EOF blocks) so this program can be used to overcome this.

Download TapeEdit v1.1

tapedit.bin
tapedit.asc (DASM assembler source)