# Validation: the RSP's oracles and rungs (proposed) No tier-1 or tier-2 source exists that we hold: no die model, and Nintendo's "RSP Programmer's Guide" (leaked; ultra64.ca; facts only) was not fetched. The judges are tier-3 hardware-run test ROMs. Pins are in `../n64-python/scripts/pinned_repos.json`; when this repository is built, it pins its own copies the same way. | Oracle | Tier | Licence | Pin | Decides | | --- | --- | --- | --- | --- | | nemu64-test `tests/rsp` (thelemmy) | 3 | MIT | `9a8b9f7` | 243 tests in 57 modules: every scalar op (incl. `op_lwu`, `op_break`, `wrap_around`), every multiply and MAC (incl. VMULQ, VMACQ), VRNDN/VRNDP, VSAR, VMOV/VRCP, vector loads and stores, CFC2/CTC2, MFC2/MTC2, stress tests (VMULF/VMULU, division); plus `rsp_timing` (4) | | n64-systemtest (lemmy-64) | 3 | MIT | `196f542` | the predecessor; RSP section | | krom RSPTest (CPU, CP2, DMAAlignment-SP, MEM, XBUS) | 3 | Unlicense | `7085543` | results on screen; hardware photos beside many | | rsp-ruination (Dillonb) | 3 | none stated: run only | `511b838` | a vector "torture test" | | libdragon `tests/` (rsp, rspq) | 3 | Unlicense | `e356bf3` | RSP queue and DMA behaviour as libdragon relies on it | | ares `ares/n64/rsp`, cen64 `rsp/` | 5 | ISC, BSD-3-Clause | as pinned | readable comparators (detectors) | | MAME 0.285 `rsp` device | 5 | closed box | | **not usable yet**: its trace of krom's RSPCPUADD showed 20 instructions (vr4300-python mame-oracle.md trap 4) | ## Rungs (each with its exit test) | Rung | Content | Exit test | | --- | --- | --- | | 0 | decode (from the wiki's opcode tables, checked against nemu64-test's assembler encodings, MIT) | every encoding decodes as the tables say | | 1 | scalar unit, IMEM wrap, DMEM misalignment, BREAK | nemu64-test RSP scalar tests; krom RSPTest/CPU | | 2 | vector moves, loads and stores (all forms) | nemu64-test `op_vector_loads`, `op_vector_stores`, `op_mfc2_mtc2`, `op_cfc2_ctc2`; krom CP2 load/store tests | | 3 | multiplies and accumulator, clamping | the `op_vmu*`, `op_vma*`, `op_vmulq`, `op_vmacq`, `op_vrnd*`, `op_vsar` tests; the stress tests | | 4 | add/sub/compare/select/logic and flags | `op_vector_arithmetic`; rsp-ruination | | 5 | VRCP/VRSQ and their tables | `op_vmov_vrcp`, `stresstests_div` | | 6 | pipeline: dual issue, latencies, stalls, the pairing bug | `rsp_timing`; n64-python M6 timing | The rungs run on n64-python's M2 board (they need SP DMA, IMEM/DMEM from the CPU, the SP interrupt), so this core is built alongside M2 as vr4300-python is alongside M1.