A D80 is every 256-byte sector of a Commodore 8050 disk, track by track, with no header. Tracks are numbered from 1 and sectors from 0. The numbers are from the VICE manual (chapter 17, sections D80 and D82), read through a summarising fetch tool, so they are “our words”.
Sectors per track
| Tracks | Sectors per track | Sectors in zone |
|---|---|---|
| 1–39 | 29 | 1,131 |
| 40–53 | 27 | 378 |
| 54–64 | 25 | 275 |
| 65–77 | 23 | 299 |
2,083 sectors. Track offsets the manual prints, which the tests check: track 1 at 0x00000, 2 at 0x01D00, 40 at 0x46B00,
54 at 0x5E500, 65 at 0x6F800, 77 at 0x80C00. Files and the directory use an interleave of 1; the BAM an interleave of 3.
Image sizes
533,248 bytes (2,083 sectors). With one error byte per sector: 535,331 bytes. The error-byte size is our sum; the text we read did not state it.
Header, track 39 sector 0
| Offset | Size | Meaning |
|---|---|---|
$00 | 2 | Track and sector of the first BAM sector, 38/0 |
$02 | 1 | DOS format, $43 (“C”) |
$03 | 1 | Reserved |
$06–$16 | 17 | Disk name, PETSCII padded with $A0; the name is 16 characters and $17 is another $A0 |
$18–$19 | 2 | Disk ID |
$1B–$1C | 2 | DOS version, “2C” |
$1D–$20 | 4 | $A0 |
The manual’s table prints the name as $06–$16, which is 17 bytes; the viewer takes 16 characters from $06, with $16 and $17
as padding. That is our reading of an apparent off-by-one in the summary we read, not a verified fact.
BAM, track 38 sectors 0 and 3
| Offset | Size | Meaning |
|---|---|---|
$00 | 2 | Next BAM sector: 38/3 in the first; the first directory sector 39/1 in the second |
$02 | 1 | DOS version $43 |
$03 | 1 | Reserved |
$04 | 1 | The first track the sector covers (1 in 38/0, 51 in 38/3) |
$05 | 1 | The last track covered plus one (51 in 38/0, 78 in 38/3) |
$06… | 5 each | One entry a track: a free count and a 4-byte bitmap. 38/0 covers tracks 1 to 50 (track 50 at $FB), 38/3 covers tracks 51 to 77 (track 77 at $88) |
A set bit is a free sector; bits for sectors the track does not have are clear. The manual’s own labels for the link of 38/3 disagree with its dump; we follow the dump (39/1).
Directory and file entries
The first directory sector is always 39/1; sectors 1 to 28 of track 39 hold up to 224 entries, eight 32-byte entries a sector. The entry layout is that of the D71 page (type byte, first sector, 16-character name, REL fields, size in sectors). The last directory sector has track 0 in its link.
File chains
The first two bytes of a sector are the track and sector of the next; track 0 ends the chain and the second byte is the index of the last used byte, so the last sector holds that number minus 1 bytes; other sectors hold 254.
Error bytes
When present, one byte per sector in sector order after the 2,083 sectors; $01 is no error. The codes are those of the
D64 page; that the 8050 reports the same ones is our assumption.
Not described
Known, not yet covered
- REL side sectors.
Unknown
- Whether the 8050’s error codes are exactly the 1541 set.