Skip to main content
Dolphin emulates the GameCube/Wii Digital Signal Processor (DSP) which handles all audio processing.

DSP Hardware

The DSP is a dedicated audio coprocessor: Location: Source/Core/Core/DSP/

Emulation Modes

Dolphin supports two DSP emulation approaches:
Location: Core/DSP/DSPHLE/Default and recommended. Emulates DSP behavior without running actual DSP code:

Advantages

  • Very fast (low CPU usage)
  • No DSP ROM required
  • Compatible with 95%+ of games
  • Deterministic

How It Works

  • Intercepts DSP UCode (microcode) uploads
  • Identifies known UCode types (AX, Zelda, etc.)
  • Reimplements UCode functionality in C++
  • Outputs audio samples directly

Supported UCodes

  • AX: Most common (Luigi’s Mansion, Mario Kart, etc.)
  • Zelda: Zelda-specific (Wind Waker, Twilight Princess)
  • Card: Memory card operations
  • InitAudioSystem: Boot-time initialization
  • ROM: IPL/BIOS DSP code

Audio Pipeline

Audio flows through these stages:
1

Game Sends Audio Commands

PowerPC CPU sends commands to DSP via mail interfaceLocation: Core/DSP/DSP.cpp
  • Write to DSP mailbox registers
  • Upload UCode to IRAM
  • Send DMA commands for audio buffers
2

DSP Processes Audio

DSP runs UCode to process samplesHLE: C++ implementation mimics UCode LLE: Execute actual DSP instructions
  • Decode audio (ADPCM, PCM)
  • Apply effects (reverb, delay, filters)
  • Mix multiple channels
  • Output to DMA buffer
3

Audio Interface Streams

Audio Interface (AI) streams from DMA bufferLocation: Core/HW/AudioInterface.cpp
  • 32 KHz sample rate (AI default)
  • Stereo output (left/right channels)
  • Trigger AI interrupts on buffer completion
4

Audio Backend Outputs

Backend plays samples through OS audio APILocation: AudioCommon/
  • Resample if needed
  • Send to audio device
  • Handle buffer underruns

Audio Backends

Location: Source/Core/AudioCommon/ Dolphin supports multiple audio output backends:

Configuration

Mozilla’s cross-platform audio library:
Advantages:
  • Low latency
  • Reliable on all platforms
  • Automatic device switching
  • Minimal CPU overhead

Audio Settings

Key audio configuration options:
Choose between HLE and LLE:
Default: HLE (fast, compatible) Use LLE when: Game has audio issues with HLE
Buffer size in milliseconds:
  • Lower (10-20ms): Less delay, more CPU, potential underruns
  • Higher (50-100ms): More delay, less CPU, smoother audio
Default: 20ms (good balance)
Time-stretch audio to match emulation speed:
Useful when emulation runs slower than 100% speed.
Dolby Pro Logic II decoder:
Upmixes stereo to 5.1 surround.

DSP UCode Types

Common UCode implementations in HLE:

AX UCode

Location: Core/DSP/DSPHLE/UCodes/AX.cpp Most common UCode for game audio:
  • Multiple voice channels (up to 64)
  • ADPCM and PCM decoding
  • Volume, pitch, and pan control
  • Effects: reverb, chorus, delay
  • Surround positioning
Games using AX:
  • Luigi’s Mansion
  • Mario Kart: Double Dash
  • Super Smash Bros. Melee
  • Most GameCube/Wii games

Zelda UCode

Location: Core/DSP/DSPHLE/UCodes/Zelda.cpp Zelda-specific audio:
  • Sequenced music playback
  • Sound effect triggering
  • Custom mixing
Games using Zelda UCode:
  • The Legend of Zelda: Wind Waker
  • The Legend of Zelda: Twilight Princess
  • The Legend of Zelda: Four Swords Adventures

Card UCode

Memory card audio operations (beeps).

Audio Debugging

Enable audio logging:
DSP debugging tools:
Files written to User/Dump/Audio/ and User/Dump/DSP/.

Performance Tuning

See Also