A whole machine fits in your head
Fifty-six instructions. Sixty-four kilobytes of address space. This is the last generation of computer one person can hold completely — every cycle, every flag, every documented quirk.
Twenty-nine builds that start at LDA #$48 and end with a cycle-accurate 8-bit computer running real software on your desk. No hand-waving, no copied source, no chapter you cannot compile.
NO COIN REQUIRED — THE WHOLE BOOK IS FREE ON THE WEB
// 0x6D ADC absolute — 4 cycles fn adc(&mut self, bus: &mut Bus, mode: Mode) { let m = self.operand(bus, mode); let c = u16::from(self.p.contains(Flags::C)); let sum = u16::from(self.a) + u16::from(m) + c; let out = sum as u8; // V: the result’s sign disagrees with BOTH inputs self.p.set(Flags::V, (self.a ^ out) & (m ^ out) & 0x80 != 0); self.p.set(Flags::C, sum > 0xFF); self.a = out; self.set_zn(out); }
Fifty-six instructions. Sixty-four kilobytes of address space. This is the last generation of computer one person can hold completely — every cycle, every flag, every documented quirk.
Ownership, traits, exhaustive matching and wrapping arithmetic land differently when the compiler is stopping you corrupting a machine you can watch running.
Decimal-mode overflow. The indirect-jump page wrap. Why BRK pushes PC+2. Written up as they were found, not tidied away afterwards.
Every build ends with something on screen and a test that proves it.
… PLUS SEVENTEEN MORE, THROUGH DECIMAL MODE, CONFORMANCE, CYCLE COUNTING AND THE FINISHED APPLICATION.
The book hands you the same conformance suites the emulator-writing community has used for years, and a scorecard you fill in as you go. You finish knowing exactly which corners of the chip you have proved and which you have not.
Test suites by Klaus Dormann, MIT licensed, used with attribution. Nothing here is derived from another emulator’s source.
The CPU, the bus, the debugger. Everything else is built on this.
SHIPPINGVideo, sound, keyboard and a filing system. Volume two.
IN PROGRESSThe same core, a very different machine around it.
QUEUEDSpectrum, Amstrad, Game Boy. A new core, the same method.
ON THE MAPBuy a copy when it has earned it. That is the deal, and it is the reason this project exists in the shape it does.
The complete book on the web. All twenty-nine builds, every listing. No account, no wall, no email required.
READ NOW6502 Construction Set in print, plus DRM-free PDF and EPUB and the full reference appendices.
PRE-ORDERThe book, graded exercises with an autograder, the conformance harness, and the build channel.
JOIN THE LISTBuild 01 — hello world in 6502 assembly, on an emulator you wrote yourself — lands in your inbox tonight. One email a month after that.