# Domains and speed Read with the charter's "Domains and channels" and "Capabilities" (`recompile: native | wasm | none`), and the accepted JIT proposal (emulator-lineage `docs/proposals/2026-11-jit.md`: the no-JIT path first). The Dreamcast is not in that proposal's family table yet; this page proposes its row. Everything here is a proposal for the specification to confirm. ## Domains | Domain | Holds | Clock (source) | Why one domain | | --- | --- | --- | --- | | **C: CPU** | the SH-4 (caches, TLBs, SQs, on-chip modules), system RAM, the boot ROM and flash, Holly's bus arbiter, interrupt controller and DMA engines | SH-4 200 MHz (MAME); bus and peripheral clocks from FRQCR (sh4-python U2) | the SH-4 and the DMA engines share system RAM with no coherency; every DMA start and end is a CPU-visible event | | **V: video** | the TA, the ISP/TSP renderer, VRAM, the display controller | Holly's own clock (not in a document we hold); pixel clock 27.0 or 26.91 MHz (holly-pvr2.md C2) | the TA's lists, the renderer and the scan-out all live in VRAM and meet C only through area 4 writes, VRAM accesses, registers and interrupts | | **S: sound** | AICA: the ARM7DI, the 64 channels, the DSP, sound RAM, the RTC | 22.5792 MHz AICA, ARM7 at 2.82 MHz (MAME) | own crystal; meets C only over G2 and one interrupt | | **D: drive** | the GD-ROM drive (HLE) | its own | meets C through the G1 ATA registers and G1 DMA, S through CD-DA | | **M: Maple** | the peripherals (controllers, VMU memory/LCD/clock; an LLE VMU's CPU) | the bus's 2 Mbit/s; a VMU's own clocks | meets C only through Maple DMA frames | Optional split inside V for `-fast`: the renderer (a pure producer, below) apart from the TA and the display controller. ## Channels and sync points | Channel | From -> to | Mechanism | Sync point for | | --- | --- | --- | --- | | TA input | C -> V | SQ bursts and CPU writes to 10000000-13FFFFFF; PVR DMA | each burst (the TA consumes it in order; its errors and list-done events come back as interrupts) | | VRAM and PVR registers | C <-> V | CPU accesses to area 1 and 005F8000 | every access | | render start / done | C -> V -> C | `PVR_ISP_START`; render-done events 0-2 | the start; the done time (FITTED) | | raster events | V -> C | V-blank in/out, H-blank, the two raster lines | their times (computable from the display mode) | | G2 | C <-> S | sound RAM and AICA registers through Holly's G2 FIFO; G2 DMA channel 0 | every access; DMA start and end | | SPU interrupt | S -> C | event 0101h | its time | | ARM7 <-> SH-4 mailbox | S <-> C | sound RAM (KOS's command queue) | inside the G2 accesses above | | G1 ATA, G1 DMA | C <-> D | ATA registers at 005F7000; GD DMA; events 0100h, 000Eh | every access; DMA end | | CD-DA | D -> S | the drive's audio into the AICA (U13 in aica.md) | none needed: a timestamped sample FIFO (pure producer) | | Maple DMA | C <-> M | descriptor list in RAM, responses in RAM; event 000Ch | DMA start; DMA end | | light gun | M -> V | the display's beam position latched (to read) | the trigger's time | ## Memory kinds and writers (what invalidates cached code) | Memory | Kind | Written by | | --- | --- | --- | | boot ROM | ROM | nobody | | flash | flash | the SH-4 through the flash command protocol | | system RAM (area 3) | RAM: all game code lives here | the SH-4 (through the O-cache or SQs), G1 DMA (disc reads), G2 DMA, Maple DMA | | O-cache RAM mode (7C000000) | on-chip RAM, code possible (HYPOTHESIS) | the SH-4 | | the SH-4's I-cache | cache | refills; invalidated by CCR.ICI and the I-cache array (sh4-python mmu-caches-sq.md) | | sound RAM | RAM: the ARM7's code | the SH-4 over G2, G2 DMA, the ARM7, the DSP's ring buffer | | VRAM | RAM: no CPU code (HYPOTHESIS) | the SH-4, the TA, the renderer, PVR DMA | ## The arithmetic: work per emulated second **SH-4.** 200 MHz, two instructions a cycle at most: a ceiling of 400 M instructions a second. MAME, a detector, charges 1.281 cycles an instruction in the boot ROM's menu: 2.61 M instructions a frame, **156 M a second**, 90 % of them a wait loop (mame-oracle.md). Working range for games: **100-200 M instructions a second** (HYPOTHESIS, 0.5-1.0 instructions a cycle; to replace with counts from games). **ARM7DI.** 2.82 MHz (MAME): at most 2.82 M instructions a second; MAME's boot ROM window ran **1.25 M a second** (62,301 instructions in 141,258 cycles over frames 600-603, mame-oracle.md). **AICA.** 64 channels x 44,100 samples = **2.82 M channel-samples a second** (each an address step, interpolation, envelope, LFO, pan); the DSP at 128 steps a sample (by analogy with the SCSP: HYPOTHESIS until U11) = **5.64 M steps a second**. **PVR2.** Output: 640 x 480 x 60 = **18.4 M pixels a second** (VGA and 480i). The ISP's depth work scales with depth complexity: at an average of 3 surfaces a pixel (HYPOTHESIS) about 55 M depth tests a second, plus texturing and shading of the visible opaque pixels (18.4 M) and every translucent layer over them (1-3 more passes: HYPOTHESIS). Tiles are independent: 300 tiles a 640 x 480 frame, each renderable alone. **TA.** Up to a few hundred thousand vertices a frame in heavy games (HYPOTHESIS; the PowerVR2's marketing figures are not evidence): 32 bytes each, binned into tiles. **Totals** (instruction-like steps a second, high-level drive): | Case | SH-4 | ARM7 | AICA slots | AICA DSP | renderer (fragment ops) | | --- | ---: | ---: | ---: | ---: | ---: | | boot ROM menu (MAME's count) | 156 M | 1.25 M | 2.82 M | 5.64 M | small | | typical game (HYPOTHESIS) | 100-150 M | 1-2.8 M | 2.82 M | 5.64 M | 50-100 M | | heavy game (HYPOTHESIS) | 150-200 M+ | 2.8 M | 2.82 M | 5.64 M | 100-200 M | ## What that means per tier, per target - **dreamcast-python** (PyPy): the SH-4 alone at 0.05-0.1 M instructions a second (sh4-python's brief, from sh2-python's measured 0.09-0.11 M) is **1,000-4,000 times slower than real time**; the boot ROM's first 10 s (to its Set Date/Time dialog, about 1.6 G instructions at MAME's count) would take 4.5-9 hours. The specification runs short targeted cases: single-step CPU cases, a TA scene rendered from a captured parameter stream, an AICA channel against a capture, a few hundred thousand instructions of the boot ROM. That is era 3's "cases get short and targeted", further than any board the family has built. - **dreamcast-rust**: the SH-4 at 11-45 M (sh2-rust's 22-45 M native, 20-27 M wasm, as the yardstick): a few times too slow everywhere. Correct, not playable. - **dreamcast-rust-fast**: SH-4 30-60 M native on a fast core (sh2-rust-fast: 57-64 M unpinned P-core, 28-31 M E-core; 38-45 M / 20-23 M as wasm), on its own thread; the renderer as a pure producer on 1-4 threads (deterministic: each tile's pixels depend only on the lists and VRAM at render start, when the CPU does not write the regions being read before render-done: a declared condition, checked); the sound domain on another thread (about 10 M steps a second in total: one core is plenty); the drive and Maple as producers. - **dreamcast-rust-turbo**: the SH-4's cached interpreter (decode once, replay; no executable memory) as the first lever: 45-180 M native, 30-135 M as wasm (1.5-3x over `-fast`: HYPOTHESIS until the SH-2 pilot measures one); exact wait-loop skipping where a loop provably reads only state that cannot change before its exit (not a concession when exact); then recompilation where allowed. **Does the no-JIT path reach real time?** | Target | SH-4 need | No-JIT SH-4 (turbo, cached interpreter) | Other domains | Verdict with `recompile: none` | | --- | ---: | ---: | --- | --- | | desktop native, fast core | 100-200 M | 45-180 M | threads, room to spare | **yes for typical games, no for heavy ones** | | desktop native, E-core class | 100-200 M | 25-90 M | threads | no | | iPhone native (JIT forbidden) | 100-200 M | near the desktop fast-core figure on the newest phones (HYPOTHESIS, unmeasured), half on older ones | threads | **no in general**; light games on the newest phones at best | | browser wasm, no codegen | 100-200 M | 30-135 M | wasm threads need cross-origin isolation | **no** except light games on fast desktops | | browser, recompile to wasm | 100-200 M | unmeasured | | the plausible web route (v86's approach), to measure | The board's capability statement, proposed: `recompile: none` meets real time on fast desktop cores for typical software; phones and browsers need `native` (where allowed) or `wasm` recompilation, or named concessions (inexact wait-loop skipping; coarser sync inside compiled blocks; a GPU renderer instead of the exact software renderer), each off by default. This is the first family board where the no-JIT path does not reach every target, and the charter asks that it be said plainly. None of these figures is measured on a Dreamcast game; the IPC range, depth complexity, translucency passes and cached-interpreter gain are hypotheses to replace with the board's own counts.