# Domains, channels, speed, and where System 21 sits on the era boundary Placed against [n64-python execution-architecture.md](../../n64-python/docs/execution-architecture.md) (the cost model and the host assumptions, reused here) and the era-boundary proposal (emulator-lineage `docs/proposals/2026-11-era-boundary.md`). Figures are tagged: MEASURED (a family repository's own measurement, named), OBSERVED (MAME traces, this repository), DOC, HYPOTHESIS (arithmetic shown so a measurement can replace it). ## Place on the era boundary: inside, full contract **The game owns the machine.** No operating system, no BIOS calls: the 68000 programs, the MCU firmware, and the DSP programs (Namco's mask ROM plus uploaded code) drive the hardware directly, poll each other through shared RAM and ports, and race the frame. The proposal's test ("does a typical game depend on the hardware's timing, or on an OS's behaviour?") puts System 21 firmly inside the line, with the Saturn and the PlayStation. The family's full contract applies: an exact, timed Python specification, transcribed and gated. By instruction rate it sits in the proposal's first row ("under ~50 M instructions/s: real time everywhere") for Winning Run, and at the top of that row for the C67 boards (about 33 M, below). What is new for the family is not speed but **many cooperating CPUs**: up to nine on one C67 board (two 68000s, a 6809, an M37450, five DSPs). ## Domains and channels (proposed; HYPOTHESIS until the DSP handshakes are traced) | Domain | Parts | Clock (MAME, OBSERVED) | | --- | --- | --- | | **Main** | master and slave 68000s (and Winning Run's gpu 68000), C148s, sprite/palette/frame-buffer side, the renderer's front end | 12.288 MHz | | **DSP** | the TMS320C25 (Winning Run) or the five C67s, their vertex ROM, the DSP RAMs | 40 MHz or 24 MHz CLKIN (10 M or 6 M machine cycles/s each) | | **Sound** | 6809, YM2151, C140 | 2.048 MHz | | **MCU** | C65 or C68, inputs, analogue controls | 512 kHz or 2 MHz internal | | **Renderer back end** (producer) | the pixel work of `namcos21_3d` | - | Channels: the 68000/DSP communication RAM and control registers; the DSP master/slave ports; the dual-port RAM (68000s, 6809, MCU); the C148 reset and interrupt lines; the frame buffer at its joins (a CPU read, a swap, the beam). The **five C67s stay one domain**, like the 32X's SH-2 pair: the master and slaves exchange words through ports (OBSERVED: map), which almost certainly means dense polling (HYPOTHESIS until measured). The order of record interleaves by time in one integer unit: 24.576 MHz serves 12.288 MHz (2 units), 2.048 MHz (12) and the pixel clock (1), but MAME's 24 MHz and 40 MHz DSP clocks do not divide it (C2: the board's real DSP crystal decides the unit). ## How much work (arithmetic shown) | Load | Per second | Basis | | --- | --- | --- | | C67 DSP machine cycles, peak | 30 M | 5 x 24 MHz / 4 (DOC: C2X, four CLKIN per machine cycle; MAME's clock, C1) | | Winning Run DSP machine cycles, peak | 10 M | 40 MHz / 4 | | DSP instructions in MAME | starblad: master 3.0 M + slave 0 16.0 M (doing four slaves' work); winrun 8.1 M | OBSERVED | | 68000 instructions | ~2.0 M (starblad 1.04 + 0.94); ~2.4 M (winrun three CPUs) | OBSERVED | | 68000 bus cycles to interleave | 24.6 M (36.9 M on Winning Run) | 2 or 3 x 12.288 MHz | | 6809 + MCU instructions | ~1.0 M (starblad 0.50 + 0.53); ~0.8 M (winrun) | OBSERVED | | **All instructions, C67 board, peak** | **~33 M** | 30 + 2 + 1 | | **All instructions, Winning Run, peak** | **~13 M** | 10 + 2.4 + 0.8 | | Polygon pixels | 14.4 M per full layer (x overdraw) | 496 x 480 x 60.606 | Spin loops are a large share (DSP master 92 %, slave 47 %, 68000s 43-100 %: OBSERVED). An exact interpreter executes them; an exact idle fast-forward (a turbo technique when one channel input decides the exit: n64-python decision X6) could skip them. ## Budgets and the no-JIT path Host assumptions as in n64-python (HYPOTHESIS): desktop 5.0e9, phone app 4.0e9, phone browser 2.4e9 desktop-equivalent cycles a second on one core. | Board | Guest rate | Desktop | Phone app | Phone browser | Likely exact cost per instruction | | --- | ---: | ---: | ---: | ---: | --- | | C67 board, one thread | 33 M/s | 152 | 121 | 73 | DSP 20-50 (HYPOTHESIS: a fixed four-phase pipeline, no cache, timing as data; below the SH-2's measured 145, of which 90 were time-keeping: sh2-rust-fast); 68000 ~35-50 (MEASURED: m68000-rust 101-157 M instructions/s) | | Winning Run, one thread | 13 M/s | 385 | 308 | 185 | the same | - **C67 board:** 30 M x 20-50 + 3 M x 50 = 0.75-1.65 G cycles a second: 15-33 % of a desktop core, 19-41 % of a phone core, 31-69 % in a phone browser. With an SH-2-style scheduler (145) the DSPs alone would need 4.35 G: 87 % of a desktop core, beyond a phone. **The DSP time-keeping design decides it**, as for the N64: time charged per instruction from data, one deadline compare, not per-phase simulation (n64-python X1). - **Renderer:** flat shading with a depth term at 10-30 cycles a pixel (HYPOTHESIS) over 14-30 M pixels a second is 0.15-0.9 G cycles: a producer thread beside the CPUs, no GPU needed. Its joins (a CPU reading the frame buffer, a swap) are the only sync points. - **Threads** (from `-fast`): the renderer back end and sound synthesis as producers; the sound and MCU domains could run ahead to the next dual-port access (as proposed for System 2); the DSP domain apart from the main domain only if the 68000s poll the communication RAM rarely (to measure: decision 6). - **Verdict:** `recompile: none` should reach real time on desktop, phone app and phone browser, **if** the TMS320C25 interpreter's time-keeping is cheap (HYPOTHESIS; the first measurement in the handoff brief). Winning Run has a wide margin everywhere. - **Python:** a Python TMS320C25 at perhaps 0.3-1 M instructions a second on PyPy (HYPOTHESIS, scaled from the family's Python CPU cores) is 1/30 to 1/100 of real time for a C67 board: the specification runs short, targeted slices (a DSP job, a frame), as era-3 boards do.