# CPU cores: what exists, what each needs The chip rule: CPUs always get their own core repository; the board pins each by commit and never copies code. Counts are machines in scope (175, [census.md](census.md)). | CPU | Where | Machines | Family core (state, 2026-11-26) | What the board needs from it | | --- | --- | ---: | --- | --- | | MC68000 @ 10-16 MHz | every main CPU but Act-Fancer's; Thunder Zone's second CPU | 169 | **m68000-python** (`55d3d60`; public, v0.1.0; m68000-rust, m68000-rust-fast) | bus callbacks per cycle with the board's wait states (DTACK), autovectored IPL interrupts (the board's vblank and its MB8421 / MCU lines), a reset line. The same contract system16-python and megadrive-python use: nothing new expected; confirm against its README when wiring | | HuC6280 @ 1.34-8.06 MHz | sound CPU (dec0 HuC sets, madmotor, 77 deco16), protection CPU (Robocop, Hippodrome), main CPU (Act-Fancer, Trio the Punch) | 106 | **huc6280-python** (`684ec86`; 0.4.0; huc6280-rust, huc6280-rust-fast) | the CPU as it is (21-bit mapper, `CPUFrame` bus callbacks, `IRQ_LINE`s). **Not in the core: the on-die timer, the $1400 interrupt controller, the I/O port and the PSG**: they are in pcengine-python's `cpu_io` and `psg` packages, written to move "into a core or a repository of its own if a second consumer appears (a Data East arcade board's HuC6280)" (its `cpu_io/__init__.py`). This board is that consumer (decision 4) | | 65C02 @ 1.5 MHz ("65C02A"; MAME: Rockwell R65C02) | dec0 sound | 24 | **w65c02-python** (`fca677f`; w65c02-rust): rows `R65C02` (bit instructions, captured on a real Rockwell R65C02), `G65SC02` (none), `W65C02S` | the row for the part fitted. MAME's choice and the manual's "65C02A" agree it is CMOS; which maker is U5. Default `R65C02` (MAME's), marked provisional | | NMOS 6502 @ 1.5 MHz | karnov, stadhero, actfancr sound | 17 | **6502-python** (`81e0eb6`, imports as `sixfiveohtwo`; 6502-rust) | the plain `CPU6502` with bus callbacks, NMI/IRQ | | i8751 @ 8 MHz (and i8031) | dec0, karnov protection | 16 | **none**: `mcs51-python` proposed by system16-python, wanted by segasys1-python and irem-python | the 8751 row: 4 KB internal ROM, ports as callbacks, the external interrupt and timer pins; 12 clocks a machine cycle (MCS51). Decision 5 | | Z80 @ 3-5 MHz | deco16 sound on 10 machines (Double Wings, Super Shanghai, bootlegs), dec0 bootlegs, the `tumbleb` boards | 30 | **z80-python** | nothing new | | MC6809E @ 1.34 MHz | Lemmings sound | 1 | **m6809-python** (Phase 0, documents only) | a core; a late row, no hurry | | 68705R3/U3, AT89C52/87C52, PIC16C57 | bootleg MCUs | 9 | none (the 87C52/AT89C52 are MCS-51 parts: mcs51-python rows later) | out of scope until the originals run | | ARM (DE102 and others), SH-2 | the out-of-scope 32-bit boards | 62 | arm7tdmi-python is a later ARM; sh2-python exists | a sibling board's question (decision 2) | ## The new core this board asks for Only **mcs51-python** (already proposed three times). Its Phase 0 should take this board's needs into its brief: the 8751's port reads and writes as board callbacks, the 4 KB internal EPROM from the set's `mcu` region, and a lockstep gate against MAME's `:mcu` trace (the recipe in [mame-oracle.md](mame-oracle.md), with `pc,a,sp,psw`, not `acc`). ## Not a CPU core, but on a CPU's die The HuC6280's timer, interrupt controller and PSG are one die with the CPU. Recommendation (decision 4): extract pcengine-python's `cpu_io` and `psg` packages with history into huc6280-python (as `huc6280.onchip` beside the CPU: one die, one repository), pinned by both boards; the alternative is a separate `huc6280-io-python`. Either way the extraction starts in pcengine-python, with its tests, before this board's sound milestone.