ADR 0008 and the roadmap (#588) say dxbc-accc rejects the 29 scanned FSPX containers with FspxSectionOutOfBounds. The cause they record, a descriptor offset inside the reserved header-plus-table region, is FspxLayoutMismatch after this branch. Both now say which error the scan saw, which one the same cause maps to now, and that the scan was not re-run. The C ABI still returns BX_SHADER_ERR_INVALID_BLOB for both. Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>
14 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). Track ownership and parallel workflow rules live in docs/architecture/parallel-tracks.md; Wave 1 contributor issues live 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. Progress is measured strictly by reproducible synthetic conformance tests and recorded verification evidence — never 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
Milestones (M0 → M6)
| Milestone | Objective | Exit Gate | Status |
|---|---|---|---|
| M0 — Repo, ABI & Cross-Build | Establish 6-track directory layout (abi/, launcher/, shims/, shader-transpiler/, tests/conformance/), frozen .def/header contracts, env-isolated bx-cli, strict PE Export Directory verifier, and live CrossOver + Rosetta 2 smoke tests (test_veh_clwb.exe, test_shim_exports.exe) |
ARM64 Rust checks green; all 17 PE32+ DLLs (16 mingw-w64 C++ shims + the Rust bx_shader_bridge.dll) pass strict export & zero-MinGW-dep verification; both synthetic EXEs pass live under CrossOver + Rosetta 2 |
Verified complete (#406) |
M1 — Startup Shims to D3D12XboxCreateDevice |
Complete Wave 1 parallel issues across Tracks A–F: full clwb + crash register VEH, xmem core + physical/scatter page engine + Lockhart cap, XCRDAPI async file I/O MVP, d3d12_xs auto-logging COM proxy over Wine d3d12.dll, xg_xs linear-compatible layout MVP, dxbc-accc C ABI hook + d3dmetal-native evaluation, offline xgameruntime + dynamic loader exports, non-blocking AcpHal/xapu/chad stubs, GameInput @1, supervised bx-cli run, ADR 0007, and combined synthetic integration boot fixture |
All Wave 1 conformance binaries pass under CrossOver 26.3 + Rosetta 2; combined test_integration_boot.exe passes (19 pass, 2 ADR-0007 pending, 0 fail) |
Verified complete (Milestone #17, 16/16) |
| M2 — First Rendered Frame & Shader Format Gate | Clear dynamic GDK startup (system32 staging + public GDK COM QueryApiImpl dispatch), implement d3d12_xs swapchain presentation (PresentX → IDXGISwapChain3::Present), integrate the shipped xmem-configured D3D12 placed heap (#464) into the first-frame fixture (#469), bridge dxbc-accc into Windows guests (#445), measure D3DMetal GPU limits (#453), and establish whether target runtime shader corpora use DXIL (Branch D1) or console-compiled ACCC/FSPX RDNA 2 ISA (Branch D2). Measured translator constraints: D3DMetal GPU limits |
Synthetic D3D12 PresentX workload renders and verifies pixel readback through D3DMetal 3.0; M2 Gate ADR selects Branch D1 or Branch D2 |
In development (Milestone #18) |
| M3 — Full Shaders, Streaming & Texture Correctness | DirectStorage decompression, accurate RDNA 2 (gfx1030) xg_xs tile-addressing & deswizzling, full d3d12_xs command-list/barrier/GPUVA fidelity, and Branch D1 DXIL normalization or Branch D2 ACCC/FSPX → DXIL/MSL transpiler, within the measured D3DMetal GPU limits (WaveSize(64) and SM 6.6 64-bit atomics not run; bounded lock emulation) |
Synthetic textured/swizzled, compute, multi-queue, and compressed DirectStorage conformance suites pass | Planned |
| M4 — 3D Rendering, DXR/BVH4 & Upscaling | Bridge XboxBvhBuilder / ID3D12StateObject ray tracing to D3DMetal 3.0 DXR (intercepting incompatible AMD BVH4 rehydration → live rebuild), provide PC FidelityFX / MetalFX upscaling shim, and wire full GameInput controller/KB/M input |
Synthetic DXR + upscaled 3D scene and scripted GameInput conformance tests pass |
Planned |
| M5 — Software Audio/DSP, Saves & Stability | Replace AcpHal/xapu/chad stubs with software audio/DSP decoding + XAudio2_9/CoreAudio output, wire PersistentLocalStorage, and resolve concurrency/memory/GPU hang bugs under soak testing |
Synthetic audio playback, save round-trip, and multi-hour soak benchmarks pass with bounded memory | Planned |
| M6 — Shader Cache, 16 GB Optimization & Polish | Persistent disk PSO + translated-shader cache, Lockhart 16 GB unified memory pressure tuning, Metal System Trace optimization, and optional Swift launcher UI | Reproducible frame-pacing and memory-pressure receipts under docs/testing/hybrid-workloads.md | Planned |
Startup diagnosis
The product goal is to reach a frame presented by the target software. Under the current contribution rules, project runs use original synthetic workloads. Start with test_integration_boot.exe for startup and test_veh_unhandled.exe as a crash-logging control. Use a focused synthetic reproducer once a failing contract is identified.
Before treating either startup warning as causal, add diagnostics that record the requested DirectStorage factory IID and returned HRESULT (#483) and distinguish null, unrecognized and supported BetterXen virtual-memory configurations (#464 follow-up). On a pinned launcher, shim set and backend, repeat the synthetic case before and after a fix. Record normal exit, crash or timeout, the last completed checkpoint, and the exception thread and module offset when available. Progress means reaching the next named checkpoint in the same reproducer. Startup diagnosis and the budget fix proceed alongside the M2 exit gates.
M2 first-frame acceptance and parallel memory work
- First frame (#465, #469). The synthetic placement criterion uses BetterXen's
BXVMblock to configure the separate D3D12-owned WRITE_BACK heap shipped in #486. On the recorded overlay, #494 copied the backbuffer before the flip, counted one hostPresent, then compared 256 RGBA8 pixels through the D3D12 mapping after waiting. The xmem sentinel shows that the original page remained separate. Visibility through the original xmem address remains an open compatibility question for M3, informed by #473. Displayed-image verification is outside this fixture's measurements. Record a singlemaincommit containing the integrated presentation and fixture changes, confirm that the fixture executable built, and have someone who authored neither the fixture nor the presentation bridge verify the D3DMetal run and pixel-mismatch control. The shader gate still requires a recorded D1/D2 selection. Fixture and receipts · ADR 0008 - Shader format gate (#466, ADR 0008). D1 remains the only branch with end-to-end execution evidence, and the static scan gives it measured inputs in the target workload: 52 DXIL SM 6.5 compute containers with LLVM bitcode. The same scan makes D2 a concrete compatibility candidate rather than a hypothesis: the workload's FidelityFX upscaler component embeds 29 ACCC-only containers. Select D2 work only when a required pipeline-creation path refuses an ACCC-only container at runtime — if that refusal precedes the first presented frame, treat it as a first-frame blocker; if it appears only with upscaling enabled, track it under M4 upscaling. Two Track D parser prerequisites precede any D2 trial: extend the clean-room
FSPXsection-table layout to accept the observed tables (a maintainer provenance decision, since no public format description exists), and stop the classifier from treating aNOBCheader-only program as executable DXIL. The firstshader_gaterecord the target workload writes names the shader path its first pipeline creation actually submits. ADR 0008 - Title budget (#550, #552). Keep current allocation ownership and give xmem atomic admission authority through an ABI-first contract. The initial scope combines xmem usage with the existing charged
CreateHeappath. Under a 512 MiB cap, an xmem allocation of 256 MiB followed by a 384 MiB heap was refused, while the reverse admitted 640 MiB. Test both orders, concurrent admission and rollback. Charge a backing allocation once across aliases. Accounting forCreateHeap1, committed and reserved resources, and internal buffers such as XCRDAPI staging remains an open scope decision. Placement and wrapper lifetime have separate checks (#554, #572). Merged-base reproduction - M3 resource handling. Keep explicit paths for fixed addresses, existing contents, pre-device allocations, sections/scatter and opaque textures. The draft eligibility analysis found no reliable end-to-end classifier. Resolve the
XMemVirtualAllocargument-count question (#518) before using graphics flags as evidence. A mapped-buffer trial is optional and opt-in, with the existing path as fallback. Require a known consumer before returning a pointer, verify its alignment and lifetime, and confirm completion on every participating queue before reusing memory for work BetterXen submits. #483 retains its DirectStorage interface scope. Draft eligibility analysis - M6 optimization. Compare the existing path with a candidate allocator or bounded pool on the same 16 GB host and backend. Check correct output for both paths across repeated matched workloads. Include cold setup, transfers, fragmentation, pending retirements, post-release footprint and whole-frame time. Require a repeatable workload benefit before choosing a default.
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.