# Domains, channels, speed, and the late-era method Read with `../n64-python/docs/execution-architecture.md` (host assumptions: desktop 5.0e9, phone app 4.0e9, phone browser 2.4e9 desktop-equivalent cycles/s; the sync cost model; the sh2-rust-fast yardstick of 89-145 host cycles per exact instruction, and 25-60 with cheap time-keeping) and emulator-lineage `docs/proposals/2026-11-late-era-method.md`. Tags: DOC, OBSERVED (MAME), MEASURED (a run named here), HYPOTHESIS (arithmetic shown). ## Domains and channels | Domain | Parts | Channels | | --- | --- | --- | | A main | PowerPC 603e/603ev, MPC105/106, 8 MB work RAM, system registers, interrupt logic, 315-5649 I/O, EEPROM, RTC, backup RAM | everything below | | B Real3D front end | the scene-graph walk, transform, cull, light, setup, status | A: writes into display-list, culling and polygon RAM windows, the texture FIFO, the flush command, status reads (0x84000000); on step 1.x the 53C810 DMA | | C Real3D back end | rasterising into 3D-RAM | B: triangles; D: the frame | | D video | tile generator, palette, mixing, scan-out, vblank | A: VRAM and registers, the vblank interrupt | | E sound | 68000 + 2 SCSP; DSB or DSB2 | A: a USART (MIDI-class rate) | | F periphery | comm board (68000), billboard (Z80), Get Bass's I/O CPU | A: shared RAM, ports | - **A-E and A-F** are as loose as Model 2's: own threads, conservative sync per byte. - **A-B** decides everything. If games write a frame's display list, flush, and wait for vblank without reading results back, B and C are producers between joins, and both run on other threads or the GPU (HYPOTHESIS; the first measurement: status reads and frame-buffer reads per frame in a trace). ## Instructions per second needed The 603e issues up to three instructions per clock (603EUM 1-2, DOC); compiled game code on an in-order-completion 603e plausibly sustains 0.7-1.0 per clock (HYPOTHESIS). Planning rates: one per clock as the peak, 0.7 as typical. | Step | Clock | Rate (typical-peak) | Desktop | Phone app | Phone browser | | --- | --- | --- | ---: | ---: | ---: | | 1.0 | 66 MHz | 46-66 M/s | 76-109 | 61-87 | 36-52 | | 1.5 | 100 MHz (C1) | 70-100 M/s | 50-71 | 40-57 | 24-34 | | 2.0, 2.1 | 166 MHz | 116-166 M/s | 30-43 | 24-34 | 14-21 | (Budgets: 5.0e9, 4.0e9, 2.4e9 divided by the rate; for example 5.0e9 / 166e6 = 30.) Other domains: 68000 1.4-2.8 M/s and two SCSPs at 7.05 M operations/s each (comfortable everywhere); the Real3D as in [real3d.md](real3d.md): 22-44 M fragments/s and up to 0.75 M polygons/s. ## Does the no-JIT path reach real time? Against 25-60 cycles per instruction for an exact interpreter with cheap time-keeping (the N64 document's estimate) and 89-145 with an SH-2-style scheduler (MEASURED there): - **Step 1.0:** desktop yes; phone app yes with cheap time-keeping; **phone browser no** (36-52 cycles against 25-60): `recompile: wasm` needed. - **Step 1.5:** desktop yes; phone app at the edge; phone browser no. - **Step 2.x:** **desktop at the edge** (30-43 cycles against 25-60), and that is before the MMU's software TLB reloads and cache bookkeeping; **phone app no** without a recompiler, and a native iOS app may not have one (charter: `recompile: none` on iOS); phone browser no even with `wasm` at likely costs (14-21 cycles per instruction is a compiled-code budget). So **Model 3 step 2 is the first board in the family's plans where `recompile: none` is not expected to reach real time on a phone app, and only marginally on desktop** (HYPOTHESIS until a ppc-rust-fast is measured). The capability record must say so (the charter requires it). Options, each a decision (R3): a lower stated rate on phones; a recompiler (`native` where allowed, `wasm` in browsers), as turbo with the interpreter as fallback; named concessions (an idle-loop skip that is not exact, a coarser Real3D schedule). The cached interpreter's gain is the fetch path and decode, HYPOTHESIS x1.15-1.4 as the N64 document estimates; not enough alone. For scale: MAME runs `scud` (step 1.5, 100 MHz in its model) at 120 % of real time on one core here **with its PowerPC recompiler** (MEASURED, docs/mame-oracle.md). The Real3D: a GPU backend on phones and browsers (real3d.md); software on desktop with three to five threads. ## The late-era method, placed honestly - **What the Python specification can be.** A PyPy PowerPC at 0.1-0.5 M instructions/s (HYPOTHESIS) is 1/130 to 1/1,660 of real time. MAME's Scud Race needs about 20 emulated seconds to reach its settings screen (docs/mame-oracle.md); at 100 M instructions/s that is 2e9 instructions, **one to six hours in Python**. Even the boot is out of reach beyond its first second or so. The specification's gate cases are **slices only** (transplanted states, fractions of a second each) and **unit tests of the CPU and the Real3D functions**. There are no test ROMs for Model 3. - **x-rust is the first runnable tier** (L2), and for step 2 it will run below real time until `-fast` and probably turbo exist. - **State transplant (L3):** Model 3's state is large: 8 MB work RAM, 1 + 4 + 4 MB of display-list, culling and polygon RAM, 8 MB of texture RAM, the 3D-RAM frame buffers, tile VRAM, two SCSPs' sound RAM, caches and TLBs. About 30 MB before compression: the shared format's chunks handle it, but run-ahead and rewind costs follow from it (the capability record reports them; the host decides). - **GPU backend (L6):** expected on phones and browsers for the Real3D. - **Evidence:** tier 2 for the PowerPC (and its timing), tier 5 for everything else. The Real3D is a functional model with provisional timing; the README must say "identical to MAME on N slices", never "accurate". ## First measurements 1. Real3D status reads, flushes and frame-buffer reads per frame (a short MAME trace with watchpoints on 0x84000000 and 0x88000000). 2. The PowerPC's instruction mix and its share of TLB-miss handler time in a step 2 slice. 3. A ppc-rust interpreter's cycles per instruction (first in the GameCube line, which shares the core).