A SLEIGH processor spec for Ghidra for the GameCube/Wii DSP chip.
This repository should be placed within the Ghidra install as the folder Ghidra/Processors/GCDSP
, such that Ghidra/Processors/GCDSP/data
is the path to the data
folder. Ghidra should automatically add it to the available processor list on its next start, and compile the files when it is first used.
Unfortunately DSP data comes in multiple files, which makes the import process a bit complicated.
- Select File → Import File.
- Select a file containing DSP ucode (e.g. one dumped by Dolphin when
DumpUCode
is set toTrue
). - Change the format to Raw Binary.
- Select GCDSP as the language.
- Click Options.
- Enter "iram" as the block name, and set the base address to
inst:0000
(it defaults todata:0000
). - Click OK on options, then on import, then on import results.
- Open the imported file.
- When prompted to analyze, click no.
- Open the memory map.
- Delete the
irom
andcoef
blocks. - Close the memory map.
- Select File → Add To Program.
- Find and select
dsp_rom.bin
. Dolphin's free DSP rom will work. - Change the format to Raw Binary.
- Click Options.
- Enter "irom" as the block name, and set the base address to
inst:8000
. - Click OK on options, then on add to program, then on import results.
- Select File → Add To Program.
- Find and select
dsp_coef.bin
. Dolphin's free DSP coef will work. - Change the format to Raw Binary.
- Click Options.
- Enter "coef" as the block name, and set the base address to
data:1000
. - Click OK on options, then on add to program, then on import results.
- Select Analyzis → Auto Analyze... or press A. Run analysis as normal.
The only manual is the GameCube DSP User's Manual, which is unfortunately incomplete. I plan on adding to it with information I've found while working on this.
There is also documentation in Dolphin's DSPTables.cpp and in Dolphin's interpreter. However, DSPTables is a bit confusing to read with regards to instruction decoding, and some of the interpreter comments (e.g. those for 'LD
) are incorrect. The code itself can also be used as a reference.