# Provenance Audit of 2026-11-13 (provenance audit, wave 1), against the family charter's "Licences and provenance" rules: nothing copied or transcribed from GPL/LGPL code; facts are usable, a second-hand fact when someone established it on hardware and says so in prose; GPL/LGPL programs may be run as closed boxes. This repository holds no module code: documents staged for snes-python's `docs/dsp/`, pin lists, fetch/build scripts, extractors and a C++ referee driver. The auditor did not open any GPL/LGPL source; it read this repository's files, pin lists and history and the licence headers of the pinned trees. **Headline:** the documents are, in large part, a prose-and-formula reading of blargg's snes_spc 0.9.0 `SPC_DSP.cpp` (LGPL-2.1), cited by line number, and the handoff brief tells the builder to read that file whole and write "a readable transcription of its behaviour". Under the restart rules that is the path that produced the three archived sound cores. The brief must change before anyone builds from it. ## Verdicts | Part | Where it came from | Source licence | Verdict | | --- | --- | --- | --- | | `docs/dsp/handoff-brief.md` "Read, in this order" item 2; "Decisions": "in snes_spc's operation order", "snes_spc 0.9.0 is the judge"; rung 0 "step table equal to `dsp_schedule.py`'s JSON (generated from the pinned source)", "docstring names its blargg operation"; rung 1 "snes_spc's `decode_brr` transcribed in the test"; decision 1 "defaulting to snes_spc's table" | snes_spc 0.9.0 | LGPL-2.1 | **rewrite**: tells a builder to read and transcribe LGPL code. Replace with: anomie's S-DSP doc (r1160/r1212), the SNESdev wiki (CC BY-SA, facts), spc_dsp6's hardware-verified test names, ares (ISC, notice kept) for anything code-shaped; snes_spc stays a closed-box referee (`spc_dump`) | | `docs/dsp/start-here.md` (BRR, interpolation, counter, envelopes, KON/KOFF, ENDX, noise, PMON, mixing, echo, FLG, reset) | mostly `SPC_DSP.cpp` with line citations (`:303-310`, `:312-340`, `:129-149`, `:206-284`, `:360-371`, `:425-447`, `:604-653`, `:703-735`, `:836-845` ...), cross-checked with anomie and spc_dsp6 test names; formulas in snes_spc's form (the 16-bit BRR filter table "p2 pre-shifted", `new_kon &= ~kon`, the interpolation and mix expressions) | LGPL-2.1 (snes_spc); anomie none stated; spc_dsp6 hardware-verified | **rewrite (docs)**: keep each fact where anomie, the wiki or a spc_dsp6 test states it in prose; drop the `SPC_DSP.cpp:` citations and the code-shaped formulas taken from it (anomie states the filters, interpolation and echo FIR in its own 15-bit form; ares is ISC). Behaviour that only snes_spc's code establishes becomes an item to settle by closed-box measurement against `spc_dump` | | `docs/dsp/timing.md` (the 32-step schedule) | `GEN_DSP_TIMING` (`SPC_DSP.cpp:750-783`) via `scripts/dsp_schedule.py`; ares `DSP::main()` has the same operations per step | LGPL-2.1; ares ISC | **unclear**: per-register step timings are hardware-verified by spc_dsp6's `Timing/*` tests (middle rule satisfied for those); the order of operations inside steps 2, 5, 8, 11, 14 and the operations no test names rest on code. Settle by taking the schedule from ares (ISC, notice kept; see the ares row) or from the test ROM's results, and drop the snes_spc line citations | | `docs/dsp/undocumented-behavior.md` (U1-U24, C1-C14), `interface.md`, `validation.md` | same mix: anomie, wiki, spc_dsp6, snes_spc code citations, Mesen2/bsnes/MAME source observations | as above | **rewrite (docs)**, same treatment as start-here.md | | `scripts/dsp_schedule.py` | parses `GEN_DSP_TIMING` out of the pinned LGPL file; its line 30 quotes an LGPL code fragment (`VOICE_CLOCK(V7_V4_V1) { ... }`) | LGPL-2.1 | **rewrite**: the quoted fragment goes; parse ares `dsp.cpp` (ISC) instead, or keep the tool as an LGPL-licensed tool outside anything the module's tests import | | `scripts/dsp_gauss_tables.py` | reads ten tables from the pinned trees (no table committed) and evaluates ares's power-on formula | tables: LGPL/GPL/snes9x/libopenspc (via anomie); formula: ares ISC | **cite**: fine as a measuring tool. The plan to generate the table from ares's formula is sound: the module's copy of that formula must carry ares's ISC notice. The table's origin (libopenspc, presumably measured) is unknown: U1 | | `scripts/dsp_referee/spc_dump.cpp`, `hooks.h`, `scripts/dsp_build_referees.py`, `dsp_run_referee.py` | own driver code linked with snes_spc 0.9.0 built from the pinned archive; the build inserts one line after an LGPL anchor line it quotes (`RAM [addr] = (uint8_t) data;`) | LGPL-2.1 (the built program) | **cite**: a referee tool, never shipped in an MIT package. Add a line to each saying the built `spc_dump` is an LGPL-2.1 combined work (charter rule 6) and the driver files may stay MIT. Closed-box use of the referee is allowed | | `scripts/dsp_make_spc.py` | own synthetic .spc writer (no game data) | - | **clean** | | `scripts/dsp_fetch_references.py`, pin lists | own | - | **clean** | Counts: clean 2, cite 2, rewrite 4 (brief, start-here, the other three docs as one, dsp_schedule.py), unclear 1 (the schedule's code-only parts). ## Lineage notes a builder needs - ares `sfc/dsp` is ISC on its face, and this repository's own pin note calls it "a rewrite of blargg's SPC_DSP into per-clock phases". Whether blargg's permission covers that relicensing is not recorded anywhere pinned here. Until a record turns up, treat ares `sfc/dsp` as **unclear**: use its facts and formulas (with the ISC notice), not its code wholesale. A permission record from blargg or byuu would settle it. - MAME's `s_dsp` is LGPL-2.1+ (the only independent lineage, OpenSPC): closed box only. - snes9x's licence is non-commercial: excluded from code. ## Git history Four commits, no deleted files, nothing removed that came from elsewhere. ## Other - The documents are staged for snes-python's `docs/dsp/`; if a copy already lives there it needs the same rewrite (outside this audit). - Citation fix made in this audit: `scripts/dsp_pinned_repos.json` MAME licence was "BSD-3-Clause / GPL-2.0+"; the files' own headers say `sound/s_dsp` LGPL-2.1+, `cpu/spc700` and `nintendo/snes_m.cpp` BSD-3-Clause. - No SPDX headers yet (family-wide pass owed). ## Wave 2 rewrite (2026-11-19) Done in place (the flagged pieces were documents and two scripts; there is no module code here). Nothing flagged was reused: the two scripts were moved aside unread (a git-ignored `trash/`), the documents rewritten from the permitted sources, and the referee driver rewritten against the library's documentation only. | Part | New source | New verdict | | --- | --- | --- | | `docs/dsp/handoff-brief.md` | rewritten: build from anomie, fullsnes, the wiki, spc_dsp6 names, ares formulas (ISC); snes_spc only a closed-box referee; rungs compare outputs; docstrings name anomie's S1-S9 | **clean** | | `docs/dsp/start-here.md` | every fact re-cited to anomie (section), fullsnes, the wiki or a spc_dsp6 test name; all `SPC_DSP.cpp` citations and its code-shaped formulas struck; snes_spc-only behaviour became open items settled by closed-box measurement (OBSERVED) | **clean** | | `docs/dsp/timing.md` | the schedule re-sourced per step from anomie's sample loop and register lists, fullsnes's timing chart and ares `DSP::main()`'s step order (ISC); spc_dsp6 Timing names per row; the S-SMP/DSP order (C14) now an OBSERVED convention, not a reading of snes_spc's code | **clean** (the "unclear" row is settled) | | `docs/dsp/undocumented-behavior.md`, `interface.md`, `validation.md`, `README.md` | the same treatment; C7 (anomie's Mednafen counter fragment) recorded as not used; validation.md's note that the MAME run's IPL ROM came from a non-commercial emulator's source kept as history, the method dropped | **clean** | | `scripts/dsp_schedule.py` | removed (moved aside unread); no replacement needed: the schedule is in timing.md and the module's tables, from anomie | **removed** | | `scripts/dsp_gauss_tables.py` | removed (moved aside unread); replaced by `scripts/dsp_gauss_formula.py`, which evaluates only ares's formula (ISC notice in the file) and reads no file | **clean (MIT AND ISC)** | | `scripts/dsp_referee/spc_dump.cpp` (until 2026-11-22; below), `scripts/dsp_build_referees.py`, `scripts/dsp_run_referee.py` | rewritten: the unmodified library, compiled whole, driven through the C functions `snes_spc.txt` documents; no patching, no internal names, the accuracy macro dropped; `hooks.h` removed; compiler diagnostics withheld (they quote library source); outputs samples, per-sample DSP registers (from the saved `.spc` image) and a final `.spc` | **cite**: MIT driver files; the built `spc_dump` is an LGPL-2.1 combined work (charter rule 6), never shipped | | `scripts/dsp_make_spc.py` | own; synced with snes-python's newer version (14 cases); SPDX added | **clean** | | `scripts/dsp_fetch_references.py`, pin lists | own; SPDX added; the SPC File Format v0.30 text pinned | **clean** | Measured after the rewrite: the unpatched referee reproduces the six Phase 0 audio hashes exactly (validation.md). One accidental exposure while rebuilding it: the first build printed a compiler warning that quoted one declaration line of the library's `SNES_SPC.h` (a 64 KiB RAM array); the build now suppresses and withholds diagnostics. Nothing was taken from it. ## History rewrite (2026-11-22, wave G) The family's history clean-up (wave G) removed `scripts/dsp_referee/spc_dump.cpp` from every commit with `git filter-repo`; every other change kept its commit. Linked with snes_spc (LGPL-2.1-or-later), the driver is a GPL tool by the family's rule of 2026-11-19 and the tool-repository decision of 2026-11-20 (tools go by licence type), which overrides the verdict above that the driver file may stay MIT here. It is kept with the family's other GPL tools (emu-tools-gpl, `tools/s-dsp-python`), and `scripts/dsp_build_referees.py` finds it at `$EMU_TOOLS_GPL/tools/s-dsp-python/spc_dump.cpp` (through `S_DSP_GPL_TOOLS` until 2026-11-24). Commit hashes cited from before that date refer to the old history, which is kept privately. ## Closed-box sources removed (2026-11-24) Aubrey's rule of 2026-11-24: an MIT repository does not download or keep the source of anything the family's `sources.md` marks closed box only, unless a program with no shipped build is built from it. Pins removed from `scripts/dsp_pinned_repos.json` and trees moved aside unopened, out of the repository (not deleted): bsnes (https://github.com/bsnes-emu/bsnes @ `78474e5d39f58872dc21aca18cf9eb583b147fe7`, GPL-3.0), Mesen2 (https://github.com/SourMesen/Mesen2 @ `b9fa69ddc6d0a331fb103fdb5eef6904305703c2`, GPL-3.0), snes9x (https://github.com/snes9xgit/snes9x @ `1bcc369e89f08243e0a462882fb1f3e42e51de3a`, non-commercial), game-music-emu (https://github.com/libgme/game-music-emu @ `f68963b1de0633149b05732113d3c3113c6f63a1`, LGPL-2.1), and MAME's `sound/s_dsp.*` (LGPL-2.1+) from the MAME sparse list. **Kept, with a question for Aubrey:** the snes_spc 0.9.0 archive (`scripts/dsp_pinned_files.json`, LGPL-2.1), because `scripts/dsp_build_referees.py` compiles it, unopened, into `spc_dump` (the referee) and no shipped build of that program exists. Whether the archive and the build move to emu-tools-gpl beside the driver is open. The built `reference/dsp/build/spc_dump` is outside the source tree and stays. **Settled later on 2026-11-24** (Aubrey: no MIT repository downloads or keeps closed-box source): the GPL tool snes-spc 0.1.0 fetches the archive by SHA-256 and builds the referee inside emu-tools-gpl. `scripts/dsp_run_referee.py` runs `$EMU_TOOLS_GPL/tools/snes-spc/build/spc_dump` (exit 3 naming `EMU_TOOLS_GPL` and its `build.sh` without it), `scripts/dsp_build_referees.py` only checks it, and the archive left `scripts/dsp_pinned_files.json` and the fetcher's unzip step. The archive, its unpacked tree, the old `reference/dsp/build/` and an old patched copy in `trash/reference-build/` were moved out of the checkout, unopened. Gate: the new binary has the old one's bytes (SHA-1 `6d1aba42`); `spc_dump FILE 64000 --regs --final` gave the same hashes of all three outputs on all 80 `.spc` files here (14 synthetic, 66 from games), and `dsp_run_referee.py --regs` the same output.