# What MAME can and cannot tell the Gekko core MAME 0.285 (the `mame` binary on the PATH, or `$MAME`; closed box, tier 5). Everything here was run on 2026-11-26. ## MAME has no Gekko - `mame -listxml gcjp`: the GameCube driver (`nintendo/gamecube.cpp`, clones `gcus`, `gceu`, `gcbr`) is a skeleton whose CPU is an **"IBM PowerPC 603" at 4.85 MHz**, status preliminary. Run, it stops at once: `Fatal error: :maincpu: PPC: serial clock (3686400) must not be more than half of the system clock (4850000)` (OBSERVED; gamecube-python tests/detectors/mame-probe-2026-11-26.txt). - MAME's PowerPC devices (`ppccom.cpp`): 601, 602, 603, 603e, 603r, 604, 4xx, 740, 750. None has paired singles, GQRs, the locked cache, DMA or the write-gather pipe. - `triforce` (sega/triforce.cpp, the arcade board built on GameCube hardware) is also a skeleton with the same 603 device at 64 MHz, but it starts, so it carries the recipe. ## The recipe that ran (scripts/mame_trace.py) 1. Boot `triforce` headless (`-video none -sound none -nothrottle -noreadconfig -skip_gameinfo -debug -debugger none -log`), its boot ROM read in place from `$MAME_ROMPATH`. The boot ROM's code is never traced. 2. A Lua autoboot script, at the first frame: writes our own 17-word program (assembled by the script from the PEM's encodings) to RAM at 0x3000; sets two breakpoints, one at 0x3000 that switches the trace on (`trace T.trace,:maincpu,noloop,{logerror ...}`) and one at the closing `b .` that switches it off; sets `msr = 0` and `pc = 3000`. 3. After two more frames MAME exits; the script compares the final registers with values computed from the PEM's definitions. Result: 18 trace lines; **11 of 11 integer results agree with the PEM** (`addic.`, `subfc`, `addo.`, `mullw`, `mulhw`, `divw`, `divwu`, `rlwinm`, `cntlzw`, `srawi`, `add.`), CR = 0x90000000 and XER = 0xC0000000 (SO and OV set by `addo.`, CA clear after `srawi`), which is what the PEM predicts (tests/detectors/mame-ppc603-integer-2026-11-26.txt). Lessons (first runs, moved to `trash/`): by the first frame the boot ROM has turned address translation on, so the first attempt ran into the 603's TLB-miss vector at 0x1000 (a 603 has a software-reloaded TLB; the Gekko, like the 750, walks the page table in hardware); setting `msr = 0` fixed it. A breakpoint, not the Lua frame hook, must start the trace, or the trace can catch boot-ROM code: the first run did, its log was moved aside unread. The state symbols are `R0`-`R31`, `CR`, `XER`, `LR`, `CTR`, `MSR`, `PC`, `F0`-`F31`, `FPSCR`, `SR0`-`SR15`, `SRR0/1`, `SPRG0-3`, `DEC`, `TBL`, `TBH`. ## What it is good for A detector for rung 1 (integer UISA) and part of rung 2 (exceptions a 603 shares with the 750), on programs we write. Not for: anything Gekko-specific, the 750's implementation choices (the 603 differs: software TLB reload, no L2), floating-point corner cases (unchecked here), timing.