SNES Audio
Sound on the SNES runs on a whole separate computer. A Sony SPC700 CPU and its S-DSP sound chip sit behind their own 64KB of audio RAM, playing eight voices of compressed samples with envelopes and echo. The main CPU only uploads the music and samples, then talks to it through four I/O ports.
Overview
The audio subsystem is the SPC700 processor, the S-DSP that actually generates sound, and 64KB of private audio RAM they share. Everything to be played, the samples, the note data and a small driver program, is uploaded once into that RAM by the main CPU. From then on the SPC700 runs the driver and the S-DSP mixes eight voices to a 16-bit stereo output, independent of the game.
| Part | Role |
|---|---|
| SPC700 | Dedicated 8-bit sound CPU running the music driver. |
| S-DSP | Digital signal processor mixing the eight voices. |
| Audio RAM | 64 KB private memory for samples, driver and echo. |
| Output | 16-bit stereo, sample rate 32 kHz. |
The eight voices
The S-DSP has eight independent voices, numbered 0 to 7. Each plays a sample at its own pitch and volume, with its own envelope, and can be panned left and right by separate volume registers. Each voice has a block of DSP registers controlling it, so eight voices means eight parallel sounds, enough for a melody, harmony, bass, drums and effects at once.
| Per-voice register | Meaning |
|---|---|
| VOL L, VOL R | Left and right volume, giving pan. |
| PITCH L, PITCH H | 14-bit pitch, the sample playback rate. |
| SRCN | Source number, index into the sample directory. |
| ADSR, GAIN | Envelope control. |
BRR samples
Samples are stored compressed in a format called BRR, bit rate reduction. Audio is cut into blocks of 9 bytes: a one-byte header followed by 8 bytes that hold 16 four-bit samples. The header carries a shift amount and a filter selection that predicts each sample from the previous ones, plus flags marking the end of the sample and whether it loops.
| BRR block | Bytes | Contents |
|---|---|---|
| Header | 1 | Shift (4 bits), filter (2 bits), loop and end flags. |
| Data | 8 | 16 samples of 4 bits each. |
A sample directory in audio RAM lists, for each source number, the start address of its BRR data and the address of its loop point, so a voice can play through a sound then repeat from a chosen block for a sustained note.
ADSR and volume
Every voice shapes its volume over time with an ADSR envelope: attack rises from silence, decay falls to a sustain level, sustain holds while the note is on, and release fades when the note ends. A voice can instead be driven by GAIN, a manual mode that ramps or sets the level directly for finer control. The final voice level is the envelope multiplied by the two volume registers.
| Stage | Effect |
|---|---|
| Attack | Rise from zero at a chosen rate. |
| Decay | Fall to the sustain level. |
| Sustain | Hold at the sustain level while keyed on. |
| Release | Fade to zero when keyed off. |
Echo and filter
The S-DSP has a hardware echo unit. It keeps a delay buffer in audio RAM and feeds a mix of the delayed signal back into the output, set by an echo volume and a feedback amount. An 8-tap FIR filter sits in the echo path, so the reflected sound can be shaped, softened or brightened, giving reverb and space to the music. Because the echo buffer lives in the same 64KB, longer echoes cost sample memory.
| Echo control | Meaning |
|---|---|
| EON | Which voices are sent into the echo. |
| EVOL L, EVOL R | Echo output volume, per side. |
| EFB | Feedback, how much echo re-enters the buffer. |
| FIR C0–C7 | Eight coefficients of the echo filter. |
Communication ports
The main CPU and the SPC700 meet at four 8-bit I/O ports, visible to both sides. At power-on the SPC700 runs a small boot ROM that lets the main CPU upload the driver and samples into audio RAM through these ports using a simple handshake. During play the game passes commands, such as start this tune or play this effect, by writing the ports, and the driver reads them.
| Ports | Role |
|---|---|
| APUIO0–APUIO3 | Four shared bytes, read and written from both CPUs. |
| Upload | Boot ROM handshake to load audio RAM at start-up. |
| Commands | Runtime messages telling the driver what to play. |