# ym2612-python's Nuked-OPN2 harness From the emulator family's ym2612-python repository: `validation/nuked_harness.c`, moved out on 2026-11-22 (wave G) as it stood at ym2612-python `ee8840a` (old history; `1324639` after the rewrite, without it). ## What it measures Per-clock left and right outputs, status reads and BUSY of a die-derived YM2612 and YM3438 model, for ym2612-python's register streams. OBSERVED (Nuked-OPN2 335747d). ## Who uses it ym2612-python, which finds this folder through `YM2612_GPL_TOOLS`. `validation/closed_box.py` (rung 6) compiles it into the git-ignored `validation/build/` against the Nuked-OPN2 files `scripts/fetch_references.py` fetches. ## Contents - `nuked_harness.c`: Drives Nuked-OPN2 through the calls its public header declares (chip type, reset, write, read, IRQ pin, clock). Commands on standard input set the chip type, write a byte to one of the four ports, read a port (the value and the IRQ pin go to standard error with the clock count) or advance a number of internal clocks; standard output carries two little-endian signed 16-bit outputs per clock. Upstream: Nuked-OPN2 (Nuke.YKT), LGPL-2.1-or-later, `335747d`. ## Licence and notices Our code (alewman), first published under MIT in ym2612-python (`../../notices/MIT-emulator-family.txt`); no SPDX line. Linked with Nuked-OPN2, 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) `nuked_harness.c` is now a one-line shim that includes the Nuked harness family's source (`../nuked/src/opn2_stream.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`.