# ym2151-python's Nuked-OPM harness From the emulator family's ym2151-python repository: `validation/opm_ref.c`, moved out on 2026-11-22 (wave G) as it stood at ym2151-python `2d134f6` (old history; `1db1f52` after the rewrite, without it). ## What it measures Cycle-level output of a die-derived YM2151 (and its YM2164 mode) for ym2151-python's probes and MAME taps. OBSERVED (Nuked-OPM f209e6e). ## Who uses it ym2151-python, which finds this folder through `YM2151_GPL_TOOLS`. `validation/build_referee.sh` builds it into the git-ignored `reference/build-referee/`; `scripts/referee_probe.py`, `referee_measure.py`, `referee_freq.py`, `referee_survey.py` and `replay_tap.py` run it. ## Contents - `opm_ref.c`: Calls only the public functions of Nuked-OPM's header. Reads an event file of timed writes, runs a number of cycles as a YM2151 or a YM2164, and writes one record per cycle (or per stride of cycles) to an output file. Upstream: Nuked-OPM (Nuke.YKT), LGPL-2.1-or-later, `f209e6e`. ## Licence and notices Our code (alewman), first published under MIT in ym2151-python (`../../notices/MIT-emulator-family.txt`; its SPDX line says MIT). Linked with Nuked-OPM, the built harness is an LGPL-2.1-or-later combined work. Upstream code is not committed here, except where a file above says it carries upstream lines; each tool fetches and builds its upstream at the pin from the consuming repository. This repository is GPL-3.0-or-later (`../../LICENSE`). ## Outputs Every value these tools give is a closed-box measurement: tag it OBSERVED with the upstream and its pin, and let any document or hardware measurement overrule it (`emu-tools/docs/wall.md`). The family behind the shim, `../nuked`, gives the contract's manifest and command line (`emu-tools/docs/contract.md`); the shim keeps the old formats. ## Now a shim (2026-11-23) `opm_ref.c` is now a one-line shim that includes the Nuked harness family's source (`../nuked/src/opm_events.c`; nuked-harness 0.1.0, `../nuked/README.md`), so this consumer's own compile command builds the same program: the stripped binaries are identical, and the consumer's closed-box run gave the same output before and after the regrouping. The family also fetches and builds the model at its pin (`../nuked/build.sh`) and runs it on the contract's command line (`../nuked/run.py`); how the consumer moves to it is in `../../docs/consumer-migration.md`.