
Macronix 16-bit Audio DSP
This project develops BAudio, a custom audio engine designed for the Macronix 16-bit programmable DSP used in the Nintendo GameCube, Wii, and Wii U. The DSP acts as a slave processor dedicated to real-time audio processing, with built-in hardware support for DSP-ADPCM decoding to offload audio tasks from the CPU.The system leverages 16 MB of ARAM to store PCM and ADPCM audio data, while also allowing additional game assets such as textures and animations. All DSP logic is implemented in assembly microcode, requiring careful instruction and memory optimization to operate efficiently within hardware constraints.
BAudio supports:
PCM and ADPCM playback
FM synthesis based on the Yamaha YM2612/SCSP
Audio mixing with ADSR envelopes, and resampling
DSP effects including filtering, reverb, and Dolby Pro Logic II
Message-based command handling for flexible audio control
Waveforms: PSG, Noise, Triangle
CRI ADX-ADPCM decoding
Macronix Audio DSP Hardware

Clock: 81 MHz (GameCube) / 121.5 MHz (Wii)
Data Width: 16-bit, Big Endian
Memory:
Data RAM: 8 KB
Data ROM: 4 KB
Instruction RAM: 8 KB
Instruction ROM: 8 KB
Hardware Features: Built-in DSP-ADPCM decoder
Boot ROM: Contains initialization microcode and data tables
Macronix DSP16 Development Kit

DSP IDE & Simulator – For writing, testing, and debugging DSP microcode in a virtual environment.
DSP Assembler – Converts assembly source code into machine instructions for the DSP.
DSP Linker – Links multiple object files and resolves addresses for DSP execution.
hex2bin – Converts hexadecimal output files into binary or C format for loading onto the DSP.
mxhex2h – Converts DSP hex files into C header files for integration with CPU-side code.