# Domains and speed Read with the charter's "Domains and channels" and "Capabilities" and the accepted JIT proposal (emulator-lineage `docs/proposals/2026-11-jit.md`: the no-JIT path first). A proposal for the specification to confirm. ## System 24 domains | Domain | Holds | Clock (MAME) | Why | | --- | --- | --- | --- | | **C: CPUs** | the main 68000 (BIOS, floppy loading, I/O), the sub 68000 or FD1094 (the game), their shared RAM, the 315-5296 I/O, the floppy controller, the YM2151 and DAC as the CPUs write them | 10 MHz each | the main CPU holds and releases the sub and both reach shared RAM (OBSERVED: the sub runs code the main loaded): tightly coupled, one domain, as the charter says of the 32X's SH-2 pair | | **V: video** | tilemap, sprites, mixer, palette, their RAMs (patterns loaded from the floppy) | 16 MHz pixel clock | its own clock; meets C at the video RAMs and the interrupts | | **F: floppy drive** | the drive's rotation and data stream | the drive's | a mechanical stream like the Sega CD's drive; may be stepped inside C in the order of record (the charter's Sega CD precedent) | | **A: audio out** | YM2151 synthesis and the DAC stream | 4 MHz / 64 = 62.5 kHz samples | a pure producer from register writes over time | **Channels**: the video RAMs (tile, character, sprite, palette, mixer registers); the vblank and timer interrupts to both CPUs (U4); the FDC's registers and its data transfer to the main CPU; YM2151 register writes and the DAC byte; the 315-5296's ports. **Sync points**: every channel access, interrupt sampling on both 68000s. **Memory kinds and writers** (for a cached interpreter): | Memory | Kind | Written by | | --- | --- | --- | | BIOS ROM (main) | ROM | nobody | | shared and work RAM | RAM, **all game code on floppy sets** (loaded once, then executed) | both CPUs, the FDC path | | sub CPU code on FD1094 sets | RAM seen through the FD1094: a decode cache keys on the decrypted words and the FD1094's state | the main CPU (loading) | | tile, character and sprite RAM | RAM | the CPUs (patterns from the floppy) | ## The arithmetic: instructions per second | Processor | Clock | Rate per instruction (OBSERVED in MAME) | Instructions a second | | --- | --- | --- | --- | | main 68000 | 10 MHz | 8.2 cycles while loading (`hotrod`, 120 frames); 14.8 in play (3 frames at frame 1500) | **0.68-1.23 M** | | sub 68000 / FD1094 | 10 MHz | 13.0 (`hotrod`), 10.9 (`gground`) in play | **0.77-0.92 M** | | YM2151 | 4 MHz | 64 clocks a sample, 32 operator slots | 62,500 samples, **2.0 M** operator steps | | video | 16 MHz dots | 656 x 424 x 57.524 | **16.0 M** dots, 10.95 M visible (496 x 384) | **A System 24 in play is about 1.5-1.6 M CPU instructions a second** (0.68 + 0.92 at the heaviest pairing measured: 1.6 M), plus 2.0 M FM operator steps and 16 M dots. The dots are three times a System 16's (6.3 M, system16-python) and the largest cost. ## System 32 (for the proposed sibling) | Processor | Clock | Rate (OBSERVED in MAME) | Instructions a second | | --- | --- | --- | --- | | V60 | 16.107950 MHz | exactly 8 cycles every instruction (MAME's flat charge, **not** timing evidence) | 2.01 M in MAME's model (`radm`: 2,013,494 in 60 frames) | | V70 (Multi 32) | 20 MHz | exactly 8 | 2.5 M in MAME's model | | Z80 | 8.05 MHz | 10.1 (`radm`, 60 frames) | 0.79 M | | V25 (6 sets) | 10 MHz oscillator, 5 MHz internal | 11.7 (`ga2`) | 0.43 M | | two YM3438 | 8.05 MHz / 144 = 55.9 kHz, 24 operator slots each | | 2.7 M operator steps | | video | 6.54 MHz dots | 416 x 262 x 60 | 6.54 M dots a screen (Multi 32: two) | A System 32 is about **2.8 M CPU instructions a second** in MAME's model (V60 2.0 + Z80 0.8), 3.3 M with the V25 or on Multi 32. Because MAME charges 8 cycles flat, the real V60 rate is unknown: a CISC with memory-to-memory operands likely averages more cycles than 8, which would lower the instruction rate, so 2.0 M is a planning ceiling, not a measurement (HYPOTHESIS). ## What that means per tier - **segasys24-python** (PyPy): m68000-python runs 18.7-33.5 M instructions a second on PyPy (its validation, quoted by system16-python), 12-20 times the 1.6 M need. The 16 M dots a second and the YM2151 are the cost; megadrive-python's 16-21 frames a second on PyPy with FM (its README, as quoted by system16-python) suggests well below real time with FM and the per-dot video (HYPOTHESIS until the board runs). Reference boards are correct, not fast. - **segasys24-rust**: m68000-rust measures 134 M instructions a second natively and about 112 M as WebAssembly (m68000-rust-fast README, as quoted by system16-python): about 70 times the CPU need in a browser; a phone at a tenth still has seven times. **The plain Rust transcription reaches real time on desktop, phone and browser**; the dots (16 M a second) and FM are the budget, as on play-md. - **segasys24-rust-fast**: run-ahead headroom only. Threads at the V domain (picture drawing from a register-write log, a pure producer) and the audio producer are available if a phone measurement asks. - **Turbo / JIT**: not needed. `recompile: none` everywhere, the iPhone included. Floppy- loaded code in RAM is the invalidation case a cached interpreter would watch (written once at load, then stable). - **System 32** (a later sibling): a V60 interpreter in Rust needs about 2 M instructions a second, the order of the Mega Drive's 68000 plus Z80; a new CISC decoder in Rust should reach tens of millions a second (HYPOTHESIS: v60-python does not exist), so real time without recompilation everywhere is expected, with a cached interpreter (decode once, replay) as the no-JIT fallback if a phone falls short.