Skip to content

About

Static recompilation research for Xbox Series X|S (Scarlett) on x64 Windows. GTA VI case study with shader translation, BC7 texture rendering, script-state replay and D3D12/PE checks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Xbox2Windows

Xbox2Windows investigates static recompilation of Xbox Series X|S (Scarlett) software for x64 Windows, using Grand Theft Auto VI as its case study. The CPU experiments translate source-built x64 functions from PE machine code through C++ to new Windows DLLs, including a direct call and cross-DLL imports by name and ordinal. The shader experiment translates selected gfx1013 pixel shaders through HLSL to desktop DXIL. Other experiments test the Windows runtime, render recovered texture levels and read script state data. Title CPU code execution, full-game startup and frame rate remain unverified.

Current results and open work

Area Result on Windows Open question or contribution
FidelityFX upscaler The recompiled provider creates 11 resources at 720p → 1080p and a twelfth with the debug flag. On RTX 4060 Laptop and WARP, both the per-resource indices and the returned loader and provider handles passed. Provider loop and desktop mappings · Recurrent texture pixel readback Verify the packed RGB9E5 shader reads and writes on the RTX path.
x64 context callbacks The recompiled FidelityFX loader destroy function calls the bound provider and preserves its 32-bit result across both cleanup paths on Windows. The upscaler slot was identified in the local package. Provider and Windows comparison Verify the upscaler's internal effect teardown with a successfully created graphics context.
CPU translation A leaf function, a direct call and cross-DLL imports by name and by ordinal match the original fixtures on Windows. Establish the argument and result contract at a package import call site.
Shader translation Supported pixel programs sample a texture, read constants and export color. D3D12 readback is checked against a CPU reference. Translation and bindings Supply a source-built instruction case with known register inputs and an expected color.
BC7 textures A translated shader samples recovered mip levels on hardware and WARP. Requests for missing high-resolution levels use the first resident level. Mip fallback tests Match a variable BCPack lane against independently known BC7 blocks. Issue #15
Script states A native x64 probe follows state-tree links and reproduces distinct camera limits for front and rear selections. The replay supplies the selection requests. State replay Identify an event or caller that supplies a context and state ID, with a control input that takes a different branch. Issue #19
Windows runtime and GPU Source-built checks cover PE imports, heap operations, root signatures, compute and ray tracing. Four Radeon GPUs passed the native wave64 BVH test. Hardware coverage · Experiment notes Run the standalone GPU check on an adapter missing from the table and share the report in the hardware thread.

The public suite builds its own fixtures. A contributor can reproduce the checks below on a PC without a game installation. The standalone release packages the GPU check. To run the script, shader and texture development suite, build from source.

Run the GPU check

Download the Windows x64 GPU check and SHA-256, verify and extract the ZIP, then run this in PowerShell from the extracted folder. The package contains its own shaders and needs no compiler, console or game files.

.\Run-GpuCheck.ps1

Review gpu-report-hardware.md and paste it in the hardware coverage thread (#1). Reports with a failure or capability skip are welcome. Package instructions

Hardware coverage

Adapter or backend Default native lanes Forced wave64 BVH differential Evidence
NVIDIA GeForce RTX 2060 32 Skipped 408 queries passed Maintainer baseline
NVIDIA GeForce RTX 4060 Laptop GPU 32 Skipped 408 queries passed Second maintainer workstation
NVIDIA GeForce RTX 5070 (driver 32.0.16.1692) 32 Skipped, lane range 32–32 408 queries passed RTX 5070 report
AMD Radeon RX 6600 (driver 32.0.21045.16010) 32 Passed, 64 lanes 408 queries passed RX 6600 report
AMD Radeon RX 6750 XT (driver 32.0.21045.29003) 32 Passed, 64 lanes 408 queries passed RX 6750 XT report
AMD Radeon RX 9070 (driver 32.0.22042.14002) 64 Passed, 64 lanes 408 queries passed RX 9070 report
AMD Radeon RX 9070 XT (driver 32.0.32015.16001) 64 Passed, 64 lanes 408 queries passed RX 9070 XT report
Microsoft WARP (software) 4 Skipped 408 queries passed Maintainer baseline

The five community GPU reports used commit def386a. Each Radeon completed all 38 forced-wave64 groups with zero mismatches. The RX 9070 XT also ran all three checks with the D3D12 debug layer enabled and reported zero warnings and errors.

Maintainers link independent results to the original report and record the adapter, driver, commit and outcome. Names or handles are added on request. The hardware-report and independent-build milestones are complete. The remaining community milestone is a fix verified by the contributor who reported the problem.

First build

On x64 Windows, install Visual Studio's Desktop development with C++ workload, including x64 MSVC, the C++ CMake tools with Ninja, and Windows SDK 10.0.26100 with DXC. From the repository root in PowerShell, run:

.\tools\dev.ps1
cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -R 'desktop_root_signature|era_heap_allocation|offscreen_warp'

These three tests exercise a D3D12 root signature, heap allocation and software rendering. To enable the script, shader, texture and PE fixture tests, install x64 Python 3.11 or newer and configure again. Windows CI uses Python 3.12.

python -m venv out/pe-env
.\out\pe-env\Scripts\python.exe -m pip install -r requirements-dev.txt
cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error

An independent contributor passed all three smoke tests from a clean checkout of 71bb9f4 on Windows 11 build 26300.9974 with VS Build Tools 2022 17.14 and Windows SDK 10.0.26100. The tests passed again after an incremental rebuild at 2465837. With Python 3.14.10, the full suite had 66 and 68 tests respectively, with zero failures in either run. Each run skipped forced wave64 on the RTX 5080 and WARP because their reported lane ranges excluded 64. Original clean-build report

Choose an experiment

Area A contribution you can verify Focused CTest command
Static CPU recompilation Compare leaf, chained-range and cross-function translations with their source-built originals and negative controls. ctest --preset dev --no-tests=error -R '^cpu_' -V
Script states Reproduce a parent/child lookup, an ambiguous selection or a damaged sibling link with a synthetic tree. ctest --preset dev --no-tests=error -R '^script_(state_literals|path_links)$' -V
Texture recovery Check a packed mip tail, a first refill byte, or a resident mip drawn on the software adapter. ctest --preset dev --no-tests=error -R '^(bcpack_prefix_and_mip_tail|bc7_draw_warp)$' -V
Static shader recompilation Translate the single-texture pixel shader fixtures to desktop DXIL and check every output channel. Supported instructions and bindings ctest --preset dev -R '^pixel_aot_' -V
D3D12 and ray tracing Compare the CPU reference, custom BVH shader and DXR on another adapter. Record the driver and native wave width. ctest --preset dev -R '^bvh_(differential|wave64)_hardware$' -V
Windows runtime Add a source-built allocation case with a measurable Windows result. ctest --preset dev -R 'era_heap|desktop_memory_query'
PE tooling Reproduce an import-resolution edge case with a DLL or EXE built from source. ctest --preset dev -R 'static_exe_intake|conditional_import_paths'
Build and documentation Try the first build from a clean clone. Identify the first missing prerequisite or unclear instruction. Use the three-test command above.

For task ownership, evidence requirements and PR review, see the contribution guide. Open an issue · Community conduct · Private security reports

GTA VI case study and provenance

The installation metadata inspected for this case study lists a Scarlett executable. The main executable was absent from the inspected files. The public regression suite uses source-built fixtures and independently built shaders. Intake methods and evidence

License

Original project code and documentation use the MIT License. Third-party games, assets, SDKs and trademarks belong to their respective owners. Xbox2Windows is an independent community project, unaffiliated with Rockstar Games, Take-Two, Microsoft or AMD.

About

Static recompilation research for Xbox Series X|S (Scarlett) on x64 Windows. GTA VI case study with shader translation, BC7 texture rendering, script-state replay and D3D12/PE checks.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages