Tool
ghidra-allegrex
Ghidra processor module for the Allegrex CPU of the PlayStation Portable, derived from Ghidra's MIPS module. It adds Allegrex-specific instructions, VFPU disassembly and basic decompilation, the PSP calling convention, and an ELF loader that detects PSP executables and applies the PSP-specific type A and B relocation sections, with rebasing after import. Bundled scripts import and export PPSSPP .sym function-label files, and an exporter writes kernel modules as relocatable object files for linking.
- Targets
- Binary · Firmware · Game
- Category
- Game analysis tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Latest release at review: v21.5, published 2026-10-25, built for Ghidra 12.2 and requiring JVM 25; the reviewed master commit is that tag. Each release zip targets one Ghidra version, so v21.4 of 2026-08-25 remains the build for Ghidra 12.1.3 and 12.1.4. Extension v19 and later install through Ghidra's File > Install Extensions; v18 and earlier are unpacked into Ghidra's Processors directory.
- Source builds set GHIDRA_INSTALL_DIR and run the Gradle wrapper's buildExtension task, compiling Kotlin and Java against the local Ghidra installation with a JVM 25 toolchain. CI builds the extension against Ghidra 12.2 on Ubuntu and uploads the zip; the repository has no automated tests. The two PPSSPP scripts are written in Ghidra's Python 2 (Jython) dialect, and the .sym file comes from the user's own PPSSPP debugging session.
- Inputs are PSP executables in ELF/PRX form, kernel modules or raw binaries that the user supplies; the README notes that game executables must already be decrypted, and the repository contains no PSP software or firmware. Raw binaries need the processor and image base set by hand, and some kernel modules need the reboot.bin type B relocation option at import.
- The README lists limits: almost every VFPU operation decompiles to a function call such as vadd_q(...), the vpfxs, vpfxt and vpfxd prefix semantics are not modeled, vfim.s shows its half-float operand as an integer, object files cannot be rebased after import, and functions with 64-bit arguments need custom storage because of a Ghidra issue. Nothing was imported or analyzed for this record.
- Apache-2.0; the README says it is derived from Ghidra's Apache-2.0 MIPS module and that type B relocation parsing is based on prxtool under AFL v2.0. The project's own sources do not mention REA. Separately, REA's PSP static ELF guide, listed in this collection, uses it as a caller-installed extension and pairs v21.4 with Ghidra 12.1.3.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- README.md#L73-L81 GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- CHANGES.md GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- build.gradle GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- .github/workflows/build.yml GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- ghidra_scripts GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- LICENSE GitHub · kotcrab/ghidra-allegrex · Revision abcf976
- https://github.com/kotcrab/ghidra-allegrex/releases/tag/v21.5
- https://github.com/kotcrab/ghidra-allegrex/releases/tag/v21.4
- docs/ghidra-psp.md#L28-L37 GitHub · morluto/rea · Revision c12d9ed
More in Games
- GM8Decompiler · Tool
- UELib (Unreal-Library) · Tool
- DX-Ball: reconstruct sound panning · Case study
- TH04: recover a DOS bullet-ring helper · Case study
- Super Mario 64 DS: matching decompilation with relocation checks · Case study
- GoldenEye 007: an agent-assisted native port from a decompilation · Case study