Ghidra loader and scripts for DS decompilation projects, powered by dsd.
- Download the latest release
- In Ghidra, open the "File" menu and select "Install Extensions"
- Click the + icon in the top-right and select the downloaded file
- Press OK in the "Install Extensions" window
- Restart Ghidra
You can load a DS game by dropping a DS ROM file into the Ghidra project window, then following the steps as they appear.
Caution
You may be prompted to auto-analyze your newly generated Ghidra program. Do not do this if you are going to use dsd! Instead, you should use the sync script since it will result in more accurate function analysis.
You can synchronize your Ghidra program with a dsd configuration by running the SyncDsd.java script in the Script Manager. The script can also be added to the toolbar by checking the "In Tool" checkbox.
- Build the
build.ps1PowerShell script to build the native Rust library. - Configure Gradle:
- Copy the
dsd-ghidra/gradle.properties.examplefile todsd-ghidra/gradle.properties. - Edit the
GHIDRA_INSTALL_DIRproperty ingradle.propertiesto point to your Ghidra installation.
- Copy the
- Create the IntelliJ project:
- In IntelliJ, open
dsd-ghidra/build.gradleas a new Gradle project.
- In IntelliJ, open
- Build the extension:
- In the Gradle tool window, run the
ghidra/distributeExtensiontask. - Now you should have a .zip file in
dsd-ghidra/dist/
- In the Gradle tool window, run the
You can also debug the extension through IntelliJ:
- Add all of Ghidra's JARs to your classpath. They can be located in
${GHIDRA_INSTALL_DIR}/Ghidra/and its subdirectories. - Add an
Applicationrun configuration:- Click "Modify options" and enable "Add VM options"
- Module:
dsd-ghidra.main - VM options:
-Djava.system.class.loader=ghidra.GhidraClassLoader - Main class:
ghidra.Ghidra - Program arguments:
ghidra.GhidraRun - Environment variables:
GHIDRA_INSTALL_DIR=C:/path/to/ghidra_11.2.1_PUBLIC/
- Run the
build.shbash script- You can add the
--debugflag to build debug versions
- You can add the
- Configure Gradle:
- Copy the
dsd-ghidra/gradle.properties.examplefile todsd-ghidra/gradle.properties - Edit the
GHIDRA_INSTALL_DIRproperty ingradle.propertiesto point to your Ghidra installation
- Copy the
- Load the project into Eclipse
- Ensure you have the latest version of GhidraDev installed
- Import the
dsd-ghidrasub-project as a Gradle project - GhidraDev -> Link Ghidra
- GhidraDev -> Export -> Extension