# Provenance audit Audit of 2026-11-13 (provenance wave 1), against the family charter's "Licences and provenance" section. The audit used this repository's own records (docstrings, comments, documents, pin lists, commit history). No GPL source was opened. `provenance_check.py` (pcengine-python) was run against the four **permissively licensed** pinned trees only: Clock Signal `Components/9918` (MIT), vrEmuTms9918 (MIT), f18a (BSD-3-Clause) and MAME 0.285 `src/devices/video` (`tms9928a.*`, BSD-3-Clause). It was not run against openMSX or vdp18 (GPL-2.0). ## Summary The core (`src/tms9918_python`) is written from TI's documents (the 1982 data manual, the Programmer's Guide, the 1980 symposium draft, Guttag's 1978 timing drawing and 1981-82 memos), Sean Young's hardware-tested `tms9918a.txt`, MacDonald's TMS9929A measurement (via Young) and VATT's hardware-run results, each cited at the line that uses it. MAME (BSD-3) is named where a default follows it. Nothing GPL is in the code. Two things need attention: the MAME palette in `validation/mame_replay.py` lacked its BSD-3 notice (fixed in this audit by a citation line), and one test reads openMSX's GPL source file at run time to compare its slot tables with ours. provenance_check results: Clock Signal 1 file pair (the MAME palette numbers, which Clock Signal also carries); vrEmuTms9918 none; f18a 3 pairs of common prose ("address is destroyed by writing to the VDP", "five or more sprites on" a line: phrases from TI and Young, not from f18a); MAME 5 pairs (the palette; `REGISTER_MASKS` `(0x03, 0xFB, 0x0F, 0xFF, 0x07, 0x7F, 0x07, 0xFF)`, which `tables.py` derives from TI figure 2-3 and which MAME's table agrees with; two prose phrases). None indicates copying beyond the palette. Verdicts (rows below): clean 8, cite 3, rewrite 0, unclear 2. The two unclear items and the docs "cite" row are settled in [Wave 2](#wave-2-2026-11-19) below. ## Per item | Item | Behaviour came from | Licence of source | Verdict | | --- | --- | --- | --- | | `src/tms9918_python/tables.py` | TI manual tables 2-2, 3-1, 3-3, figure 2-3; the 1978 drawing read by eye; Young; MacDonald | manufacturer; Young (licence not stated) as facts | **clean** (each table cites its page) | | `src/tms9918_python/tables.py`: slot schedules (`GRAPHICS_LINE`, `TEXT_LINE`, `REFRESH_LINE`) | transcribed from TI's 1978 drawing; equal at every slot to openMSX's `slotsMsx1*` tables, which are their author's reading of the same drawing | TI (tier 2); openMSX GPL-2.0 | **unclear**: the code says the drawing; the agent had openMSX's tables in hand (the test parses them), and the two agree exactly. Settled if the drawing reading is re-done without openMSX (for example from Vermaelen's prose page, whose text is cite-only, plus the drawing) and gives the same table; a mismatch would mean the transcription leaned on openMSX | | `MULTICOLOR_ONE_IN_FOUR` | TI 2.1.5's "one in four" read as openMSX does; kept for comparison only | TI / openMSX reading | **clean** (not used by the core's default) | | `src/tms9918_python/chip.py`, `frame.py`, `variants.py` | TI, Young, VATT, the 1982 memo; defaults named after MAME (BSD-3) or sms-python (family, MIT) where no hardware source exists | manufacturer, community, permissive | **clean**; the MAME constants (`VERT_DISPLAY_START_PAL = 13 + 51`, `m_reva`, `m_colourmask & 0xff`) are facts or names cited to a BSD-3 file | | `validation/mame_replay.py`: `MAME_PALETTE` | MAME 0.285 `tms9928a.cpp` | BSD-3-Clause | **cite**: done in this audit (source, licence and copyright holders now beside the table). The BSD-3 text should also ship with the repository if this file is distributed (add `LICENSES/BSD-3-Clause-MAME.txt` or a NOTICE file) | | `tests/test_rung0_tables.py::test_detector_openmsx_slot_tables` | regex-reads `reference/src/openMSX/src/video/VDPAccessSlots.cc` at run time | GPL-2.0 | **unclear (policy)**: nothing is copied or committed, but the test reads GPL source (and was written knowing its array names). Recommend deleting the test, or replacing it with openMSX run as a closed box (VATT under openMSX, compared with the same sheet) | | `validation/vatt.py` | VATT's protocol (256 slow writes, a fast burst at 12-31 T, slow read-back) described in prose and re-implemented here; results from the msxgl sheet | VATT CC-BY-SA-4.0; sheet no licence | **cite**: the protocol is a method, not copied code; credit VATT (aoineko) and its licence in the docstring as done, and never commit the sheet (already the rule). Do not paste VATT's Z80 loops into the repository (share-alike) | | `docs/schedule.md`, `docs/timing.md`, `docs/results.md` | the 1978 drawing; openMSX's page (cite-only) and its tables and comments quoted ("TMS9918 (MSX1) cycle numbers translated to V99x8 cycles") | TI; openMSX GPL-2.0 | **cite**: short quoted comment lines of GPL source are prose, but should be replaced by a description; mark openMSX "detector, tier 5, read" as history and "run, not read" from now on | | `validation/faults.py`, `png.py`, `speed.py`, `synthetic.py`, `tests/*` (other) | own work | - | **clean** | | `scripts/mame_vdp_log.py`, `mame_census.py`, `docs/mame-oracle.md`, `docs/consumers.md` | MAME run headless | own work | **clean** | | `scripts/fetch_references.py`, `pinned_repos.json`, `pinned_files.json` | pins with licences stated | - | **clean** | | `docs/chip.md`, `claims.md`, `api.md`, `handoff-brief.md`, `validation.md` | TI, Young, Guttag, VATT, MAME, openMSX as described | - | **clean** (the handoff brief already says the GPL trees were not built and their timing read only as detectors) | | Sean Young `tms9918a.txt`; TI internal memos from Guttag's archive | community text with no stated licence; TI internal documents | - | **clean** for facts, as the pins say ("cite, never copy") | No source file carries an SPDX header yet (family-wide owed item, not a provenance defect). ## Git history Fifteen commits, no remote. Only `.py`, `.md`, `.json`, `.toml`, `LICENSE` and `.gitignore` were ever committed: no captures, logs, ROM data or third-party files. ## Changes made in this audit - `validation/mame_replay.py`: added the source, licence (BSD-3-Clause) and copyright holders beside `MAME_PALETTE` (citation only). ## Wave 2 (2026-11-19) Rules: the family's wave-2 rewrite rules (no GPL source read; flagged code removed unread and rewritten from permitted sources). Chosen: **in place** (the flagged pieces were one block of tables and one test). The old schedule block (`tables.py` lines 133-223) was moved to the git-ignored `trash/wave2-old-schedule/` without being displayed, and the new code was written from TI's 1978 drawing, TI's 1982 manual and VATT's results only; openMSX, vdp18, Clock Signal, vrEmuTms9918 and f18a were not opened. | Item | Was | Now | Source | Verdict | | --- | --- | --- | --- | --- | | Slot schedules (`GRAPHICS_LINE`, `TEXT_LINE`, `REFRESH_LINE`, `EARLY_Y_SLOTS`, `_pattern_mode_line`, `_with_early_checks`, the horizontal-blank table) | `tables.py`, read from the drawing with openMSX's tables in hand; equal to them | `src/tms9918_python/_schedule.py`, each rule naming its drawing row (S1YY, T2YY, VVYY, CCYY, AAYY, DDYY-XXYY, NNYY-RRYY, HCPB, S7YY, T8YY, MMYY) and HCNT counts, tagged DOC; slot kinds moved there, re-exported by `tables.py` | TI 1978 drawing; TI 2.1.5, table 3-3 | **clean**. Equality check afterwards (scratch script, counts only): **0 differing slots** in all schedules and both early-check variants | | `MULTICOLOR_LINE` (= Graphics) / `MULTICOLOR_ONE_IN_FOUR` | `tables.py` | `_schedule.py`; default from VATT (MEASURED), one-in-four from TI 2.1.5 (DOC) kept aside | VATT; TI | **clean** (0 differing slots) | | Text start slot (character 0 at slot 3) | from the drawing | from TI table 3-3 (6-pixel shift) and the pattern modes' fetch-to-picture delay, because the drawing's text sub-counter labels do not tie it to HCNT unambiguously | TI table 3-3; drawing | **clean**, PROVISIONAL to one memory cycle | | `tests/test_rung0_tables.py::test_detector_openmsx_slot_tables` | regex-read openMSX's GPL source | deleted (4 parametrized cases; rung 0 now 30 tests) | - | **removed** | | `validation/faults.py` faults 5 and 27 | edited `tables.py` text | edit `_schedule.py` text; both still caught | - | **clean** | | `docs/schedule.md`, `timing.md`, `results.md` (and a line each in `claims.md`, `chip.py`, README) | quoted openMSX source comments; openMSX as a read detector | quotes replaced by one-line descriptions; openMSX marked "read under the old rule; run, never read, from 2026-11-19"; schedule stated as derived from TI's drawing alone, with the equality result | - | **clean** | Wave 2 gates (2026-11-19), before (move-aside baseline) and after: - Rungs 0, 1, 3 (CPython): 97 passed before; 93 passed after (the 4 missing are the deleted openMSX detector cases; rung 0 is now 30 tests). - Rungs 2, 4, 5 (VATT windows, MAME stream and whole-frame replays): 62 passed before (CPython, 56 min); 62 passed after (PyPy, 6 min). - Seeded faults (`validation/faults.py`, PyPy): 28 of 28 caught before and after; faults 5 and 27 now edit `_schedule.py`. ## 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. The openMSX pin (https://github.com/openMSX/openMSX @ `45f1726029658b996680f2629f37a81dcd2b0ff2`, GPL-2.0) keeps only `doc/internal/vdp-status-race*` (hardware result files); its VDP, sprite-checker and access-slot source left the sparse list. The ColecoVision_MiSTer pin (`rtl/vdp18`, GPL-2.0, `084cf4c8`) was removed. Both trees' source moved aside unopened, out of the repository (not deleted). Nothing built from or read them at run time any more (the slot-table test noted above is gone).