# cp1610-python A readable, pure-Python **General Instrument CP1600-family** CPU core, planned: the 16-bit NMOS microprocessor of 1975 (CP1600, CP1600A, CP1610), best known as the Mattel Intellivision's CPU. The model will be **bus-accurate**: one callback per microcycle carrying the bus phase (BAR, ADAR, DTB, DW, DWS, INTAK, IAB, NACT), because the CP1600 has a single multiplexed address/data bus and the devices, not the CPU, hold the address. This repository is only the CPU and knows nothing about any console; the Intellivision is the board, [intellivision-python](../intellivision-python). **Status (2026-11-12): Phase 0 only.** No core code exists. What exists is the research, the pinned oracles and the handoff brief for the session that builds it: - registers, the instruction set, SDBD, the addressing modes ([docs/start-here.md](docs/start-here.md)); - the eight bus phases with pin levels, the phase sequence and cycle count of every instruction with the sources' votes ([docs/timing.md](docs/timing.md)); - the interruptible rule, interrupts, bus requests, reset, halt and the other pins ([docs/interrupts-and-bus.md](docs/interrupts-and-bus.md)); - 21 contradictions and 20 unknowns, each with its sources' tiers, a default and a named switch ([docs/undocumented-behavior.md](docs/undocumented-behavior.md)); - every oracle by tier and the rung ladder ([docs/validation.md](docs/validation.md)); - a verified headless MAME 0.285 recipe ([docs/mame-oracle.md](docs/mame-oracle.md)). **There is no hardware-captured source for this chip**: no die model, no netlist, no bus capture. The judges are GI's manuals and, where they are silent or wrong, the test cartridges the `openFPGA-Intellivision` project reports running on one real console. Nothing here was run on hardware. ## What is fetched Nothing third-party is committed. `scripts/fetch_references.py` rebuilds `reference/` (about 350 MB) from `scripts/pinned_files.json` (25 files by SHA-256: GI's 1975 users manual, 1982 data manual, four data catalogs, the Cross Assembler and GIC1600 manuals, Osborne's handbook, Mattel's 1978 instruction notes, 14 Intellivision Wiki pages) and `scripts/pinned_repos.json` (2 repositories at full commit SHAs, sparse where large): MAME 0.285's BSD-3 source and openFPGA-Intellivision (MIT). jzIntv, Intv_MiSTer, FreeIntv and Bliss are closed boxes whose source is not fetched (Aubrey, 2026-11-24; docs/provenance.md). ```sh python -I scripts/fetch_references.py # everything missing python -I scripts/fetch_references.py --verify # hash what is present, fetch nothing python -I scripts/fetch_references.py --no-catalogs # skip the four 30-40 MB GI catalogs ``` They need `git` and `curl`. No sudo. ## Scripts | Script | What | | --- | --- | | `fetch_references.py` | fetch and verify the pinned files and repositories | | `mame_trace.py` | MAME's per-instruction CP1610 trace of `intv` (with a cartridge) or `unichamp`; `--symbols` lists the state symbols | Run anything that reads `reference/` with `python -I`. Traces go in `tests/mame_traces/` (gitignored); never commit ROMs, traces or fetched files. ## Python The floor is the newest Python PyPy supports (3.11); CPython and PyPy both supported. The family's habit is a CPython venv and a PyPy venv side by side (`.venv` and `.venv-pypy`, both gitignored). ## Documents [docs/README.md](docs/README.md) is the index; [docs/handoff-brief.md](docs/handoff-brief.md) ends with the open decisions for the owner. MIT licensed ([LICENSE](LICENSE)).