Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
XSEmu

XSEmu

> 设计协作
Free

Experimental Xbox Series X|S (GDK) title runner for Windows, built on the XCL translation layer: D3D

1.4K stars0 likes0 views
GitHub

About

Experimental Xbox Series X|S (GDK) title runner for Windows, built on the XCL translation layer: D3D

XSEmu Launcher is the desktop app and the usual way to use XSEmu. Add your game folders, browse your library, and pick which runner to use for each game. The launcher installs supported community runners on request, shows which ones offer shader warm-up, and manages updates for the launcher and Core separately.

Runner picker design preview

XSEmu Core is the bundled runner. It uses XCL to run a game's x64 code on your PC and supply the console libraries that Windows doesn't have. It runs as a separate process from the launcher and can also be used from the command line. It does not emulate the console's CPU or hardware.

Get started

  1. Download and extract XSEmuLauncher-windows.zip from Releases.
  2. Open XSEmuLauncher/bin/XSEmuLauncher.exe. The bundle already contains bin/core/XSEmu.exe, so you don't need to download Core separately.
  3. Add a folder with an unpacked game you own, then launch it from Library. Use Runners to see other available builds.

Contents

  • Get started
  • Status
  • How it works
  • Shader pipeline
  • Requirements
  • Build and test
  • Usage
  • Repository layout
  • Upstream and licence
  • Legal

Status

XSEmu is experimental research software. Expect crashes, missing features and rendering errors. This repository makes no compatibility claims for any title. The upstream README records the results that XCL reported; those are XCL's results, not XSEmu's.

How it works

XSEmu Core's run command maps the title's executable and DLLs into its own process and runs them on the host CPU. Each import goes to an XCL replacement, the title's own DLL, the Windows DLL of the same name, or a logged stub. Graphics calls go through a D3D12.X layer that creates real PC D3D12 objects.

…
  • PE loader and runtime shims. The loader handles relocations, imports, delay-loads, TLS callbacks and exception tables. Console libraries such as kernelx, XGameRuntime, GameInput and XAudio2 are implemented in crates/xcl/src/hle. Functions that behave the same as on Windows go to the real Windows export.
  • D3D12.X to D3D12. The console's d3d12_xs.dll is replaced by real PC D3D12 objects. Console-only device slots, descriptor heaps, command lists and PresentX are translated to PC D3D12. GFX10 tiled textures are converted to PC layouts.
  • DirectStorage. The console's xcrdapi.dll reads files through the VFS and decompresses zlib and BCPack data into title memory. BCPack needs a table file that is not part of this repository.
  • Virtual file system. Console paths map to the game folder. The game folder is only read: writes, saves and logs go to a per-title data folder.

Shader pipeline

Console shaders ship as RDNA2 machine code with no usable DXIL. The recompiler translates each program (vertex, pixel, compute, geometry and mesh/NGG stages) to HLSL, and a compiler turns that HLSL into DXIL. Three disk caches keep the work between runs, and a manifest records every pipeline the title made so that XSEmu warm-up can rebuild them before the next run.

…
  • The translated cache holds the DXIL of each console program, keyed by the program's bytes, its stage, a hash of the translator sources and the DXC toolchain. The DXIL cache is keyed by the HLSL, the XCL version, the compiler identity and the shader profile. A change to the translator or to the DXC DLLs gives new keys, so stale entries are not used. XCL_TRANSLATED_CACHE=0 turns off the translated cache.
  • The direct DXIL backend compiles only the HLSL dialect that the recompiler emits. Anything outside it goes to DXC. DXC and the direct backend never share a cache entry.
  • The driver blob cache lives in \driver\ and is keyed by the DXIL hash and flags. A blob is kept when its driver compile took 250 ms or more. The driver refuses a blob from another driver, adapter or root signature, and XCL then compiles the program again. XCL_PSO_DISK_CACHE=0 turns it off.
  • The pipeline manifest lives in \pipelines\. It keeps the console shaders and the pipeline description, not the translation, so a warm-up after a translator change builds every pipeline from the new translation. XCL_PSO_MANIFEST=0 turns it off.
  • On GPUs that run only 32-lane waves, console wave64 programs run as two 32-lane halves (details).

Non-blocking pipeline creation

A title creates thousands of pipelines while it loads, and a DXC compile takes from 0.2 s to several seconds. So when a pipeline's DXIL is not cached yet, the title gets a stand-in pipeline at once and the real one is built on a background worker (hle/d3d12x/pso_async.rs):

…

A graphics bind waits at most XCL_BIND_BACKSTOP_MS (3000 ms by default). It doesn't wait at all once the thread's binds have waited XCL_FRAME_STALL_BUDGET_MS (1000 ms by default) since the last present. After that, draws with the pipeline are skipped until it is built. By default a compute bind keeps waiting, because a skipped dispatch could leave the title's state wrong. XCL_ASYNC_PSO=0 builds every pipeline inside the create call instead.

Requirements

XSEmu Launcher runs on Windows 10 or 11, x64. The bundled XSEmu Core needs:

  • A D3D12 GPU with Shader Model 6.6 and mesh shaders. Without mesh shaders, the title's geometry and NGG programs are not drawn. On Windows 10, the inbox D3D12Core.dll stops at SM 6.5: put the D3D12 Agility SDK in D3D12\ next to XSEmu.exe, in %LOCALAPPDATA%\XCL\D3D12\, or in %XCL_D3D12_DIR%.
  • DXC (dxcompiler.dll and dxil.dll) from the Windows SDK. XCL looks in Windows Kits\10\bin\\x64, next to XSEmu.exe, and in %XCL_DXC_DIR%. Version 1.8 or newer is recommended.
  • Gaming Services, which provides System32\\xgameruntime.dll. Without it, dialogs, text entry, invites and game streaming are missing.
  • To build: the Rust MSVC toolchain (stable-x86_64-pc-windows-msvc; CI uses 1.99.0) and the Visual Studio C++ build tools.
  • An unpacked copy of a title that you own. See Legal.

Build and test

See the launcher build and test guide for the Qt desktop app. To build and test XSEmu Core:

powershell
cargo build --release --locked --workspace      # target\release\\xcl.exe (packaged as XSEmu.exe)
.\scripts\test.ps1                               # cargo build + cargo test --workspace

The test suite builds and runs its own synthetic test title (tests/testtitle, tests/testgamedll). GPU tests need a physical D3D12 adapter. When the adapter cannot run a test, the test prints SKIPPED : and passes. Tests that read real title data are opt-in through XCL_SAMPLE_* variables and are skipped when those variables are not set.

The direct DXIL backend is a separate workspace with no dependencies and no Windows code, so you can also build and test it on Linux:

bash
cargo test --manifest-path crates/xcl-dxil/Cargo.toml

Usage

For the desktop app, see Get started. The commands below use XSEmu Core directly. Releases include it as XSEmu.exe; a Cargo build produces xcl.exe. Run it with --help for the full command list.

powershell
XSEmu run  [-- game arguments]   # run a title
XSEmu inspect  [--json]              # imports and how XCL resolves each
XSEmu disasm  [--hex] [--fssm FILE]                 # disassemble RDNA2 and console shader containers
XSEmu shaders  [--top N] [--recomp] [--compile N]
XSEmu shaders  --precompile [--pipelines]
XSEmu rpf  [--find NAME] [--extract NAME --out DIR]
XSEmu warm-up [--full]
XSEmu warm-up --mesh-only [--recent-used N]
XSEmu warm-up --giants-only --floor-mb N
XSEmu --version
Command What it does
shaders --precompile Translates every VS, PS, MS and CS program in a shader package and compiles it into the DXIL cache, so a title does not wait for DXC on first use. Cached programs are skipped. --pipelines also creates each compute pipeline on the GPU, so the driver caches its own compile.
warm-up Rebuilds the pipelines in the manifest, so the driver compiles less while a title loads. It stops after 20 minutes (XCL_WARMUP_BUDGET_S), leaves out programs over 1 MB of DXIL, and leaves out pipelines that none of the last 3 runs made.
warm-up --full Builds everything, with no time limit, and resumes where an earlier --full pass stopped.
warm-up --mesh-only Builds only the missing driver blobs for mesh pipelines.
warm-up --giants-only --floor-mb N Builds the large compute programs one at a time and keeps N MB of RAM free (N must be 1024 or more).

warm-up refuses to start while another XSEmu.exe (or an older xcl.exe) is running. Run one XCL process tree at a time.

Title data and configuration

Each title gets a data folder at %LOCALAPPDATA%\XCL\\ (or %XCL_DATA_ROOT%\\). It holds xcl.toml, the write overlay, saves, the title's S:\ and T:\ storage, caches, logs\\xcl.log and logs\report.json. The report lists called stubs, unknown D3D12.X slots, shader statistics and the crash, if there was one.

In xcl.toml, device_type = "lockhart" makes the title see a Series S; the default, "anaconda", is a Series X.

Environment variables

Variable Effect
XCL_DATA_ROOT Root folder for per-title data, instead of %LOCALAPPDATA%\XCL.
XCL_DXC_DIR Folder that holds dxcompiler.dll and dxil.dll.
XCL_D3D12_DIR Folder that holds the D3D12 Agility SDK.
XCL_ADAPTER GPU to use, by index (1) or by name (radeon).
XCL_SHADER_BACKEND hlsl (default) compiles with DXC. dxil uses the direct DXIL backend, with DXC as the fallback.
XCL_DXIL_CACHE Folder of the DXIL cache, instead of %LOCALAPPDATA%\\xcl\dxil.
XCL_TRANSLATED_CACHE=0 Turns off the disk cache of translated shaders.
XCL_PSO_DISK_CACHE=0 Turns off the driver blob cache.
XCL_PSO_MANIFEST=0 Stops recording pipelines in the manifest.
XCL_ASYNC_PSO=0 Builds every pipeline inside the create call, with no stand-in.
XCL_WARMUP_BUDGET_S Time limit in seconds for XSEmu warm-up without --full.
XCL_NETWORK=0 Runs the title with no network, as on a console that is offline. Loopback still works.
XCL_STORE=offline-error Every store query fails with the GDK store network error. No licence is granted.
XCL_BCPACK_TABLES Path to the BCPack table file. The file is not part of this repository; without it, BCPack requests fail.
XCL_D3D12_DEBUG Turns on the D3D12 debug layer.
XCL_REQUIRE_GPU In tests, wave64, mesh or wave64,mesh makes skipped GPU tests fail.

The code reads many more XCL_* variables for tracing and diagnostics. See the source for those.

Repository layout

Path Contents
launcher/ XSEmu Launcher, the Qt desktop app: game library, runner management, settings and updates.
crates/xcl XSEmu Core: translation layer, PE loader, VFS and runtime CLI.
crates/xcl/src/hle Console library replacements: kernelx, xgameruntime, d3d12x (D3D12.X), dstorage, xaudio2, xma2, gameinput, bink and others.
crates/xcl/src/gpu RDNA2 decoder, console shader containers, texture tiling and adapter selection.
crates/xcl/src/gpu/recomp RDNA2 to HLSL recompiler, DXC driver and pipeline building.
crates/xcl-dxil Direct DXIL backend, with the xdxc and xdiff tools.
crates/xcl-bcpack BCPack decoder.
tests/ Synthetic test title, test DLL and test data.
scripts/ Test scripts and the generators for the tables in crates/xcl/src/gpu.
docs/ Design notes: [design spec

> Tags

compatibility-layerd3d12dxil

No comments yet. Be the first to share.

> Details

PublishedNov 30, 2026
UpdatedNov 30, 2026
Category设计协作
PricingFree

> Related tools

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨