Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 2.68 KB

README.md

File metadata and controls

41 lines (33 loc) · 2.68 KB

A SLEIGH processor spec for Ghidra for the GameCube/Wii DSP chip.

Installation

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.

Usage

Unfortunately DSP data comes in multiple files, which makes the import process a bit complicated.

  1. Select File → Import File.
  2. Select a file containing DSP ucode (e.g. one dumped by Dolphin when DumpUCode is set to True).
  3. Change the format to Raw Binary.
  4. Select GCDSP as the language.
  5. Click Options.
  6. Enter "iram" as the block name, and set the base address to inst:0000 (it defaults to data:0000).
  7. Click OK on options, then on import, then on import results.
  8. Open the imported file.
  9. When prompted to analyze, click no.
  10. Open the memory map.
  11. Delete the irom and coef blocks.
  12. Close the memory map.
  13. Select File → Add To Program.
  14. Find and select dsp_rom.bin. Dolphin's free DSP rom will work.
  15. Change the format to Raw Binary.
  16. Click Options.
  17. Enter "irom" as the block name, and set the base address to inst:8000.
  18. Click OK on options, then on add to program, then on import results.
  19. Select File → Add To Program.
  20. Find and select dsp_coef.bin. Dolphin's free DSP coef will work.
  21. Change the format to Raw Binary.
  22. Click Options.
  23. Enter "coef" as the block name, and set the base address to data:1000.
  24. Click OK on options, then on add to program, then on import results.
  25. Select Analyzis → Auto Analyze... or press A. Run analysis as normal.

Manuals

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.