# The MAME recipe (run 2026-11-26, MAME 0.285) MAME is a closed box here, tier 5, a detector. Its Oric files carry `license:BSD-3-Clause` (the first 300 bytes of each, through raw.githubusercontent.com at tag `mame0285`): `mame/tangerine/oric.cpp`, `bus/oricext/{oricext,microdisc,jasmin}.cpp`, `machine/6522via.cpp`, `sound/ay8910.cpp`, `lib/formats/{oric_tap,oric_dsk}.cpp`, `cpu/m6502/m6502.cpp`. Nothing else of MAME's source was read or fetched; the brief keeps it closed (decision 9). `hash/oric1_cass.xml` is CC0-1.0. ## Devices (`mame -listdevices orica`, `oric1`) `maincpu` MOS Technology 6502 @ 1.00 MHz; `via6522` MOS 6522 VIA @ 1.00 MHz; `ay8912` AY-3-8912A PSG @ 1.00 MHz; `screen` @ 6.00 MHz; `cassette`; `centronics` with a printer; `ext` (the expansion connector: `oric_microdisc`, `oric_jasmin`). Screen (`-listxml`): 240 x 224 visible, htotal 384, vtotal 312, 50.080128 Hz. No ULA device is listed. ## Commands ```sh python -I scripts/mame_trace.py --snap 4 # Atmos, untraced, PNG after 4 s python -I scripts/mame_trace.py --snap 4 --driver oric1 python -I scripts/mame_trace.py --frames 150 # 6502 traced, ~3 s (12 s wall) ``` Flags as in the script: `-video none -sound none -nothrottle -noreadconfig -skip_gameinfo -log -seconds_to_run N -autoboot_script run.lua`, plus `-debug -debugger none` to trace; the Lua traces `:maincpu` (`pc,a,x,y,p,sp,totalcycles`) and puts a write watchpoint on $0300 (16 bytes). One process at a time, `nice`, CPUs 24-31. ## Results | Run | Result | | --- | --- | | `--snap 4` orica | "ORIC EXTENDED BASIC V1.1 / (c) 1983 TANGERINE / 37631 BYTES FREE / Ready", CAPS in the status line | | `--snap 4` oric1 | "ORIC EXTENDED BASIC V1.0 ... 47870 BYTES FREE / Ready" | | `--frames 150` orica | **812,342 instructions in 2,995,197 cycles** (3.69 cycles an instruction; 1,000,000 cycles a second); first instruction at $F88F at cycle 8; 2,550 VIA writes | VIA writes (OBSERVED): none before cycle 2,312,654 (the RAM test takes 2.3 s); then DDRB $F7, DDRA $FF, ORA $B7, PCR $DD, IER $7F, ACR $00, the PSG set-up through PCR toggles ($DD/$FD/$FF), ACR $40 (T1 free-running), T1 latch and counter $2710 (written to $0306/$0304 then $0307/$0305), IER $C0, then an `IFR <- $40` every 10,000 cycles: the 100 Hz tick. ## Traps met 1. MAME's screen is a fixed 312-line, 50.08 Hz raster in its XML; the ULA's 60 Hz mode (264 lines) is not visible there (ula.md C1): test before trusting MAME on a 60 Hz program. 2. The Atmos snapshot at 4 s caught the cursor in its off phase; compare snapshots at a fixed instruction count, not a fixed time. 3. The RAM test runs ~2.3 s before any I/O; a boot lockstep must cover at least 2.5 s.