# SPU2 Sources: Sony's *SPU2 Overview Manual* 6.0 ("SPU2M", DOC, facts only); ps2tek "Sound Processing Unit (SPU2)", "SPU2 AutoDMA" (tier 3). No hardware-captured judge among the pinned tests (ps2autotests has none for the SPU2). ## What it is (SPU2M ch. 1) - **Two cores**, CORE0 and CORE1, each a 24-voice ADPCM sound generator with pitch modulation, ADSR envelopes, a noise generator, volume slides, mixing and a digital effect (reverb/echo/delay) unit; 48 voices in all (SPU2M §1.1.1, §1.1.3). - **36.864 MHz, 48 kHz output**; one sample period, 1/48000 s, is called 1 Ts (SPU2M §1.1.1). 36.864 MHz / 48 kHz = 768 cycles per sample (arithmetic). PS1 mode: 44.1 kHz (ps2tek, iop.md). - **CORE0's output feeds CORE1**, whose mix is the final output (SPU2M §1.1.1); each core's effect work area is in the shared 2 MB local memory (ESA/EEA registers, SPU2M ch. 3). - **Sound data input**: AutoDMA (ADMA) streams signed 16-bit stereo PCM into the MEMIN double buffers (core 0 at 2000h-23FFh, core 1 at 2400h-27FFh, in 1 KB blocks: 512 bytes left, 512 right), bypassing voice processing; music streaming uses it (ps2tek "SPU2 AutoDMA"). CORE0 has a bypass path and CORE1 a 32-bit input (SPU2M §2.2.4-2.2.5). - Registers at 1F900000h on the IOP (core 1 at +400h), voice registers, KON/KOFF, IRQ address, DMA transfer address, ENDX, status; master and effect volumes at 1F900760h (ps2tek "I/O Maps"). IOP DMA channels 4 (core 0) and 7 (core 1) (iop.md). ## Reuse: the PS1 SPU (decision P10) The SPU2 is described as two PS1 SPU cores with additions (psx-python docs/spu.md quotes psx-spx: "basically two PS1 SPU cores"). psx-python decision 4 kept the PS1 SPU in its board "until a PS2 board exists". **It exists now**, so the chip rule's second-user test is met. Recommendation: **extract an `spu-python` core** from psx-python's SPU once both boards have working SPU models, with configurations `SPU` (one core, 512 KB, 44.1 kHz) and `SPU2` (two chained cores, 2 MB, 48 kHz, ADMA, the new registers, CORE0->CORE1 routing). Until then the SPU2 is written in ps2-python behind a pin-shaped interface whose shape matches psx-python's SPU, so the extraction is a move. What is genuinely shared (the ADPCM decoder, ADSR, the Gaussian-style interpolation table, reverb) is to be confirmed per item against SPU2M (**U29**: whether the interpolation and reverb are bit-identical to the PS1's). ## Modelling As psx-python's SPU: caught up at each register access and DMA; ENDX, ENVX, the capture buffers and the IRQ are visible to the IOP, so the voice stepping is inline; only the final mix to the host's rate is a producer (domains.md, domain D). Load: 48 voices x 48 kHz = 2.3 M voice-samples/s; at 100-250 host cycles each (HYPOTHESIS, psx-python's estimate), 0.23-0.58 G cycles a second. ## Unknowns U29 interpolation and reverb identity with the PS1's; U30 ADMA timing (when a MEMIN half is consumed relative to the IRQ); U31 the effect unit's algorithm per mode (SPU2M gives the registers and areas, not the arithmetic); U32 register-access delays.