# Provenance ## Licence provenance (audit 2026-11-13) Audit against the family charter: an MIT project takes nothing copied or transcribed from GPL/LGPL code, and GPL emulators are run as closed boxes, their source not opened while writing the code it would inform. The 7800's GPL emulators (ProSystem, JS7800, A7800DS, test7800) appear here only as closed-box detectors and, for the cartridge census, as data files parsed at run time from the ignored `reference/` tree (never committed, "No row comes from a GPL table", `cartridge/table.py`). MAME's 7800 files are BSD-3-Clause (`a7800.cpp`, `maria.cpp`, `bus/a7800/*`, `machine/mos6530.cpp`, read from the files' first two lines), so citing and using them is allowed with the notice. The MiSTer core (k7800, Jamie Blanks) is MIT per its LICENSE and per-file headers. The audit read this repository's files, commits and pin records only, plus the licence header lines named above. `provenance_check.py --repo src --reference reference/src/Atari7800_MiSTer/rtl` (MIT) found one pair: `cartridge/a78.py` and `cart.sv` share the controller names of the A78 header specification (prose; both take them from the spec). No GPL source was opened. **Firmware:** no BIOS is shipped; `machine.py` finds the player's own copy by SHA-256. (House-rule note: `machine.py` `MAME_SETS` names a machine path and a mirror; the family rule is `MAME_ROMPATH`.) | Module | Behaviour source | Licence of source | Verdict | | --- | --- | --- | --- | | `maria.py` | [GLD] TIA-MARIA gate-level diagrams (Atari/GCC), [SG], [1702B], [MT84], [HF] measurements; "[MiS] DMA.sv ... as the cross-check", line-RAM cell formats "as [MiS] line_ram.sv states them" | manufacturer documents; k7800 MIT | cite: name k7800 (Jamie Blanks, MIT) in the module and keep its notice if any structure was taken from `DMA.sv`/`line_ram.sv` | | `board.py` | schematics, [SG]; Φ2 rounding from "sally.sv's capture" (k7800) | documents; MIT | cite: as `maria.py` | | `television.py` | MAME 0.285's visible window (closed box; `a7800.cpp` BSD-3) | BSD-3 / closed box | clean | | `controllers.py` | 7800 wiki "hardware interfacing guide" (no licence stated: facts); MAME `a7800.cpp` (BSD-3) | facts; BSD-3 | clean | | `sound.py` | the TIA from a2600-python (`28fb095`, the rebuilt project; its listed `Audio.on_sample` hook), POKEY from pokey-python (`6ed1ffa`, the restarted core: see "The POKEY core" below); the mix is a labelled fit | family code | clean | | `frontend.py` | palettes computed from the wiki's hue steps (facts), pygame-ce | facts | clean | | `mode2600.py` | drives a2600-python's board; subclasses its `System` | family code | **inherits a2600-python's verdicts**: since 2026-11-14 the rebuilt project, now at `28fb095` (see "The answered requests" and "The a2600-python restart" below); the seven rewrite items and one unclear item of the archived `4613846` are gone with it | | `machine.py` | power-on state matched to MAME's trace (closed box); BIOS by hash | facts | clean (see house-rule note) | | `cartridge/a78.py` | the wiki's A78 header specification and `a78header.asm`; "`7800header.c` (GPL) is not consulted" | facts | clean | | `cartridge/schemes.py` | the wiki's bank-switching guide; MAME `bus/a7800/rom.cpp` (BSD-3) | facts; BSD-3 | clean (name the BSD-3 licence beside the MAME citation) | | `cartridge/table.py`, `mame_softlist.json` | MAME `hash/a7800.xml` (CC0-1.0) and 17 rows confirmed here; slot mapping read off `a78_slot.cpp` (BSD-3) | CC0; own; BSD-3 | clean | | `cartridge/formats.py`, `connector.py`, `description.py` | own; a2600 dumps through a2600-python's identification | own | clean | | `cartridge/bios_test.py` | runs the player's BIOS on a minimal bus | own | clean | | `probes/*.s` | own 7800 probe programs | own | clean | | `scripts/prosystem_run.py`, `frames_prosystem.py`, `ram_prosystem.py`, `mame_trace.py`, `frames_mame.py`, ... | drive ProSystem (GPL-2.0) and MAME as closed boxes | own tools | clean | | `scripts/count_carts.py` | parsed `ProSystem.dat` (JS7800) and A7800DS `Database.c` at run time until 2026-11-25; those readers are removed (below, decision L4) | own tool | clean | **Counts (rows):** clean 13, cite 2, rewrite 0, unclear 0; inherited through `mode2600.py` at the audit: a2600-python's rewrite 7, unclear 1 (those belonged to the archived `4613846`; the rebuilt `9475aa1`, now `28fb095`, has its own audit, below). ## Wave 2 (2026-11-13): rewrites, cites, romsets, headers **Rewrites:** none. The wave-1 table has no **rewrite** row in this repository, so nothing had to be re-established. The rewrite and unclear rows inherited through `mode2600.py` belong to a2600-python and are not acted on here (see "Inherited" below). **Cite rows, closed:** - `maria.py`, `board.py` and k7800: both files now name Atari7800_MiSTer (Jamie Blanks, MIT) in a header line beside the SPDX line, and `NOTICE` section 3 keeps its full MIT notice. What is followed from it is unchanged and was already labelled [MiS] in place: DMA.sv's state order as a cross-check of [GLD], the line-RAM cell formats (line_ram.sv), the HALT rounding sally.sv captures. No behaviour change. - `cartridge/schemes.py` (and `scripts/outside_softlist.py`): the BSD-3 licence of MAME's `bus/a7800/rom.cpp` is named in the header line; `NOTICE` section 2 keeps the notice. **MAME's BSD-3 7800 files: every fact taken, and how it rests now.** `a7800.cpp` and `maria.cpp` (copyright holders Dan Boris, Fabio Priuli, Mike Saarna, Robert Tuccitto) and `bus/a7800/*` (Fabio Priuli) are BSD-3-Clause, so facts from them may be used with the notice (`NOTICE` section 2). They were opened for single facts: | Fact | Opened | Where used | Standing now | | --- | --- | --- | --- | | the `a7800p` screen's visible area (the two `set_raw` lines) | session 3 | `television.py` PAL window, lines 35-294 | a fact (a detector setting, inside [MT84] 2.2's and the wiki's bounds), kept with the notice; also fixed by measurement: 30 of 37 PAL dumps pixel-exact and the PAL BIOS 26 pixels against 1,816 one line off (`scripts/pal_bios_frame.py`) | | `tia_r` (how MAME drives TIA reads) | session 2, before the 2026-11-12 rule | nothing taken: `scripts/harness.py`'s C17 exclusion is the distribution of MAME's own logged reads (152,000, six traces) | re-established by measurement already (build-progress, session 2 note) | | `maria.cpp` `startdma`: DMA decided 7 CPU cycles into the line; `spin_until_time` charges `(maria_clocks + 3) / 4` cycles | session 2 | docs/mame-oracle.md traps 4-5, docs/timing.md (a detector's statement beside [SG] App. 3) | the board's DMA start is [SG] App. 3's "7 cycles" (DOC); MAME's rule is quoted only to explain detector differences; kept with the notice | | `maria.cpp` `draw_scanline` | session 2 | nothing taken: the crop fix and C18/C19 rest on traces and snapshots | measurement | | the BIOS ROM loads (NTSC 4 KiB at $F000, PAL 16 KiB at $C000) | session 2-3 | C8, `machine.py` BIOS rows | the dumps' own sizes and hashes say the same; the MAME fact kept with the notice | | no slow cycle in `a7800.cpp`; MAME's controller wiring | session 2-3 | C11; `controllers.py` (beside the wiki's interfacing guide) | detector statements, confirmed by MAME's own traces (lockstep through the BIOS); kept with the notice | | slot names and meanings, `a78_slot.cpp` / `a78_carts.h` | Phase 0 | `cartridge/table.py` `SLOTS`, `scripts/count_carts.py` | facts that interpret the CC0 list's `slot` feature; kept with the notice | | bank mappings, `bus/a7800/rom.cpp` | Phase 0, milestone 3 | `cartridge/schemes.py` where named, `scripts/outside_softlist.py` (Activision halves) | detector statements beside Stolberg's guide (tier 3); kept with the notice | **The cartridge table.** Its seed rows are MAME 0.285's `hash/a7800.xml` (CC0-1.0; the attribution is kept in `NOTICE` section 1 and in `mame_softlist.json`'s `source` field). `scripts/make_cart_table.py --check` says the committed JSON equals the list ("unchanged", 2026-11-13). The 17 confirmed rows rest on the dumps' own bytes or behaviour (`scan_4000.py`, `uses_4000.py`, `outside_softlist.py`), none of which reads a GPL table. `scripts/count_carts.py` reads two GPL cartridge databases (JS7800's `ProSystem.dat`, A7800DS's `Database.c`) from the gitignored `reference/` tree at run time: a tool reading a detector's answers, not code or data in the repository. Checked: only `count_carts.py` opens them (`git grep`), and no row of `table.py` or `mame_softlist.json` comes from them. **Romsets** (scope item 2): `MAME_SETS`, the mirror paths and the retrobat path are gone (`romsets.py`; the house-rule note above is closed). `pyproject.toml` keeps its `git+file:///data/emu/...` pins: pip needs an absolute URL there. **Headers** (scope item 3): `SPDX-License-Identifier: MIT` on every Python, assembler, ld65 config and TOML file (61 files by `scratch/spdx.py`, ignored); the files holding outside material carry a second line naming it; `NOTICE` lists the three permissive sources with their notices. **Inherited through 2600 mode** (a2600-python `4613846`, its own wave-1 audit; not acted on here; superseded on 2026-11-14 by the restart, "The a2600-python restart" below: the paragraph is kept as the record of what the old pin carried). `mode2600.py` loads any 2600 image through `a2600_python.cartridge.load`, so 2600 mode exercises every inherited cartridge item: E7's 8K/12K `SELECTS`, CommaVid (CV), UA and FC, DPC's four Stella-sourced choices, the Supercharger's open points, and the unclear 3F latch rule. The inherited controller items (Driving's Gray sequence, Booster Grip and SaveKey pins) are reachable only by a caller that plugs those a2600-python controllers into the 2600 board; nothing in this repository does (7800-mode controllers are our own, Paddles imported from a2600-python, a clean row). Claims about 2600 mode stand on a2600-python's verdicts for those items until its rewrites land. ## The POKEY core (2026-11-14) The pokey-python this board pinned until 2026-11-14 (`e276d27`) was archived by its project for provenance: its build had read an unlicensed VHDL model's source. The project restarted from documents and closed-box measurements of that model's pins (pokey-python's docs/restart.md and docs/provenance.md), and this board now pins the restarted core at **`6ed1ffa73220a967cb2add7e978eabfe11502af0`**, the commit its status names for boards. Nothing of the old core was ever copied into this repository: the board only called it (`cartridge/schemes.py`'s `Pokey` socket, `sound.py`'s `mix()`), so nothing here had to be rewritten. The socket was adapted to the new core's docs/adoption.md (the variant `C012294` named at construction; the chip's `snapshot()` in the cartridge's state) and nothing else. In this pass the old installed package was uninstalled unread from both venvs (`.venv`, `.venv-pypy`) and the new pin installed with `--no-deps`; a2600-python (`4613846`) and 6502-python (`741419a`) were left as installed (`pip freeze` checked before and after). No GPL source and nothing under the archived core was opened. ## The a2600-python restart (2026-11-14) The a2600-python this board pinned for its TIA, RIOT and 2600 mode (`4613846`, branch `a7800-sockets`) was archived by its project for provenance: its milestones 5 and 6 (cartridge schemes, controllers) had been written from GPL emulator source. The project restarted under its docs/restart.md rules, scrubbed its inherited documents (its docs/provenance.md lists every statement struck or re-sourced) and rebuilt the board, the schemes, the controllers and the 7800 sockets fresh from this board's requests. This board now pins the rebuilt project at **`9475aa15b71d65396ca31d9e1943fdd2805b3399`**, the commit its docs/status.md names for consumers ("For the Rust transcription": the board, its `gates.py`, the frame-hash record and the fault list). **What this board inherits from it:** the TIA (class, revision fields, the die judge's verdicts), the RIOT, the 2600 board and console rows for 2600 mode (`HOSTED_MACHINES`: `NTSC_7800`, `PAL_7800`), every 2600 cartridge scheme and the identification by MAME's CC0 list (2600 dumps typed by `cartridge/formats.py`), `controllers.Paddles` (7800-mode paddles), the TIA's audio channels and mix (`sound.py`), and the gates (`gates.py`). Their provenance is a2600-python's: its docs/provenance.md at `9475aa1` records the scrub, a licence check per source, and "None in this restart" under work done with another implementation's source open (it has no rewrite/unclear table of the old audit's kind); Stella and Gopher2600 are closed boxes there, MAME's BSD-3 files cited with notice. This board took no code from it: it calls it, as before. **What changed here:** only the calls (status.md "The a2600-python repin"): `board.py` builds the TIA as `TIA(hclock, row.tia_revision)`; `machine.py` names the rows `NTSC_7800` and `PAL_7800`; `mode2600.py`'s `Cart2600` follows the new connector protocol (`access(address, value, t, write)` and `snoop`), and `System2600` takes a built cartridge as the gates' `system_factory` does; `scripts/gates_2600.py` calls the new `gates.py` with `root=` and factories. **How it was done:** the old installed package was uninstalled unread from both venvs and the new pin installed with `pip install --force-reinstall --no-deps` (6502-python `741419a` and pokey-python `6ed1ffa` left as they were; `pip freeze` checked after). Read: a2600-python's README, docs/api.md, docs/status.md, docs/provenance.md, and `gates.py`, `system.py`, `board.py`, `machine.py`, `cartridge/connector.py`, `cartridge/__init__.py`, `audio.py`, `riot.py`, `controllers.py` and `tia.py` (signatures) at `9475aa1` (family MIT), and 6502-python's log between its two pins. No GPL source, nothing under `/data/backup/`, nothing of the archived a2600-python was opened. The four socket corners found are `docs/issue-a2600-0001` to `0004`. **The answered requests (2026-11-14, repin `9475aa1` -> `28fb095`).** a2600-python answered the four issue files (its docs/api.md, "Requests from hosting boards, decided"; its docs/validation.md records the CPU repin): `System(..., cpu=)`, `gates.timer_roms(machine=)`, `gates.smoke_names`, `Audio.on_sample`, the RIOT's port registers listed read-only, `load(..., cpu_hz=)`, and 6502-python `741419a`. Its commits between the pins (`84abe86`, `ae3ad35`, `4a5e20f`, `d49c3ba`, `f88d88a`, `28fb095`) are family MIT; the one new outside source is Crane's patent US 4,644,495 (read on Google Patents by a2600-python for the DPC oscillator, a primary document, DOC). How it was done: the old package uninstalled from both venvs, the new pin installed with `pip install --force-reinstall --no-deps` (`pip freeze` checked); a plain `pip install .` then checked in a fresh scratch venv (it resolves: one 6502-python URL). Read: a2600-python's docs/api.md, docs/validation.md and docs/status.md, and the diff `9475aa1..28fb095` of `system.py`, `audio.py`, `gates.py`, `cartridge/__init__.py` and `cartridge/dpc.py`. No GPL source, nothing under `/data/backup/` or of the archived a2600-python was opened. This board took no code from it: `mode2600.py` subclasses its `System`, `sound.py` sets its hook, `scripts/gates_2600.py` calls its gates. ### History No files were ever deleted (`git log --all --diff-filter=D`); nothing fetched was committed. Local repository, no remote at the wave-1 audit; a private GitHub remote since (nothing pushed by wave 2). ### Sources MAME's 7800 driver and bus files are BSD-3-Clause (code OK with notice); MAME's `sound/tiasound.cpp` is GPL-2.0+ (not used: the TIA comes from a2600-python). k7800 (Atari7800_MiSTer) is MIT: code OK with notice, and the most useful permissive second opinion on MARIA. ProSystem, JS7800, A7800DS (GPL-2.0), test7800 (GPL-3.0 expected), `7800header.c` (GPL-2.0): closed box only. ### 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. Pins removed and trees moved aside unopened, out of the repository (not deleted): JS7800 (https://github.com/raz0red/js7800 @ `2c1b91468a63dc56b6a2350c5dd3e585ed10dffe`), ProSystem (https://github.com/libretro/prosystem-libretro @ `8a88014287c7a01cd568067e5a557d0a2b2a051f`, and the source copy it was built in under `reference/build-prosystem/`), A7800DS (https://github.com/wavemotion-dave/A7800DS @ `6c108cd9767a67647abde20c33eb0e785f464120`), test7800 (https://github.com/JetSetIlly/test7800 @ `d489a81f7fccda89edf5c5c40d613fe0c1e18efa`); `sound/tiasound.cpp` (GPL-2.0+) from both MAME sparse checkouts (MAME `f379cd0` and A7800 `7a2afdc`); 7800basic's GPL C tools from its sparse list (they were not on disk). The ProSystem core built before the move (`prosystem_libretro.so`, sha1 `e0cebbf6a53a62dfc2acadd376e77018322611b9`) was put back at `reference/build-prosystem/` and is run as before; a fresh checkout uses a shipped libretro build. `scripts/count_carts.py`'s tables 3 and 4 (the two GPL databases) are empty now; the census's other tables are unchanged. 7800OpenBIOS (CC0 per its README), the A78 header source (no licence stated: a format description, flagged to Aubrey) and the MIT MiSTer core stay. For review: `scripts/count_carts.py` `A7800DS_TYPES` maps A7800DS's database type tokens to scheme names, written while reading that GPL file; it is a tool's decoder, not board code, and has nothing to decode now. ### The census's GPL database readers removed (2026-11-25, decision L4) Aubrey approved decision L4 (emulator-lineage `docs/proposals/2026-11-decisions.md`) as recommended: a table a script extracts from GPL source is still a transcription of it, whoever does the reading. `scripts/count_carts.py` parsed two GPL files, JS7800's `ProSystem.dat` (an INI database) and A7800DS's `Database.c` (C source, by regular expression): that is reading the source, not a closed box's output, so both readers (`prosystem_dat`, `a7800ds_db`), the paths, the `PROSYSTEM_TYPES` map and the `A7800DS_TYPES` map (A7800DS's `CT_*` token names, written while reading that file: the 2026-11-24 "for review" item above) are gone, with the report lines and JSON fields (`prosystem`, `a7800ds`) that used them. Moving them to emu-tools-gpl was not worth it: both trees have been unfetched since 2026-11-24 and the tables were empty. Rerun 2026-11-25 (`python -I scripts/count_carts.py`, `NO_INTRO_DIR` and `MAME_ROMPATH` set; a census of the files, no emulator run): the output equals the one taken just before the edit except the three lines that printed the empty GPL tables (161 lines before, 158 after; `diff` shows only those). **Owed:** typing for the dumps neither the CC0 list nor an A78 header covers (the 2026-11 counts in cartridge.md that name the GPL tables are a record, not reproducible now), from documentation, a dump's own bytes (`CONFIRMED` rows) or a closed-box emulator's output; handoff-brief.md open decision 6 (b) is closed accordingly. No other script here parses closed-box source: the ProSystem, A7800 and MAME scripts run them as closed boxes (their output), and the test-ROM scripts read ROM archives. ### BIOS disassemblies out (2026-11-25, decision L5) Aubrey approved decision L5 as recommended: disassemblies of console firmware are console makers' firmware in another form (charter, licences point 9) and leave the repositories; facts already taken from them stay, cited as such. Moved, unopened, from the git-ignored `reference/` to `/data/backup/a7800-python-bios-disassemblies-2026-11-25/`, and their four entries dropped from `scripts/pinned_files.json` (56 entries left; `fetch_references.py --verify`: all pins satisfied): - `8bitdev-wiki/ntsc-bios.html` (sha256 `dc746764...`) and `pal-bios.html` (`b3a8d137...`): the 7800 Development Wiki's commented NTSC and PAL BIOS disassemblies, with the text copies `ntsc-bios.txt` and `pal-bios.txt` made from them; - `docs/7800_ntsc_bios_source_code.pdf` (`28b52cb4...`): Atari/GCC's 1984 NTSC BIOS source listing, scanned; - `docs/atariage-bios7800.asm` (`c5304447...`): AtariAge's NTSC BIOS disassembly. The BIOS facts in start-here.md, validation.md and `scripts/lockstep_mame.py` (the `Enter7800Mode` address) stay, cited to those documents. The other L5 kinds here: the test ROMs under `reference/test_roms/` (the utility cart, the Bankset Test Suite) are run only, pinned by hash, git-ignored; the Atari and GCC manuals under `reference/docs/` are read as DOC, git-ignored, never redistributed; `a78_asm_header` (no licence) stays a format description, flagged earlier. Nothing under `reference/` is or ever was tracked (`git ls-files`, `git log --all`).