Standard loading system notes ----------------------------- Files are split into blocks. Each block has a header and data block. The header block is 64 bytes long, and has a sync byte of &2c. The header block is written using the cassette block structure described below. The header has the following form: offset length description 0 16 filename (padded with "0"s) 16 1 block number (normally 1) 17 1 last block flag (!=0 means this is last block in file) 18 1 file type bit 0 = 1: file is protected bit 1..3 = contents 0 = basic 1 = binary 2 = screen image 3 = ASCII 4..7 not defined bit 4..7 = version ASCII files are version 1, all other files are version 0 The data block stores up to 2K of data and has a sync byte of &16. The data block is written using the cassette block structure described below. cassette block structure: Leader/pilot, sync bit (0), sync byte, 1 or more cassette data structures (see below), trailer cassette data structure: 256 bytes, CRC high byte, CRC low byte notes: 1. Leader/pilot is 2048 "1" bits (4096 pulses) 2. sync bit is timing for a 0 bit pulse 3. timing for 0 and 1 bits in data is derived from leader/pilot 4. see details above for standard sync byte values 6. CRC is calculated using polynomial with initial seed of &ffff. 7. CRC is stored NOTed on the cassette! 8. Trailer is 32 "1" bits at end