Dreamcast audio and the Manatee sound driver
A guided tour of the Dreamcast's audio subsystem and of Manatee, the sound driver Sega shipped with its SDK and that a large part of the Dreamcast library runs on the sound processor: from SH-4 game code asking for a sound, across the G2 bus, into a hand-written ARM kernel that plays music, sound effects and streams on 64 hardware voices and a programmable reverb DSP.
Games built on Sega's Katana SDK did not usually write their own sound engine: they linked Sega's
sd library on the SH-4 and loaded a Manatee driver image (manatee.drv) into
the AICA. Different SDK releases shipped different Manatee builds. Everything here is taken from one
concrete, fully decompiled build, v1.1 build 0x3F, dated 1999-03-18, as shipped in
Soul Calibur (USA). The architecture and concepts apply to Manatee in general; exact details
such as specific bugs, command codes or table layouts may differ in other versions.
The big picture
The Dreamcast has two processors involved in sound. The SH-4 runs the game and Sega's sound library; it never touches a sound voice directly. The AICA is a Yamaha sound chip with its own ARM7DI CPU, 64 sample-playback voices, an effects DSP, a mixer and 2 MB of dedicated sound RAM. The SH-4 loads a driver program into sound RAM, starts the ARM, and from then on talks to it only through shared memory.
A sound's journey in one paragraph
A game calls, say, sdShotPlay(). The SH-4 library writes a 16-byte command into a queue in
main RAM; once per video frame it copies the whole batch across the G2 bus into a mailbox in sound RAM
and raises a flag byte. Within 4 ms the ARM driver notices the flag, decodes the command, picks a free
AICA channel, copies a pre-built register image of the sample into it and sets its key-on
bit. The voice starts reading sample data from sound RAM, shapes it with its envelope and filter, and
sends it both straight to the mixer and into the DSP, where a reverb program adds the room. The driver
writes a status record back into sound RAM so the game can see that the sound is playing.
How this guide is organised
Dreamcast audio hardware
SH-4, Holly and the G2 bus, the AICA's blocks, the ARM7DI, and the two views of memory.
HardwareHow an AICA channel makes sound
Samples and formats, loops, pitch, envelopes, the resonant filter, LFOs, levels and key on/off.
Hardware + driverThe DSP and effects
How a 128-step microprogram and a delay ring buffer make reverb, and how the driver swaps programs.
Hardware + driverSH-4 ↔ ARM communication
FIQ, interrupt levels, the timer heartbeat, and the mailbox protocol Manatee actually uses.
DriverDriver architecture
Boot, the main loop, the event ring that unifies everything, and the sound-RAM memory map.
DriverThe MIDI engine & voices
Ports, channels, tone banks, what happens on note-on, voice stealing and controllers.
DriverThe sequencer
How songs are stored and timed, generated note-offs, loops, calls, tempo and priorities.
DriverOne-shots & PCM streams
Sound effects, voices and streamed music on the 16 channels reserved for them.
Everything about the driver was established by decompiling the Soul Calibur copy of it: the image
was extracted from the game's CINIT.DAT, analysed in Ghidra, and rewritten as C in src/arm/, with every function
independently re-checked against the disassembly. The SH-4 side comes from disassembling Sega's sound
library as linked into the game. General AICA hardware behaviour (what a register does) is
standard Dreamcast knowledge and is marked as such where it matters. The Bugs,
quirks & confidence page lists what is certain and what is not.