TGP482 / XboxXBERecomp
git clone https://github.com/TGP482/XboxXBERecomp.git
A tool for statically recompiling original Xbox games into native executables.
+11
stars, 24h · #1,266
+~77
stars, 7 days · #1,608
+102
stars, 30 days · #4,827
112
★ total · +77% this week
16
forks · 2 open issues
Star history (as recorded here)
LanguageC++
LicenseMIT
Created2026-09-27 (25d ago)
Last push1d ago
Watchers6
OwnerUser
GitHub topics
Links
- GitHub: github.com/TGP482/XboxXBERecomp
- Homepage: https://discord.gg/8dAn4ZSsap
- Releases · Issues · Hacker News mentions
README excerpt
# Xbox XBE Recomp A tool for creating unofficial native PC ports of original Xbox games. Games are statically recompiled from their x86 XBE into native 64 bit Windows executables. The game's x86 code is translated to C++ ahead of time. The Xbox kernel and the XDK libraries (Direct3D 8, DirectSound, XAPI, XNet) are implemented at the API level on Windows. Everything is drawn with a native Direct3D 12 renderer and played through XAudio2. This tool was originally created for porting Tom Clancy's Splinter Cell: Double Agent and later used to port BLACK > [!NOTE] > This project does not include any game assets. You must provide the files from your own legally acquired copy of the game to install or build. ## Installation - Put this repository in your game repository as `sdk/`. This can be a copy or a submodule. - In the game's `CMakeLists.txt`: [code] - Build with Clang and Ninja (`clang++`, `-fuse-ld=lld`). Zydis, toml++, Dear ImGui and SDL3 are fetched by CMake. ## Game Setup 1. Copy `templates/game` to a new repository and put this SDK in it as `sdk/`. Set `GAME_TITLE`, `GAME_XBE` and `GAME_EXE` at the top of `build.bat` (`GAME_EXE` in `release.bat` too), and the target and xbe in `add_xbe_image` in `CMakeLists.txt`. 2. Put the game's XBE and its data folders in the `assets` folder. No game files, keys or generated code belong in any repository. 3. Run `xbe_symbols`, which `build.bat` does on the first build: [code] This prints the XBE's library versions, picks `xdk/ /signatures.toml` and finds the XDK functions and data the host replaces, then writes the config: `[xbe]` with a partition count and the code sections, the `layout.toml` include, `[symbols]` and `[data]`. Misses and ambiguous names are listed and left at 0, which become trapping stubs. It stops when no `signatures.toml` exists for the XBE's build. 4. Fill in `app::kGame` in `src/common/game_info.cpp`: title, window name, log and settings file names, splash, the xbe to exe table, game options, and the hooks for loading, the window, drawing and the pads. 5. Game hooks go in `src/game`. Define `X86_FUNC(sub_XXXXXXXX)` to replace a recompiled function, and call `__imp__sub_XXXXXXXX` to reach the original. `python sdk/tools/symbols/xbe2pe.py config/game.toml game.exe` writes a flat PE with the recompiled functions as exports for Ghidra. 6. Run `build.bat`. One game repo can build several images, one config and `add_xbe_image` each; `--name` sets the config's `generated/ `, which is the folder argument of `add_xbe_image`. A new XDK build needs `xdk/ /layout.toml` and signatures made from titles whose configs are complete: `xbe_symbols --sign config/a.toml [config/b.toml] --out sdk/xdk/ /signatures.toml`. Signatures are lengths and hashes of the functions with addresses masked, never library code. ## Features ### Recompiler - **Function Discovery** - Finds every function in the XBE by following direct calls, code pointers and the gaps between known functions. - **Jump Tables** - Resolves