| 1 | # DSPSpy |
| 2 | |
| 3 | DSPSpy is a homebrew tool for experimenting with the GameCube/Wii DSP. It can also be used to dump the DSP ROMs. |
| 4 | |
| 5 | ## Building |
| 6 | |
| 7 | DSPSpy is built using [devkitPPC](https://wiibrew.org/wiki/DevkitPPC); see the [devkitPro getting started page](https://devkitpro.org/wiki/Getting_Started) for more information. DSPSpy also requires DSPTool to be built. |
| 8 | |
| 9 | First, run DSPTool to generate `dsp_code.h`, for instance from `tests/dsp_test.ds`. The following commands assume an x64 Windows setup running in the DSPSpy directory: |
| 10 | |
| 11 | ``` |
| 12 | ../../Binary/x64/DSPTool.exe -h dsp_code tests/dsp_test.ds |
| 13 | ``` |
| 14 | |
| 15 | To use the ROM-dumping code, run this: |
| 16 | |
| 17 | ``` |
| 18 | ../../Binary/x64/DSPTool.exe -h dsp_code util/dump_roms.ds |
| 19 | ``` |
| 20 | |
| 21 | DSPTool can also generate a header for multiple DSP programs at the same time. First, create a file (in this example, it was named `file_list.txt`) with the following contents: |
| 22 | |
| 23 | ``` |
| 24 | tests/dsp_test.ds |
| 25 | tests/mul_test.ds |
| 26 | tests/neg_test.ds |
| 27 | ``` |
| 28 | |
| 29 | Then run: |
| 30 | |
| 31 | ``` |
| 32 | ../../Binary/x64/DSPTool.exe -h dsp_code -m file_list.txt |
| 33 | ``` |
| 34 | |
| 35 | After `dsp_code.h` has been generated, simply run `make` to generate `dspspy_wii.dol`, which can be loaded by normal means. |
| 36 | |
| 37 | ## Dumping DSP ROMs |
| 38 | |
| 39 | Build DSPSpy with `util/dump_roms.ds`. When launched, DSPSpy will automatically create files `dsp_rom.bin` and `dsp_coef.bin` on the SD card (only SD cards are supported); DSPSpy can be exited immediately afterwards. |