# How the Sega 32X works: a top-down guide Written 2026-11-25 for Aubrey, from the 32X board **sega32x-python**, the CPU core **sh2-python** and the Mega Drive board **megadrive-python**. Every fact names the file it comes from, with the spec's evidence tag where it gives one: MEASURED, TEST ROM, DOC (a document), OBSERVED (what an emulator did when run), FITTED, HYPOTHESIS, and the board's own RESEARCH (developer notes) and "assumption". Read one thing first. **No 32X hardware is at hand, and nothing in the board is measured on one** (sega32x-python `README.md`; `docs/claims.md`: "Nothing here is MEASURED"). The 32X spec rests on Sega's and Hitachi's documents, on test programs that were checked on real consoles by their authors, and on emulators run as closed boxes. This guide keeps that boundary. Short names: "the Manual" is Sega's *32X Hardware Manual* (1994, marked "provisional", written before the hardware shipped). "HM" is Hitachi's SH7604 hardware manual and "PM" its SH-1/SH-2 programming manual. sega32x-python `docs/start-here.md` lists them all. --- ## 1. The machine in one picture The 32X is not a console. It is a board that plugs into the Mega Drive's cartridge slot, and the game plugs into the top of it (start-here.md, "The machine in one paragraph"; Manual 1.1, DOC). It has no crystal of its own. A phase-locked loop (PLL) takes the 68000's clock from the slot and multiplies it by three for its two SH-2 processors (`docs/timing.md`, "The clock domain"; service manual block diagram, DOC). ``` MEGA DRIVE (megadrive-python) MCLK 53.693175 MHz (NTSC) ──┬── /7 ──► 68000 (VCLK, ~7.67 MHz) │ Z80, Mega Drive VDP, YM2612 FM, PSG │ cartridge slot: VCLK, EDCLK (pixel clock), HSYNC, VSYNC, YS, audio, 68000 bus │ ┌───────────────────────────▼─────────── 32X (sega32x-python) ──────────────────────┐ │ PLL: VCLK x 3 = MCLK x 3/7 = 23.01 MHz │ │ │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ SH-2 master │ │ SH-2 slave │ each an SH7604: CPU + 4 KB cache, DMAC, │ │ │ (sh2-python) │ │ (sh2-python) │ FRT, WDT, SCI, divider, bus controller │ │ └──────┬───────┘ └──────┬───────┘ FRT output A (FTOA) ──► its own /IRL0 │ │ └───────┬──────────┘ │ │ ONE shared SH-2 bus (master owns it, slave asks) │ │ ┌──────┬──────┴──────┬────────────────┬──────────────────┐ │ │ SDRAM boot ROMs 315-5818 gate array cartridge 315-5781 (32X VDP) │ │ 256 KB 2 KB/1 KB system registers, (shared with the 2 x 128 KB frame │ │ comm ports, DREQ 68000, RV bit) buffers, palette, │ │ FIFO, PWM sound RAMDAC │ │ │ │ │ │ 68000 side: $A15100- │ Mega Drive RGB + YS ──►│ analog switch │ │ $A153FF, $840000- │ ▼ pixel by pixel │ │ $9FFFFF windows └── PWM ──► 32X sound mixer ──────────► TV / speaker │ └────────────────────────────────────────────────────────────────────────────────────┘ ``` The facts in the picture: - Two SH-2s (Hitachi SH7604 parts, Sega 315-0922/315-0998), 256 KB of SDRAM (synchronous DRAM) shared by both, two 128 KB frame buffers (one shown while the other is drawn), a 256-entry palette, a VDP (video display processor) with no sprites or tiles, and two PWM (pulse-width modulation) sound channels (start-here.md; service manual, DOC). - Two Sega gate arrays do the work. The **315-5818** holds the Mega Drive interface, the system registers, the FIFO (first-in, first-out queue), the communication ports, PWM and the SH-2 bus. The **315-5781** is the VDP, its registers, the palette and the RAMDAC (the chip that turns palette colours into an analog signal) (start-here.md; service manual, DOC). - **The clocks are locked.** 7 MCLK (master clocks) = 1 68000 clock = 3 SH-2 clocks, exactly, for ever (timing.md, "The clock domain"). The board needs no drift handling: it steps each SH-2 by `mclk * 3 // 7` and keeps the remainder. - The 32X's pixels are clocked by the Mega Drive VDP's EDCLK (its pixel clock) and timed by its HSYNC and VSYNC, which cross the slot (timing.md; service manual pins, DOC). **Who can see what.** The 68000 controls everything except the SH-2s and the SDRAM. The SH-2s cannot see the Mega Drive at all ("MEGA Drive hardware cannot map in SH2 address space", Manual 2.2). They talk to the 68000 only through the communication ports, the CMD interrupt and the DREQ FIFO. And nothing in the 32X interrupts the 68000 ("There are no interrupts from SH2 to 68000", Manual 3.3) (start-here.md). The 68000 has to poll. --- ## 2. One frame's life A frame on the 32X is a Mega Drive frame. The 32X VDP has no timing of its own: it follows the Mega Drive's lines, at 3,420 MCLK per line in H40 (the 320-pixel mode) (timing.md, "The line"). **Power-on, before the first frame of a game.** The 68000 starts with ADEN = 0, the 32X switched off. Then the 68000 map looks exactly like a plain Mega Drive's, so a Mega Drive game runs through a 32X untouched (start-here.md, "68000 memory map"; Manual 3.5, DOC). A 32X cartridge carries Sega's initial program at `$3F0`, which sets ADEN = 1. The master SH-2's boot ROM checks that program byte for byte (the security check), copies the game's code into SDRAM, writes `"M_OK"` to a communication port and jumps; the slave answers `"S_OK"` (start-here.md, "Boot ROMs"; Manual 5.1-5.2, DOC). The boot ROMs are Sega's: bring your own. **Then, every line** (timing.md, "Where the board puts it"): 1. **HBLANK rises**, 12 dots before the Mega Drive's own HBlank flag. No hardware source places it: it is the one spot where all four of the Manual's figures come out exactly on megadrive-python's measured H40 line. HINT (the horizontal interrupt, level 10) goes to the SH-2s every "H count + 1" lines. 2. **PEN rises** 3 dots later: the CPUs may now touch the palette. 3. **The register latch**, 76 dots after HBLANK. A VDP register written before it takes effect on this line; after it, on the next line (Manual: "valid from the next line"). 4. **The display**: 100 dots after HBLANK the 320-dot row starts. The VDP reads the line's start from the **line table** (the first 256 words of the shown frame buffer), then draws 320 pixels from there (start-here.md, "The 32X VDP"). 5. **The composite.** For each pixel, an analog switch picks the 32X's colour or the Mega Drive's. The Mega Drive VDP's YS signal ("no plane or sprite pixel here") crosses the slot for this (start-here.md; service manual, DOC). **Then, once a frame:** - **VBLANK** starts 27 dots after the HBLANK that follows the last row (224 on NTSC). VINT (level 12) goes to the SH-2s (timing.md, "Interrupts to the SH-2s"). - **The frame buffers swap.** Writing FS (frame select) during display takes effect at the next VBlank. Reads return the old buffer until then (start-here.md, "Frame buffer control"). This is how a game double-buffers. - **Meanwhile, all frame long**, the master and slave SH-2s draw into the hidden frame buffer through a 4-word write FIFO and run game logic from SDRAM. The 68000 runs the Mega Drive side and feeds the SH-2s through the communication ports, the CMD interrupt and the DREQ FIFO (domains.md, "Channels"). The PWM raises its timer interrupt (level 6) every TM periods and paces DREQ1, so SH-2 DMA channel 1 can feed it samples without the CPU (start-here.md, "PWM"). **How the spec runs that frame** (sega32x-python `docs/domains.md`, "Order of record"). The Mega Drive leads: one 68000 instruction, the Z80 behind it, then the 32X is caught up to the 68000's clock. Inside the catch-up, the board takes whichever SH-2 is earlier on the time line (the master on a tie), runs any VDP and PWM events due by then, and steps that chip one instruction. Every 68000 access to 32X space catches the 32X up first. Time is integers, so every run is the same, and save states continue identically. --- ## 3. Each part in turn ### The 68000 side: windows and registers **What it is for.** It lets the 68000 switch the 32X on, reach the frame buffer and the cartridge, and talk to the SH-2s. **How software talks to it.** With ADEN = 1 (start-here.md, "68000 memory map"; Manual 3.1, DOC): - `$000000-$0000FF` is the 32X's vector ROM; the level-4 vector at `$70` is a writable register (testpico, TEST ROM). - The cartridge appears at `$880000` (fixed) and in four 1 MB banks at `$900000`, while the **RV** bit is 0. With RV = 1 it returns to `$000000` and the SH-2s lose it. - The system registers sit at `$A15100-$A1513F`, the VDP's at `$A15180`, the palette at `$A15200`. The frame buffer is at `$840000`, with an "overwrite image" at `$860000` where zero bytes are skipped. - `$A130EC` reads `"MARS"`, the 32X's ID. **Famous quirks.** - **RV for cartridge writes and DMA.** The 32X can hold the 68000 off with its own DTACK (the 68000's "data ready" signal) only in ranges the Mega Drive never answers. So games set RV = 1 around save RAM writes and around Mega Drive VDP DMA from the cartridge, and the SH-2s stall on any cartridge access while RV = 1 (start-here.md; Manual 3.1, DOC). The board models the stall (`Quirks.rv_stall`, domains.md). ### The two SH-2s (sh2-python) **What they are for.** The 32X's computing. Most of a game's code and data live in SDRAM (domains.md, "Memory map"). **What they are.** Each is a Hitachi SH7604: a 32-bit RISC CPU with 16 general registers and a five-stage pipeline, plus on-chip modules: a 4 KB cache, a two-channel DMA controller (DMAC), a divider, a free-running timer (FRT), a watchdog, a serial port, a bus state controller (BSC) and an interrupt controller (sh2-python `README.md`; HM 1.1, DOC). They are part of the chip, so they are part of the core. **How software talks to them.** Their memory map (start-here.md of sega32x-python, "SH-2 memory map"; Manual 3.1, DOC): boot ROM at `$00000000`, 32X registers at `$00004000`, cartridge at `$02000000`, frame buffer at `$04000000`, SDRAM at `$06000000`. Each address also has an uncached alias: add `$20000000`. The master owns the bus; the slave asks for it before each access (2 states) and the master takes it back 1 state after the slave's access ends (`docs/timing.md`, "What the board models"; HM 7.10, DOC). **Interrupts.** Levels 14 (VRES, the reset button), 12 (VINT), 10 (HINT), 8 (CMD), 6 (PWM) arrive on the SH-2's /IRL pins as auto-vectors. Each SH-2 has its own masks (timing.md; Manual 3.2.2, DOC). **Famous quirks.** The FTOA wire and the cache get their own sections below. A third is the **"2.5 cut" interrupt bug**: a developer's FAQ says early 32Xs carry an SH-2 revision that, when a high-priority interrupt arrives within 3 cycles of a low one, takes the low one's vector but sets SR (the status register) to the high level. No measurement, no Hitachi erratum: an **open decision**, a revision option defaulting to off (sh2-python `docs/undocumented-behavior.md`, U5). ### Communication: ports, CMD and the DREQ FIFO **What it is for.** The only way across between the 68000 and the SH-2s. **How software talks to it** (domains.md, "Channels"; Manual 3.2.1, DOC): - **Eight communication ports**, 16 bits each, at `$A15120` (68000) and `$20004020` (SH-2s). Both sides read and write them. The Manual says simultaneous writes are undefined. - **The CMD interrupt.** The 68000 writes INTM or INTS at `$A15102` to raise level 8 on the master or slave. The SH-2 clears its own bit. - **The DREQ FIFO.** The 68000 pushes words into `$A15112`. While it holds a word, DREQ0 is asserted, and an SH-2's DMA channel 0 pulls the words into SDRAM. **Famous quirk.** The spec names one limit of its own: the chips run whole instructions, so an SH-2 may stand up to one instruction past the 68000's clock when the 68000 reads a port. An SH-2 write made in that overshoot is visible to the 68000 early. That any game depends on it is a **HYPOTHESIS**; testpico's and the Mars Check Program's communication tests pass as it is (domains.md, "Sync points, summarised"). ### The 32X VDP (315-5781) **What it is for.** It draws a bitmap picture over (or under) the Mega Drive's. **How software talks to it** (start-here.md, "The 32X VDP"; Manual 3.2.3 and 3.3, DOC). The FM bit gives the VDP to one side at a time: the 68000 with FM = 0, the SH-2s with FM = 1. Three modes: - **Packed pixel**: one byte per pixel, a palette index. - **Direct colour**: 16 bits per pixel, 15-bit colour plus a priority bit. - **Run length**: one word holds a length and a palette index, for 1-256 pixels. The Manual does not say which byte is which; the board follows ares (length high), and the test programs' pictures agree. **Famous quirks.** - **The palette is only reachable in blanking** (or in direct colour mode). Otherwise the CPU waits, up to a whole line (start-here.md; timing.md, "Bus waits"). - **The composite rule.** What counts as "transparent" on the Mega Drive side, the YS signal or colour 0, is **contested**. The board uses YS. Its H32 alignment and pixel width are **HYPOTHESIS** and **provisional** (`docs/claims.md`, "The composite rests on detectors"). Nothing judges the composite: no hardware-checked program looks at the picture that leaves the console. - **H32 mode.** The Manual says the Mega Drive must be in H40 when the 32X displays. Games break the rule: NFL Quarterback Club turns on H32 in its menus (start-here.md). What EDCLK does in H32 has no permitted source. The board assumes it keeps its H40 dots: a **HYPOTHESIS** (timing.md, "The clock domain"; `Quirks.edclk_h32`). ### PWM sound **What it is for.** Two 12-bit channels of sampled sound beside the Mega Drive's FM and PSG. **How software talks to it** (start-here.md, "PWM"; Manual 3.2.1 and 3.4, DOC). A cycle register sets the period in SH-2 clocks. Each channel has a 3-entry FIFO; writing when full drops the oldest. Every TM periods (TM = 0 means 16) a timer interrupt fires and DREQ1 asks DMA channel 1 for more samples. NTSC: cycle 1047 gives 21,999.4 Hz (timing.md, "PWM"). **Famous quirk: the period.** The Manual says cycle x Scyc. ares uses cycle - 1. Run here, PicoDrive's tones fit cycle - 1 and BlastEm's cycle - 2 (OBSERVED). The board takes cycle - 1 (claims.md, "PWM sound rests on detectors"). Output level and gain are marked **assumption**. Nothing that leaves the console is judged. --- ## 4. Where it's hard ### The FTOA finding (2026-11-25) **The wire.** Each SH-2's free-running timer has an output pin, FTOA. On the 32X it is wired straight to that SH-2's /IRL0 interrupt pin. When FTOA is low it asks for interrupt level 1 (start-here.md, "System registers"; tagged RESEARCH: the 32XDK wiki's "FRT Bumping" page, read from the schematic; testpico's hardware-written comment "SR $10 at start: 0 causes endless irq"). The board expresses it in one line (sega32x-python `src/sega32x_python/sh2side.py`): ```python # /IRL0 is FTOA itself: a low FTOA asserts it (Quirks.ftoa_to_irl0). self.chips[index].irl = level | (self.ftoa[index] ^ 1) ``` So a program that lowers its interrupt mask to 0 without first setting up the FRT gets a level-1 interrupt after every instruction it tries to run. **What the beta sweep found** (`docs/worklog.md`, Session 19; `docs/status.md`, "The FTOA finding"). 19 titles stall on the board and not on the two closed-box detectors (PicoDrive, BlastEm): the Gnu Sierra sample, the Golf Magazine betas 2-10, the Motocross Championship betas 1-7, and the Doom betas 2 and 4. Each runs an SH-2 at mask 0 while FTOA is low. In frame 161 of Gnu Sierra the master took the interrupt **25,019 times**, and the jump it was trying to reach never ran. With FTOA kept off /IRL0 in a scratch run, the board draws at frame 200 what PicoDrive draws. **Why it is believable.** The later betas of the same games, which agree with the detectors, write the FRT at the SH-2's entry. That follows Sega's Technical Bulletin #10 of 1994-09-23: "Initialization of the free run timer must be done whether or not interrupt is used." **What the board did.** Nothing. It follows the documents. That these programs stall on a production 32X is a **HYPOTHESIS**; they may have been built on development units without the wire. Two smaller points stay open with it: the level FTOA leaves reset at (sh2-python sets 0, untagged there), and whether a real SH-2 runs one instruction between back-to-back level-1 interrupts (sh2-python takes the interrupt first; testpico's "endless" agrees). **A related bulletin.** Sega's Technical Bulletin #27 says a CMD interrupt can be taken twice, at level 8 and then at level 9, when FTOA changes the IRL level before SR is masked: "this problem only occurs on the 32X". The core needs no special case; it follows from correct sampling plus the wire (sh2-python `docs/undocumented-behavior.md`, U6, DOC). ### The SH-2 caches Each SH-2 has a 4 KB, 4-way cache: 64 entries of four 16-byte lines, write-through, pseudo-LRU (least recently used) replacement (sh2-python `docs/start-here.md`, "The cache in one page"; HM chapter 8, DOC). The top address bits choose a space: cached (`$0...`), cache-through (`$2...`), associative purge (`$4...`: a write there throws out the line that holds that address), the address array, and the data array. **Why it is hard.** There is no snooping. DMA writes do not update the cache, and neither do the other SH-2's writes. Software must purge (start-here.md; HM 7.11.2 and 8.5.2, DOC). **The one hardware measurement of purge order** (U9). Dunkley measured, on a CPS3 arcade board, that a cache purge (a write to CCR, the cache control register) waits behind a store still in the bus controller's write buffer, while cache hits keep using the old lines. It gave eight values, `1111, 1122, 2222, 2222` and so on. Every emulator checked purges inside the CCR write instead. sh2-python models the wait, and reproduces his eight values exactly (sh2-python `docs/undocumented-behavior.md`, U9; MEASURED by its author on one CPS3 board, not on a 32X or a Saturn). One of his results, a stale fetch that trapped, is **not** reproduced and stays open. **Against a real 32X.** bakemono's 32xspd benchmark, photographed on one, gives 11 states an iteration for a cached-read loop; the core runs it at 11 (sh2-python `docs/timing.md`, "The cache"; research tier, one photograph). ### DMA, the write FIFO and the bus - **DMA** (sh2-python `docs/timing.md`, "DMA"; HM chapter 9, DOC). Two channels, cycle-steal or burst. On the 32X, DREQ0 comes from the 68000's FIFO and DREQ1 from the PWM. DMA writes never update the cache. Since 2026-11-25 the core also models DMA address errors (vector 10), found by the Rust port (sh2-python `README.md`; U15). - **The frame-buffer write FIFO** (sega32x-python `docs/timing.md`, "What the board models"; Manual 4.1, DOC). Four words, one leaving every 5 states: a write costs 3 states with room and 5 once full. Sega's *32X H/W Information* lists the same shape. - **The missing time.** On the 32xspd photograph, a loop of 8 frame-buffer writes and one cache line fill costs about 9 states more than the board gives. No document says why. Each rule tried overshoots. A fitted constant would fit, and **it is not taken** (open item 12 in `docs/undocumented-behavior.md`). That refusal is the family's method in one line. ### What we know versus what is HYPOTHESIS From `docs/claims.md` and the open items, in rough order of strength: | Part | Strength | | --- | --- | | 68000-side registers and windows | checked by testpico's 68000-side tests (TEST ROM) | | SH-2s on the bus, at the level tested | testpico's twelve 32X tests, the Mars Check Program (TEST ROM) | | The 32X VDP alone | Mars Check, testpico `irq vint` (TEST ROM); pictures agree with two detectors (OBSERVED) | | SH-2 instruction behaviour | the manuals (DOC); 129 M instructions of four games register-exact against MAME (OBSERVED) (sh2-python `README.md`) | | SH-2 bus costs | **documents, not hardware**, one photograph | | The composite | **detectors only**; "transparent" is contested; H32 is **HYPOTHESIS** | | PWM sound | **detectors only**; level and gain are assumptions | | FTOA storms stalling those 19 programs on a console | **HYPOTHESIS** | | The "2.5 cut" bug | a FAQ; open decision | "Agree" with a detector says only that the board has not gone wrong in a way that detector would show. It does not say what the hardware does (claims.md). ### Which hardware probes would settle it There is no 32X here, and claims.md records Aubrey's decision that none will be measured. So these probes are written down, not queued. The spec names them: 1. **The FTOA probe** (worklog Session 19): a program that sets SR to 0 with the FRT at its reset values and counts what its main loop does. One run settles three things: whether the storm happens, FTOA's level out of reset, and whether an instruction runs between interrupts. 2. **A video capture** for the composite: what "transparent" means, the H32 placement, the colour levels (claims.md; `docs/validation.md`, "What a judge would cost to add"). 3. **An audio recording** of the PWM sample against a Mega Drive tone: the period, level and gain (claims.md). 4. **A bus timing program** like 32xspd with more loops, to find the frame-buffer copy's missing states (undocumented-behavior.md, open item 12). --- ## 5. How our family models it ### The Python specification Three repositories, pinned by git revision (sega32x-python `README.md`; `docs/status.md`): - **megadrive-python** is the Mega Drive: 68000, Z80, VDP, FM, PSG, input, and the **sockets** an add-on plugs into (its `docs/expansion-sockets.md`). The 32X is a *slot device that holds a cartridge*. Nothing is copied from megadrive-python. - **sh2-python** is the SH7604, used twice; its timing reproduces all 80 pipeline figures of PM section 7 (sh2-python `README.md`). - **sega32x-python** is everything in the two gate arrays: the SDRAM, frame buffers, boot ROM mapping, composite, PWM, and the board's own wiring (FTOA to /IRL0, the two SH-2s' serial lines crossed, DREQ0 and DREQ1) (start-here.md, "Where the cores fit"). Every board choice is a `Quirk` record in `machine.py`, with its basis, its status and what remains unresolved. **Where it stands** (status.md, 2026-11-25): milestone 6 (games) under way; all 60 titles of the smoke and release lists run 1,200 frames with no exception or lockup, and every difference from the detectors is triaged, as are the 149 betas and demos. ### Domains: what makes threads possible The charter asks every multi-core spec to name its domains and channels (charter, "Domains and channels"). sega32x-python did it on 2026-11-25 (`docs/domains.md`), and a test checks the boundaries against the code: | Domain | Time | Parts | | --- | --- | --- | | Mega Drive side | MCLK | megadrive-python's board, plus the 32X's 68000-facing half (`slot.py`) | | SH-2 pair (one domain) | SH-2 states | both SH-2s, SDRAM, boot ROMs, the shared bus, the write FIFO, interrupt lines (`sh2side.py`) | | 32X VDP | MCLK, from the Mega Drive VDP's line records | `vdp.py` | | PWM | SH-2 states | `pwm.py` | The two SH-2s are one domain, because every SDRAM access of either one could be seen by the other. As built, the VDP and PWM events still run inside the SH-2 loop, because they raise the SH-2s' interrupts; splitting them out is proposed for the fast tier (domains.md, items 10-11). ### The Rust tiers - **sh2-rust** (tier `x-rust`) transcribes sh2-python at `8824075` and proves every bus cycle, every step's states and every pipeline event identical (sh2-rust `README.md`). "Matches the Python" is all it claims. - **sh2-rust-fast** was started on 2026-11-25 as the speed fork. **sega32x-rust** is being built by another agent and had no commits when this guide was written. - families.md calls the 32X "the first board where a straight transcription will not be enough for real use". ### The speed plan, without JIT From emulator-lineage `docs/proposals/2026-11-jit.md`, a **draft** for Aubrey: - **How much is needed.** Each SH-2 issues at most one instruction a state, so the pair's ceiling is 46 M instructions a second. The benchmark's states per instruction put the real need at about 11-35 M a second. One core of the transcription gives about 27-45 M natively and 20-27 M as WebAssembly (sh2-rust `docs/status.md`, "Speed": MEASURED on this machine, interpreter only; the rest is an estimate). So natively one core covers the pair; in the browser it is at the edge, before the rest of the board. - **iPhone forbids JIT.** A native iOS app cannot create executable memory, so every board must meet its target with `recompile: none` (proposal, "Targets that forbid recompilation"; to confirm against Apple's current rules). - **The order, without JIT**: turbo's scheduling (catch-up, whole-line paths); a **cached interpreter** (decode once, replay the handler sequence: no executable memory, allowed everywhere); **threads** around the domains (the Mega Drive side, the SH-2 pair, the VDP, the PWM); and only then a code generator, on targets that allow one. - **What a cached interpreter must watch on the 32X**: code lives in SDRAM, written by both chips and both DMA controllers; each chip's cache sees only its own writes; the purge space and the cache-through alias are the software's tools (domains.md, "Memory map"; proposal, 32X row). Any of these can make a cached block stale. - **The SH-2 is the pilot** for the whole plan, because sh2-python's decode table is already generated from the manual, with one small handler per instruction. - **How it is proven**: lockstep at every block's exit, seeded faults aimed at stale blocks, and never reported as hardware accuracy. --- ## 6. Further reading Only sources listed in emulator-lineage `docs/sources.md`, with the licence and verdict it records: | Source | Licence | Verdict in sources.md | | --- | --- | --- | | ares (Near and others) | ISC | code OK (with notice); a comparator. Its 32X source is read by sega32x-python | | MAME | GPL-2.0+, some files BSD-3 | closed box only, with a per-file check for BSD-3 files; sega32x-python reads `mega32x.cpp` as BSD-3 (its `README.md`) | | PicoDrive | non-commercial licence | excluded for code; closed box only (a detector here) | | BlastEm | GPL-3.0 | closed box only (a detector here) | | jgenesis (jsgroth) | GPL-3.0 | closed box only; sh2-python's divider referee | | Nuked-MD (nukeykt) | GPL-2.0-only | closed box only; the struck H32 reasons came from it | | SingleStepTests | MIT | code OK; CPU cores' cycle-level judge | | Commercial ROMs, BIOS and boot ROMs | the makers' copyright | never shipped; found through `NO_INTRO_DIR` | The spec's main documents are **not yet rows in sources.md**: Sega's 32X Hardware Manual, its supplements and Technical Bulletins, the service manual, Hitachi's SH7604 manuals, notaz's testpico, the 32XDK wiki, Dunkley's CPS3 measurements (CC-BY-4.0, per sh2-python's `README.md`) and the 32xspd benchmark. So they are not listed here as reading. Their pins and tiers are in sega32x-python `docs/validation.md` and sh2-python `docs/validation.md`.