# s-dsp-python's S-DSP referee driver From the emulator family's s-dsp-python repository: `scripts/dsp_referee/spc_dump.cpp`, moved out on 2026-11-22 (wave G) as it stood at s-dsp-python `fbd0be9` (old history; `740e97b` after the rewrite, without it). snes-python holds the same file (`../snes-python/`); the two are kept apart until the refactor. ## What it measures The S-DSP's output samples and registers for synthetic and game .spc files. OBSERVED (snes_spc 0.9.0). ## Who uses it s-dsp-python, which finds this folder through `S_DSP_GPL_TOOLS`. `scripts/dsp_build_referees.py` compiles it with the library into the git-ignored `reference/dsp/build/spc_dump`; `scripts/dsp_run_referee.py` runs it. ## Contents - `spc_dump.cpp`: Plays an .spc file in blargg's snes_spc 0.9.0, through only the C functions the library's documentation describes, and writes every 32 kHz output sample, unfiltered, as little-endian 16-bit left and right pairs; optionally the 128 DSP registers after every sample, and the final state as an .spc file. Upstream: snes_spc 0.9.0 (blargg), LGPL-2.1-or-later, the archive of 2007-04-17 by SHA-256 `dbad8273...83aed`. ## Licence and notices Our code (alewman), first published under MIT in s-dsp-python (`../../notices/MIT-emulator-family.txt`; its SPDX line says MIT). The built program 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`). Nothing here has been refactored onto the shared contract yet (`emu-tools/docs/contract.md`); that is the next job. ## Regrouped (2026-11-24) `spc_dump.cpp` here is now a relative link to `../snes-spc/spc_dump.cpp` (the same bytes as the copy it replaced, and as snes-python's): the tool `../snes-spc` (snes-spc 0.1.0) fetches the pinned archive and builds `$EMU_TOOLS_GPL/tools/snes-spc/build/spc_dump` itself, so the consumer no longer needs the archive (`../snes-spc/README.md`, "For consumers").