CBM DOS (Commodore DOS)

CBM DOS is the file system of Commodore disk drives (1540, 1541, 1571, 1581) used with the VIC-20, Commodore 64 and 128. It is found only in disk images (D64, D71, D81 and similar) and preserved collections.

Overview

The drive firmware implements the file system. A 1541 disk has 35 tracks, with track 18 holding the Block Availability Map (BAM) in sector 0 and the directory chain starting at sector 1. Files are linked chains of 256-byte sectors with 254 data bytes each. The 1571 is double-sided; the 1581 has 3.5-inch disks with partitions and subdirectories. Images are stored as D64, D71 and D81.

History

  • Introduced with the VIC-1540/1541 drive in 1982.
  • The 1571 and 1581 followed in 1985 and 1987.

Structures

Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

Cbm Dos File System

OffsetSizeTypeFieldNotes
0x416bytesLabel
0x162bytesId
0x9016bytesLabel
0xA22bytesId

Make Entry

OffsetSizeTypeFieldNotes
0x21u8Type
0x31u8Start Track
0x41u8Start Sector
0x516bytesName
0x171u8–
0x181u8–
0x1E1u8Blocks
0x1F1u8Blocks

Partition Entry

OffsetSizeTypeFieldNotes
0x31u8Track
0x41u8Sector
0x516bytesName
0x1E1u8Blocks
0x1F1u8Blocks

Probe

OffsetSizeTypeFieldNotes
0x01u8Weak
0x01u840
0x11u8–
0x21u8–
0x416bytesLabel
0x191u8–
0x1A1u8–
0x9016bytesLabel
0xA51u8–
0xA61u8–

Constants

Cbm Dos File System

NameValueTypeNotes
Types[“del”, “seq”, “prg”, “usr”, “rel”, “cbm”, “type6”, “type7”]string[]
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.