Production-Ready Static Recompiler for GameCube Games → Rust → Native PC Executables
⚠️ IMPORTANT: This software is subject to an End User License Agreement (EULA). By downloading, installing, or using this software, you agree to the terms in EULA.md.
GCRecomp is an advanced static recompiler that translates GameCube PowerPC binaries (DOL files) into optimized Rust code, producing standalone, cross-platform executables that run natively on modern PCs without emulation overhead.
Inspired by the groundbreaking N64Recomp, GCRecomp combines reverse engineering, compiler design, and modern systems programming to enable high-performance ports, game preservation, and modding capabilities.
This tool is for educational, research, archival, and game preservation purposes only.
BY USING THIS SOFTWARE, YOU AGREE: - You are solely responsible for complying with all laws (e.g., copyright, DMCA, EU directives). - To indemnify and hold harmless authors/contributors from any claims, damages, or liabilities arising from your use. - Software provided "AS IS" with NO WARRANTY (including noninfringement or fitness for purpose). Authors are NOT LIABLE for any consequences.
Do not use if you disagree or cannot comply. Use at your own risk. This is not legal advice.
Nintendo is famously protective of its IPs — think of them as the ultimate "overprotective parent" of Mario, Zelda, and friends. They rarely go after pure preservation tools like this one (decomp/recomp projects for old consoles have been chilling untouched for years), but they do swing the legal hammer hard when people cross into obvious piracy territory. Here's a playful rundown of some notable takedowns:
Moral of the story? Nintendo sues when you distribute games, bundle ROMs, sell bypass tools for current consoles, or facilitate mass piracy. They haven't come knocking on doors of clean-room decomp/recomp projects, older-system emulators without keys, or tools that require your own legally dumped files.
So keep it legit: use your own discs, don't share binaries, and we're all just here preserving gaming history like responsible adults. Stay safe out there, fellow preservers! 🛡️
GCRecomp has evolved from a proof-of-concept to a production-ready recompiler with comprehensive features:
Condition register operations
Advanced Analysis Framework
Dead code elimination
Production-Ready Code Generation
Code validation and error handling
Memory-Optimized Architecture
SmallVec and BitVecExplicit type annotations for compiler optimization
Comprehensive Documentation
Inline code comments explaining complex logic
Error Handling
thiserrorwgpuGCRecomp/
├── gcrecomp-core/ # Core recompiler library
│ ├── src/
│ │ ├── recompiler/ # Recompilation engine
│ │ │ ├── parser.rs # DOL file parsing
│ │ │ ├── decoder.rs # PowerPC instruction decoding
│ │ │ ├── analysis/ # Control flow, data flow, type inference
│ │ │ ├── codegen/ # Rust code generation
│ │ │ ├── ir/ # Intermediate representation
│ │ │ └── pipeline.rs # Recompilation pipeline
│ │ └── runtime/ # Runtime system
│ │ ├── context.rs # CPU context (registers, state)
│ │ ├── memory.rs # Memory management
│ │ └── sdk.rs # GameCube SDK stubs
│ └── Cargo.toml
├── gcrecomp-runtime/ # Runtime implementation
│ ├── src/
│ │ ├── memory/ # Memory subsystems (RAM, VRAM, ARAM)
│ │ ├── graphics/ # Graphics emulation
│ │ └── input/ # Input handling
│ └── Cargo.toml
├── gcrecomp-cli/ # Command-line interface
│ └── src/
│ └── main.rs
├── gcrecomp-ui/ # Graphical user interface (optional)
│ └── src/
├── game/ # Generated game binary
│ └── src/
│ └── recompiled.rs # Auto-generated Rust code
├── scripts/ # Automation scripts
│ └── ghidra_export.py # Ghidra analysis integration
├── docs/ # Documentation
├── tests/ # Test files and fixtures
├── Cargo.toml # Workspace configuration
└── README.md
For detailed installation instructions, see INSTALL.md.
# Clone the repository
git clone https://github.com/yourusername/GCRecomp.git
cd GCRecomp
# Build the project
cargo build --release
# Run tests
cargo test
# Build documentation
cargo doc --open
# Recompile a DOL file
cargo run --release --bin gcrecomp-cli -- path/to/game.dol output.rs
# The generated Rust code will be in output.rs
# Compile it as part of the game crate
See the documentation for detailed usage instructions, API reference, and examples.
If you encounter issues, check TROUBLESHOOTING.md for common problems and solutions.
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test suite
cargo test --package gcrecomp-core
Contributions are welcome! Please read our Contributing Guidelines and Code of Conduct before submitting pull requests.
cargo fmt and cargo clippy before submittingGCRecomp is optimized for both memory efficiency and compilation speed:
wgpuGCRecomp uses aggressive memory optimizations:
#[repr(u8)] saves 3-7 bytes per enum instanceThis project is licensed under the CC0 1.0 Universal (Public Domain Dedication) license.
See LICENSE for the full license text.
This project got a helpful boost from AI—specifically Cursor (the AI-powered code editor)—during development.
As I'm still in the early ("noob" 😂) stages of my Rust journey, Cursor was an invaluable co-pilot that helped with:
$ claude mcp add GameCubeRecompiled \
-- python -m otcore.mcp_server <graph>