Sampled sound
Playing sound from stored sample values rather than a chip's fixed tone shapes, from a 32-step loop in Game Boy wave RAM to recorded instruments on the Super NES.
The NES and the Game Boy make most of their sound from fixed shapes, pulses and noise, beside one channel that plays stored values1. The Game Boy’s wave channel loops 32 4-bit samples that a program writes into wave RAM2. The NES’s delta modulation channel plays 1-bit deltas from ROM3. The Super NES’s sound unit plays only samples, 8 voices of compressed BRR blocks from its own 64 KB of RAM4,5.
- Wave channelGame BoyPokémon Red and Blue (1996). Six 32-step waves for channel 3, copied into wave RAM on each note.6Pokémon Yellow (1998). Pikachu's 1-bit voice clips, played by switching the wave channel between full volume and mute.7
- Sampled instrumentsSNES, AmigaSuper Mario World (1990). Each instrument is a 5-byte entry naming a sample, its envelope, and a pitch multiplier.8
#Game Boy
Pokémon Red and Blue treat wave RAM as an instrument slot. A song picks one of six 32-step waves for channel 3, and the engine copies it in on each note6.
Pokémon Yellow plays Pikachu’s voice through the same channel. It fills wave RAM with the top level and then sets the channel’s volume to full or mute for each bit of a 1-bit recording, with interrupts off and delay loops for timing7. Pan Docs describes the other way to play samples, reloading wave RAM each time it has been read through2.
#Super NES
Super Mario World’s sound engine runs on the sound CPU. Its instrument command loads a 5-byte entry that names the sample and sets the voice’s envelope and a pitch multiplier8.
Games
| Game | Year | How | Note |
|---|---|---|---|
| Pokémon Red and Blue | 1996 | Wave channel Game Boy | six 32-step waves for channel 3, copied into wave RAM on each note |
| Pokémon Yellow | 1998 | Wave channel Game Boy | Pikachu's 1-bit voice clips, played by switching the wave channel between full volume and mute |
| Super Mario World | 1990 | Sampled instruments SNES, Amiga | each instrument is a 5-byte entry naming a sample, its envelope, and a pitch multiplier |
Every claim about this mechanic, by game (6)
References
- ^The Game Boy has four sound channels, each specialized, with two pulse channels with four fixed duty settings, a wave channel that plays a user-supplied wave, and a noise channel.WikiPan Docs, “Pan Docs: Audio Overview”
How we know
Channels 1 and 2, the “pulse channels”, produce pulse width modulated waves with 4 fixed pulse width settings. Channel 3, the “wave” channel, produces arbitrary user-supplied waves. Channel 4 is the “noise” channel, producing a pseudo-random wave.
Architecture · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abThe wave channel loops 32 4-bit samples from wave RAM (
$FF30-$FF3F, 16 bytes, upper nibble first), clocked at 2,097,152 Hz divided by , so a full wave repeats at Hz. Its output level is 100%, 50%, 25%, or off.WikiPan Docs, “Pan Docs: Audio Registers”How we know
Wave RAM is 16 bytes long; each byte holds two “samples”, each 4 bits. As CH3 plays, it reads wave RAM left to right, upper nibble first.
FF30–FF3F — Wave pattern RAM · archived copy ↗ The wave channel’s period divider is clocked at 2097152 Hz, once per two dots, and its waveform is 32 samples long.
FF1D — NR33 · archived copy ↗ 100% volume (use samples read from Wave RAM as-is)
FF1C — NR32 · archived copy ↗ It’s also possible to artificially “increase” the wave’s length by loading a new wave as soon as the whole buffer has been read; this is sometimes used for full-on sample playback.
Sound Channel 3 — Wave output · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^The delta modulation channel (DMC) plays 1-bit delta-encoded samples from , bytes long, at one of 16 rates; a program can also load its 7-bit output level directly through
$4011.WikiNESdev Wiki, “APU DMC”How we know
The NES APU's delta modulation channel (DMC) can output 1-bit delta-encoded samples or can have its 7-bit counter directly loaded, allowing flexible manual sample playback.
lead · archived copy ↗ Sample address = %11AAAAAA.AA000000 = $C000 + (A * 64) … Sample length = %LLLL.LLLL0001 = (L * 16) + 1 bytes
Overview · archived copy ↗ For example, on NTSC (1.789773 MHz), a rate of 428 gives a frequency of 1789773/428 Hz = 4181.71 Hz.
Pitch table · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^Sound runs on its own processor, the SPC700 (S-SMP) at 1.024 MHz with 64 KB of audio RAM, beside the S-DSP, which plays 8 voices from BRR samples at variable rates and outputs 16-bit stereo at a nominal 32,000 Hz.WikiSNESdev Wiki, “S-SMP”
How we know
Sony SPC-700 processor, clocked at 1.024MHz … 8 voice channels Decodes BRR samples at a variable sample rate using 4-point Gaussian interpolation … Audio-RAM: 64KiB RAM from two 32K x 8bit PSRAM chips. … Digital to analog converter, outputting the analog audio signal from the DSP's stereo 16-bit 32000 Hz digital audio.
lead · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^BRR stores samples in 9-byte blocks of 16 4-bit samples, each block led by a byte with a shift, a decoding filter, and loop and end flags.WikiSNESdev Wiki, “BRR samples”
How we know
BRR is composed of 16-sample blocks, each of which is stored in 9 bytes of data. This is a 1 byte control block, followed by 8 bytes containing 16 4-bit samples to be decoded (high nibble first). … Left-shift (S), decoding filter (F), loop (L), end (E).
lead · archived copy ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abChannel 3 plays one of six 32-step waveforms, numbered 0 to 5. A song's
note_typecommand picks one with its low nibble, and on each note the engine stops the wave channel, copies the 16 bytes into wave RAM, and starts it again.Codepret/pokeredHow we know
3 dw .wave0 ⋮ 8 dw .wave5 ; used in the Lavender Town and Pokemon Tower themes ⋮ 13; these are the definitions for the channel 3 instruments 14; each instrument definition is made up of 32 points (nibbles) that form 15; the graph of the wave 16; the current instrument is copied to AUD3WAVERAM
audio/wave_samples.asm lines 3–16 at af51989 · upstream ↗ 344 cp CHAN3 345 jr z, .musicChannel3 ⋮ 350.musicChannel3 351 ld hl, wMusicWaveInstrument 352.channel3 353 ld a, d 354 and $f 355 ld [hl], a ; store low nibble of param as wave instrument
audio/engine_1.asm lines 343–355 at af51989 · upstream ↗ 906Audio1_ApplyWavePatternAndFrequency: ⋮ 920 ld a, [de] ⋮ 924 ld hl, Audio1_WavePointers ⋮ 929 ld hl, AUD3WAVERAM 930 ld b, AUD3WAVE_SIZE - 1 931 ld a, $0 ; stop hardware channel 3 932 ldh [rAUD3ENA], a 933.loop 934 ld a, [de] 935 inc de 936 ld [hli], a ⋮ 941 ld a, AUD3ENA_ON ; start hardware channel 3 ⋮
audio/engine_1.asm lines 906–944 at af51989 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abPikachu's voice clips are 1-bit recordings played through the wave channel. The routine disables interrupts, fills wave RAM with
$FFso the channel outputs a constant high level, and then for each bit sets channel 3's output level to 100% ($20) or mute ($00), with counted delay loops setting the rate.Codepret/pokeyellowHow we know
32 ld hl, _AUD3WAVERAM 33 ld de, wSavedAudioWavePattern 34.saveWaveDataLoop 35 ld a, [hl] 36 ld [de], a 37 inc de 38 ld a, $ff 39 ld [hli], a ⋮ 54 ld a, $ff ⋮ 56 ld a, $20 57 ldh [rAUD3LEVEL], a
audio/pikachu_pcm.asm lines 22–57 at b6696f2 · upstream ↗ 11.loop 12 ld a, [hli] 13 ld d, a 14 ld a, $3 ⋮ 16 dec a ⋮ 19REPT 7 20 call LoadNextSoundClipSample 21 call PlaySoundClipSample 22ENDR ⋮ 24 call LoadNextSoundClipSample ⋮ 28 jr nz, .loop ⋮ 31 ret ⋮
home/pikachu_cries.asm lines 11–47 at b6696f2 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abThe sound engine runs on the SPC700. Its set-instrument command (
$DA) reads a 5-byte entry from a table in audio RAM at$5F46and writes the first four bytes to the voice's DSP registers, the sample number (SRCN), ADSR1, ADSR2, and GAIN, and keeps the fifth as a pitch multiplier, so every instrument is a recorded sample with an envelope.CodeSMWDisXHow we know
3SPC700Engine: ⋮ 7 arch spc700
bank_0E.asm lines 1–8 at 30643c7 · upstream ↗ 1174VCmd_DA: 1175 CALL NextVCmd46 ; vcmd DA: set instrument; ⋮ 1182 MOV Y,#$05 1183 MOV.B ARam_14,#$46 1184 MOV.B ARam_15,#$5F ⋮ 1186APU_0D56: 1187 MUL YA ; set sample A in bank at $14/15 width Y; ⋮ 1197 OR A,#$04 ; voice X SRCN; ⋮ 1211 CMP Y,#$04 1212 BNE - ; set SRCN, ADSR1/2, GAIN; 1213 MOV.B A,(ARam_14)+Y 1214 POP X ⋮
bank_0E.asm lines 1174–1215 at 30643c7 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
Sources
Code
- pret contributors. 2026. “pokered: disassembly of Pokémon Red and Blue.” pret. Commit af51989. pret/pokered @ af51989 · licence, all uses
- pret contributors. 2026. “pokeyellow: disassembly of Pokémon Yellow.” pret. Commit b6696f2. pret/pokeyellow @ b6696f2 · licence, all uses
- IsoFrieze, kaizoman666, mikeyk, and loveemu. 2026. “SMWDisX: Super Mario World disassembly (IsoFrieze/SMWDisX).” Commit 30643c7. IsoFrieze/SMWDisX @ 30643c7 · licence, all uses
Secondary
- Pan Docs contributors. n.d. “Pan Docs: Audio Overview.” Pan Docs (gbdev.io). original · archived · licence, all uses
- Pan Docs contributors. n.d. “Pan Docs: Audio Registers.” Pan Docs (gbdev.io). original · archived · licence, all uses
- NESdev Wiki contributors. n.d. “APU DMC.” NESdev Wiki. Version oldid 23783. original · archived · licence, all uses
- SNESdev Wiki contributors. n.d. “S-SMP.” SNESdev Wiki. Version oldid 1381. original · archived · licence, all uses
- SNESdev Wiki contributors. n.d. “BRR samples.” SNESdev Wiki. Version oldid 902. original · archived · licence, all uses