# Domains, channels and speed ## Domains and channels (proposed; HYPOTHESIS until the C148 is understood) | Domain | Parts | Clock | | --- | --- | --- | | **Main** | master and slave 68000s, their C148s, shared data ROM, C123, C116, sprites, ROZ or road, the key, the screen | 12.288 MHz | | **Sound** | 6809, YM2151, C140, sound RAM | 2.048 MHz (YM2151 on its own 3.579545 MHz) | | **MCU** | C65 (HD63705Z0) or C68 (M37450), inputs, DIP switches, analogue inputs | 512 kHz or 2.048 MHz internal | | **Link** (later) | C139 and its RAM to another cabinet | - | The two 68000s share the data ROM, video and the dual-port RAM side; like the 32X's SH-2 pair, they stay **one domain**. Channels: the **dual-port RAM** (68000s, 6809, MCU), the reset and interrupt lines from the C148s, the C139 RAM, and the picture and audio producers. The order of record interleaves by bus time (earlier first; master, slave, sound, MCU on a tie). Unlike System 1, the clocks are unrelated in rate (12.288, 2.048, 0.512 MHz) but share a master (HYPOTHESIS, 49.152 MHz), so the board's time unit can be the 49.152 MHz tick: 68000 cycle = 4 ticks, 6809 E = 24, C65 = 96, C68 = 24, video dot = 8. ## How much work (arithmetic shown) | Load | Per second | Arithmetic | | --- | --- | --- | | 68000 cycles | 24.58 M | 2 x 12.288 MHz | | 68000 instructions (Valkyrie, measured) | ~1.9 M | 1.14 M main + 0.76 M slave | | 6809 instructions | 0.66 M | measured, Valkyrie | | MCU instructions | 0.15 M (C65) or 0.59 M (C68) | measured | | All instructions | ~2.7 M (C65 board) | sum | | Bus cycles to interleave | ~27.1 M | 24.58 + 2.048 + 0.512 | | Video dots | 6.144 M | 384 x 264 x 60.606 | | YM2151 samples | 55,930 | 3,579,545 / 64 | ## Can the no-JIT path reach real time? Family measurements: m68000-rust 101-157 M instructions a second; megadrive-rust (one 7.67 MHz 68000 + a Z80 + VDP + FM + PSG, cycle lockstep) 4-6x real time with sound. - **Instructions**: ~1.9 M 68000 instructions a second is ~1.5% of m68000-rust's rate. - **Board**: ~27 M bus cycles a second to interleave is about **2.4x the Mega Drive's** 11.25 M (7.67 + 3.58), and the video adds a ROZ plane or a road over tilemaps and sprites. HYPOTHESIS, scaled from megadrive-rust: plain Rust at roughly 1.5-2.5x real time on this desktop, enough for real time but thin for run-ahead; **`-fast` is the desktop target**, as megadrive-rust-fast's x1.56 was for the Mega Drive. - **Desktop browser**: WebAssembly ~1.5-2x slower: real time needs `-fast`, and the cached interpreter for the 68000s (all code in ROM, so decode-once caches never invalidate except for code run from RAM, which the board must still detect). - **Phones (native and browser)**: a phone core at a third to a half of this desktop leaves plain Rust below real time; `-fast` plus the cached interpreter is needed, and **threads**: the main domain on one core, picture drawing (from a register-write log) and audio synthesis beside it. The sound and MCU domains meet the main domain only at the dual-port RAM and the C148 lines, so they could run ahead to the next dual-port access; whether that pays depends on how often the 68000s poll the RAM (to measure). - **`recompile: none`**: expected to meet desktop and desktop browser; for phones it is plausible but unproven, and the board should say so in its capabilities until measured. - **Python**: far from real time (two 12 MHz 68000s); the reference is correct, not fast.