# MAME 0.285 as a closed-box detector The binary only (its source is never fetched or opened here). One MAME process at a time, short windows, `nice` and `taskset -c 24-31` (built into `scripts/mame_trace.py`). ```sh MAME_ROMPATH=... python -I scripts/mame_trace.py starblad --cpu dspmaster --start 50 --window 0.25 MAME_ROMPATH=... python -I scripts/mame_trace.py winrun --cpu dsp --start 20 --window 0.25 MAME_ROMPATH=... python -I scripts/mame_trace.py starblad --snap 10 --start 0 --window 61 MAME_ROMPATH=... python -I scripts/mame_trace.py winrun --maps ``` MAME runs unthrottled to `--start`, a frame notifier then issues the debugger's `trace` command for one CPU (no `noloop` option; MAME's tracer still folds tight loops into "(loops for N instructions)" lines, which the script counts in full and reports as spins), stops it after `--window` and exits. Output: `reference/mame/-/T.trace` (git-ignored). Older outputs are moved to `trash/`, never deleted. ## Tags and state names (probed 2026-11-26 with a Lua script listing `manager.machine.devices`) | Kind | Tag | Device | State names | | --- | --- | --- | --- | | 68000s | `:maincpu`, `:slave`, `:gpu` (Winning Run) | m68000 | D0-D7 A0-A6 SP USP SR PC IR | | sound | `:audiocpu` | mc6809e | A B D X Y U S DP CC PC | | C65 | `:c65mcu:mcu` | hd63705z0 | A X S CC PC | | C68 | `:c68mcu:mcu` | m37450 | A X Y SP P PC IR | | DSP (Winning Run, Driver's Eyes) | `:namcos21dsp:dsp`, `:pcb_N:namcos21dsp:dsp` | tms320c25 | PC ACC P T AR0-AR7 STR0 STR1 STK0-STK7 DRR DXR TIM PRD IMR IFR GREG RPTC | | DSPs (C67 boards) | `:namcos21dsp_c67:dspmaster`, `:dspslave0`..`:dspslave3` | namcoc67 | as tms320c25 | ## Runs (2026-11-26; 0.25 emulated seconds each unless said) | Game | CPU | Start | Instructions | Per second | Spins | Host time | | --- | --- | ---: | ---: | ---: | ---: | ---: | | starblad | dspmaster | 20 s | 679,957 | 2.72 M | 89.0 % | 11.0 s | | starblad | dspslave0 | 20 s | 3,022,177 | 12.09 M | 71.3 % | 17.2 s | | starblad | dspslave1 | 20 s | 0 | 0 | - | 10.4 s | | starblad | main / slave | 20 s | 266,095 / 266,215 | 1.06 M each | 85 / 89 % | 10.4 s | | starblad | sound / c68 | 20 s | 124,823 / 132,574 | 0.50 / 0.53 M | 97 / 94 % | 10.2 s | | starblad | dspmaster | 50 s | 754,915 | 3.02 M | 91.9 % | 31.8 s | | starblad | dspslave0 | 50 s | 4,006,230 | 16.02 M | 47.0 % | 46.5 s | | starblad | main / slave | 50 s | 260,966 / 234,509 | 1.04 / 0.94 M | 65 / 43 % | 33 s | | winrun | dsp | 20 s | 2,034,003 | 8.14 M | 10.8 % | 19.7 s | | winrun | main / slave / gpu | 20 s | 185,364 / 189,179 / 227,784 | 0.74 / 0.76 / 0.91 M | 71 / 100 / 91 % | 6 s | | winrun | sound / c65 | 20 s | 163,022 / 36,219 | 0.65 / 0.145 M | 97 / 72 % | 6 s | Snapshots (`--snap`): Starblade at 20 s is the copyright screen with a few stars, at 50 s a full 3D scene (hence the second set of runs); Winning Run at 20 s is a race in progress. MAME's own speed with the debugger attached was about 2x real time for Starblade (its "Average speed" line), unthrottled on one of CPUs 24-31 of this machine while it was loaded. `--maps` (Lua `space.map.entries`) printed 154 entries for winrun and 193 for starblad ([memory-map.md](memory-map.md)). ## What MAME can and cannot decide here - **Can detect:** the 68000s', 6809's and MCUs' instruction streams from reset; DSP instruction streams on Winning Run (one DSP, MAME clock 40 MHz); pictures; the C140 and YM2151 write streams. - **Cannot judge:** DSP timing or work-sharing on the C67 boards (MAME runs one slave at 96 MHz and leaves three idle: OBSERVED); the renderer (MAME marks every set imperfect or preliminary); save states (MAME: unsupported for all 12 sets). - **Winning Run warns** "wr-g2b.4p / wr-g3.4s NOT FOUND (NO GOOD DUMP KNOWN)": two PALs are undumped, and MAME runs without them.