Porting Xbox 360 Games to Native C++ with ReXGlue
Emulating consoles like the Xbox 360 has always been bottlenecked by high CPU demands. The eight-threaded PowerPC Xenon required serious hardware just to translate instructions on the fly. The Xenia project developers did tremendous work, but even on modern PCs the CPU load remains noticeable.
The reverse engineering community is embracing a different approach: static recompilation. Instead of translating code during gameplay, a utility converts the console executable into standard C++ source code in a single pass, then compiles it natively for the target platform.
This is exactly what the ReXGlue project does.
What static recompilation is about
When an emulator runs in real time, it continuously expends resources decoding PowerPC instructions, managing registers, and simulating the console architecture. A static recompiler takes the binary beforehand, analyzes its instructions, and generates equivalent C++ code.
A standard compiler like Clang or MSVC then takes over, optimizing the generated code for the specific processor and leveraging all available x86-64 or ARM64 instructions. The result is a standard native application.
This approach eliminates translation overhead entirely. The game taps directly into the PC's capabilities, demanding far fewer resources.
What ReXGlue consists of
The project's creators openly acknowledge that they build on the Xenia team's research and the work of XenonRecomp and rexdex tool developers.
ReXGlue's architecture can be split into two components:
- An analysis tool that reads Xbox 360 binaries and generates C++ functions.
- A runtime library (SDK) that handles console system function calls, memory management, and input/output operations.
The repository rexglue-sdk contains the runtime and build wrapper. The source code itself is written in C and C++.
The project supports builds for Windows (amd64) and Linux (amd64, arm64). The ARM64 build is particularly noteworthy—it enables running recompiled games on handheld consoles and single-board computers without frame rate penalties.
Current state and limitations
The developers are upfront about the project's early stage. The public API undergoes frequent changes, and some features remain incomplete. You cannot yet transform a compiled game into a ready-to-run binary with a single click.
Static recompilation in general is full of nuances. Binaries often contain indirect jumps or packed data. An automated translator doesn't always independently determine function boundaries without hints. Because of this, the porting process requires creating game-specific configurations for each title.
The repository currently has around 750 stars. The community is forming around a Discord server and the releases section on GitHub, where the authors publish nightly builds.
Who the tool is for
You will not be able to run any Xbox 360 game in a couple of minutes through this tool yet. But the project will definitely interest:
- Reverse engineers and researchers studying the structure of PowerPC executables.
- Compiler and translator developers looking for practical examples of code generation from one ISA to another.
Detailed instructions for working with the CLI and configuration files can be found in the repository wiki, and the source code itself is available on GitHub in the rexglue/rexglue-sdk repository.
Related projects