Everything after the header is pulses. On a Commodore cassette, information is in the time between pulses of the signal the recorder plays back. The file keeps each of those times, one after another.
Pulse byte
A pulse byte from 1 to 255 is a pulse of byte × 8 processor cycles. At the C64’s PAL clock of 985,248 Hz one unit is about 8.1 microseconds, so the longest such pulse is about 2.07 milliseconds. In versions 0 and 1 a pulse is measured from one falling edge of the signal to the next.
Overflow
A pulse of more than 255 units (silence, or the gap between blocks) does not fit in a byte. The byte
00 stands for it:
- Version 0:
00alone, meaning “longer than 255 × 8 cycles”; the length is not stored. The explorer takes it as 2,048 cycles. - Version 1 and 2:
00then three bytes, the length in cycles, little-endian. A pulse of 10,000 cycles is00 10 27 00.
The explorer counts such a pulse as one, four bytes wide in version 1.
Short, medium and long
The machine’s own tape routines write three pulse lengths, which on a C64 are about:
| Name | Byte | Cycles | Time (C64 PAL) |
|---|---|---|---|
| Short | 30 | 384 | about 390 µs |
| Medium | 42 | 528 | about 536 µs |
| Long | 56 | 688 | about 698 µs |
The explorer sorts pulses into the three by their length, with the dividing lines at 39 (between short
and medium) and 4C (between medium and long), and calls a pulse shorter than 1C or
longer than 70 “other”. These lines are the explorer’s own choice, not part of the file. The three
lengths are confirmed by the VIC-20 emulator’s tape code, which uses the same 30, 42 and
56, and by the real C64 tapes checked, whose first stage has exactly those lengths.
The viewer’s Pulse lengths table lists how many pulses have each length. A tape of the Kernal’s
format shows three tall lines; a tape with a turbo loader shows others as well. The real tapes checked show,
besides the three, a large number of pulses of 22 or 24 and of 56, which
are probably a fast loader’s pulses (the explorer does not decode them).
How the three lengths spell bytes is on the Kernal tape format page.