# Handoff: build `3do-python`, the 3DO Interactive Multiplayer board ## Context you are inheriting Chips are cores, boards compose cores; the board pins its cores by commit. The CPU core is `arm60-python` (`../arm60-python`, Phase 0 done in parallel; its brief proposes the bus contract this board implements: arm7tdmi-python's per-cycle callbacks). The DSPP is proposed as a second core, `dspp-python` (open decision 2). Era 2-3 by shape (one 12.5 MHz CPU, but a transaction-level 2D engine and a DSP): Python is the specification only; cases are short. Nearest models: `psx-python` (a disc board with a firmware census, `REDUMP_DIR`, decisions on HLE vs LLE drives), `segacd-python`/`sega32x-python` (domains.md documents, catch-up at channels), `gameboy-python`'s functional-model-judged-by-lower-level pattern (for the CD drive). Rules: Python >= 3.11, CPython and PyPy; MIT; nothing read from GPL/LGPL emulators; **FreeDO, 4DO and Opera never read or run** (provenance.md); MAME's 3DO files closed; no firmware, disc or 3DO artwork in the repository (MAME snapshots stay in git-ignored `tests/mame_traces/`); `MAME_ROMPATH`, `FRONTEND_BIOS`, `REDUMP_DIR`; local git only; no sweeps. ### Read in this order README.md; docs/start-here.md; docs/domains.md; docs/memory-map.md; docs/madam.md; docs/display.md; docs/clio.md; docs/dspp.md; docs/xbus-cdrom.md; docs/controllers.md; docs/bios.md; docs/models.md; docs/census.md; docs/validation.md; docs/mame-oracle.md; docs/provenance.md; then arm60-python's handoff-brief.md, and for each milestone the cited patent sections (PDFs in `reference/patents/`) and SDK pages. ## Scope In: memory and the map (ROM overlay, SYSRAM, fences), MADAM (arbiter, DMA stack, SPORT functions, the cel engine, the matrix engine), CLIO (interrupts, timers, watchdog, the expansion-bus interface, the display path, the DSP's FIFOs and memories as a socket), the VDL display pipeline with the encoder's timing, the CD drive (high-level first), NVRAM, the player bus with pad, mouse, light gun and flight stick, firmware loading by SHA-1, disc images (Redump .cue/.bin first). Out: the ARM60 (arm60-python); the DSPP's instruction execution (dspp-python, or a board-local module until decided); the FMV module; the arcade boards; the 3DO Blaster; the M2. ## Proposed names - Package: **`threedo_python`** (provisional; `3do_python` is not a Python identifier: open decision 1). Board class `threedo_python.Opera` (3DO's own name for the platform, used by the patents' expansion bus and the SDK) with `model=` chosen by firmware SHA-1 (models.md). - Modules: `bus.py` (decode, arbiter, MCLK stretching), `madam/` (`dma.py`, `cel.py`, `ppmp.py`, `projector.py`, `matrix.py`, `sport.py`, `fences.py`), `clio/` (`irq.py`, `timers.py`, `xbus.py`, `display.py`, `vdl.py`, `audio.py` for FIFOs and the DSP socket), `cdrom/` (`drive.py` HLE, `disc.py`), `pbus.py` (+ `devices/`), `nvram.py`, `domains.py`, `machine.py`. - Sockets: the CPU (arm60-python), the DSP (`Dspp` protocol: memories, FIFOs, tick budget), the CD drive (`Drive` protocol: HLE now), the PBUS chain (`Device`), the expansion bus (more XBUS devices later). ## Import boundary The board imports `arm60_python` (and `dspp_python` once it exists) and nothing else of the family's. The cores never import the board. ## Unknowns (U) and contradictions (C) collected Numbered across the documents (each defined where it is listed): memory-map.md U4-U10, C1-C2; madam.md U11-U19, C3-C8; clio.md U20-U24, C9; dspp.md U25-U32, C10-C13; display.md U33-U35, C14-C15; xbus-cdrom.md U36-U39, C16-C18; controllers.md U40, C19-C20; bios.md U41-U42; models.md U43-U44. arm60-python's U1-U9 and C1-C3 are the CPU's. The ones that block a milestone: - U4 ROM-overlay remap (M1); U8 DMA group placement (M1); U22 timer clock and prescaler (M1); U26 CLIO addresses of the DSP memories (M4); U24 XBUS registers (M5); U36 the Opera file-system layout (M5, only for identifying discs); U13 the Regis state tables (M3, exact fill); U35/U5/U18 every transfer's cost in ticks (M7). - C14 RELSEL polarity (take the OS code's); C5 PIXC half order (take the SDK prose, provisional); C6 REGCTL0 bits (take `hardware.h`). ## Milestones M1 bus, boot, interrupts, timers; M2 display path; M3 cel and matrix engines; M4 DSP socket and audio DMA; M5 XBUS, CD drive, NVRAM; M6 player bus; M7 timing pass; M8 seeded faults. Exit tests in validation.md. ## Domains and speed Full analysis in domains.md. Summary: - **Domains:** D1 system bus (CPU, MADAM incl. the cel engine, memory, CLIO registers; one domain because the cel engine stalls the CPU), D2 display (CV25M), D3 DSPP, D4 CD drive, D5 player bus. **Channels:** VRAM and the VDL/CLUT words at line boundaries (D1-D2); DMA FIFOs, DSP memory accesses, semaphore and interrupt word (D1-D3); XBUS FIFOs and EXINT (D1-D4); the per-field shift register (D1-D5). - **Need per second:** ARM60 8 M instructions typical / 12.5 M worst; cel engine up to 9 M pixels while it runs (and the CPU is then asleep: D1 costs (1 - f) CPU + f cel, not the sum); DSPP up to 22.9 M ticks = ~5-10 M DSP instructions; display 18.4 M interpolated output pixels. - **No-JIT path:** desktop native and browser: real time on one thread (0.45-0.9 s of host time per second, estimated), with margin on three threads. Phone native: needs the three threads at the D1/D3/D2 channels and is at the limit in the worst cel-heavy case; next steps are the turbo tier's cel-span fast path and a cached ARM60 interpreter. Phone browser: not real time at the worst case even threaded without turbo. Recompilation would not pay (the CPU is not the cost): `recompile: none`. 3do-python under PyPy: about 1/20 to 1/100 of real time. All estimates until 3do-rust is measured. ## Open decisions for Aubrey 1. **Package name `threedo_python`** (repository `3do-python`), since the 2026-11-12 rule gives `3do_python`, which Python cannot import. Recommended; the alternative is renaming the repository (`opera-python`, after 3DO's platform name), which would break the "named after the console" habit. 2. **The DSPP gets its own core, `dspp-python`, with its own Phase 0** (chip rule: it is a processor with its own instruction set; MAME files it under CPUs and uses it again in the 3DO M2). Recommended; dspp.md and '383's pseudo-code are its start. Until it exists, the board specifies the DSP's memories, FIFOs and tick budget behind a socket. 3. **FreeDO, 4DO and Opera excluded entirely, not even as closed boxes.** FreeDO's licence forbids commercial use of its sources and of "any knowledge obtained by studying" them or "any other material published by FreeDO", which an MIT board cannot honour. Recommended: excluded; and ask whether the wiki's FreeDO-derived lines (marked) may be cited at all. (If you want a detector beyond MAME: build Opera in emu-tools-gpl2 as a non-commercial closed box and never let its results into the specification, which in practice makes it useless; so: excluded.) 4. **MAME's BSD-3-Clause 3DO and DSPP files stay closed.** Recommended (the brief's rule, and their relation to FreeDO-derived knowledge is unknown); revisit only for a question no patent answers. 5. **Reference firmware FZ-10 USA (`panafz10.bin`, SHA-1 3c912300...), model rows FZ-1 USA, FZ-10 Europe Anvil, FZ-10 Japan with its kanji ROM; MAME's `-norsa` images only to run unsigned homebrew tests, never as reference.** Recommended. 6. **The interpolator code tables printed in WO1994010679A1 (3DO reserved copyright on the listings):** may they be transcribed as data (a fact of the hardware, like a PLA), or must the function be re-derived from the prose and verified? Recommended: re-derive from the prose and the patent's figures, and use the tables only as a check, until you decide. 7. **The SDK documentation set (marked "Confidential Information" in 1995) as a facts-only source**, fetched into `reference/` from trapexit's public repository, never committed. Recommended: yes, as the family does with psx-spx's SDK-derived facts; the company is defunct and the set is public. 8. **CD drive high-level first, from the wiki's command set (tier 3) and '382's protocol.** Recommended; there is no drive firmware to run (the drive's controller is not documented), so a lower-level drive is not on the table. 9. **Cel engine at transaction level: each source pixel's destination pixels, in the hardware's order, with bus cost per burst; not per tick.** Recommended: the evidence (the patents' algorithms, the SDK's throughput) supports it; per-tick claims would exceed the evidence (no timing beyond "one pixel per clock", "6-tick page break", "release within 7"). 10. **Disc formats: Redump .cue/.bin first (all single-track Mode 1), CHD later** (161 CHDs in the curated library; a CHD reader needs its own licence check). Recommended. 11. **robots.txt findings (flagged for the family, not this board):** dwedit.org blocks AI agents (arm7tdmi-python pins its ARM7TDMI data sheet); ARM's documentation service disallows every crawler (arm7tdmi-python and arm946es-python pin from it); GitHub gives AI agents a crawl delay and disallows `/*.git` for everyone. Recommended: re-source the dwedit file; decide whether the ARM and GitHub rules count as walls.