Skip to content

Commit

Permalink
Improve docs (#5)
Browse files Browse the repository at this point in the history
* Improve docs

* Smol tweaks

* More tweaks

* Build clarifications
  • Loading branch information
ComplexPlane committed Nov 20, 2023
1 parent 3dd712a commit 59b365f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,43 @@
# SuperMonkeyBallTools for Ghidra
Utilities to help reverse engineer Super Monkey Ball 2 with [Ghidra](https://github.com/NationalSecurityAgency/ghidra)
# Super Monkey Ball Tools for Ghidra

[Ghidra](https://github.com/NationalSecurityAgency/ghidra) plugin for Super Monkey Ball 2 reverse engineering.

## Install

- Download the plugin .zip from the [releases page](https://github.com/ComplexPlane/Ghidra-SuperMonkeyBallTools/releases)
- Move the .zip to `<Ghidra install dir>/Extensions/Ghidra/`
- Start Ghidra, go to (`File > Install Extensions...`), and enable the extension

## Features
- Converting a Ghidra address to an address in GameCube memory
- Converting a Ghidra address to a location in a .dol/.rel file
- Converting an address in GameCube memory to a Ghidra address

This is accessible from `Window > SMB: Convert Address` in CodeBrowser
### Address Conversion

- Convert a Ghidra address to an address in GameCube memory
- Convert a Ghidra address to a location in a .dol/.rel file
- Convert an address in GameCube memory to a Ghidra address

**SMB Address Conversion window**: `Window > SMB: Convert Address` in CodeBrowser

## Default keybinds
- **Shift-G**: Go to GameCube RAM address
![Convert address window](doc/convert-address-window.png)

## Building
- Ensure you have `JAVA_HOME` set to the path of your JDK installation
**Shift-G**: Go to GameCube RAM address

### Symbol Export

- Export symbol addresses
- [SMB2PracticeMod](https://github.com/ComplexPlane/SMB2PracticeMod) / [SMB2WorkshopMod](https://github.com/TheBombSquad/SMB2WorkshopMod) format
- [cube_code](https://gitlab.com/CraftedCart/cube_code) format
- Export complete C/C++ headers - much better than Ghidra's built-in support

## Build from Source

- Ensure you have `JAVA_HOME` set to the path of your JDK 17 installation
- Set `GHIDRA_INSTALL_DIR` to your Ghidra install directory. This can be done in one of the following ways:
- **Windows**: Running `set GHIDRA_INSTALL_DIR=<Absolute path to Ghidra without quotations>`
- **macOS/Linux**: Running `export GHIDRA_INSTALL_DIR=<Absolute path to Ghidra>`
- Using `-PGHIDRA_INSTALL_DIR=<Absolute path to Ghidra>` when running `gradle`
- Adding `GHIDRA_INSTALL_DIR` to your environment variables.
- Run `.\gradlew.bat` (Windows) or `./gradlew` (Linux)
- Using `-PGHIDRA_INSTALL_DIR=<Absolute path to Ghidra>` when running Gradle
- Adding `GHIDRA_INSTALL_DIR` to your environment variables
- Run `.\gradlew.bat` (Windows) or `./gradlew` (macOS/Linux)
- You'll find the output .zip file inside `/dist`

## Installation
- Copy the zip file to `<Ghidra install directory>/Extensions/Ghidra`
- Start Ghidra, go to (`File > Install Extensions...`), and enable the extension

Binary file added doc/convert-address-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 59b365f

Please sign in to comment.