An installer and a handful of fixes on top of xcl-dev/xcl,
the Xbox Series X|S → Windows compatibility layer.
Unofficial. This fork is not the XCL project and is not affiliated with it, with Microsoft or with any game publisher. All the hard work is upstream's. It contains no game files, keys or shader caches – you need your own unpacked game files.
Upstream XCL is built from source and started from a terminal. This fork packages it so that someone can install it and point it at a game folder, and it carries a few fixes found while bringing up a large game on an NVIDIA GPU.
| Upstream | This build | |
|---|---|---|
| Getting it | install Rust, the Windows SDK, build | one XCL-Setup.exe, per-user, no admin |
| Shader compiler DLLs | found in the Windows SDK | bundled next to xcl.exe |
| Starting a game | pick the exe / config, or xcl run <folder> |
Add a game folder… in the launcher menu |
| Mouse and window | cursor pinned to the window while it is focused | cursor taken by a click in the picture, released by F8, the title bar or Alt+Tab – the window can be moved and resized |
| Big shaders | DXC compiles queue on the process heap lock | a heap per compile thread – very large programs compile in parallel |
| Crash-reporter uploads | set XCL_NETWORK=0 yourself |
installer option that sets it for you |
XCL is a research project and this is a snapshot of it. Please read this before you try it.
-
What upstream reports as working (see the table further down): a few retail titles are listed as playable. Those claims are upstream's; they were not re-tested with this build.
-
Large, new games: do not expect them to be playable. With build 19 the game this build was tested against runs its menus and intro, reaches play and draws its world with the right colours; as an Xbox Series S (chosen in the start menu) it starts, needs less video memory, and its characters are drawn whole. It is not playable: about 5 frames a second, hair is missing and soft surfaces show a dot pattern, square patches of the picture are not redrawn, interiors are too dark (no working ray tracing), and in about one run in four the graphics driver stops answering or scenery goes missing shortly after the world appears. It needed 20 to 24 GB of video memory as a Series S and about 27 GB as a Series X, and on NVIDIA a driver profile setting that raises the reserve for pipeline code. The settings of those runs, and the diagnostic switches this build adds, are in
installer/CHANGES.txt. -
Network: XCL has no networking code of its own and does not phone home. The game does try to use the network – name lookups, and its crash reporter uploads a memory dump when it crashes. With the environment variable
XCL_NETWORK=0XCL makes the game's web requests and outside socket connections fail (connections to the PC itself stay) and logs each attempt. The installer's "networking off" option (ticked by default) sets it for your account; by hand:setx XCL_NETWORK 0, then start XCL again. -
NVIDIA GPUs are the slow path. XCL is developed on AMD GPUs, which match the console. On NVIDIA the console's 64-lane programs are split in two and the driver's compiler takes seconds to minutes on each of the biggest ones. Results are cached, so each run gets further.
- Download
XCL-Setup.exefrom the latest release and run it. - Start XCL from the Start menu.
- Choose Add a game folder… and pick the folder with the game's unpacked files
(the one that holds
MicrosoftGame.config). - Use a gamepad, or click inside the picture to play with keyboard and mouse (F8 lets the mouse go).
Logs and per-game settings are in %LOCALAPPDATA%\XCL\<title>\.
- Windows 10 (22H2) or Windows 11, x64
- a Direct3D 12 GPU with Shader Model 6.6 and mesh shaders
- the Xbox Gaming Services component (
System32\xgameruntime.dll) - your own unpacked game files – XCL has nothing for decrypting packages
Windows Defender flags xcl.exe
The build is unsigned and XCL loads another program's code into itself and hooks system calls, which is what heuristic ("!ml") detections look for. If you decide to trust it, add a folder exclusion for the install folder. Build it from this source yourself if you would rather not trust a binary.
The window stays black
The title bar says what XCL is doing (compiling shaders: N running, M done, Q pipelines queued).
First runs of a big game compile thousands of shaders. Leave it running: closing it throws away
the compile in progress, everything finished is cached. Whether a picture follows depends on
the game – see Honest status.
The game uploads crash dumps
A game's own crash reporter may upload a memory dump of the process when it crashes. The
installer's "Run games with networking off" option sets XCL_NETWORK=0, which makes the game's
network calls fail as on a console without a network.
It runs my game's code – is that safe?
A game runs as native code inside XCL with no sandbox. Only run game files you trust.
flowchart LR
G["Your unpacked game<br/>(x64 code, console DLLs)"] --> L["XCL loader<br/>maps the exe, resolves imports"]
L --> H["Console libraries, reimplemented<br/>kernelx · XGameRuntime · d3d12_xs · audio · input"]
L --> S["Shader recompiler<br/>RDNA2 → HLSL → DXIL"]
H --> W["Windows"]
S --> D["Direct3D 12 on your GPU"]
H --> D
The game's CPU code is not emulated: the console is an x64 machine, so the code runs as it is and XCL answers the console-only system calls, in the spirit of Wine / Proton. The console's GPU programs are machine code for its AMD GPU and are recompiled into PC shaders.
powershell -ExecutionPolicy Bypass -File build.ps1 # target\release\xcl.exe and dist\XCL-Setup.exeRequirements and details are in BUILDING.md. From build 6 on, the release
installer is built by GitHub Actions from the release's tag, with a public build log and a
provenance attestation – check a download with
gh attestation verify XCL-Setup.exe -R theaustinayers/xcl.
What changed against upstream is listed in installer/CHANGES.txt.
GPL-2.0-only, as upstream (LICENSE, THIRD_PARTY.md). XCL is
written by its upstream authors at https://github.com/xcl-dev/xcl; please send compatibility
reports and thanks there. Product names are trademarks of their owners and are used only to
say what the software is compatible with.
Everything below is upstream's README, unchanged.
Games · Highlights · How it works · Quick start · What works · Controls · Building and usage · Tests · Contributing
XCL is a compatibility layer that runs Xbox Series X|S (GDK) games you own on a Windows PC - in the spirit of Wine/Proton. There is no CPU emulation: the game's x64 code runs natively, and XCL provides its own, independently written implementations of the console system libraries the PC does not have (kernelx.dll, XGameRuntime, d3d12_xs.dll, …). The console's GPU code (RDNA2 machine code) is recompiled into PC shaders (HLSL → DXIL).
Important
XCL works only on unpacked game files you already own. It does not download, decrypt or unpack game packages (XVC / MSIXVC) and contains nothing for circumventing DRM. The repository holds no code, headers or binaries from the console SDK, no keys and no game data; the Windows components XCL relies on (XGameRuntime, XAudio2, D3D12, DXC) come from your own system or the public Windows SDK and are not distributed with XCL.
| Game | State | What works | Limits |
|---|---|---|---|
Minecraft PreviewMicrosoft.MinecraftBeta 1.18.3064.0 |
✅ playable | fully playable | – |
Unicorn OverlordSEGAofAmericaInc.Pa253b0c1Y 1.0.0.6 |
✅ playable | fully playable | – |
Fortnite436609B6.FortniteClient 2.0.1461.7919 |
✅ works | works fully, as far as the game allows without its online services | the game itself is online-only (multiplayer servers) |
XDefiantUbisoft.XDefiant-Game 1.0.0.186 |
✅ works | works fully, as far as the game allows without its servers | the game's own servers have been shut down |
| A newer retail game | 🚧 ≈ 60 % estimate |
starts in ~4 s, runs at a steady 30 fps without a crash, shows its menus and goes on past the first one to its settings; fits a 32 GB machine (~15 GB committed in the menus). With the NVIDIA integration branch (#2057) it goes on into its 3D world: ~5 fps there on an RTX 5090 (14 fps on average over a whole 5-minute run, its menus and loading included) | not playable yet: the picture of the world is incomplete (its minimap and other mesh pipelines are refused), and it does not keep running there for long |
The game's code runs on the CPU as it is; each call into a console library lands in XCL's own
implementation of it, and each shader is translated once and cached. The details:
docs/specs/2026-11-20-xcl-design.md, status and
measurements: HANDOFF.md.
-
Build – Windows 10 / 11 x64, Rust and the Windows SDK (all requirements):
cargo build --release --workspace
-
Look at your game – its unpacked files, the folder that holds
MicrosoftGame.config:target\release\xcl.exe inspect D:\Game\game.exe
-
Run it – or open
xcl.exefrom Explorer and choose the game:target\release\xcl.exe run D:\Game
A gamepad is recommended (Controls). The game folder is never modified.
✅ done and verified
Running the game's code – PE loader, kernelx, Memory, File system, DirectStorage
| Feature | State | What it does | Verified by |
|---|---|---|---|
| PE loader | ✅ | relocations, imports by name / ordinal / delay-load, TLS callbacks, exception tables, game DLLs, data-driven import routing (HLE / Windows / stub) | the game's 16 console DLLs load with 0 unresolved imports |
| kernelx | ✅ | title memory (budget from MicrosoftGame.Config, physical pages), threads on the PC's processors, modules, OS / console info | unit + end-to-end tests |
| Memory | ✅ | title graphics memory shared by CPU and GPU without copies, up to 16 GB (4 GiB windows) | GPU tests: loads, stores and atomics across windows |
| File system | ✅ | console paths (GAME:, G:, D: …) → the game folder; writes go to an overlay, the game folder is never modified; the console's drives: S:\ (persistent local storage) and T:\ (temp) in the title's data folder; free disk space answered for console paths |
end-to-end: the test title's folder stays byte-identical; PLS and free space through the real call path |
| DirectStorage | ✅ | the console's DirectStorage queues: file and memory sources, zlib, and BCPack – the console's texture compression – for BC1, BC3, BC4, BC5, BC6H and BC7 (BC2 and the hardware swizzle are refused) | unit tests on synthetic streams; retail BCPack chunks of all six modes byte-identical with a reference decoder (XCL_SAMPLE_BCPACK) |
System services – XGameRuntime, Input, Audio
| Feature | State | What it does | Verified by |
|---|---|---|---|
| XGameRuntime | ✅ | the GDK thunk protocol real titles use, laid out from a table of all 396 GDK runtime functions; offline XUser, XGameSave, persistent local storage, XPackage, XGame (title id), XSystem – the title sees an Xbox Series X / S; task queues, async, networking and dialogs through the PC's XGameRuntime | the game's libHttpClient initialises; users, saves and storage through the real call path; slot layout cross-checked against the game's own thunks |
| Input | ✅ | GameInput: one gamepad – the PC's XInput controller or a PlayStation controller, and keyboard and mouse as a gamepad (see Controls) | unit tests; an Xbox controller in Minecraft; a DualShock 4 (USB) |
| Audio | ✅ | XAudio2 → system XAudio2.9 (PCM / float voices; Opus 0x704F decoded via MSOpusDecoder.dll; XMA1 / XMA2 decoded in pure Rust) |
unit + end-to-end tests |
Graphics – Shader recompiler, Pipelines, D3D12.X compute, D3D12.X graphics, Textures, Ray tracing, Upscaling
| Feature | State | What it does | Verified by |
|---|---|---|---|
| Shader recompiler | ✅ | RDNA2 → HLSL → DXIL: VS, PS, CS, mesh (NGG), GS; atomics, LDS, scratch, images, samplers incl. static ones, wave ops, ray-tracing instructions; structured control flow; parallel DXC, disk cache | 26 698 / 26 698 programs of the retail pack; 0 DXC errors on random samples; per-instruction GPU tests |
| Pipelines | ✅ | PSOs from console shaders: VS+PS, CS, MS+PS, VS+GS+PS; root signature with the shaders' static samplers; non-blocking creation – a pipeline whose shaders are not compiled yet gets a stand-in at once and is built in the background | GPU tests drawing the game's own VS / PS pairs, also built in the background |
| D3D12.X compute | ✅ | console device slots, console descriptor heaps (T# / V# / S#), buffers at their console addresses, compute command lists recorded in the console format and replayed (tables, barriers, clears, copies) | the game's BVH builder and FSR 4 record and run through XCL |
| D3D12.X graphics | ✅ | device, resources and heaps (also placed in title memory), pipelines; the title's graphics command lists – draws, indirect draws, graphics root arguments, barriers, copies, clears – and command lists recorded by console code, replayed; PresentX and frame pacing into an XCL window |
Minecraft Preview plays its worlds (millions of draws, none skipped); Fortnite and XDefiant draw their screens |
| Textures | ✅ | GFX10 tiling (all 14 2D swizzle modes, the 6 3D thick modes, linear), mip chains with mip tail, arrays, cubes and 3D textures → PC textures | 909 / 912 retail textures exact (the 3 volume LUTs decode smooth); GPU upload bit exact |
| Ray tracing | ✅ | BLAS / TLAS built on the GPU by the game's own XboxBvhBuilder; RDNA2 BVH node format; BVH intersection instructions emulated in shaders, with misses for nodes outside mapped memory windows | GPU traversal = brute force reference; the game's builder output checked on the GPU |
| Upscaling | ✅ | the game's AMD FSR 4 console DLL (amd_fidelityfx_upscaler_xbox.dll): context, the 29 pipelines in the console driver's own container (FSPX) translated, a frame's 20 passes recorded and run on the GPU |
end-to-end with the real DLL: a 1280×720 → 1920×1080 frame on an RX 9070, the input's gradient in the output |
Far-jump address calculations are resolved to fixed targets only when branches enter at the start of the calculation. An entry partway through it keeps the jump indirect and subject to the recompiler's existing indirect-branch limits.
Media and tools – Video, Tools
| Feature | State | What it does | Verified by |
|---|---|---|---|
| Video | ✅ | the game's Bink 2 console DLL decodes its movies (720p / 1080p) on the CPU; the game's own YUV → RGB display shaders (PS_Bink… in its pack) translate like any other. Bink's GPU-assisted mode needs no Bink-specific support: its compute shaders ship with the game and go through the recompiler too (no game seen using it yet) |
a game movie decodes frame by frame, picture checked |
| Tools | ✅ | xcl inspect, xcl run, xcl disasm (RDNA2, console shader containers), xcl shaders (pack statistics, recompile / compile runs), xcl rpf |
– |
A gamepad is recommended: console games are made for one, and their menus and controls expect it.
- Gamepad: any controller Windows sees through XInput (Xbox controllers, wired or wireless) is the game's gamepad – buttons, sticks, triggers and rumble. It can be plugged in or out while the game runs.
- PlayStation controllers (DualShock 4 wired or over Bluetooth, DualSense wired) are the gamepad
when no XInput controller is connected – buttons, sticks and triggers, no rumble or light bar.
XCL_PLAYSTATION_PAD=0turns this off. - Keyboard and mouse work too, as a gamepad: WASD the left stick, the mouse the right stick, mouse
buttons the triggers, the wheel the bumpers, Enter / Space A, Escape / Backspace B, arrows the D-pad,
E / Q Y / X, Shift / Ctrl the stick clicks, Tab View, P Menu.
keyboard_mouseandmouse_sensitivityin the game'sxcl.tomlturn it off or change the mouse speed. A gamepad and the keyboard / mouse can be used together.
Windows 10/11 x64, Rust (stable-x86_64-pc-windows-msvc), the Windows SDK (DXC: dxcompiler.dll
and dxil.dll, looked up in Windows Kits\10\bin\<version>\x64, next to xcl.exe or in
%XCL_DXC_DIR%), a D3D12 GPU with Shader Model 6.6 and mesh shaders, and the system XGameRuntime
(System32\xgameruntime.dll, part of Windows / Gaming Services). On Windows 10 (22H2
KB5029331+), inbox D3D12Core.dll stops at SM 6.5; place the Microsoft D3D12 Agility SDK
(D3D12Core.dll, plus d3d12SDKLayers.dll if using XCL_D3D12_DEBUG=1) in a D3D12\ folder
next to xcl.exe, directly next to xcl.exe, in %LOCALAPPDATA%\XCL\D3D12\, or point %XCL_D3D12_DIR% at it
(for cargo test, use %LOCALAPPDATA%\XCL\D3D12\ or %XCL_D3D12_DIR%).
- DXC: 1.8 or newer is recommended, from the
DirectXShaderCompiler releases: unpack one
and point
XCL_DXC_DIRat itsbin\x64. A Windows SDK may hold an older one (the same10.0.26100.0folder has DXC 1.7.2308 or 1.8.2502, depending on the SDK's revision). DXC 1.7's DXIL was 2–2.7 times the size of 1.9's for translated compute programs and took an NVIDIA driver 1.4–2.2 times as long to build pipelines from (#156).xcl runprints the DXC it loaded, andreport.jsonhas it underdxc. A compute program with many memory-window accesses is compiled as two libraries, the program and its accessors, and linked, which is much faster for DXC (XCL_LINK_MEM=0turns it off); the linker needs DXC 1.8 or newer. With an older one the first attempt fails,xcl.logsays so, and every program is compiled whole after that. - GPU: developed on AMD RDNA4. The console's geometry and NGG programs run as a compute pass plus a
mesh pass, so a GPU without mesh shaders draws none of them. On GPUs with 32-lane waves only
(NVIDIA) console wave64 compute, geometry and mesh programs run as two 32-lane halves that exchange
masks and lane values (
docs/wave64-on-wave32.md) – slower than 64-lane waves, most for groups of several waves; wave64 vertex and pixel shaders that read lanes 32–63 can still differ there. WithXCL_DIRECT_DXIL=1andXCL_PER_LANE=1, compute groups made up of complete native waves can use the per-lane form for branches on whole-wave masks. Test results on other GPUs: #42.
cargo build --release --workspace # target\release\xcl.exe
xcl inspect D:\Game\game.exe # the game's imports and what XCL has for them
xcl run D:\Game [-- game arguments] # run
xcl disasm <shader.bin> [--hex] # RDNA2 disassembler (console containers too)
xcl shaders D:\data\shaders.rpf --top 50 # pack statistics; --recomp / --compile N
xcl shaders D:\data\shaders.rpf --precompile --only cs --pipelines # build compute pipelines and save driver blobs for the next run
xcl shaders D:\data\shaders.rpf --precompile --only cs --pipelines --used-only # only the compute pipelines an earlier run of the title used
xcl shaders D:\data\shaders.rpf --export-hlsl out --record-hash HEX # exact compute HLSL for investigation
xcl shaders D:\data\shaders.rpf --measure-pso HEX --repeat 3 # cold driver PSO timing (cache disabled)
xcl rpf D:\data\shaders.rpf --extract NAME --out folderFill the reusable DXIL cache ahead of a run with the read-only package wrapper. Add
-Pipelines to warm the GPU driver's compute-pipeline cache too (slower and GPU/driver-specific):
.\scripts\precompile-shaders.ps1 -Package 'D:\data\shaders.rpf'
.\scripts\precompile-shaders.ps1 -Package 'D:\data\shaders.rpf' -PipelinesSwitches, caches, logs and the files XCL writes
- When a game folder contains a
shaders.rpfshader pack or loose.dxbcfiles undershaders/, XCL shows shader preparation in the game window before executing title code. The same window then presents the game. The percentage counts processed records. The timer counts seconds since one finished (or preparation started); five seconds without progress counts as a stall, and the window shows when the last one ended. XCL prepares supported shader stages and compute pipelines, including split pieces and their whole fallback. Graphics pipelines are created during play the first time; the ones a run used are recorded with their state (used-graphics-pipelines.binbeside the shader cache, at mostXCL_GFX_RECORDS_MB, default 64) and built before the title starts on the next launch, with their driver blobs kept, so the title makes them from those in milliseconds.XCL_PREPARE_GRAPHICS=0leaves that pass out. Later launches reuse matching cache entries. Closing the window cancels the launch. A compiler or driver failure stops it and reports the cause. Null-renderer runs skip shader preparation. With presentation disabled, the gate runs without a window. - For compute shaders that XCL can split, the runtime first tries the saved driver blob for the whole shader. A usable blob lets the GPU run it in one dispatch. If the blob is missing or the driver rejects it, XCL builds the split pieces.
--pipelinessize cap: a compute program whose DXIL is over 8 MiB and that has no saved blob is left to the runtime instead of being compiled in the pass — those compiles take tens of minutes and gigabytes and stopped the pass on the biggest programs.XCL_PIPELINE_MAX_KBsets the cap in KiB (0 turns it off).- Without a command line (xcl.exe opened from Explorer) XCL shows a small menu: Choose a
game… (pick its exe or
MicrosoftGame.config) or Run again (the last one). On an error the window stays open until Enter. - XCL works on unpacked game files you own; it contains nothing for decrypting or circumventing DRM.
- The game folder is never modified – writes go to the overlay.
- Switches for how a title runs (set them in the environment of
xcl run):XCL_SKIP_BINK: skips the Bink 2 movies of a title that ships abink2*.dll(its logos and intros), by taking them straight to their last frame without decoding. Off when unset or0,off,falseorno;allalso skips looping movies; any other value (1,intro…) skips the ones that do not loop.XCL_MUTE_TTS: the title gets no Windows speech synthesis: its XAccessibility requests are answered by XCL's own object, which has closed captions and high contrast only. Off by default; any value except empty,0,offorfalse(in any case) turns it on.XCL_FRAME_INTERVAL_US: changes the console frame clock. Unset, the title's own frame interval (SetFrameIntervalX) is kept.0,offoruncappedremoves the cap, soWaitFrameEventXreturns at once with a fresh token. A number of microseconds is an upper bound on the interval, never below 1000:8333for 120 Hz,4167for 240 Hz.XCL_WAIT_TIMEOUT_MSandXCL_GPU_WAIT_TIMEOUT_MS, for diagnostics: the longest XCL waits for aWait32BitValueX/Wait64BitValueXthat nothing satisfies (2000 ms) and the watchdog for a GPU queue wait (5000 ms). A value that is not a number above 0 keeps the default.
- Translated shaders are reused across XCL rebuilds when the translator sources and DXC
toolchain are unchanged;
XCL_TRANSLATED_CACHE=0disables that disk cache. - Direct compute dispatches can split large programs into pipelines built in parallel.
XCL_DIRECT_SPLIT_INSTRUCTIONSsets the target instructions per piece (default 12500, zero disables splitting). Loops stay in one piece. A strongly connected component over the target gets its own piece, up to four times the target. Larger components and indirect dispatches use the whole pipeline. A chained dispatch runs in slabs of groups that share one scratch buffer of at mostXCL_SPLIT_SCRATCH_MB(default 256); the chains of one recording share it, andXCL_SPLIT_SCRATCH_TOTAL_MB(default 384) bounds what all recordings not yet reset hold together (past it a dispatch runs in smaller slabs). - Huge pipelines (translated DXIL of
XCL_HUGE_PSO_BYTESor more, default 262144) built on the backgroundxcl-pso*workers take turns in the driver's compiler:XCL_HUGE_PSO_CONCURRENCYat once (default 1, maximum 64). Pipelines of 4 MiB or more use a separate one-wide lane so they cannot occupy the ordinary huge-pipeline slot; one of them can therefore run next to the ordinary ones, and each gated compile starts only with 3 GB of commit free. Smaller pipelines and those a game thread waits for never wait.xcl.logshows each huge one as a numbereddriver compile start #K/driver compile finish #K: … PSO, N B DXIL, M mspair (compute ones withrecord HASH, the console record's hash that--measure-psoand--export-hlsl --record-hashtake), with whether it was gated and how long it waited;XCL_PSO_TRACE=1logs every driver compile. A huge compute program the driver refuses is logged with the driver's verdict (the driver refused the compute PSO of record HASH … with 0x…): its dispatches are skipped. - A loop in a translated compute program run by a Dispatch (not ExecuteIndirect) is ended
after its dispatch's share of passes for each entry (between 1024 and 65 536 a thread, fewer the
more threads the dispatch has; the direct DXIL translator ends the thread's program there), so
one that runs away does not hold the GPU past the time Windows gives it. The direct
translator's compact form (programs of 20 000 instructions and more) and
XCL_PER_LANEkeep only the thread's 65 536 passes in all.XCL_DISPATCH_LOOP_BUDGET=0leaves every loop the thread's 65 536 passes, as before (to compare). - With
XCL_DRED=1, a D3D12 device removal logs GPU breadcrumbs inxcl.log. XCL examines up to 4,096 command lists and reports up to 64 unfinished lists, starting with those on which the GPU completed at least one operation. For each, it names the translated pipeline bound at the last operation DRED saw complete and those bound after it, by their console shaders' hashes (cs,vs/ps,ms/ps,vs/gs/ps). XCL_DSTORAGE_PARALLEL_DECOMPRESS=1enables parallel CPU decompression for file-backed zlib requests with virtual destinations. Defaults: four workers and a shared 32 MiB staging budget (XCL_DSTORAGE_WORKERS,XCL_DSTORAGE_MEMORY_BUDGET_MIB). Requests retire in queue order.- The queue's page mappings (
CopyPageMappingsBatchX: a title maps the pages its texture streaming fills into its GPU views) are applied: a GPU-view page shows the physical page mapped into it.XCL_PAGE_MAPPINGS=0turns them off (the call is ignored and a GPU-view page shows its CPU view at the same offset, as before). - Every run writes
report.json(called stubs, unknown D3D12.X slots and interfaces, XGameRuntime classes asked for, shader statistics, audio formats, crash).d3d12.presentscounts presentations, not visible content. WithXCL_FRAME_DUMP=N(N > 1), the existing optional frame dumps also setd3d12.last_frame_dump: the latest sampled frame's zero-based index, source dimensions, DXGI format, sample step, sample count andnon_dark_samples(decoded 8-bit R+G+B > 30). The field isnulluntil a frame is sampled;non_dark_samplesisnullif its format cannot be decoded. Intermediate render-target dumps do not update it. Sampling uses every fourth pixel in each direction (XCL_FRAME_DUMP_FULL=1: every pixel).XCL_DUMP_TARGETS=<draws>[,<frames>]logs, for the first frames with that many draws and dispatches, each render target and the depth buffer drawn into (draws ran / stand-in / PC / skipped) and dumps the eight drawn into most (target<k>_<n>.bmp);XCL_DUMP_AFTER_S=<s>waitssseconds first.XCL_CAPTURE_FRAME=<draws>[,<s>]writes the command stream of the first frame with that many draws and dispatches (sseconds after the first present at the earliest) tocapture_<frame>/next to the log:frame.jsonl(every submit, barrier, copy, clear, draw and dispatch in the order the GPU got them, with render targets and root arguments),resources.jsonl,pipelines.jsonl, the pipelines' shaders translated again andsummary.txt. Every frame is recorded until then, which costs time.XCL_GPU_TIMES=<frames>[,<s>]times every draw and dispatch of the nextframesbusy frames (fromsseconds after the first present) with GPU timestamps and logs the 60 programs that took the most GPU time per frame (D3D12.X: GPU times:lines); the times are coarse, fine for ranking. A coarse sample can miss detail; a non-dark sample does not establish correct rendering or gameplay. - Diagnostics for a bug report (all off by default; set them in the environment of
xcl run):XCL_RUN_SECONDS=n: the title ends itself afternseconds, with the GPU drained andxcl.logandreport.jsonwritten, so a run of a fixed length can be attached. A value that is not a whole number is ignored.XCL_ACTIVITY=1(any value turns it on): every 2 secondsxcl.loggets anactivity (2 s)line with what the title did in that time (presents, submits, draws, dispatches, frame-event waits, DirectStorage requests), and amemory:line with the process's commit and the video memory in use. Where the lines stop changing is where the title stopped.XCL_THREAD_DUMP_AT=s1,s2,…: at each of those seconds after the start, the state of every thread of the title goes intoxcl.log, for a title that stalls.XCL_TRACE_FAULTS=1(any value): the first 32 access violations are logged as they are raised (read, write or execute, the address, some registers and the callers on the stack), before the title's own handlers see them – for a title whose crash filter ends the process without a trace.XCL_TRACE_MEM=1(any value turns it on): the title's memory allocations of 64 KiB or more are logged, the first 60 (XCL_TRACE_MEM=nwithn > 1: the firstn). The same variable also logs XCL's own allocations of 1 MB or more in the title's committed memory window, and the ones that fail.XCL_TRACE_IMPORTS: logs the arguments and the result of every call of the imports it names. A comma-separated list:1orhlefor every function XCL implements (also what a list with no word to add means),allfor the system's functions too (short runs only), any other word is the start of adll!Functionname to add, and-wordone to leave out; the name is the DLL's file name with its extension and case does not matter, so for examplehle,-kernelx.dll!GetTickCount,gameinput.XCL_D3D12_TRACE=1(any value): every call console code makes to a public D3D12.X method is logged with the interface and method name. Very verbose: use it for a short run.
- Title data:
%LOCALAPPDATA%\XCL\<title>\(%XCL_DATA_ROOT%):xcl.toml,overlay\,saves\,pls\(the title'sS:\),temp\(T:\),cache\,logs\xcl.log,logs\report.json(the previous run's:xcl.prev.log,report.prev.json).
.\scripts\test.ps1 # cargo build --workspace + cargo test --workspaceUnit tests, an end-to-end test with our own "console title" (tests/testtitle) and GPU tests
(D3D12, SM 6.6; skipped without a GPU / DXC; XCL_ADAPTER=1 or XCL_ADAPTER=radeon picks
another adapter than the first high-performance one, for titles too). A GPU test that cannot run on
the adapter (no GPU / DXC / wave64 / mesh shaders) passes too, but prints SKIPPED <test>: <reason>, and
scripts/test.ps1 counts them at the end; XCL_REQUIRE_GPU=wave64 (or mesh, or wave64,mesh) makes
those skips fail. Tests on real game data are opt-in through
environment variables pointing at your own files – XCL_SAMPLE_RPF (shader pack),
XCL_SAMPLE_DLLS (the game's console DLLs), XCL_SAMPLE_TTPF (texture archive),
XCL_SAMPLE_BCPACK (a folder of BCPack streams <name>.bc<mode> with a reference decoder's blocks of each, <name>.vic<mode>), XCL_SAMPLE_BK2 (a movie), XCL_SAMPLE_BVH4, XCL_SAMPLE_AWC (a sound) – described in HANDOFF.md; without them those
tests pass without running anything (scripts/test.ps1 lists the ones not set). No game data is
part of the repository.
Help is welcome – CONTRIBUTING.md has what a pull request needs, in short: small,
one problem, tested. Test results on your GPU go to #42,
questions and talk to the Discord server.
GPL-2.0-only (LICENSE); third-party sources: THIRD_PARTY.md (including AMD's
machine-readable ISA, AMD addrlib swizzle patterns, LLVM disassembler tests, AnyPS5,
libHttpClient headers). WinDurango serves only as a reference – no code is ported from it. The
repository contains no headers or binaries from the console SDK.
The artwork in assets/readme is drawn for this repository and under its license. XCL is an independent
project: it is not affiliated with, endorsed or sponsored by the owners of the trademarks named here,
which are named only to say what XCL runs and what it runs on.

