Skip to content
RonLogicPublic

About

A Xbox Series X|S Emulator Designed to map and shim system apis to run games seamlessly

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

107 Commits

Folders and files

Repository files navigation

TomBox

An Xbox Series X|S compatibility runtime for Windows PCs.

TomBox runs dumped, decrypted Xbox Series X|S game builds on ordinary PC hardware. It is not tied to one game: it reimplements the console's platform layer (the Xbox flavour of Direct3D 12, its precompiled GPU shaders, unified-memory textures and system libraries), so that a console executable can run as a normal Windows process.

It is early. One title has been brought up so far, and it reaches its main menu but is not playable. A second title's shaders have been examined; it has not been run. Every number below is measured, and nothing outside the status section is claimed.

Status

system functions Direct3D 12.x methods RDNA2 instructions shaders translated milestones titles examined

progress map

One square per item: green = done, amber = partial (a stub, a forwarder, or not verified to work), grey = not done. Hover a block in the image for its count.

  • System functions: the functions the test title imports, not every Xbox system function. Most are ordinary Windows and C runtime functions that run natively. The total grows as more titles are brought up.
    Direct3D 12.x: method slots of the Xbox device and command-list interfaces; grey slots are unmapped and have not been called by the test title.
    RDNA2 instructions: every instruction the decoder knows; green when the test title's shaders use it and every shader using it translates. Translating is not the same as rendering correctly.
    Shader stages: mesh and amplification shaders first appeared in the second title and are not translated yet.
    Generated by tools/progress/gen.py.
Milestone State
Console executable loads and runs natively done
Graphics device, pipelines and presentation done
First frame from the real game done
Main menu / lobby reached done
3D scene correct in progress
Input partial (mouse)
Audio not started
Gameplay not started
A second title shaders examined, not run

Tested titles

Title Build Result
Fortnite (Chapter 2 Season 4) 2.0.1461.7919 Boots, logs in to a private server, reaches the lobby. 2D interface correct. 3D scene lit but the character material is wrong and bloom shows artifacts. No audio. Not playable.

| Grand Theft Auto VI | 1.0.2.1 | Not run (the dump has no executable yet). Shader package examined: 26,503 shaders found, stored as plain compressed Xbox shader containers. Of a 4,000-shader sample all disassemble cleanly; about a third of the vertex shaders translate. Blockers: mesh shaders, and shaders that carry no root signature. |

No other title has been tried. Expect anything else to stop at the first platform call or shader construct this title did not exercise; unsupported features fail with a logged error instead of being silently ignored.

How it works

The Series X|S CPU is x86-64, so game code runs directly on the host CPU. There is no CPU emulation and no recompilation of game code. All the work is at the platform boundary.

Layer What TomBox does
Executable The game's PE starts as an ordinary Windows process. Its Xbox-only DLL imports are satisfied by compatibility DLLs placed next to it.
Graphics (d3d12_xs) Wraps a real PC Direct3D 12 device and presents the Xbox D3D12.x interface: different method-table layouts and Xbox-only device, command-list and queue methods (CreatePlacedResourceX, PresentX, frame-pacing events, derived pipeline states), each reconstructed from call sites.
Shaders (tombox-xshader) Console builds ship no DXIL. Shaders are precompiled AMD RDNA2 machine code. The translator disassembles it and emits HLSL, compiled at run time with Microsoft's DXC and cached on disk.
Textures On console a texture lives at a game-chosen address in unified memory, in a tiled layout. The runtime mirrors that memory into PC textures, using the layout library (xg_xs.dll) from the dump itself.
Platform services Games run against Microsoft's PC xgameruntime.dll. Where that cannot serve an unregistered title, local replacements stand in: one offline user and an empty store.
Network A configurable guard on DNS, sockets and HTTP. Three modes: offline (the default), everything redirected to one server of your choice, or unrestricted.

What is general and what is title-specific

  • General: the PE tooling, the shader translator, the Direct3D 12.x translation layer, texture mirroring, memory and storage shims, and the network guard.
  • Specific to the tested build: the local user and store hooks locate functions through that build's symbol table and refuse to install on any other executable. One shader rule (the element size of structured buffers) is a heuristic fitted to this title. Both are listed in docs/TECHNICAL_DEBT.md with the planned general replacement.

Known problems

  • 3D rendering is not verified correct. Lighting works, but the lobby character renders with a cyan "hologram" look, bloom produces bright blocks along the top of the screen, and there is no reference image to compare against.
  • A shader that fails to compile is fatal. Pipeline creation fails and the engine exits.
  • First-time shader compiles stall. Each shader is compiled once and then cached, but the first visit to a screen can trip the engine's stall watchdog.
  • Approximations in translated shaders. Whether a buffer or texture holds integers or floats is inferred from how the shader uses it (checked against a PC build's declarations, not exact). Texture lookups inside shader loops use the sharpest mip. Pixel-shader colour outputs assume the console replaces the default output packing per render-target format; that replacement is inferred, not observed.
  • Texture mirroring is polling-based. Changes are found by hashing game memory each frame.
  • Window. The image is stretched to the window, and the game still believes it drives a 3840×2160 display.
  • No audio, no controller support, no save data.

The full list of unverified assumptions is in docs/TECHNICAL_DEBT.md.

Requirements

  • Windows 10/11 x64 with a Direct3D 12 GPU.
  • Microsoft Gaming Services (provides xgameruntime.dll).
  • Rust toolchain (x86_64-pc-windows-msvc) and the Windows SDK (dxcompiler.dll and dxil.dll, found automatically or through TOMBOX_DXC_DIR).
  • Your own legally obtained, already-decrypted dump. No game files are provided here.

Build

cargo build --release
cargo test --release

The compatibility DLLs must be built with a static CRT:

set RUSTFLAGS=-C target-feature=+crt-static
cargo build --release -p d3d12_xs -p xmem -p xcrdapi -p acphal -p dxcompiler_xs -p mfplat

Running a title

There is no launcher yet. This is the manual procedure, shown for the tested title; the development scripts in tools/dev/ automate it with machine-specific paths.

  1. Extract the dump to input/extracted/ (game files end up under input/extracted/Mount/).

  2. Map that folder to drive G:, where the game expects its filesystem root: subst G: <repo>\input\extracted\Mount

  3. Copy acphal.dll, d3d12_xs.dll, dxcompiler_xs.dll, mfplat.dll, xcrdapi.dll and xmem.dll from target/release/ into the folder of the game executable (G:\FortniteGame\Binaries\XSX\).

  4. Copy the real xg_xs.dll from the dump (EmbeddedXvd/Windows/System32/) into the same folder. Texture layouts depend on it; do not use the stub crate of that name.

  5. Optional: create tombox.cfg in that folder:

    net_redirect=<your server>   # send all traffic to one host (omit to stay offline)
    gamertag=<name>              # local offline user (default TomBoxPlayer)
    xuid=<decimal id>
    xbl_token=<token string your server expects>
    
  6. Run the game executable (FortniteClient-XSX-Shipping.exe).

Compatibility-layer calls are logged to %TEMP%\tombox_compat.log (or %TOMBOX_LOG%). The game logs only through the debugger channel; tools/dev/mdbg.rs is a small tracer for it.

Variable Effect
TOMBOX_NET_REDIRECT Same as net_redirect
TOMBOX_ALLOW_NETWORK=1 Turn the network guard off (unrestricted access)
TOMBOX_D3D12_DEBUG=1 Direct3D validation layer
TOMBOX_RTCAP=1 Diagnostics: render-target capture, per-draw trace, shader skip list and override, binding trace (see docs/DEVELOPMENT_LOG.md)
TOMBOX_OWN_WINDOW=1 Present into a separate window

Repository layout

crates/tombox-pe         PE32+ parser (bounds-checked, fuzz and truncation tested)
crates/tombox-cli        pe-inspect and other analysis tools
crates/tombox-archive    safe archive inspection and extraction
crates/tombox-rpf        RAGE package (.rpf) header and region inspector (structure only)
crates/tombox-disasm     x86-64 disassembler front end with symbol resolution
crates/tombox-xshader    RDNA2 shader extraction, disassembly and HLSL translation
crates/compat/*          the compatibility DLLs (d3d12_xs, xmem, xcrdapi, acphal, ...)
                         and compat-common (logging, network guard, local user and store)
tools/dev/               development scripts and the tracer
tools/progress/          data and generator for the status image
analysis/                shader test fixtures and inspection output
docs/                    research and engineering record
input/                   your dump (git-ignored, never committed)

Documentation

  • docs/ARCHITECTURE.md — execution model and subsystem boundaries
  • docs/XBOX_RESEARCH.md — platform findings and references
  • docs/FORTNITE_ANALYSIS.md — the first test title: inventory, modules, dependencies
  • docs/COMPATIBILITY.md — API matrix and feature status
  • docs/TECHNICAL_DEBT.md — unverified assumptions, known bugs, risks
  • docs/DEVELOPMENT_LOG.md — chronological log with commands, results and evidence
  • docs/DECISIONS.md — architecture decision records

ARCHITECTURE.md, XBOX_RESEARCH.md and COMPATIBILITY.md lag behind the code; the development log and the technical-debt file are current.

Scope and legal

Interoperability research on binaries the user is authorised to analyse.

  • No console-security circumvention, key extraction or package decryption.
  • Network access is the user's choice (offline, redirected or unrestricted). The project's own development and testing never connects to publisher production services.
  • The local user is an offline placeholder, not an Xbox Live account, and the local store grants no entitlements. No anti-cheat code is touched.
  • Game executables and assets are not distributed with this project.
  • Not affiliated with Microsoft or any game publisher. Xbox is a trademark of Microsoft.

About

A Xbox Series X|S Emulator Designed to map and shim system apis to run games seamlessly

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages