ZX Spectrum Tape Files The ZX Spectrum saves programs and data to tape in the form of audio recordings consisting of square wave signals with different wavelengths and durations. Here are some definitions:
Tape data is encoded as two 855 T-state pulses for binary zero, and two 1,710 T-state pulses for binary one. A standard ZX Spectrum tape file consists of a header block and a data block. The header block being 19 bytes long (17 bytes plus a flag byte and a checksum byte) and contains the filename and the type of data block which follows (program, array, screen or bytes). For program data, the header can include a line number to start from for programs that shall execute automatically. To distinguish header blocks from data blocks, a sequence of leader pulses precedes each type of block. The leader pulse is 2,168 T-states long and is repeated 8,063 times for header blocks and 3,223 times for data blocks. After the leader pulses, two sync pulses (667 T-states plus 735 T-states long) follow to signal the beginning of the actual data. Read more about the tape file structure here. Custom tape routines can have other structures and encodings. Emulator Tape Files An emulator tape file contains all the necessary data for the emulator to recreate the audio pulses and input them to the emulator’s audio in port. Some emulators can bypass tape loading routines and instead convert the tape file data directly into emulated RAM, but this is not implemented in SoftSpectrum 48. The two most common tape file formats are:
SoftSpectrum 48 can load TAP files and most TZX files. Process The process for loading tape files in SoftSpectrum 48 is as follows:
Speed Loading SoftSpectrum 48 uses a simple technique to increase the speed of the tape loading process. Whenever the CPU runs the instruction at 0x05C8, which is in the beginning of the ROM tape loading routines, CPU speed is increased to 400 %. Then, when the end of the tape file has been reached, speed is returned to its previous value.
0 Comments
|
Archives
November 2020
Categories
All
|