# Documents Read in this order. | Document | What it holds | | --- | --- | | [start-here.md](start-here.md) | The MB88xx as the core will model it: the family and its four variants, 4-bit A/X/Y, RAM at `(X << 4) + Y`, the 6-bit PC inside a 64-byte page with PA beside it, the ST skip/status model and why there are no conditional branches, the 4-deep stack and the three flag bits it hides, ST/Z/C/V/S/I, **all 256 opcodes** with mnemonics, operands, cycles and flag effects, the interrupt entry sequence and its vectors, both timer clock sources, the serial port, the output PLA's two mask-option modes, and reset state. Transcribed from the Fujitsu MB8840/40H datasheet (TM336-A871, 1987) and MAME's BSD-3-Clause `mb88xx.cpp`/`.h`/`mb88dasm.cpp`, with the licence position stated up front. | | [timing.md](timing.md) | The six-clocks-per-instruction-cycle rule and its two independent statements in the datasheet, the complete per-opcode cycle table (two values and no third), the mask-option prescaler and why it does not bite, what the Namco parts run at (1.536 MHz → 256 kHz on both Galaga and Pole Position hardware), the derived constants — exactly 12 Z80 T-states per MCU cycle, 4,224 MCU cycles per Galaga frame — and three ways to schedule an MCU against a Z80 timeline. | | [namco-customs.md](namco-customs.md) | What each Namco custom is: 50xx, 51xx, 52xx, 53xx, 54xx and the 06xx bus controller that feeds them. MCU type, ROM name, size, CRC32 and SHA-1 (hashes only, never bytes), pin wiring, command protocol, and which games use which. Galaga-specific protocol detail is cited from `../emu-galaga`'s `docs/custom-io.md` rather than re-derived. | | [validation.md](validation.md) | The oracle-tier rule; the evidence that **no hardware-captured MB88xx corpus exists** and why one structurally cannot; every oracle with tier, licence, URL, coverage and limits; MAME's four acknowledged guesses named with the source text that marks them; the one code path MAME's authors *did* hardware-correct; and the five gates in order. | | [mame-oracle.md](mame-oracle.md) | The verified recipe for tracing a Namco MCU headlessly out of MAME 0.285: command line, Lua script, output format, the `curflags` bit map, six gotchas, three real runs with their numbers, and what those numbers confirm about the hardware. Re-run from scratch on 2026-09-12. | | [handoff-brief.md](handoff-brief.md) | The brief for the session that builds the core: the context including emu-galaga's open question, the task and host contract, four milestones each with an acceptance test in oracle-tier order, constraints, and what done looks like. | Scripts: [`scripts/mame/trace_mcu.lua`](../scripts/mame/trace_mcu.lua) and [`scripts/mame/trace_mcu.sh`](../scripts/mame/trace_mcu.sh) are the trace recipe as runnable files. Both were executed as shipped before this document was written. Nothing in this repository is generated by a tool that needs installing: the only dependency of the trace recipe is MAME 0.285 and a ROM set read in place.