The translator item said GFX10-to-DXIL and that every rule is checked against the console compiler. The translator produces HLSL, compiled with the GDK's dxcompiler.dll at first draw, and rules are checked from public assembler encodings and the instruction's definition. Dated state notes record what is done and what is open. Signed-off-by: ates <ahmetrizaates@hotmail.com>
17 KiB
BetterXen Roadmap
This is the single authoritative active roadmap. Strategic decisions are recorded in ADR 0005 (CrossOver-based hybrid direction) and ADR 0006 (retiring the paused native-first workspace to Git tag native-first-final). How the team and its agents work is in docs/process/working-method.md. Track (directory) ownership is in docs/architecture/parallel-tracks.md; the completed Wave 1 issues are in docs/issues/wave-1-backlog.md.
Direction
BetterXen builds a modular Xbox Series (Scarlett) compatibility layer for Apple Silicon macOS around externally installed CrossOver 26.3+, Rosetta 2 (ROSETTA_ADVERTISE_AVX=1), and D3DMetal 3.0:
BetterXen (in-tree):
launcher/ (ARM64 CLI, probe, telemetry) + abi/ (frozen contracts)
shims/ (16 cross-compiled x86-64 PE32+ Xbox Game OS DLLs
+ the Rust-built bx_shader_bridge.dll)
shader-transpiler/ (DXBC / DXIL / ACCC / FSPX classifier & RDNA 2 pipeline)
|
External Foundation (user-installed, never bundled):
CrossOver 26.3 / Wine (Win32, CRT, XAudio2, WinHTTP) | Rosetta 2 | D3DMetal 3.0
|
Apple Silicon: ARM64, Metal, unified memory
This is an active engineering stack, not a verified commercial Xbox game compatibility layer. The product goal is one project-authorized target build, fully playable on Apple Silicon Macs with 16 GB of memory. From the Boot stage on, progress is measured by how far that build gets in repeated, recorded runs (working method); every contract a fix introduces is also pinned by a synthetic conformance test. Progress is never measured by commit counts or unverified compatibility claims.
Priorities, in order: practical compatibility, correctness, stability, observability, Apple Silicon performance, and long-term maintainability.
Research Inputs
- Licensing & redistribution boundaries: docs/research/crossover-licensing.md and docs/licenses.md (#354). CrossOver, D3DMetal, and Rosetta 2 stay strictly external and unbundled.
- Primary-source verification & upstream registry: docs/research/primary-source-verification-2026-11-25.md, docs/research/upstream-registry.md, and docs/research/component-reuse-matrix.md.
- Hybrid measurement protocol: docs/testing/hybrid-workloads.md (#353).
- Buffer ownership on CrossOver 26.3.0.39832 and D3DMetal 3.0 (#473). On the tested M4 (24 GiB) and M5 (16 GiB), the two existing-memory heap imports returned
E_NOTIMPL. A D3D12-owned persistent buffer mapping supported fence-separated CPU/GPU access and ordered virtual aliasing (BASE-2, BASE-4, A-8). The actual CPU address could miss 64 KiB alignment (A-6). Inside the timed small-copy window, no serialized copy cost as much as the explicit full copy to READBACK. The other workstream accepted 13 of 29 register entries within stated scopes, mostly through same-source reruns. #473 remains open. Physical page identity, hidden copies, workload memory savings and speedups remain open. Report 001 · Evidence register · Review corrections - Target-workload shader corpus (static scan, 2026-11-28). A read-only container scan of an authorized local test workload measured what its shipped components embed — structure only, no run, no extraction, and the workload is not redistributed. Its
XboxBvhBuildercomponent carries 52 DXIL compute containers, all Shader Model 6.5, with valid LLVM bitcode; its AMD FidelityFX upscaler component carries 29 ACCC-only containers whose payloads start withFSPX, none with aDXILchunk; its main executable carries 10 DXIL containers (nine pixel, one vertex, Shader Model 6.6) whoseDXILchunks hold four-byteNOBCpayloads — valid program headers, no executable bitcode. Its packaged shader archive exposes no plaintextDXBCsignatures and remains unclassified. BetterXen's classifier accepts all 62 DXIL containers, so it currently labels the 10NOBCprograms as executable DXIL, and it rejects all 29FSPXcontainers because their section tables do not match the clean-roomFSPXlayout (FspxSectionOutOfBoundsat the time of the scan; that cause isFspxLayoutMismatchsince #599, not re-measured). Runtime use is unmeasured: the recorded startup run stopped before pipeline creation and wrote noshader_gaterecords. ADR 0008
Foundation and stages
The first three milestones (M0 to M2) were defined by subsystems and synthetic tests. They built the foundation, and they also showed the limit of that approach: with M1 verified complete, the target build still stopped at more than a dozen missing or wrong contracts that no synthetic test had asked for. From here on, the roadmap is a ladder of stages the target build reaches, observed in runs every collaborator can repeat. Synthetic conformance tests stay mandatory for every contract a fix introduces; they no longer define progress.
Foundation (history)
| Milestone | What it established | Status |
|---|---|---|
| M0 — Repo, ABI & cross-build | Track layout, frozen .def/header contracts, env-isolated bx-cli, export verifier, live smoke tests |
Verified complete (#406) |
M1 — Startup shims to D3D12XboxCreateDevice |
Wave 1 shims across Tracks A–F and the combined synthetic boot fixture | Verified complete (Milestone #17) |
| M2 — Synthetic first frame & shader format gate | PresentX through D3DMetal with pixel readback; Xbox-layout D3D12 objects (ADR 0009); the shader format question |
Closing. Remaining: amend ADR 0008 to select Branch D2. The target build supplies console-compiled code only: shader containers whose DXIL part carries no bitcode, and serialized pipelines. |
The stages
Every gate below is measured the same way (working method): the current main, the offline sandbox, a contributor's own bottle, ten runs, on a 16 GB Apple Silicon Mac. A gate that says "10/10" means ten of ten. Stages have names, not numbers: exactly one is current, and blocker issues carry its label (stage: boot, stage: picture, …).
| Stage | The target build… | Exit gate | Status |
|---|---|---|---|
| Boot | starts, reaches its frame loop and stays there | 10/10 runs present frames for 5 minutes; the run report lists no unimplemented call on the path taken, no fault in a BetterXen module, and no early exit | Left (repository owner's decision, 2026-11-30; the gate was not run under the run protocol) |
| Picture | shows its first non-black screen, correctly | In 10/10 runs the first reference screen matches the reference image within the agreed tolerance; every pipeline drawn with is a translated pipeline, none is skipped | Current (since 2026-11-30) |
| Menus | plays its opening sequence and menus with sound and input | A scripted input sequence goes from launch to the last menu before gameplay in 10/10 runs; audio is audible and in sync by the checklist; a save written in one run is read in the next | Planned |
| World | loads into gameplay and keeps running | 10/10 runs enter gameplay and run 10 minutes with no crash, hang or early exit; streaming requests complete without error; memory stays inside the 16 GB profile | Planned |
| Fidelity | draws its 3D scenes as the console does | The scene checklist (geometry, textures, lighting, effects, HUD) passes against the reference set at the fixed capture points; no draw or dispatch is skipped or stubbed | Planned |
| Playable | is playable start to finish on every supported Mac | 30 fps or better at the tier's resolution for each chip tier; a 2-hour session with bounded memory and no hang; warm start uses the shader cache; controller and keyboard/mouse complete | Planned |
"Reference image" and "reference set" are captures of the same content from a real console or from published footage, kept in the private evidence store, never in the repository (working method).
Boot
Known work, all found by running the target build:
| Blocker | Effect | State |
|---|---|---|
CLZERO trapped once per 64 bytes |
The frame loop stalls for tens of seconds while the build zeroes memory | Fix exists locally (the loop completes in one trap); needs a PR and a conformance test |
| A storage worker writes into a page xmem is remapping | The build's own fault handler exits (status 5) | Bounded retry exists locally. The real fix is an atomic remap in xmem |
Missing runtime calls: XUserDuplicateHandle, XAsyncRun, XTaskQueue duplicate/port/composite, XGameSaveGetContainerInfo and its by-name variant |
The build waits forever or exits (status 1) | Implemented locally; need PRs and tests |
| Serialized-pipeline calls answered with success in null-render mode | The build never falls back to its shader containers | Decide and document: these calls fail (logged) until they are implemented |
| One early exit (status 1) with nothing logged | 1 run in 5 | Open: needs the run report's exit capture |
| Run tooling lives outside the repository | Nobody else can repeat a run or read its result the same way | Move the offline runner, the run report and the sampler into launcher/ and scripts/ |
Not needed for the gate: audio output, correct pictures, performance.
Picture
This is where the shader translator becomes the critical path, and where the D3DMetal route is tested for real. The risk checks come first, before feature work depends on them.
- Capability checks on D3DMetal (first). Synthetic tests, one each, for what translated shaders need: direct descriptor-heap indexing (SM 6.6), 64-lane compute behaviour through the translator's emulation, 64-bit atomics on typed resources, mesh and amplification shaders. Each ends in runs correctly, can be worked around in the translator, or blocked. A blocked result opens an ADR on the back end, marked
needs-human, before anything else in this stage continues. State (2026-11-30): not done in this order. The translator and its run-time path were built first, on the vertex and pixel shaders of the build's first screens, which need none of these capabilities. The checks still come before compute shaders (64-lane behaviour, 64-bit atomics) and before anything that indexes descriptor heaps directly. - The translator. BetterXen writes its own translator in
shader-transpiler/(gfx10-translate) and exposes it throughbx_shader_bridge.dll; the upstream emulator's translator is not used (repository owner's decision, 2026-11-29). It turns GFX10 code into HLSL, not DXIL directly:d3d12_xscompiles the HLSL to DXIL with the GDK's PCdxcompiler.dllwhen a pipeline is first drawn, and keeps the result on disk (ADR 0010). The design is mechanical: one rule per instruction, registers as variables, and control flow as numbered blocks in a dispatch loop, so no structure has to be reconstructed. How rules are checked today: each rule has a test whose instruction words come from the public LLVM assembler and whose expected HLSL is written from the instruction's definition. Checking against the console compiler's output for a shader of our own (source rank 2) is the standard this item set; so far it has been done for the root-data layout (docs/research/console-shader-abi.md) and not rule by rule. The Python prototype on branchexperiment/visible-frameis kept as a reference; the Rust translator matched its output on the pairs both translate. - Translator verification. Extend the known-source corpus (#650) so every instruction class the first screens use is checked against a reference result. A translator bug is found with a ten-line shader, not in a broken frame.
- The first pipelines. The clear pipeline, the display-mapping compute shader, and whatever the first reference screen draws with, created on the host on first use.
State (2026-11-30): vertex/pixel pipelines are translated at first draw (opt-in,
BX_CONSOLE_SHADERS=1), and every one the build draws with in its first two minutes translates. Compute pipelines are not translated; their dispatches are skipped (#746). - Descriptors and memory the shaders read. The descriptor model the translated shaders expect; contents of textures placed in title memory (today a logged stub); title-written constant and vertex data reaching the GPU. State (2026-11-30): descriptors the title copies itself are followed, and root signature layouts are passed to the translator. Open: texture contents (#745), and why the first screen shows only its background bars (#744). Two known simplifications: every translated shader samples with one fixed sampler (#750), and a descriptor table is widened for its first 8 entries only (#751).
Menus to Playable — known work and unknowns
Listed so lanes can prepare, not as a commitment to order. Each item is confirmed by a run before work starts on it.
| Stage | Known work | Main unknown |
|---|---|---|
| Menus | XMA decoding and audio output through the audio coprocessor contract; GameInput devices; speech/accessibility provider; saves round trip |
What the build waits for between sign-in and its first screen |
| World | DirectStorage page destinations, BCPack and swizzle options; XG tiling modes beyond linear; atomic page remapping; the Series S memory profile as the 16 GB default | Streaming behaviour under memory pressure |
| Fidelity | Mesh/amplification pipelines; indirect draws with console argument types; rectangle lists; the unimplemented command-list state calls; upscaler substitute (FSR 3.1 or plain scaling in place of the console's FSR 4); ray tracing: bridge it, or run the profile that does not use it | How much of the frame depends on the console's ray-tracing path |
| Playable | Translated-shader and pipeline cache; memory copies removed where the host allows; frame pacing against the display; chip-tier matrix | Whether the base 16 GB tier reaches 30 fps, and at what resolution |
Decision gates
A gate is a question answered by a measurement, with the options written down before the measurement is taken.
| Gate | When | Question | If the answer is no |
|---|---|---|---|
| Back end | Start of Picture | Does D3DMetal run what translated console shaders need? | ADR: translator-side lowering, another host back end, or a narrower shader profile |
| Reference | Start of Picture | Do we have reference images for the first screens? | The Picture gate falls back to a written checklist per screen, agreed by two collaborators |
| Memory | Start of World | Does the build load into gameplay inside the 16 GB profile? | Series S profile only; reduce copies before any other World work |
| Frame rate | Start of Playable | Is the base tier within 2x of 30 fps? | Publish tiers honestly; lower the base tier's resolution before promising it |
What counts as progress
A change belongs on main only if it passes the step-forward test. It must do one of these, and say which:
- remove a blocker of the current stage (shown by the run report before and after);
- remove a blocker already confirmed for a later stage, when every blocker of the current stage is claimed;
- make a blocker faster to find (run tooling, diagnostics, a corpus test);
- retire a risk at a decision gate.
Work that does none of these waits: subsystems nobody has seen the build need, documentation about work not yet done, and optimisation before the Playable stage.
How Progress Is Reported
Milestone status is one of: Planned, In development, In validation, Verified complete, or Blocked. A milestone reaches Verified complete only after independent verification of its exit gate per AGENTS.md.
For the stages, the pinned ladder issue carries the live status: the current stage, the latest ten-run result for its gate, and the open blocker issues with their claims. A gate result is reported with every run counted, the machine it ran on, and the main commit.