# Start here: the RSP (Reality Signal Processor) Phase 0 documents only, 2026-11-25, written beside n64-python's. Facts from the n64brew pages "Reality Signal Processor", "/CPU Core", "/CPU Pipeline", "/Interface" (CC BY-SA 4.0, facts only, tier 3; pinned revisions in `../n64-python/scripts/pinned_wiki.json`: 4813, 5539, 5618, 5376), digested tonight. The pages are developer documentation; **none of their claims is attributed to a named hardware test** except where noted. ## Why it is its own core It is a CPU (charter: CPUs always get their own core). It runs microcode uploaded per task: the graphics microcode (F3D, F3DEX and the rest) and the audio microcode. One machine uses it (the N64, with the iQue Player and Aleck64 as the same RCP). ## The scalar unit (SU) - A cut-down MIPS core: 32 registers of **32 bits**; no multiply/divide unit (no MULT, DIV, MFHI...), no 64-bit operations, no LWL/LWR/SWL/SWR (ordinary loads and stores work at misaligned DMEM addresses), no branch-likely, **no exceptions or interrupts** (so no SYSCALL, no traps); BREAK halts the RSP and sets BROKE (and raises the SP interrupt if INTBREAK is set). - Harvard: instructions from IMEM (4 KB), data in DMEM (4 KB); the PC is 12 bits and wraps from 0xFFC to 0x000; data addresses use the low 12 bits. - COP0 is the RCP's register file: c0-c7 the SP DMA and status registers, c8-c15 the RDP's DPC registers (owned by the board: n64-python rsp.md). ## The vector unit (VU, COP2) - 32 registers of 128 bits = 8 lanes of 16 bits, numbered big-endian. - An accumulator of 8 lanes x 48 bits, read in 16-bit slices by VSAR. - Control registers VCO, VCC, VCE (16 bits) by CFC2/CTC2. - Element field (4 bits): no broadcast, pairs (0q/1q), halves (0h-3h), single lane (0-7). - Instruction families: multiplies VMULF, VMULU, VMUDL, VMUDM, VMUDN, VMUDH and their accumulating forms VMACF, VMACU, VMADL, VMADM, VMADN, VMADH; VADD, VADDC, VSUB, VSUBC (the wiki's table omits the subtracts: U1), VABS, VSAR; logic VAND, VNAND, VOR, VNOR, VXOR, VNXOR; selects VLT, VEQ, VNE, VGE, VCL, VCH, VCR, VMRG; single-lane VRCP, VRCPL, VRCPH, VRSQ, VRSQL, VRSQH, VMOV, VNOP; moves MFC2, MTC2, CFC2, CTC2. - Loads and stores (LWC2/SWC2): LBV/LSV/LLV/LDV and stores (scalar sizes; loads stop at byte 15, stores wrap), LQV/LRV and SQV/SRV (128-bit, split at 16-byte boundaries), LPV/LUV (packed bytes), LHV, LFV, LTV/STV (transposes across 8 registers), SWV. - Clamping: signed to -32768..32767; unsigned rule odd (negative -> 0, above 32767 -> 65535). ## The pipeline - Each instruction issues in 1 cycle; **dual issue** of an adjacent SU + VU pair (not in a delay slot, not at a misaligned branch target, not when the first writes a vector register the second uses, not on control-register conflicts); if either stalls both wait. - Latencies: vector-register writes (VU ops, vector loads, MTC2) 4 cycles; DMEM scalar loads 3; MFC0/MFC2/CFC2 3; a branch costs 3 cycles (with the delay slot and one bubble); any store exactly two cycles after a load stalls (length not given: U3). - **A hardware bug**: single-lane instructions placed second in a pair are checked for conflicts as if their lane field were a register number (OBSERVED, unattributed). ## What the pages do not give (the gaps the build must fill from test ROMs) The VRCP/VRSQ tables (size and construction), the flag semantics of VCO/VCC/VCE per instruction, the subtract and rounding instructions, the packed and transpose loads and stores in detail, BREAK's full behaviour, the reciprocal precision. These are exactly what **nemu64-test's 243 RSP tests** (MIT) and **rsp-ruination** encode as expectations, and what krom's RSPTest shows on screen with photos. They are the judges; the wiki is the map.