# Start here: the Super FX as a core author needs it > **Sources (wave 2, 2026-11-19).** byuu's model is cited to **ares** (ISC, > `ares/component/processor/gsu` and `ares/sfc/coprocessor/superfx` at `9408cb4`; notice > in [NOTICE](../NOTICE)), its readable form; bsnes is a closed box and is not cited. > MAME is cited from its BSD-3 files (`bus/snes/sfx.cpp`, `sfx_dasm.cpp`) and from runs > (OBSERVED, MAME 0.285: traces, krom's rows, the rung-4 replays); its GSU file > `cpu/superfx/superfx.cpp` is GPL and a closed box. A **†** marks a statement about > Mesen2, snes9x, the sd2snes GSU or MAME's `superfx.cpp` that was **read from source under > the old rule (before 2026-11-19)**: those are closed boxes from now on, and such a > statement is never the basis of a default. Results of running Mesen2 or MAME are > closed-box observations and carry no mark. The Super FX is Argonaut's and Nintendo's **Graphic Support Unit (GSU)**: a 16-bit RISC-like CPU with sixteen 16-bit registers, a 512-byte instruction cache, a one-byte instruction pipeline, buffered access to the cartridge's ROM and RAM, an 8 x 8 multiplier, and a "bitmap emulation" unit that plots pixels straight into SNES character (tile) format. It sits on the cartridge between the SNES bus and the Game Pak ROM and RAM, and owns both buses while it runs. Five chips shipped (fullsnes "GSU Chip Versions"): | Chip | Package | Games (fullsnes, survey) | Clock source (fullsnes "External Oscillators") | | --- | --- | --- | --- | | **MC1** (Mario Chip 1; "Black Blob" epoxy and SMD) | 100 pin | Star Fox / Starwing (+ competition carts, SFC Box) | the SNES master clock (21.477 MHz NTSC) | | **GSU-1** | 100 pin | Stunt Race FX / Wild Trax, Vortex, Dirt Racer, Dirt Trax FX | own crystal, 21.4 MHz | | **GSU-1A** | 100 pin | Powerslide (prototype board) | own crystal | | **GSU-2** | 112 pin | Doom, Yoshi's Island (early boards), Winter Gold, Star Fox 2 | own crystal, 21.44 MHz | | **GSU-2-SP1** | 112 pin | Yoshi's Island (SHVC-1CB5B-20) | own crystal, 21.44 MHz | All run at **CLSR = 0: half the input clock (~10.7 MHz)** or **CLSR = 1: the full input clock (~21.4 MHz)**. The instruction set is the same on all five; the differences that sources name are the maximum ROM/RAM size (GSU-2: 2 MiB ROM, 128 KiB RAM), the VCR value, the high-speed multiplier (MS0, "not implemented on Black Blob MC1": fullsnes) and an MC1/GSU-1 STOP-after-RAM-write hang (fullsnes). See [undocumented-behavior.md](undocumented-behavior.md) U22-U25. This repository builds the GSU alone: registers, decode with prefixes and the pipeline, ALU, multiplier, ROM and RAM buffers, code cache, plot unit with its pixel caches, STOP and the IRQ flag, and the chip's side of the bus arbitration (RON/RAN, WAIT, the fixed vectors). The board (`../snes-python`, milestone 7) owns the cartridge address decode, the clock relation to the master clock, scheduling against the S-CPU, the IRQ wire, the ROM and battery files. [The boundary](handoff-brief.md#the-core-boundary), the [bus contract](handoff-brief.md#the-bus-contract-snes-python-needs) and the [open decisions](handoff-brief.md#open-decisions-for-aubrey) are in the brief. Sources and their short names (all pinned in `scripts/pinned_*.json`; tiers in [validation.md](validation.md)): - **BK2**: Nintendo, *SNES Development Manual Book II*, Section 2 "Super FX" (`reference/docs/book2.pdf`, an image-only scan; OCR in `reference/docs/book2_djvu.txt`, lines 7995-23778). Cited by **printed page** (2-c-p); PDF page = fullsnes's "book2.pdf page" (printed 2-5-3 is PDF 121, 2-6-10 is PDF 133, 2-9-20 is PDF 177: checked by OCR of the page images). This is the manufacturer's document: Nintendo's manual for licensed developers. It has known errors and disputed points (C1-C5, C9). - **fullsnes**: Martin Korth, "SNES Cart GSU-n" chapters (lines 7676-8462 of the pinned `fullsnes.txt`), which correct BK2 in places from hardware tests ("Mistakes in book2.pdf"). - **ares** `ares/component/processor/gsu/` + `ares/sfc/coprocessor/superfx/` (ISC: byuu's model in readable form; read and cited with its notice), **MAME** `bus/snes/sfx.cpp` and `cpu/superfx/sfx_dasm.cpp` (BSD-3: read and cited) and MAME 0.285 run as a closed box. **Closed boxes, never opened:** bsnes (byuu's GPL form of the same core), MAME's `cpu/superfx/superfx.cpp` (byuu's older core, GPL-2.0+), Mesen2, snes9x and the sd2snes FPGA GSU (RedGuyyyy, 2018); statements read from them under the old rule carry a †. ares tree in `../snes-python/reference/src/` at the pinned revision. **ares and MAME's GSU are one lineage** (byuu's); Mesen2, snes9x and sd2snes are separate. - **krom**: Peter Lemon's `CHIP/GSU` test ROMs and sources (`../snes-python/tests/test_roms/krom/CHIP/GSU/`, BYOR). ## Registers (BK2 2-2-3..2-2-5 and chapter 4; fullsnes "I/O Map", "General I/O Ports") | Register | Width | S-CPU address (banks 00-3F, 80-BF) | S-CPU access | GSU access | Initial value BK2 / emulators | | --- | --- | --- | --- | --- | --- | | R0 | 16 | `$3000-$3001` | R/W | default Sreg and Dreg | "invalid" / 0 | | R1, R2 | 16 | `$3002-$3005` | R/W | PLOT X and Y | `0000h` / 0 | | R3, R5, R9, R10 | 16 | | R/W | general (R10: stack by convention) | invalid / 0 | | R4 | 16 | `$3008` | R/W | LMULT low word | invalid / 0 | | R6 | 16 | `$300C` | R/W | FMULT/LMULT multiplier | invalid / 0 | | R7, R8 | 16 | `$300E`, `$3010` | R/W | MERGE sources | invalid / 0 | | R11 | 16 | `$3016` | R/W | LINK destination | invalid / 0 | | R12, R13 | 16 | `$3018`, `$301A` | R/W | LOOP counter and target | invalid / 0 | | R14 | 16 | `$301C` | R/W | ROM buffer address (a write starts a ROM read) | invalid / 0 | | R15 | 16 | `$301E` | R/W | program counter; **an S-CPU write of `$301F` starts the GSU** | `0000h` / 0 | | SFR | 16 | `$3030-$3031` | R/W (bits 1-5), `$3031` read clears IRQ | flags | `0000h` | | BRAMR | 1 | `$3033` | W | | `00h` | | PBR | 8 | `$3034` | R/W | LJMP | undefined / 0 | | ROMBR | 8 | `$3036` | R | ROMB | undefined / 0 | | CFGR | 8 (bits 7, 5) | `$3037` | W | | `00h` | | SCBR | 8 | `$3038` | W | | undefined / 0 | | CLSR | 1 | `$3039` | W | | `00h` | | SCMR | 6 | `$303A` | W | | `00h` | | VCR | 8 | `$303B` | R | | chip version (U23) | | RAMBR | 1 | `$303C` | R | RAMB | undefined / 0 | | CBR | 12 (bits 15-4) | `$303E-$303F` | R | CACHE, LJMP | `0000h` | | COLR | 8 | none | | COLOR, GETC | undefined / 0 | | POR | 5 | none | | CMODE | undefined / 0 | | cache RAM | 512 bytes | `$3100-$32FF` | R/W (U14) | instruction fetch | (power-on contents: U26) | Internal state with no address (fullsnes "I/O Map" N/A rows; every emulator keeps it): **Sreg/Dreg** (the FROM/TO selections), the **pipeline byte**, the **ROM read buffer** (one byte from `[ROMBR:R14]`), the **RAM write buffer** (one byte; address and data), the **RAM address register** for SBK, the 32 **cache line valid flags**, and the **two pixel caches** (8 pixels and 8 "bit-pend" flags each, with the X/8 and Y they belong to). **SFR** (BK2 table 2-4-2; fullsnes "3030h/3031h"; ares `registers.hpp`): | Bit | Name | Meaning | | --- | --- | --- | | 0 | - | reads 0 | | 1 | Z | zero | | 2 | CY | carry (subtraction: 1 = no borrow) | | 3 | S | sign | | 4 | OV | overflow | | 5 | GO | the GSU is running; the S-CPU may write 0 to stop it (BK2 2-5-4) | | 6 | R | a ROM buffer read via R14 is pending | | 7 | - | reads 0 | | 8, 9 | ALT1, ALT2 | prefix state | | 10, 11 | IL, IH | "immediate lower/upper 8-bit flag" (BK2): no emulator sets them (U27) | | 12 | B | set by WITH | | 13, 14 | - | read 0 | | 15 | IRQ | set by STOP; **cleared by an S-CPU read of `$3031`** (BK2 2-5-5) | ares (`registers.hpp` l.57) and MAME read SFR through the mask `9F7Eh`; Mesen2† packs the same bits. **CFGR** bit 7 = IRQ mask (1 = no IRQ on STOP), bit 5 = MS0 (multiplier high speed; "should be fixed at 0" at 21 MHz, BK2 2-4-11). **CLSR** bit 0: 0 = 10.7 MHz, 1 = 21.4 MHz. **SCMR** (BK2 2-4-8): bits 1-0 MD (colour depth: 0 = 4 colours, 1 = 16, 2 = "not used", 3 = 256), bits 5 and 2 HT1/HT0 (height 128, 160, 192, OBJ mode), bit 4 **RON**, bit 3 **RAN** (1 = the GSU has the ROM / RAM bus). **POR** (BK2 table 2-8-1; set by CMODE): bit 0 transparent (0 = do not plot colour 0), bit 1 dither, bit 2 high nibble, bit 3 freeze high, bit 4 OBJ mode. **SCBR** = screen base in 1 KiB units: `70:0000h + SCBR * 400h` (BK2 2-8-3). ### The S-CPU's view of the register file (U8-U12) - **16-bit registers are written low byte first** (BK2 chapter 4 preamble: "the low byte must be accessed first"). fullsnes: an even address sets a latch; the odd address writes `latch | data << 8`; Mesen2† does exactly that. ares and MAME write each byte straight into the register (C6). Writing `$301F` sets GO. - **While GO = 1**, BK2 says only SFR and VCR may be accessed (chapter 4 preamble; fullsnes adds SCMR, which BK2 2-5-4 needs for RON/RAN). Mesen2† enforces it (reads return 0, writes ignored); ares and MAME do not (C7). - **Writing SFR with GO = 0 while it was 1** stops the GSU, sets CBR = 0 and invalidates the cache (BK2 2-5-4, 2-6-11; all emulators). STOP leaves CBR and the cache alone (BK2 2-6-11). - Unmapped addresses in `$3000-$34FF`: fullsnes lists different mirror sets for MC1 (VCR 1) and GSU-2 (VCR 4); ares/MAME/Mesen2† return 0 (U12). ## Instruction set (BK2 2-2-6..2-2-8 and chapter 9; fullsnes "CPU ... Opcodes") One-byte opcodes, most of them complete instructions; operands follow the opcode (`IBT Rn,#pp`: `An pp`; `IWT Rn,#xxxx`: `Fn lo hi`; branches `0x nn`). Six **prefixes** change what the next opcode does: | Prefix | Opcode | Effect | | --- | --- | --- | | ALT1 | `3D` | the next opcode's ALT1 form (ADC, SBC, BIC, XOR, UMULT, LDB/STB, LJMP, RPIX, CMODE, LMULT, DIV2, LMS, LM, GETBH) | | ALT2 | `3E` | its ALT2 form (`#n` immediates, SMS, SM, RAMB, GETBL) | | ALT3 | `3F` | ALT1 + ALT2 (ADC #n, CMP, BIC #n, XOR #n, UMULT #n, ROMB, GETBS) | | TO Rn | `1n` | Dreg = Rn; with B = 1 it is **MOVE Rn, Sreg** | | WITH Rn | `2n` | Sreg = Dreg = Rn and B = 1 | | FROM Rn | `Bn` | Sreg = Rn; with B = 1 it is **MOVES Dreg, Rn** | **Every other opcode clears ALT1, ALT2, B and resets Sreg = Dreg = R0 after it executes, NOP included; the branches `05-0F` leave the prefixes alone** (BK2 2-6-4: "The flags are not cleared when the next instruction is a FROM, TO, WITH, ALT1, ALT2, ALT3, or a branch instruction"; fullsnes; all emulators). So a prefix placed before a branch applies to the opcode after the branch (BK2 example 8: `BNE NEWLOP1` / `ALT1` in the delay slot, U3). The opcode map with its ALT forms (fullsnes tables, BK2 chapter 9; ares `instruction.cpp` agrees, with BGE/BLT as fullsnes, C2): | Op | none | ALT1 | ALT2 | ALT3 | | --- | --- | --- | --- | --- | | `00` | STOP | | | | | `01` | NOP | | | | | `02` | CACHE | | | | | `03` | LSR | | | | | `04` | ROL | | | | | `05-0F nn` | BRA BGE BLT BNE BEQ BPL BMI BCC BCS BVC BVS (prefixes kept) | | | | | `1n` | TO / MOVE | | | | | `2n` | WITH | | | | | `30-3B` | STW (Rn) | STB (Rn) | | | | `3C` | LOOP | | | | | `3D 3E 3F` | ALT1 ALT2 ALT3 | | | | | `40-4B` | LDW (Rn) | LDB (Rn) | | | | `4C` | PLOT | RPIX | | | | `4D` | SWAP | | | | | `4E` | COLOR | CMODE | | | | `4F` | NOT | | | | | `5n` | ADD Rn | ADC Rn | ADD #n | ADC #n | | `6n` | SUB Rn | SBC Rn | SUB #n | CMP Rn | | `70` | MERGE | | | | | `71-7F` | AND Rn | BIC Rn | AND #n | BIC #n | | `8n` | MULT Rn | UMULT Rn | MULT #n | UMULT #n | | `90` | SBK | | | | | `91-94` | LINK #1-4 | | | | | `95` | SEX | | | | | `96` | ASR | DIV2 | | | | `97` | ROR | | | | | `98-9D` | JMP R8-R13 | LJMP R8-R13 | | | | `9E` | LOB | | | | | `9F` | FMULT | LMULT | | | | `An pp` | IBT Rn,#pp | LMS Rn,(pp*2) | SMS (pp*2),Rn | | | `Bn` | FROM / MOVES | | | | | `C0` | HIB | | | | | `C1-CF` | OR Rn | XOR Rn | OR #n | XOR #n | | `D0-DE` | INC Rn | | | | | `DF` | GETC | | RAMB | ROMB | | `E0-EE` | DEC Rn | | | | | `EF` | GETB | GETBH | GETBL | GETBS | | `Fn lo hi` | IWT Rn,#xxxx | LM Rn,(xxxx) | SM (xxxx),Rn | | The empty cells: fullsnes says an ALT prefix on an opcode with no such form is **ignored** (ALT3 falls back to ALT1, then to none; "Doom is using ALT1/ALT2 alongside with conditional jumps"). BK2 does not say. ares's and Mesen2†'s decoders test single bits (`if alt1 ... else if alt2 ...`), which gives exactly that fallback in every cell (`3F 4C` is RPIX, `3E 96` is ASR, `3F A0` is LMS, `3D D0` is INC). U4. Flags per instruction are in BK2 chapter 9 (each entry's "Flags affected") and fullsnes' tables; the ones that are not "S and Z from the result" are: ADD/ADC/ SUB/SBC/CMP (OV, S, CY, Z), LSR (S = 0, CY, Z), ASR/ROL/ROR/DIV2 (S, CY, Z), MERGE (U18), MOVES (OV = bit 7, S, Z), FMULT/LMULT (S, CY = product bit 15, Z), LOB/HIB (S = bit 7 of the result), LOOP (S, Z of R12), and the moves, loads, stores, jumps and bank/plot setters (no flags). BK2 is explicit that SBC is `Sreg - Rn - CY` in its operation line but fullsnes and every emulator compute `Sreg - Rn - (1 - CY)` (CY = 1 means "no borrow"; C4). ## The pipeline and R15 (BK2 2-6-1..2-6-3; fullsnes "Jump Notes") "The program counter (R15) indicates the next address following the instruction currently being executed" (BK2 2-6-1). The GSU fetches one opcode byte ahead: **the byte after any jump or branch, taken or not, is executed before the target** (BK2 example 1), and if that byte starts a multi-byte instruction, its operand bytes come **from the target** (BK2 example 2: the `11h` of `TO R1` becomes the offset of a split `BRA`; U1). Any write of R15 (IWT, MOVE, ADD, LOOP, JMP, LJMP, branch) is a jump with the same delay slot (BK2 example 4). `MOVE R13,R15` reads the address of the next instruction (BK2 example 12); `LINK #n` sets R11 = R15 + n (BK2 example 14). Every emulator models this the same way (ares `peekpipe`/`pipe`, MAME `superfx_peekpipe`†, Mesen2† `ReadOpCode`/`ReadOperand`): a one-byte pipeline register; each instruction starts by taking the pipeline byte and fetching `[PBR:R15]` into the pipeline; operand bytes are fetched with R15 + 1; after the instruction R15 is incremented unless the instruction wrote it. At power-on and after STOP the pipeline holds `01h` (NOP) (ares `power`, MAME, Mesen2†), so the first instruction after a start is a NOP and R15 is fetched behind it. **R15 after STOP** (BK2 2-5-3, the table fullsnes calls "page 121"): after a jump with STOP in its delay slot, R15 = target + 1; otherwise "Address of STOP instruction + 1". The emulators give target + 1 for the first case and **STOP + 2** for the second, and MAME 0.285 measured it (krom ADD: STOP at `BCC1`, R15 read back `BCC3`; [mame-oracle.md](mame-oracle.md)). C1. ## Memory as the GSU sees it (BK2 chapter 3; fullsnes "GSU2 Memory Map (at GSU Side)") | GSU address | What | | --- | --- | | `00-3F:8000-FFFF` | Game Pak ROM, LoROM order (2 MiB max) | | `00-3F:0000-7FFF` | mirror of the same ROM halves (fullsnes: "for GETB R15 vectors"; ares, Mesen2†) | | `40-5F:0000-FFFF` | the same ROM, linear (HiROM order) | | `70-71:0000-FFFF` | Game Pak RAM (128 KiB max; carts have 32 or 64 KiB) | | PBR:R15 inside CBR..CBR+511 | the code cache (no bus access when the line is valid) | **PBR** may point at ROM or RAM (or run from the cache), **ROMBR** only at `00-5F`, **RAMBR** only at `70-71` (BK2 3.2 note). ares and MAME mask PBR and ROMBR with `7Fh` (ares `io.cpp` l.93, `instructions.cpp` l.378); ares maps the RAM side to `70-71` only (`memory.cpp` l.20). A bank outside the map reads 0 in ares (`memory.cpp` l.29, `superfx.hpp` l.61's default) and Mesen2† (`ReadGsu`); MAME maps `60-7D` as RAM (U13). - **ROM buffer** (BK2 7.1): writing R14 (by any instruction or by the S-CPU) starts a read of `[ROMBR:R14]`; SFR.R is 1 until it completes; GETB/GETBH/GETBL/ GETBS/GETC take the buffered byte and **wait** if it has not arrived; a new R14 write restarts the read; ROMB **waits** for a pending read, then changes the bank (fullsnes: so the next GETxx gets `[old ROMBR:R14]`). CACHE within 7 cycles (21 MHz) or 4 (10 MHz) of an R14 change spoils the buffer (BK2 7.1 "CAUTIONS"; U6). - **RAM write buffer** (BK2 7.2): STB/STW/SM/SMS/SBK hand one byte (ares, Mesen2†: one byte per buffer slot, so a word store is two buffered writes) to the buffer and continue; the next store, a RAM opcode fetch, RAMB or a RAM read **waits** for it. A word at an odd address stores the low byte at the address and the high byte at address - 1 (BK2 9.85 STW: "When the contents of Rm are odd, the high byte is stored at address (Rm-1)"; ares `ramaddr ^ 1`). - **RAM address cache** (BK2 7.3): LM/LMS/LDW/LDB/STW/STB/SM/SMS remember the RAM address; **SBK** stores the source register's word there. ## The code cache (BK2 6.8; fullsnes "Code-Cache") 512 bytes in 32 lines of 16; **CBR** (bits 15-4) is the GSU address the cache mirrors; an opcode fetch at `PBR:R15` with `R15 - CBR < 512` reads the cache if that line's flag is set, else from ROM/RAM, loading the line. BK2 2-6-10: lines fill while executing; a jump out of a partly loaded line first finishes it; a jump into the middle of an unloaded line first loads its leading bytes (Figure 2-6-1). ares, MAME and Mesen2† load the **whole 16-byte line at the first miss** (U15, C10). CACHE sets CBR = R15 & `FFF0h` and clears the flags if it changed (BK2 9.27); LJMP sets CBR from the target and clears them (BK2 2-6-11); the S-CPU's GO = 0 sets CBR = 0 and clears them. The S-CPU sees the cache at `$3100 + (address - CBR & 1FFh)` (BK2 6.8.3, example CBR = `C3A0h`); **a write of the last byte of a line (`xxxFh`) marks the line valid** (BK2 6.8.3), so the S-CPU can upload code and start the GSU at `0000h-01FFh` with CBR = 0 and neither RON nor RAN (BK2 5.1.3, 6.8.4; krom `CACHEINJECT`). ## Bitmap emulation: PLOT, RPIX and the pixel caches (BK2 8.1; fullsnes "Bitmap I/O Ports", "Pixel-Cache") PLOT writes COLR's colour at (R1, R2) (low bytes) into the character data at SCBR, then **increments R1**. The character number (BK2 8.1.5): ``` 128 high: CN = X[7:3] * 10h + Y[7:3] 160 high: CN = X[7:3] * 14h + Y[7:3] 192 high: CN = X[7:3] * 18h + Y[7:3] OBJ: CN = Y[7] * 200h + X[7] * 100h + Y[6:3] * 10h + X[6:3] address = 70:0000h + SCBR * 400h + CN * (16 | 32 | 64 for 2/4/8 bpp) + Y[2:0] * 2 + plane pair offset (planes 0-1 at +0/+1, 2-3 at +10h/+11h, 4-5 at +20h/+21h, 6-7 at +30h/+31h) ``` (BK2's printed OBJ formula has `Y[6:3] * 10h + Y[6:3]`, an obvious misprint for `X[6:3]`; its address formula prints `SB[7:0] x 4000H` against its own `SCBR x 400H` two pages earlier. fullsnes and ares `rpix` agree on `X[6:3]` and `400h`: C5.) **Pixel caches** (BK2 8.1.3): the primary cache holds one 8-pixel row of one character with 8 bit-pend flags. A PLOT to another row or character (X & `F8h` or Y changed) moves primary to secondary (waiting while the secondary is still being written) and starts afresh; a full primary (all 8 flags) moves at once. The secondary is written to RAM **in parallel with execution**: one read-merge-write per bit plane when fewer than 8 flags are set (BK2 example 2, "the pixels ... which have not been plotted are written after a game pak RAM read"), plain writes when all 8 are. **RPIX** flushes both caches (waits), then reads the pixel from RAM, never from the cache (BK2 8.1.3.3: "data will always be read from the game pak RAM"). **Transparency** (POR bit 0 = 0): a colour whose effective bits are 0 is not plotted, R1 still increments; effective bits are the low 2/4/8 by depth, but with freeze-high in 256-colour mode only the low 4 (BK2 8.1.4.1; fullsnes; ares `core.cpp` `plot` l.12-22). **Dither** (bit 1, 4/16 colours only): COLR's high nibble when `(X xor Y) & 1`, else the low nibble. COLOR/GETC with **high nibble** (bit 2): COLR = (COLR & `F0h`) | source >> 4; with **freeze high** (bit 3): COLR = (COLR & `F0h`) | (source & `0Fh`) (ares `core.cpp` `color` l.5-9; BK2 figure 2-8-5). ## Multiply (BK2 8.2; fullsnes "Multiply Opcodes") MULT/UMULT: low byte of Sreg x low byte of Rn (or #n), signed/unsigned, 16-bit result to Dreg. FMULT: Sreg x R6, signed 16 x 16, **high word** to Dreg, CY = product bit 15. LMULT: high word to Dreg, low word to R4. BK2 8.2.1 describes the circuit: four 8 x 8 multiplies into an 18-bit partial-product buffer, the low byte of R4 after the first, its high byte after the third; **with Dreg = R4, LMULT leaves the high word in R4 and FMULT "will not be stored" (the result is lost)** (BK2 8.2 CAUTION, 9.33 note "any register except R4"). The emulators compute `(int16)Sreg * (int16)R6` in one step and write Dreg last, so FMULT R4 gets the high word (C9). The speed is CFGR.MS0's and CLSR's (timing.md). ## STOP, the IRQ and the S-CPU's view of the buses (BK2 5.2-5.4; fullsnes "Memory Map") - **STOP** (BK2 9.84): GO = 0, "the Super NES IRQ signal is initiated", the GSU goes idle and the ROM/RAM buses return to the S-CPU. SFR.IRQ = 1 and the cartridge's /IRQ is asserted **unless CFGR bit 7 masks it** (BK2 2-5-5; ares, MAME, Mesen2†, sd2snes† set SFR.IRQ only when unmasked; fullsnes says SFR.IRQ is set "even if IRQ is disabled": C11). The S-CPU's read of `$3031` clears SFR.IRQ and releases /IRQ. - **RON/RAN** (BK2 2-4-8, 5.3): while RON = 1 the GSU owns the ROM; while RAN = 1 the RAM. The S-CPU may clear either during a run: the GSU then **WAITs** at its next access to that bus until the bit is set again (BK2 5.3, 6.1.1). - **What the S-CPU reads while GO = 1 and RON = 1** (BK2 table 2-5-2): ROM space returns a fixed byte by address bits 3-0: `00h` for 0, 2, 6, 8, C; `04h` for 4; `08h` for A; `0Ch` for E; `01h` for every odd address. So the 65C816's vectors read `0100h` (COP `0104h`, NMI `0108h`, IRQ `010Ch`): the game puts jumps at `00:0100-010F` in WRAM (BK2 5.4.1). ares, Mesen2† and sd2snes† return this table in all ROM space; MAME 0.285 only in banks `40-5F` (`sfx.cpp` `read_h`; banks `00-3F` read the real ROM, vectors included). - **RAM while GO = 1 and RAN = 1**: reads are open bus (ares returns the bus value, `bus.cpp` l.37; MAME `FFh`, `sfx.cpp` l.155, its comment calling it open bus; Mesen2† 0), writes are dropped (MAME `sfx.cpp`, Mesen2†) or performed (ares `bus.cpp` l.41-43) (U16). ## Reset and power-on (BK2 1.5.1, 5.1; chapter 4 initial values) The console's reset resets the GSU: idle, buses to the S-CPU (BK2 1.5.1). BK2 gives initial values for R1, R2 (0), R15 (0), SFR, CBR, SCMR, BRAMR, CFGR, CLSR (0) and calls the rest "invalid" or "undefined". Every emulator zeroes everything, sets the pipeline to NOP and VCR to 4 (ares `gsu.cpp` `GSU::power` l.15-37, MAME `device_reset`†, Mesen2† `Reset`). U26. ## What the core owns, and what it does not Owned: every register above and the internal state, decode with prefixes and the pipeline, all 98 instructions, the ROM and RAM buffers and their waits, the code cache and its S-CPU window, the plot unit and both pixel caches, STOP and the IRQ flag, CFGR/CLSR timing, RON/RAN and the WAIT they cause, and the fixed-vector table the S-CPU reads while the GSU owns the ROM. Its unit of time is the **GSU clock at the selected speed** (timing.md). Not owned: where the ROM and RAM are in the S-CPU's map and their mirrors, the RAM's size and battery, the input clock (master clock or crystal) and its fraction of the master clock, running the GSU up to the S-CPU's time before each access, the cartridge /IRQ wire to the S-CPU, open bus. All the board's ([handoff-brief.md](handoff-brief.md#the-core-boundary)).