Use Cursors To Scroll Text Use Cursors To Scroll Text Tape to Disc Transfer Tape to Disc Transfer By Rafael Jay By Rafael Jay Files: TTD-I - BASIC program TTD-II - BASIC program TTD - Text file There is nothing more frustrating than, having just bought a brand new disk drive, being forced back to slow, unreliable cassettes simply because that's where all your software is. And even when you've built up a respectable collection of disk-based programs, there are always those old favourites which you'd still like to play, but can't be bothered to load off tape. Many people have the idea of transfering their tape software to disk, but are defeated by a lack of technical know-how, and that's where this article comes in. I will be attempting to explain clearly and simply just how to go about successfully moving programs from tape to disk. Transfering programs from tape to disk suffers from two main problems. These are: A. People protect their tape-based program in a special way which is difficult to get round. B. The program you have transfered needs to be loaded into or use the memory taken up by the Disk Filing System (DFS), and consequently does not work. Taking the first problem first, the "special way" in which people protect their programs is by using a method intrinsic to the Cassette Filing System, which prevents the protected file being accessed in any way other than *RUNing it. Any attempt to load the file in a different manner (eg. *LOAD, CHAIN, etc), will result in the error message "Locked", and the computer stops loading. To describe how this is done, it is neccessary to reveal the format of data stored on tape. Any program saved to magnetic tape is saved in "blocks" of 256 bytes (one quarter K). Each of these blocks has a block header (see figure I), which contains various pieces of information about the file. In the header is a byte known as the "block flag". If Bit 0 of the block flag is set, this causes the above results. This is difficult to get round, but it can be done. 'Unlocker' (file TTD-I) bypasses the protection by using events to check the computer's copy of the block flag (which is stored at &3CA) fifty times a second. If it finds bit 0 set, it unsets it and beeps to tell you it has encountered and unlocked a locked block. This is a simple and neat method to use, as it does not change tape contents, but merely fools the computer into thinking the program is devoid of protection. Run 'Unlocker', then read and execute the following instructions: A. Type *TAPE *OPT 1,2 *LOAD "" 1900 B. This will produce something like: PROGRAM 05 0500 FFFF0E00 FFFF8023 C. Type *DISK *SAVE 1900+ The letters ,, stand for the numbers they are underneath. Your program is now transfered to disk. If you need to transfer more programs, ensure the tape is at the correct position and return to step A. Your program may run straight away on disk without the need for further tinkering (so try it!), but it is far more probable that something known as 'downloading' will be required. Downloading, and the problems associated with it, have made many an aspiring tape-to-diskster pull out his hair in frustration. The main difficulty is this: The DFS takes up two and three quarters K for it's own use, which the tape system doesn't. This means that writers of tape-based programs feel free to use the extra memory, and when they are moved to disk, they don't work. The solution is to load the file to a safe address in memory, switch to the CFS, and move, or download the program to where it should be. This incurs certain problems, however. If, after you have downloaded your program, you try to load up other programs from disk, you will find that the DFS refuses to work, and your original program is corrupted. There are some solutions to these problems, but they rapidly become too complicated for easy use. Here, we are just going to assume that your program consists of only one file. An important point to note is that all the files that make up one piece of software are not necessarily indispensible parts of that software. Many games (particularly older ones) have one or more loader programs, which display title screens, etc, and these can be ignored as they are not essential to the running of the program. 'DownLoad' (file TTD-II) is an all-purpose loader program. To use it simply enter the required filename and whether or not it is a BASIC program. Provided the program has been saved using the method above, it will then be loaded in at a safe address, moved to its correct location, and RUN or CALLed. The actual instructions to move it are done in a special way so they will not be affected if the loader program is overwritten when the main program is moved. It will not cope with very large programs (eg. long adventure games). Figure I Adapted from the Advanced User Guide 1 byte synchronisation (&2A "*") Filename (1 to 10 Characters) Filename terminator (&00) Load address of file, 4 bytes Execution address of file, 4 bytes Block number, two bytes Block length, two bytes Block flag, one byte: bit=1 means 0 Block protected 6 Empty block 7 Last block in file Four spare bytes (&00) Cyclic Redundancy Check for header, 2 bytes Data block, usually 0-256 bytes CRC for data, 2 bytes This article and its associated programs are not intended as an aid to software piracy. They are simply assisting the transfer of expensive cassette programs to disk, thus allowing the user to make continuing use of the software for which he or she has already paid. PRESS BREAK PRESS BREAK