The TapeIO package is an optional package that you can install on ResiDOS which gives you the ability to load and save directly to .TAP and .TZX files on your flash card or hard disk as if it was a real tape. This means that you can take advantage of the thousands of .TAP and .TZX emulator files available and use them with your Spectrum
The most important commands to use are %TAPEIN and %TAPEOUT. Each of these takes the name of a .TAP or .TZX file. Thereafter, and standard LOAD commands that would normally access the tape will be redirected to whichever .TAP/.TZX file you specified in the %TAPEIN command. Similarly, any standard SAVE commands that would normally access the tape will be redirected to the .TAP/.TZX file specified in the %TAPEOUT command. In order to redirect access to tape, simply use the %TAPEIN or %TAPEOUT command without a filename.
For example, to load up Jetpac from a jetpac.tap file, use the following commands:
To create a .TZX file containing your latest masterpiece, so that it can be loaded by an emulator, use commands such as:
Some more useful commands that are available are %TAPELIST and %TAPEWIND.
The first of these lists out the contents of the current .TAP/.TZX file being used for input (ie the last one specified in a %TAPEIN command). It also shows which is the next block that will be LOADed, with a cursor (similar to the cursor in a BASIC program listing).
With the %TAPEWIND command, you can "wind" the tape pointer forwards (using a positive number) or backwards (using a negative number) by a number of blocks, or to a specific block number (using the "=" option). If you do not specify any number, then the input tapefile will be rewound to the start.
For example, use the following commands to wind the tape in different ways and see the result on the tapelisting:
Finally, you can also change the behaviour when the last file is loaded from the input .TAP/.TZX file. Normally, when this happens the tapefile is "ejected" and subsequent LOAD commands use the real tape again, until another %TAPEIN command is used. However, if you would prefer the tapefile to be "rewound" to the start, then use the following command:
To revert to the default behaviour (ejecting the tapefile), use:
It's also easy to transfer files from within .TAP and .TZX files to separate files on your flash card or hard disk. There are commands available to transfer files with headers (%TAPEGET and %TAPEPUT) and also headerless files (%TAPEBGET and %TAPEBPUT). For details, see the full command reference below.
All .TAP files should work correctly with ResiDOS, as well as some .TZX files which use the standard Spectrum loading system. However, any .TZX files using speedloading or other custom loaders will not work. If a game appears to stop loading from a .TZX file, then it is likely to have a custom loader. Using the %TAPELIST command on such a file should show which blocks ResiDOS can "see" and help to show if it is a non-standard loader program.
If a CODE file which might overwrite the ROM area or the stack is encountered, then TapeIO will load this byte-by-byte in "slow" mode, to ensure that ResiDOS data is not corrupted. In such cases, the border will flash multicoloured during loading.
If you have a 128K Spectrum and find a game that fails to load, please try again after selecting 48K mode (with the %SPECTRUM command). Many games will only load in 48K mode by design (and would have included instructions on the cassette inlay to switch to 48K mode before loading).
Here is a complete list of all the commands supported by the TapeIO package, including several options and variants that aren't described above. Please read carefully to get the most out of this package.