# Provenance Where every fact in this repository comes from, and the record of the restart's scrub of the inherited Phase 0 documents ([restart.md](restart.md), rule 10). ## The rule From 2026-11-14 no GPL, LGPL or unlicensed source is read (restart.md rule 1). Permitted: Atari's data sheet (C012294) and schematic sheets, the Altirra Hardware Reference Manual, Acid800/AcidSAP sources and expected results (MIT), recordings of real chips, community documents that report hardware findings (prose only; code in them stays unread), permissive code with its notice. The VHDL of Nick Mikstas is a closed box: built under GHDL, driven by this repository's testbench, never opened. MAME is run as a released binary only. ## The scrub of 2026-11-14 The Phase 0 documents (commit `195e002`) were written under the older rule ("read GPL source for facts, never copy"). Each statement whose support was reading a model's or an emulator's source was struck or re-sourced. What could be re-sourced was checked against the Altirra Hardware Reference Manual (2026-01-02 edition, chapter 5) as fetched on 2026-11-14. | Where | What was there | Why | Now | | --- | --- | --- | --- | | start-here.md, sources | [VHDL] "written from [RE], as run here" | leaves open that it was read | closed box, never opened, values `OBSERVED` | | start-here.md, sources | [RE] as "ijor's reconstructed schematics ... and the thread" | the PDF was never obtained; only forum prose was ever cited | [RE] = the thread's prose only | | start-here.md, pins | OCLK "(MAME's drawing calls it ACLK)" | read from MAME's `pokey.h` | struck | | start-here.md, dividers | "+4 ... three for the borrow pipeline (the counter is split into stages with clocked borrows); a joined pair has two pipelines" | structure worded as if read from a model | re-sourced: quoted [AHRM 5.3] wording ("split into multiple stages and for the underflow logic"; the joined pair's extra 3) | | start-here.md, polys | heading cited "[AHRM 5.5, RE]" | the table is all [AHRM 5.5]; [RE] only for the tap history | heading [AHRM 5.5]; the tap erratum note kept as forum history (middle rule) | | start-here.md, output | "Altirra and Atari800 each carry a measured table (their sources, GPL, read only)" | knowledge of GPL files' contents | struck; replaced by "no permitted source gives the curve as numbers; `mix()` uses a FITTED curve" | | start-here.md, variants | "PokeyMAX's and Mikstas's HDL are references" | implied reading HDL | "Mikstas's VHDL is a closed-box detector; no other HDL is used" | | timing.md, legend | "die: read from the die-derived schematics or their VHDL" | reading the VHDL | die = prose of people who read the schematics; new tag "closed box" | | timing.md, comparison table | "(die, run 2026-11-11)" | a run is a closed-box measurement, not die evidence | "(closed box, run 2026-11-11)"; the measured numbers kept | | timing.md, U1 causes | "the VHDL's bus interface and clocked cells were re-timed for an FPGA" | read from the model's files (`IO_core.vhd`) | struck; candidates now only those testable through the pins | | timing.md, derived clocks | tagged "(hw, die)" | the counter type, polynomial, reset state and forced state looked model-derived | re-sourced: every cell is in [AHRM 5.2] "Clock reset timing"; tag "(hw)" | | timing.md, pokey_noise note | "the distance that reproduces both values in [VHDL] is 114" | fine as a measurement; reworded | "through the closed box" | | timing.md, AUDCTL bit 7 | "changes the feedback path, not the register" | structural claim with no permitted source | re-sourced to [AHRM 5.5] "an additional eight bits are added"; the rest left as U2 | | timing.md, ultrasonics | "MAME's old half-volume shortcut (its change note 4.2)" | read from MAME's source comments | struck | | undocumented-behavior.md, C1 | "follow [AHRM] and the VHDL (die)" | the VHDL as a die source | "follow [AHRM]" | | undocumented-behavior.md, C4 | "checked against the VHDL's `SER_clock_gen`" | an internal entity name | "compared with the closed box's OCLK and BCLK pins" | | undocumented-behavior.md, C8 | "MAME's device runs in time slices beside the CPU" | read from MAME's source | replaced by the observed fact (latency not following AUDF1, U13) | | undocumented-behavior.md, U1 | `IO_core.vhd` strobe timing, "edge-triggered stand-ins for two-phase cells", "read ijor's PDF" | model internals; the PDF is not usable without a ruling | struck; ijor's prose about the decoder kept as [RE]; replay of Acid800 against the closed box kept | | undocumented-behavior.md, U6 | Altirra's `pokeytables.cpp`, Atari800's `mzpokeysnd.c` "61 values" | contents of GPL files | struck; "no permitted source gives numbers" | | undocumented-behavior.md, U12 | "survives in ASAP's `pokey.fu` and MAME's polynomial code" | contents of GPL source | struck | | validation.md, oracle table | rows for Watson's HDL, Altirra source, Atari800, ASAP, MAME `pokey.cpp`, A7800 fork, all "read" | forbidden sources | removed; MAME kept as a binary detector; a note lists what was removed | | validation.md, ijor's PDF | "the best statement of the logic; needed to close U1" | unlicensed drawing; not obtained | "not used until the owner rules" | | validation.md, GPL rule | "the four GPL sources are read to learn facts" | the old rule | the restart's rule | | validation.md, judge item 1 | "read [internal signals] with VHDL-2008 external names" | needs internal names, i.e. opening the model | struck; only the volume 1, 2, 4, 8 decode of the audio pin | | validation.md, judge item 4 | "parts the model's author lists as untested in his `Progress.txt`" | the author's notes in an unlicensed repository | kept as a caution, marked as inherited and not re-read | | validation.md, netlist idea | "the VHDL shows it is some 600 cell instances" | read from the model | struck | | mame-oracle.md | "Why run inside a driver" (device_execute_interface, `step_one_clock`, scheduler synchronise, four timers); trap 1's cause (time slices); trap 5 (`LEGACY_LINEAR`, RC, op-amp models); machine paths | read from MAME's source; machine paths | rewritten: run as a binary only; trap 1 states only the observation; trap 5 generic; `MAME`, `MAME_ROMPATH` | | handoff-brief.md | "read them for facts, cite them"; reading-order items 8-9 (fetch sizes, ijor's PDF "needed for U1"); `src/pokey/`, `from pokey import`; per-channel tap; sibling paths | old rule; decision 1 was decided as (b); machine paths | restart rule; PDF not used; `pokey_python`; audio-pin decode; repository names; a "2026-11-14" entry in "Decided by the user" | | phase0-progress.md | a scratchpad path for the rules; a machine path for GHDL; "GPL sources were read only" | machine paths; old rule | rewritten | | scripts/pinned_files.json | Altirra 4.40 source, MAME `pokey.cpp`/`pokey.h`, the MAME Testers page and the A7800 emulation forum thread | forbidden sources, or pages about an emulator's code | entries removed: never fetched again | | scripts/pinned_repos.json | atari800, ASAP, A7800, Atari800_MiSTer (Watson); atari_pokey's sparse list included its README, Progress.txt and the Verilog | forbidden sources; only the VHDL directory is needed to build | removed; atari_pokey checks out `HDL/VHDL/POKEY_top/source/` only | | scripts/mame_pokey.py | `/usr/games/mame`, a romset path, a hash path; "Its POKEY cannot be built ... scheduler, timers" | machine paths; read from source | `MAME`, `MAME_ROMPATH`, `MAME_HASHPATH`; the reason restated | Kept as they were: the pins (minus the removed sources), the closed-box harness design (`validation/pokey_tb.vhd`, `scripts/run_vhdl.py`: they drive and print pins only; the testbench's port map is the model's interface and is inherited from Phase 0), every fact from the data sheet, the Hardware Manual, the Altirra manual, Acid800 and the Plogue recordings, and the closed-box and MAME measurements of 2026-11-11. ## Open for the owner - **ijor's PokeyReSchem PDF.** Decided 2026-11-19: allowed, facts only (see "The die schematic" below and the amendment in restart.md). - **The testbench's port names** were known to Phase 0 by reading the model. The restart keeps the testbench as "the closed-box harness design" (rule 10); recorded here so it is visible. ## The build (from 2026-11-14) Every behaviour in `src/` is written from the documents above or from closed-box measurements of pin behaviour, and is first written down in [behaviour.md](behaviour.md) with its source and evidence tag. No model's or emulator's source was opened while writing it. Outside this repository the build opened only: the family charter documents and sources.md, the two boards' `docs/handoff-brief.md`, the GHDL binary of 65816-python's oss-cad-suite (run, not modified), and 6502-python's `cpu.py` interface (MIT, family; read for the AcidSAP harness's planned use, nothing taken). Inside `reference/` it read the Altirra manual (chapters 4.9 and 5), the Acid800 README and `libsap.s`, `pokey_default.s` (MIT), and nothing of the closed box's files. Values fitted to the closed box are tagged `OBSERVED` in behaviour.md (B2.1a support, B3.1, B3.2's load timing, B3.4, B3.6, B3.7, B3.10). The rung 3 session (2026-11-14) also read, inside `reference/`: the Plogue blog page's prose (its one five-line C fragment, a pattern "shuffler", was printed with the text; nothing is taken from it, only the recorded patterns are used), the Acid800 sources `pokey_irqtiming.s` and AcidSAP's `libsap.s` and `standalone_hdr.txt` (MIT), and the Altirra manual 5.3-5.5 and 5.7; outside the repository, the charter documents and 6502-python's `cpu.py` public interface. Nothing of the closed box's source was opened (the names of its build directory's object files were seen once in a directory listing). The rung 4-10 session (2026-11-14) opened, outside the repository: the charter, methodology, agents.md and sources.md; the two boards' `docs/handoff-brief.md` (no other file of theirs); 6502-python's `cpu.py` (MIT, family; its public class, read for the harness's use of `step()`, the IRQ calls and `note_stall()`; nothing taken) and its git log; 6502-python 741419a fetched from its public GitHub repository by pip into this repository's two virtual environments; the GHDL binary of 65816-python's oss-cad-suite (run). Inside `reference/`: the Altirra manual 4.9, 4.10, 4.14, 5.2 and 5.7-5.9; the Acid800 sources (MIT) `pokey_irqtiming.s`, `pokey_timerirq.s`, `pokey_default.s`, `pokey_addrmirror.s`, `pokey_inittiming.s`, `pokey_timergranularity.s`, parts of `library.s`, and AcidSAP's `libsap.s`, `standalone_hdr.txt` and makefile; the built `.sap` and `.lab` files (run and parsed). Of the closed box: only its pins, through `scripts/referee.py`; once more the object-file names of its build directory appeared in a directory listing (`ls`), nothing else. ## The die schematic (from 2026-11-19) | Source | Ruling | Use | Tag | | --- | --- | --- | --- | | Jorge Cwik (ijor), "ATARI Pokey reconstructed schematics", `PokeyReSchem-13.pdf`, version 1.3 (2023-03-06), die-derived, no licence | Owner, 2026-11-19 (emulator-lineage sources.md 34b0b2f): the one exception to restart rule 1; facts only, like ijor's ANTIC schematics. Obtained by hand from AtariAge into `reference/byo/`, gitignored, never committed | read for circuit behaviour (which gate is clocked on which phase, what feeds what); no drawing reproduced, no net or cell names used as code structure | `DIE: ijor PokeyReSchem-13, sheet N, area` (sheet = PDF page) | The U1 session (2026-11-19) opened: the charter, methodology and sources.md; this repository's README and docs; the PDF (all seven pages, rendered to images in a scratch directory outside the repository); Acid800 `pokey_inittiming.s` (MIT); `tests/acidsap.py` and `src/`. It ran a scratch copy of the core with one change (an extra 64 kHz init tick) outside the repository, to test the die reading against the AcidSAP harness; the copy was not kept. Nothing of the closed box's source, no GPL or LGPL source, no `zzz-*` repository and nothing under `/data/backup` was opened.