# MAME 0.285 as a detector The binary is the installed `mame` (`0.285 (unknown)`). The Game.com driver's files (`src/mame/tiger/gamecom.cpp`, `gamecom.h`, `gamecom_m.cpp`, `gamecom_v.cpp`, Wilbert Pol and Robbbert) are `license:BSD-3-Clause` (first lines read 2026-11-26, tag `mame0285`). They stay closed (decision 4); the CPU's trace recipe is in sm8521-python's mame-oracle.md. ## What MAME says it runs (`mame -listxml gamecom`, `-listmedia gamecom`) CPU "Sharp SM8500" at 5,529,600 Hz; sound: a speaker, an "8-Bit R-2R DAC" and two "4-Bit R-2R DAC"s; screen LCD 200 x 160 at 59.732155 Hz; two cartridge slots (`cart1`, `cart2`, `.bin`/`.tgc`); ROMs `internal.bin` (4 KB) and `external.bin` (256 KB). Inputs (Lua port list): `IN0` Up, Down, Left, Right, Button A, Menu, Pause, Sound; `IN1` Button B, Button C; `IN2` Button D, Reset, Stylus press. ## The recipe (run) ```sh MAME_ROMPATH=... python -I scripts/mame_run.py --frames 300 MAME_ROMPATH=... python -I scripts/mame_run.py --frames 1200 --press "400::IN0:Button A" \ --cart "$NO_INTRO_DIR/Tiger - Game.com/Centipede (USA).zip" ``` runs, in `tests/mame_traces/gamecom-/` (git-ignored), MAME with `-video none -sound none -nothrottle -noreadconfig -skip_gameinfo -snapshot_directory snap -autoboot_script run.lua`. The Lua script taps CPU writes to 0010-007F (logged with time, address, value) and counts writes to A000-DFFF and E000-FFFF; a frame notifier presses buttons if asked, then saves a screenshot and exits. ## Runs 2026-11-26 (`tests/detectors/mame-gamecom-2026-11-26.txt`) 1. **Firmware alone, 300 frames:** the Tiger splash screen at frame 300 (screenshot kept in the git-ignored directory: Tiger's artwork). Register writes include SYS = 46h, CKC = A3h, LCH = 07h, LCV = 27h, LCC alternating B0h/F0h, DMC 3,652 times, SGC = 88h and SGDA 31,384 times, TM1C/TM1D, MMU1-MMU4 (never MMU0). **0 CPU writes to VRAM**; 149,772 to E000-FFFF. 2. **Centipede in slot 1, 900 and 1,200 frames, Button A pressed at frame 400 in the second:** the firmware's menu (Cartridge, Phone Book, Calendar, Calculator, High Score, Solitaire) at the end of both runs: the cartridge was not started. The menu is chosen with the stylus; MAME's Lua port list showed no stylus position field, so this Phase 0 could not start a cartridge headless (U17). Caution on counts: the tap also saw SPH/SPL/PS0/PS1 written about 3.96 M times in 300 frames, more than the instructions executed: MAME routes internal CPU updates through the same space, so tap counts on 0010-001F are not firmware stores. ## What MAME can and cannot decide - **Can detect:** register writes and their order; which registers the firmware uses and with what values (a guide to what to build first); pictures at matching points; the DMA patterns the firmware relies on. - **Cannot decide:** the frame rate (its 59.73 Hz disagrees with DS's formula, C2), the touchscreen and slot wiring as hardware facts (it is someone's model), the DMA's speed, grey levels, sound levels.