# hedge-dev/xenonrecomp

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hedge-dev-xenonrecomp).**

6,370 stars · 411 forks · C++ · MIT

## Links

- GitHub: https://github.com/hedge-dev/XenonRecomp
- awesome-repositories: https://awesome-repositories.com/repository/hedge-dev-xenonrecomp.md

## Description

XenonRecomp is a static binary translator and Xbox 360 game recompiler. It functions as a binary analysis tool and native code generator that converts machine instructions from Xbox 360 game executables into C++ source code for recompilation on different hardware platforms.

The tool features specialized capabilities for translating compiled binaries, including the conversion of assembly jump tables into native switch cases and the detection of function boundaries using stack space data and branch link instructions. It optimizes translated code by converting non-volatile and non-argument registers into local variables to reduce executable size and improve frame times.

The system supports a broader workflow for game preservation and reverse engineering. This includes mapping guest system calls to native architecture implementations, inserting custom function hooks at specific instruction addresses, and replacing recompiled functions with native implementations via weak linking and function aliasing.

## Tags

### Game Development

- [Native Recompilations](https://awesome-repositories.com/f/game-development/retro-game-emulation/native-recompilations.md) — Translates Xbox 360 legacy binary code into native machine code to run games without the need for emulation.
- [Cross-Platform Porting](https://awesome-repositories.com/f/game-development/cross-platform-porting.md) — Adapts original console game logic to run on PC by replacing guest system calls with native implementations.
- [Reverse Engineering Tools](https://awesome-repositories.com/f/game-development/game-engine-utilities/reverse-engineering-tools.md) — Provides tools to analyze and modify original game binaries via hooks and overrides to patch or optimize the engine.
- [Retro Game Preservation](https://awesome-repositories.com/f/game-development/retro-gaming-frameworks/retro-game-preservation.md) — Preserves Xbox 360 games by converting binaries into native source code to ensure playability on modern hardware.

### Programming Languages & Runtimes

- [Binary-to-C Translation](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/c-source-translators/binary-to-c-translation.md) — Converts machine code binary instructions from game executables into static C++ source code.
- [AOT Binary Recompilation](https://awesome-repositories.com/f/programming-languages-runtimes/aot-binary-recompilation.md) — Translates legacy console guest instructions into host-compatible C++ source code during a static build step.
- [Static Binary Translation](https://awesome-repositories.com/f/programming-languages-runtimes/static-binary-translation.md) — Implements static binary translation by converting compiled machine code into source code for native execution on different architectures.
- [Function Overriding](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/linkers/function-overriding.md) — Replaces recompiled binary functions with custom native implementations using the linker and function aliasing.

### Operating Systems & Systems Programming

- [Binary Analysis Tools](https://awesome-repositories.com/f/operating-systems-systems-programming/binary-analysis-capabilities/binary-analysis-tools.md) — Provides utilities for inspecting assembly patterns and optimizing register usage within compiled binaries.
- [System Call Mapping](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/system-calls/system-call-mapping.md) — Translates guest system calls from the Xbox 360 to native architecture implementations to maintain binary compatibility. ([source](https://github.com/hedge-dev/xenonrecomp#readme))
- [Static Binary Analysis](https://awesome-repositories.com/f/operating-systems-systems-programming/static-binary-analysis.md) — Performs static analysis on legacy binaries to identify function boundaries and jump tables without executing the code.
- [Instruction Hooking](https://awesome-repositories.com/f/operating-systems-systems-programming/computer-architecture/instruction-execution-models/instruction-hooking.md) — Allows the redirection of execution flow by inserting custom function calls at specific instruction addresses.
- [Host-to-Guest Translation](https://awesome-repositories.com/f/operating-systems-systems-programming/keyboard-input-modes/host-to-guest-translation.md) — Implements a translation layer that maps guest system calls to native host implementations.

### Security & Cryptography

- [Function Boundary Discovery](https://awesome-repositories.com/f/security-cryptography/symbol-recovery-tools/function-boundary-discovery.md) — Provides techniques for discovering the start and end addresses of functions within compiled Xbox 360 binaries. ([source](https://github.com/hedge-dev/xenonrecomp#readme))

### Software Engineering & Architecture

- [Jump Table Detection](https://awesome-repositories.com/f/software-engineering-architecture/dispatch-tables/jump-table-optimizations/jump-table-detection.md) — Detects assembly jump tables and transforms them into native switch cases during the translation process. ([source](https://github.com/hedge-dev/xenonrecomp#readme))
- [Register-to-Variable Conversions](https://awesome-repositories.com/f/software-engineering-architecture/state-management/hardware-register-state-managers/register-pressure-optimizations/register-to-variable-conversions.md) — Optimizes translated code by converting non-volatile and non-argument registers into local variables to reduce executable size and improve frame times. ([source](https://github.com/hedge-dev/xenonrecomp#readme))
- [Register-to-Variable Mapping](https://awesome-repositories.com/f/software-engineering-architecture/state-management/hardware-register-state-managers/register-pressure-optimizations/register-to-variable-mapping.md) — Converts non-volatile and non-argument registers into local variables to reduce executable size and improve frame times.
