# MAME as a detector for the board (closed box, tier 5) MAME 0.285 (`mame -version`: "0.285 (unknown)"). Machines: `channelf` (BIOS options `sl31253`, `sl90025`; `sl31254` always), `channlf2`, and the PAL clones `sabavdpl`, `luxorves` (of `channelf`) and `sabavpl2`, `luxorvec`, `itttelma`, `ingtelma` (of `channlf2`). Source `fairchild/channelf.cpp`. **Closed box.** Only `// license:` lines were read, through the GitHub API at tag `mame0285` (2026-11-26): | File | Licence line | Authors | | --- | --- | --- | | `src/mame/fairchild/channelf.cpp`, `channelf.h`, `channelf_a.cpp` (sound) | **GPL-2.0+** | Juergen Buchmueller, Frank Palazzolo, Sean Riddle | | `src/devices/bus/chanf/slot.cpp`, `rom.cpp`, `rom.h` (cartridge slot and types) | BSD-3-Clause | Fabio Priuli | | `src/devices/cpu/f8/f8.cpp`, `f8.h`, `f8dasm.cpp` | BSD-3-Clause | Juergen Buchmueller | | `src/devices/machine/f3853.cpp`, `f3853.h` | BSD-3-Clause | Wilbert Pol, hap | The driver and its sound are GPL and stay closed under any decision. The BSD files would be "code OK with notice" by the family's rules; they stay closed tonight (f8-python Open decision 3; here Open decision 5). The software list `hash/channelf.xml` is **CC0-1.0** (its header, read through the API): its titles, SHA-1s and `slot` features may be used as data. ## The recipe (run 2026-11-26) ```sh export MAME_ROMPATH="" # channelf.zip python -I scripts/mame_run.py --frames 300 --out tests/mame_traces/io-bios.log # WRITES 32207 FRAMES 300 TIME 4.956161 python -I scripts/mame_run.py --frames 300 --cart "$NO_INTRO_DIR/Fairchild - Channel F/.zip" \ --out tests/mame_traces/io-<title>.log ``` The script writes `tests/mame_traces/run.lua` and runs, in `tests/mame_traces/` (git-ignored): ``` nice mame channelf -bios sl31253 -rompath "$MAME_ROMPATH" -video none -sound none -nothrottle \ -noreadconfig -skip_gameinfo -snapshot_directory snap -autoboot_script run.lua \ -seconds_to_run N [-cart <image extracted to a temporary file>] ``` The Lua installs `cpu.spaces["io"]:install_write_tap(0x00, 0xff, ...)` and writes one line per port write, `frame port value` (hex), counts frames with `emu.add_machine_frame_notifier`, and at the last frame takes `manager.machine.video:snapshot()` (a PNG works even with `-video none`) and exits. (Lua's `io` name is shadowed by the address space, so the script saves `io.open` first.) Runs (300 frames each, 4.956 emulated seconds): | Run | Writes | Port 00 | 01 | 04 | 05 | Screenshot | | --- | ---: | ---: | ---: | ---: | ---: | --- | | BIOS alone | 32,207 | 15,652 | 7,525 | 7,525 | 1,505 | "G?" prompt, grey background | | Maze (USA) | 32,211 | 15,653 | 7,526 | 7,526 | 1,506 | "G?" on green | | Schach (Germany) | 49,381 | 19,209 | 10,700 | 9,897 | 9,575 | "SABA VIDEOPLAY SCHACH COMPUTER" | | Hangman (USA) | 50,991 | 24,812 | 12,252 | 12,273 | 1,654 | gallows and "GAME?" | 300 frames in 4.956161 s = **60.53 Hz** (MAME's NTSC raster; video.md C1). No writes to ports 6/7 (the BIOS PSU's timer and interrupt control), 0Ch-0Fh (an F3853), 20h/21h or 24h/25h (the RAM cartridges) happened in these windows: the cartridge RAMs are used later in play, so a run with scripted input is the next step (MAME's Lua can press inputs through `manager.machine.ioport`). ## What MAME can and cannot decide - **Detects:** the port write sequence a program makes (exactly what the board's ports must receive), pictures to compare at the frame level, the cartridge kinds. - **Cannot decide:** video timing (its 60.53 Hz and 15.98 kHz are its own model), the VRAM write window (VW: MAME draws pixels that a real console drops), colours (its palette is a choice), the tone frequencies and envelope, the port pin model, the per-chip F8 registers. It is never a judge.