DISKDEFS(5)
πΎ DISKDEFS(5) β the diskdefs file, aka CP/M disk format tea π
okay so bestie, welcome to diskdefs, the file format manual page from the CP/M tools girlies. This is the file that holds your CP/M format descriptions, and the reason it exists is lowkey tragic: CP/M in general does not store those in the file system, and there are no standards of any kind. Not one. It's giving chaos. π« So we keep them in a text file like the icons we are. β¨
πΈ DESCRIPTION πΈ
The diskdefs file contains CP/M format descriptions. That's the whole vibe. π
A diskdefs file consists of one or more entries shaped like this, and the way that it's shaped is literally non-negotiable:
diskdef name
seclen size
tracks count
sectrk count
blocksize size
maxdir count
[dirblks count]
boottrk number
[bootsec number]
[skew number]
[skewtab sector[,sector]...]
[os 2.2|3|isx|p2dos|zsys]
[offset size]
[logicalextents count]
[libdsk:format name]
end
See those square brackets? Those lines are the optional ones, the little accessories of the entry. π The rest are the fit that has to be exact.
β οΈskewandskewtabmust only be used exclusively. Pick one, bestie. Not both. It's giving "you can't sit with both tables at lunch". π
Comments are marked with a leading hash or semicolon and extend to the end of the line. So go ahead and annotate your life. # and ; are your journaling besties. π
It is possible to reserve space after the directory beyond maxdir using an inflated DPB ALV0. And if the format makes use of that, then dirblks must be set. No skipping it, no "I'll do it later". Set it. π
bootsec contains the total number of sectors used by the boot area. This is for CP/M systems that map multiple logical tracks onto a physical track. And here's the tea: while raw disk images <em>can</em> be configured for doing the same, accessing libdsk images needs to be done by physical tracks. Physical. Tracks. Periodt. π
π SEE ALSO π
cpm(5)β your other bestie, go read her too π¦
and that's the whole page, bestie!! π This one's from CP/M tools, dated November 2, 2022 β shoutout to the date stamp for keeping it iconic. β¨ Go define some disks. Slay. ππ
π¦ where this page comes from
- debian bookworm: cpmtools 2.23-4
- debian trixie: cpmtools 2.23-7
- fedora 43: cpmtools 2.23-10.fc43 Β· GPL-3.0-or-later
- fedora 44: cpmtools 2.23-12.fc44 Β· GPL-3.0-or-later
- ubuntu noble: cpmtools 2.23-5build1
- ubuntu questing: cpmtools 2.23-7
- ubuntu resolute: cpmtools 2.23-7build1
- ubuntu stonking: cpmtools 2.23-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms