read the bits, not the bytes: WOZ, and a drive that shifts
A .dsk says what sectors are on a disk and a .nib says what nibbles the head would read. WOZ says what is on the surface: the bit cells, in order, as many as that track happens to hold. It exists because everything above it throws away what copy protection was built on -- a track is however many bits went past in one revolution, a self-sync byte is ten bits rather than eight, and some disks have a track between two tracks or a run of bits that reads differently every time because nothing is recorded there. Reading it meant the drive had to change. It held a disk as thirty-five tracks of 6,656 bytes and handed one over per read; it now holds each track as the bits it is, with its own length, and the controller assembles them the way the real one does -- a shift register taking a bit every four microseconds that says a byte is ready when its top bit comes round. The shifter holds a finished byte until the processor collects it, and what goes past meanwhile is gone, which is why the firmware has thirty-two cycles to come back for each one. That is a better model of the hardware for every disk, and it made something visible that had been quietly wrong all along. The gaps had to become real self-sync bytes. A gap written as plain $ff is eight bits, so a reader that starts mid-byte stays mid-byte for ever and every field on the disk reads as a smear of two. Real formatters write $ff and two extra zero bits, and those two bits are what push a lost reader back into step within a byte or two. The old byte-at-a-time drive could not tell the difference and did not need to; the moment the shifter became real, disks laid out here stopped being readable until the encoder wrote proper self-sync. Two tests were asserting that every byte off the head is a legal nibble, which was an artefact of handing over whole bytes: a head just put down is not in step, so the first bytes it assembles are two neighbours smeared together. They now check that the marks a sector begins with turn up, which is what the ROM is looking for too. Verified against the WOZ reference images, which the format's authors publish for exactly this and order by difficulty. The DOS 3.3 System Master boots, and so does The Apple at Play. Of the six copy-protected titles their readme lists as the next step, three -- Rescue Raiders, Sammy Lightfoot and Stargate -- reach their graphics and draw them; three do not get there yet. Ordinary .dsk and .nib disks still boot, and all 642 tests pass. Quarter tracking is still not modelled: the head moves in half tracks, so a disk that puts it between two of those cannot work yet. That is the most likely reason for the three that do not run, and it is the next thing. WOZ disks are read only. Writing one back means the WRIT chunk and an account of where the write splice falls. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGTyJ7dpf3LT6aU9icQwkV