Color Computer machines initially used audio cassette tapes for storage. How was the data stored? What was the maximum bit rate?
Most of this info comes from the Color Computer 3 Service Manual (26-3334), except for the actual frequencies used on the cassette:
On the tape, frequency shift keying is used, with a zero bit encoded by a single 1200 Hz sine wave, and a one bit encoded by a single 2400 Hz sine wave. (Yes, this means some bytes play faster than others.) The service manual claims this results in 1500 baud, but obviously this will vary depending on the actual data being stored.
The service manual follows by describing the actual data format in section 5.10:
Each file saved on tape consists of six discrete items:
- A leader, 128 bytes of 55H
- A Namefile block, containing the file name
- Approximately 0.5 seconds of blank space with no audio, which is meant to give the CoCo enough time to process the Namefile block
- Another leader, 128 bytes of 55H
- One or more data blocks
- An end of file block
Data blocks, Namefile blocks and end of file blocks have a common format:
- Leader byte 55H
- Sync byte 3CH
- A block type byte: 00H = Namefile block, 01H = data block, FFH = end of file block
- Block length byte
- Data (up to 255 bytes)
- Checksum: the sum of all data bytes plus block type and block length bytes
- Trailer byte 55H
The data in the Namefile block is 15 bytes long, and consists of:
- Eight bytes for the file name
- A file type byte: 00H = BASIC program, 01H = data, 02H = Machine language program
- An ASCII flag: 00H = ASCII, FFH = binary
- A gap flag: 01H = continuous, FFH = gaps
- For machine language programs, the start address (two bytes)
- For machine language programs, the load address (two bytes)
The end of file block is a block with zero length.
The original Color Computer Technical Reference Manual (26-3193) has more detail on the hardware implementation of the cassette interface, if you find this necessary.