Using Ghidra with the Wii

Ghidra is a FOSS reverse-engineering tool by the US National Security Agency. It includes a disassembler and a decompiler.

Use with GameCube/Wii games

Ghidra does not include a GameCube loader by default, nor does it understand Broadway's slightly extended instruction set featuring paired singles. However, this can be fixed by installing ghidra-gekko-broadway-lang and Ghidra-GameCube-Loader. After these are installed, DOL and REL files can be imported using the normal import system. To extract those files from a disc image, one option is to open the properties for the disc in Dolphin, go to the filesystem tab, right-click, and select "Extract System Data" (or "Extract Entire Disc"/"Extract Entire Partition"). If a game includes debug symbols, then those can also be imported. When importing an ELF file, make sure to select the Gekko/Broadway PowerPC variant (which is selected by default for DOL and REL files).

Use with IOS

Ghidra can naturally import some IOS ARM Binaries, specifically those that are just regular ELF files. However, it will produce bad results due to the use of undefined instructions for syscalls. A language definition exists to fix this (though it will not produce the cleanest results since it doesn't know what various registers are used/changed by each syscall). For ELFLOADER files (used for monolithic IOS versions, and the kernel in non-monolithic IOS versions), the file must be converted to a normal ELF file first (by removing everything before the ELF header, or using the program on the ARM Binaries page).

There is also a functionID database available to help disassemble an IOS kernel in Ghidra. It can be found here.

Use with Disc Drive firmware

A MN102 processor spec exists.

Use with DSP microcode

A work in progress processor spec exists.

External Links