Ally X recompilation harness: builds the GTA VI recompilation runtime (Palmetto/Leonida) on Linux, generates the SPIR-V shader corpus, and boots the retail exe under Proton/Wine. Measured on a Ryzen Z1 Extreme.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
ryan bbcf311776 linux-boot: name the failing precondition instead of the null
The int3 at game+0x19f4f58 is a debugbreak on a precondition (0x142478440)
that failed, and the code after it publishes the uninitialised singleton
anyway. Probes show the module init runs (0x24781d0) but never reaches the
attach call (0x24792f4), so 0x1475df128 is legitimately null. GetAdapter is
instrumented and returns S_OK with a live adapter, ruling out the GDX output
discovery path as the failing check.
2026-11-26 21:54:05 +00:00
docs linux-boot: name the failing precondition instead of the null 2026-11-26 21:54:05 +00:00
patches Linux build and boot harness for the GTA VI recompilation runtime 2026-11-26 21:45:15 +00:00
scripts Linux build and boot harness for the GTA VI recompilation runtime 2026-11-26 21:45:15 +00:00
NOTICE.md Linux build and boot harness for the GTA VI recompilation runtime 2026-11-26 21:45:15 +00:00
README.md Linux build and boot harness for the GTA VI recompilation runtime 2026-11-26 21:45:15 +00:00

allyx-recomp — Linux build and boot harness for the GTA VI recompilation runtime

This repository is the Linux side of the static-recompilation route to GTA VI on PC: it builds Palmetto (the open continuation of Leonida) on Linux, generates the translated shader corpus from your own package, and runs the runtime under Proton's Wine with the Vulkan backend.

It exists because every upstream tree is Windows/MSVC-first. Nothing here contains game code, game data, shaders, keys or logs that quote them — it is a build recipe, a run harness, one compiler patch, and the measurements that came out of running it on a Ryzen Z1 Extreme handheld.

You need your own copy of the Xbox Series package (1.0.2.1), readable on disk. Nothing here obtains, decrypts or works around protection.

Why this target

The recompilation route is the only one that can eventually give a portable, buildable, source-level artifact instead of a runtime that translates D3D12 calls as the title makes them. Upstream (Palmetto) already has: the PE loader and import shims, the Xbox D3D12 → Vulkan device, the RDNA2 → SPIR-V shader translator covering all 26,503 shader modules, and a boot that records and submits draws. What it did not have is a documented way to build and run any of that anywhere but Windows.

What is measured here (not estimated)

All numbers below were produced on this machine, in this repository's harness. They are counts and error classes; no game bytes.

Step Result
Shader carve from shaders.rpf 26,503 containers in 3.49 s, 293 MB (vs 2,236 / ms 9,282 / ps 12,101 / gs 195 / cs 2,689)
Native program unpack (FSSM) 26,503 blobs, 412 MiB, median 10,479 B, 10.0 s
Disassembly (llvm-mc, gfx1013) 60/60 clean in 0.22 s (LLVM 23.1.5, AMDGPU target present in the distro build)
Translate to SPIR-V + spirv-val 60/60 translated, 60/60 validate, 2.95 s (~49 ms/shader)
Runtime build palmetto.exe 5,662,208 B and palmetto_tls_host.dll 407,040 B, clang-cl 23.1.5 + xwin SDK 10.0.26100 + lld-link, after one C++ source fix (see patches/)
--dry-run on the retail exe under Wine 5 modules mapped, 0 unimplemented imports, exit 0
--run on the retail exe under Wine 1,181 D3D12 calls (598 ID3D12Device, 581 ID3D12GraphicsCommandList, 1 D3D12XboxCreateDevice, 1 XboxIDXGIDevice), then an access violation at t = 2.5 s

The --run stop is the current Linux frontier:

xmem_physical_pages  XMemAllocatePhysicalPages attributes=0x280 pages=11360   game+0x5eb27ac
xmem_attributes      XMemVirtualAlloc  attributes=0x7   size=193986560        game+0x1e8649f
xmem_attributes      XMemVirtualAlloc  attributes=0x27  size=10485760         game+0x1e865a3
int3_skipped         at game+0x19f4f58
exception            0xc0000005 read of 0x18 at game+0x5eb24bf
stack: game+0x5eb24bf game+0x19f4f5e game+0x580437e game+0x43a4911
       game+0x224070b game+0x23cf00a game+0x2215eca kernel32+0x11649 ntdll+0x10e0f

PALMETTO_SKIP_INT3=1 stepped over a soft assert at game+0x19f4f58; the very next frame in the fault stack is game+0x19f4f5e, six bytes later. The code that runs after that assert dereferences +0x18 of a null pointer. So the first real question on Linux is what that assert tests, and running without PALMETTO_SKIP_INT3 is the honest way to see it.

Quick start

# 1. Toolchain (once). No root needed: CMake comes from a venv, the MSVC CRT and Windows SDK
#    are reused from cargo-xwin's cache if you already build Rust for Windows.
./scripts/build-linux.sh --setup

# 2. Vendor and build the runtime (patches + configure + build).
./scripts/build-linux.sh

# 3. Build the shader corpus from your own package (hours; shardable).
./scripts/shader-corpus.sh "/path/to/package" --jobs 8

# 4. Run the title under Proton's Wine, with traces.
./scripts/run-linux.sh "/path/to/package" --mode run --timeout 150

Layout

patches/   the one source fix the Linux compiler needs (applies to Palmetto's port/)
scripts/   build-linux.sh (toolchain + build), shader-corpus.sh (carve/disasm/translate), run-linux.sh
docs/      linux-build.md, shader-corpus.md, linux-boot.md, target-ally-x.md

Hardware target

The intended device is a ROG Ally X: Ryzen Z1 Extreme (8 cores / 16 threads, RDNA3 12 CU, native 64-wide wavefronts) with 24 GB of shared LPDDR5. docs/target-ally-x.md records what that implies for the port: Series S visual parity, pre-warmed pipelines, FSR, frame generation, and where the current recompilation frontier sits against those budgets.

Because the same code path has to scale to a 4K discrete card, the rule is: nothing is tuned to the handheld. Everything is a runtime option with the handheld as one profile.

Status and scope

Working: Linux build of the runtime, the whole shader pipeline on Linux, PE mapping and import binding, D3D12 device/command-list traffic up to 1,181 calls, traces.

Not working: the boot stops at the access violation above before any frame is presented. Upstream's own Windows frontier is further along (draws record and submit; presented frames read black); that gap is the next thing this harness is for.

Credit and licence

The runtime, the translator and the format work are the Leonida authors' and Palmetto's (GPL-3.0-or-later); this repository only carries build/run tooling, one patch and measurements, under MIT. See NOTICE.md.