Supertape (Input64 Diskmagazine) ================================ info by Andreas Matthies Encoding: --------- Three different pulses are used (not 100% accurate) Short (s): 464 T-States ~ 261 cycles of C64(PAL) Middle (m): 703 T-States ~ 396 cycles of C64(PAL) Long (l): 945 T-States ~ 532 cycles of C64(PAL) A pulse s represents a Bit0. A pulse m first represents Bit1Bit0 (two Bits) then Bit1(one Bit), then again Bit1Bit0 and so on. A pulse l represents Bit1Bit1 (two Bits) and resets the counter for the m pulses, means that the next m following an l is always Bit1Bit0. Each Data Byte has 8 Bits with least significant Bit first. Lead-In Byte is $16 and Sync Byte is $3A (or $2A; the byte is masked with $EF and compared to $2A) for the header-block and $C5 for the data-block. Structure: --------- Each file consists of two blocks, the header and the data. Each block follows a lead-in, which is at least 11 bytes of $16. The structure of the header is: $00 - $0F: filename $10 - $10: #00 (not used?) $11 - $12: start-adress $13 - $14: length of file $15 - $18: #00 (not used?) $19 - $1A: parity-checksum, should match the amount of Bits1 in $00-$18. The strucure of the data-block is even more simple: $0000 - ...: data followed by two bytes parity-checksum, that should match the amount of Bits1 in data modulo $10000.