# sn76489-python's Nuked-PSG harness From the emulator family's sn76489-python repository: `validation/nuked_harness.c`, moved out on 2026-11-22 (wave G) as it stood at sn76489-python `c471413` (old history; `f06cbed` after the rewrite, without it). ## What it measures The output of a die-derived SN76489-family PSG model at every tick, for sn76489-python's streams. OBSERVED (Nuked-PSG d15a168). ## Who uses it sn76489-python, which finds this folder through `SN76489_GPL_TOOLS`. `validation/closed_box.py` (rung 5) compiles it into the git-ignored `validation/build/` against the Nuked-PSG files `scripts/fetch_references.py` fetches. ## Contents - `nuked_harness.c`: Drives Nuked-PSG through the calls its public header declares (init, write, clock, output, test register, mute). Commands on standard input write a byte, set the test register or the mute mask, or advance a number of clock calls; after each clock call the model's output goes to standard output as a 32-bit float. Upstream: Nuked-PSG (Nuke.YKT), GPL-2.0-or-later, `d15a168`. ## Licence and notices Our code (alewman), first published under MIT in sn76489-python (`../../notices/MIT-emulator-family.txt`); no SPDX line. Linked with Nuked-PSG, the built harness is GPL-2.0-or-later. 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/psg_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`.