# MAME as a detector (closed box, tier 5) MAME 0.285's `nds` machine ("DS", not working; source `nintendo/nds.cpp`, BSD-3-Clause by its licence line, kept closed as decided for psx-python's BSD-3 files until Aubrey says otherwise). The CPU trace recipe, its run and its quirks are in arm946es-python's docs/mame-oracle.md (`../arm946es-python/scripts/mame_trace.py`). What the board adds: ## What MAME's nds has (run 2026-11-26) - Devices: `arm7` (33.51 MHz), `arm9` (ARM946ES, 67.02 MHz), two address-map banks for the WRAM (`mame -listdevices nds`). - **No screen and no media**: `mame -listmedia nds` lists none; a snapshot taken after 300 and 600 frames (Lua `manager.machine.video:snapshot()`, `-snapshot_directory snap`) is MAME's "No visual output. No available internal or external artwork, and/or no screens attached to the system." Recipe: ```sh cd tests/mame_traces # git-ignored nice mame nds -rompath "$MAME_ROMPATH" -video none -sound none -nothrottle -noreadconfig \ -skip_gameinfo -snapshot_directory snap -autoboot_script snap.lua -seconds_to_run 30 ``` with `snap.lua`: ```lua frames = 0 sub = emu.add_machine_frame_notifier(function() frames = frames + 1 if frames == 300 or frames == 600 then manager.machine.video:snapshot() end if frames == 600 then manager.machine:exit() end end) ``` (4.2 s wall time; "Average speed: 274.67%".) - The run logs the ARM7's last steps: `ARM7: 00080000 to IE`, `ARM7: 04000000 to IME`, `ARM7: 00000001 to IME`, `arm7: HALT`; the ARM9 polls a halfword in its BIOS for the whole frame (arm946es-python mame-oracle.md). The boot stops before the firmware runs. (`ARM7: ... to IE/IME` are MAME's own log lines from its driver; the values are what the BIOS wrote.) ## What it can and cannot decide - It **can** serve the cores' rung-2 lockstep over the first instructions of both BIOSes. - It **cannot** judge anything of the board: no video, no 3D, no sound output, no cartridge, no firmware boot; timing is a flat 3 cycles per instruction (OBSERVED). MAME is the weakest DS detector in reach. Stronger detectors (melonDS, DeSmuME, NooDS) are GPL and would be built and run from emu-tools-gpl if ever needed (validation.md); none is built tonight.