From b04b41f26ac0503927a929df05699168048f6f3f Mon Sep 17 00:00:00 2001 From: maridogolpeador <354308468+maridogolpeador@users.noreply.github.com> Date: Wed, 25 Nov 2026 01:45:07 -0300 Subject: [PATCH 1/7] ci: build and smoke-test BetterXen.app on native ARM64 runners (#248) The CI workflow built and inspected the CLI but never ran scripts/build-app.sh, so a Swift compile, link or smoke failure in app/ passed CI. - ci.yml: a second job, "Native app build and smoke", on the same macos-26 image, pinned Rust toolchain and CARGO_BUILD_JOBS as the Rust job. It verifies an arm64 host without Rosetta, prints the Xcode and Swift versions and runs scripts/build-app.sh. The Rust job is unchanged. - build-app.sh: after the lipo check, print file and otool -L for the executable and fail if it links anything outside /System/Library/ and /usr/lib/. No Metal fixture runs in the new job; --smoke probes the C interface and the trusted fixture's headers only. The same change was proposed upstream as XenoraOSS/Xenora#426. Signed-off-by: maridogolpeador <354308468+maridogolpeador@users.noreply.github.com> --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + scripts/build-app.sh | 10 ++++++++++ 3 files changed, 41 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f1b65..ddc37a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,3 +90,33 @@ jobs: file "$binary" test "$(lipo -archs "$binary")" = arm64 otool -L "$binary" + + native-app: + name: Native app build and smoke + runs-on: macos-26 + timeout-minutes: 20 + env: + CARGO_BUILD_JOBS: 3 + RUSTUP_TOOLCHAIN: 1.100.0-aarch64-apple-darwin + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Verify runner architecture + run: | + uname -m + test "$(uname -m)" = arm64 + test "$(sysctl -n sysctl.proc_translated)" = 0 + - name: Install native Rust + run: | + rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal + rustc -vV + - name: Show Swift and Xcode + run: | + xcodebuild -version + swift --version + # Builds the locked C ABI library and the Swift app together, checks the + # executable is arm64-only and links only system libraries, and runs + # `--smoke`. This is an app build and smoke result, not GPU verification. + - name: Build BetterXen.app and run its smoke check + run: scripts/build-app.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index af426af..e4a22aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ remains unsupported. - Added a Python 3 fallback for `timeout` in `scripts/test-gpu.sh`, so the native Metal suite runs on stock macOS without GNU coreutils while preserving bounded execution and the usual timeout exit status. ### Added +- Added a `Native app build and smoke` CI job (#248). On the same native `macos-26` runner image and pinned Rust toolchain as the Rust checks, it runs `scripts/build-app.sh`, which builds the locked C ABI library and the Swift app together, bundles and ad-hoc signs `BetterXen.app`, and runs its `--smoke` check, so a Swift compile, link or smoke failure now fails CI. `scripts/build-app.sh` also prints `file` and `otool -L` for the executable and fails if it links any library outside `/System/Library/` and `/usr/lib/` (checked locally against a stubbed non-system dependency). The job is an app build and smoke result; it runs no Metal fixture and is not GPU verification. - Recorded the migrated PR integration decisions, native verification and scope exclusions in the testing documentation. - Added `xenora-bench startup` (#178), which measures Metal startup in fresh processes and in repeated submissions within one process, phase by phase (launch, device and queue, translation, library, pipeline, diff --git a/scripts/build-app.sh b/scripts/build-app.sh index 19fe502..3d042ad 100755 --- a/scripts/build-app.sh +++ b/scripts/build-app.sh @@ -54,5 +54,15 @@ codesign --force --sign - "$bundle" binary="$bundle/Contents/MacOS/BetterXen" [ "$(lipo -archs "$binary")" = arm64 ] || fail "executable is not arm64-only: $(lipo -archs "$binary")" +file "$binary" +otool -L "$binary" +# Only system libraries may be linked: anything else would be a host dependency +# shipped or expected outside macOS, which this bundle does not carry. +for dependency in $(otool -L "$binary" | tail -n +2 | awk '{print $1}'); do + case "$dependency" in + /System/Library/*|/usr/lib/*) ;; + *) fail "executable links a non-system library: $dependency" ;; + esac +done "$binary" --smoke echo "build-app: built $bundle" From 4e838207fef42b1cbd922228335c5095000b8824 Mon Sep 17 00:00:00 2001 From: maridogolpeador <354308468+maridogolpeador@users.noreply.github.com> Date: Wed, 25 Nov 2026 02:09:22 -0300 Subject: [PATCH 2/7] ci: check the printed dependency listing and reject empty or failed listings (#248) Review follow-up. build-app.sh now runs otool -L once in a checked assignment, prints that output and parses the same text, so a failing or empty listing fails the gate instead of skipping the loop. Every Swift executable links libSystem, so an empty list is an error. Bundle-relative entries (@rpath, @executable_path, @loader_path) get their own message. The changelog entry now separates the designed CI behaviour from what has been verified locally. Signed-off-by: maridogolpeador <354308468+maridogolpeador@users.noreply.github.com> --- CHANGELOG.md | 2 +- scripts/build-app.sh | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a22aa..17734d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,7 @@ remains unsupported. - Added a Python 3 fallback for `timeout` in `scripts/test-gpu.sh`, so the native Metal suite runs on stock macOS without GNU coreutils while preserving bounded execution and the usual timeout exit status. ### Added -- Added a `Native app build and smoke` CI job (#248). On the same native `macos-26` runner image and pinned Rust toolchain as the Rust checks, it runs `scripts/build-app.sh`, which builds the locked C ABI library and the Swift app together, bundles and ad-hoc signs `BetterXen.app`, and runs its `--smoke` check, so a Swift compile, link or smoke failure now fails CI. `scripts/build-app.sh` also prints `file` and `otool -L` for the executable and fails if it links any library outside `/System/Library/` and `/usr/lib/` (checked locally against a stubbed non-system dependency). The job is an app build and smoke result; it runs no Metal fixture and is not GPU verification. +- Added a `Native app build and smoke` CI job (#248). On the same native `macos-26` runner image and pinned Rust toolchain as the Rust checks, it runs `scripts/build-app.sh`, which builds the locked C ABI library and the Swift app together, bundles and ad-hoc signs `BetterXen.app`, and runs its `--smoke` check, so a Swift compile, link or smoke failure is designed to fail CI (implemented and verified locally; not yet shown on a CI run). `scripts/build-app.sh` also prints `file` and a single `otool -L` listing for the executable, fails if that listing fails or is empty, and fails if the executable links any library outside `/System/Library/` and `/usr/lib/`, naming bundle-relative (`@rpath`, `@executable_path`, `@loader_path`) entries separately (checked locally against stubbed failing, empty, bundle-relative and non-system listings). The job is an app build and smoke result; it runs no Metal fixture and is not GPU verification. - Recorded the migrated PR integration decisions, native verification and scope exclusions in the testing documentation. - Added `xenora-bench startup` (#178), which measures Metal startup in fresh processes and in repeated submissions within one process, phase by phase (launch, device and queue, translation, library, pipeline, diff --git a/scripts/build-app.sh b/scripts/build-app.sh index 3d042ad..e5e16a7 100755 --- a/scripts/build-app.sh +++ b/scripts/build-app.sh @@ -55,12 +55,19 @@ codesign --force --sign - "$bundle" binary="$bundle/Contents/MacOS/BetterXen" [ "$(lipo -archs "$binary")" = arm64 ] || fail "executable is not arm64-only: $(lipo -archs "$binary")" file "$binary" -otool -L "$binary" # Only system libraries may be linked: anything else would be a host dependency -# shipped or expected outside macOS, which this bundle does not carry. -for dependency in $(otool -L "$binary" | tail -n +2 | awk '{print $1}'); do +# shipped or expected outside macOS, which this bundle does not carry. List the +# dependencies once, print that listing and check the same output. +dependencies=$(otool -L "$binary") || fail "otool -L failed for $binary" +printf '%s\n' "$dependencies" +dependencies=$(printf '%s\n' "$dependencies" | tail -n +2 | awk '{print $1}') +# Every Swift executable links at least libSystem, so an empty list is an error. +[ -n "$dependencies" ] || fail "otool -L listed no dependencies for $binary" +for dependency in $dependencies; do case "$dependency" in /System/Library/*|/usr/lib/*) ;; + @rpath/*|@executable_path/*|@loader_path/*) + fail "executable links a bundle-relative library, but this bundle ships none: $dependency" ;; *) fail "executable links a non-system library: $dependency" ;; esac done From 4f5c6913f5b9d34e1460d8b4457241ed0cedaec0 Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 04:12:59 -0600 Subject: [PATCH 3/7] Replace game-title and upstream-project names in our own docs Use generic 'commercial title' wording for our own references to a specific game, rename the ignored diagnostics folders to title-candidate-* and title-check, and refer to the upstream PE/Vulkan project as 'PE-Vulkan project' in prose. Third-party URLs and repository paths are unchanged to keep provenance accurate. Also adds the native macOS development phases and PortWatch research notes already in the working tree. Signed-off-by: Arths17 --- .gitignore | 4 +- AGENTS.md | 2 +- CHANGELOG.md | 5 + CLAUDE.md | 1 + README.md | 53 ++-- docs/README.md | 7 + docs/development-phases.md | 346 +++++++++++++++++++++++ docs/research/phase02-collaboration.md | 8 +- docs/research/phase02-ecosystem.md | 2 +- docs/research/portwatch-native-macos.md | 354 ++++++++++++++++++++++++ docs/research/synthetic-integration.md | 6 +- docs/testing/phase-02-baseline.md | 2 +- docs/testing/x9-acceptance.md | 10 +- fixtures/rdna2/ashr.md | 2 +- 14 files changed, 752 insertions(+), 50 deletions(-) create mode 120000 CLAUDE.md create mode 100644 docs/development-phases.md create mode 100644 docs/research/portwatch-native-macos.md diff --git a/.gitignore b/.gitignore index 7e912eb..81991b0 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,8 @@ __pycache__/ *.pyc /diagnostics/probe/ -/diagnostics/gta6-candidate-*/ -/diagnostics/gta6-check/ +/diagnostics/title-candidate-*/ +/diagnostics/title-check/ # Native application build output /app/.build/ diff --git a/AGENTS.md b/AGENTS.md index 37e60ae..2f0ce30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ Never introduce Rosetta 2, x86-64 host executables, MoltenVK, Vulkan runtime dep - Contributors who have seen leaked or confidential Xbox materials must not contribute. State this in CONTRIBUTING.md and require a DCO sign-off (Signed-off-by) on contributions. - Include a plain statement in docs/legal.md: BetterXen does not circumvent console security or DRM, does not load encrypted or protected content, and is a research project built from public documentation. Add a note that this is not legal advice and that contributors should know their local laws, including anti-circumvention provisions such as DMCA section 1201. - Before copying or adapting any upstream code: verify the exact license of that file (not just the repo), check GPL-3.0-or-later compatibility, preserve copyright notices, record source repository and exact commit, document modifications, include required attribution. Never remove upstream copyright notices. If licensing is uncertain, stop using that code until resolved. -- Keep BetterXen's emulator implementation original. Never copy, port, translate or adapt emulator source from Leonida, KyTx, AnyPS5 or similar projects. +- Keep BetterXen's emulator implementation original. Never copy, port, translate or adapt emulator source from PE-Vulkan project, KyTx, AnyPS5 or similar projects. - Validate the technical compatibility and safety of user-provided files. Do not ask for ownership receipts, accounts or acquisition provenance as part of file loading. Contributor provenance and licensing obligations still apply. - Never place restricted material in the repository or its Git history. - Do not push, publish, or change remote visibility without explicit user authorization. Prepare locally and report readiness. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7e128..27a9c54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Guest execution uses original, purpose-built test programs. Commercial Xbox game remains unsupported. ### Changed +- Replaced our own references to a specific commercial game title (README non-affiliation line, phase and integration notes, ignored diagnostics folder names) with generic "commercial title" wording. The ignored folder names are now `diagnostics/title-candidate-*` and `diagnostics/title-check`. Third-party repository names and URLs in research notes are unchanged so their provenance stays accurate. Our own prose references to the upstream project formerly named in the research notes now read "PE-Vulkan project"; its repository paths in URLs and code spans are unchanged. No behavior change. +- Replaced the active phase plan and README X1–X25 roadmap with one workload-based native macOS sequence: compiled guest boot, modular workers, guest-controlled rendering, an interactive application, compatibility corpus, sustained execution and conditional Xbox experiments. Historical acceptance records remain evidence for their original candidates; no new execution or compatibility result is claimed. +- Revised the native macOS development phases after a pinned PortWatch project screen and current-main inspection: hosted C is already merged, CPU feature/unwind contracts and console evidence now have explicit stages, and eight contributor follow-ups define bounded work. Added the research comparison and index link; no runtime changes, new execution results or independent acceptance are claimed. +- Repaired destination issue links in 20 migrated PR descriptions while retaining the imported text, attribution and contributor certifications. Template and review requirements remain in place. - Added `.github/CODEOWNERS` so pull requests request review from the `MacosPorters/maintainers` team. With the `main` branch rule that requires code-owner review, a maintainer must approve each change before it merges. - Moved 163 unused migration PR refs from branches to verified archive tags, retaining the 22 open-PR branches. Historical refs no longer clutter the branch list or produce recent-push PR prompts. - Renamed the project branding and native app and primary CLI package/binary to BetterXen (`betterxen`), and updated active repository links to `MacosPorters/betterxen`. Legacy `xenora-*` library packages and synthetic guest ABI names remain for compatibility. Upstream licenses, notices and historical evidence are retained. @@ -35,6 +39,7 @@ remains unsupported. - Added a Python 3 fallback for `timeout` in `scripts/test-gpu.sh`, so the native Metal suite runs on stock macOS without GNU coreutils while preserving bounded execution and the usual timeout exit status. ### Added +- Added a BetterXen development phase plan based on current source, pending PRs and existing acceptance records, linked from both contributor entry points. It separates baseline reconciliation, hosted C execution, guest threading, translated rendering, application integration and measured optimization; no new runtime or compatibility acceptance is claimed. - Added `tests/runtime_clock.rs`, which reads the performance counter, its frequency, both tick counts, the unbiased interrupt time and the system time from one injected clock and checks that they report the same elapsed time in their own units, after a host advance and after a guest `Sleep`, and that none of them decreases up to and past the end of the clock (#204). Expected values are worked out by hand from the documented units. Timed waits still return without consuming clock time. - Added opt-in shader IR constant folding (`CompileOptions::fold_constants` / `compile_with`) for pure vector unary and binary ops whose operands are already constants (#141). Floating-point ops still use the exact positive-normal rules; loads, stores, lane masks, merges and branches are never folded. Default `compile` keeps the historical IR. Covered by hand-computed known-answer compiler tests (shifts by 32/33, ashr, min_i32 vs min_u32, mul_hi_i32_i24, ffbh_i32, exact float fold, load-derived float non-fold, and verify rejection of inexact constant float add) with a fold-on versus fold-off check, plus an MSL template drift check over every foldable op. - Added opt-in shader IR common-subexpression elimination (`CompileOptions::eliminate_common_subexpressions` / `compile_with`) that reuses the first result of an equivalent pure vector unary or binary (#142). Equivalence is the same operation and the same operand values in the same order; constant operands match by bit pattern. Loads, stores, constant definitions, lane masks, merges, branches and other side-effecting or execution-mask-dependent ops are left in place. The pass runs after constant folding, so folded results stay constants and a later pure op on two equal folded constants can still be reused. Default `compile` keeps the historical IR. Covered by hand-derived known-answer compiler tests for reuse (and/xor, not, exact float add), for rejected loads, swapped subtracts, lane masks, lane merges and VCC selects, and for the four combinations with constant folding (1 + 2 = 3, and 1.0 + 2.0 = 3.0), and a check that the 13 golden fixtures, none of which repeats an expression, compile unchanged with the pass on. No speedup is claimed. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/README.md b/README.md index fc5b94f..8f26502 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BetterXen -BetterXen is an independent continuation copied from [XenoraOSS/Xenora](https://github.com/XenoraOSS/Xenora). The original Git history, licenses and contributor attribution are retained. See the [migration notes](docs/migration.md) for imported issue and pull-request history. +BetterXen is a community-maintained continuation. Original Git history, licenses and contributor attribution are retained. See the [project history and migration notes](docs/migration.md) for source attribution and imported issue and pull-request records. **Experimental Xbox Series X|S emulation research for Apple Silicon Macs.** @@ -23,37 +23,26 @@ BetterXen has progressed from executing individual x86-64 instructions to runnin The latest verified milestones include **translated gfx1030 vertex and pixel shaders executing through native Apple Metal**, the native Metal **blend pass** (`NativeCompute::render_blend`) and **indexed triangle draws** (`NativeCompute::render_indexed`) into offscreen targets, with rendered pixels compared against independently calculated reference results. -### Development milestones +### Development phases -| Milestone | Implementation | Status | -| --- | --- | --- | -| X1 — Guest CPU | Bounded x86-64 instruction execution on ARM64 macOS | Verified | -| X2 — Executable loading | Loading original fixed-base PE32+ test executables | Verified | -| X3 — GPU compute | Guest-submitted Metal compute workloads and readback | Verified | -| X4 — Metal rendering | Guest-driven offscreen rendering using authored Metal shaders | Verified | -| X5 — Guest execution expansion | Additional bounded CPU execution and fixture coverage | Implemented | -| X6 — Guest control flow | Nested calls, returns, checked memory and synthetic PE execution | Verified | -| X7 — Imported services | Named imports, guest-to-host service dispatch and result validation | Verified | -| X8 — Translated compute | Original gfx1030 compute shaders executing on Metal, partial Wave32 handling and BC1 readback | Verified subset | -| X9 — Translated graphics | Persistent resource handles, translated vertex/pixel stages and offscreen Metal rendering | Verified subset | -| X10 — Texture sampling | Translated image instructions are still planned; upload, readback and decode of BC compressed formats is implemented (see [Texture support](#texture-support)) | Planned | -| X11 — Graphics pipeline | Bounded multi-draw passes into offscreen RGBA8 targets: translated vertex and pixel stages, indexed triangle draws, colour write masks and blend state | Implemented | -| X12 — Wave execution | Expand Wave32/Wave64 semantics, divergent control flow, cross-lane operations, LDS and barriers | Planned | -| X13 — Advanced shaders | Mesh, geometry and additional compute shader capabilities with verified Metal execution | Planned | -| X14 — CPU recompilation | Native ARM64 dynamic recompilation of supported x86-64 instructions in synthetic fixtures | Implemented subset | -| X15 — Executable compatibility | Static PE inspection reports sections, relocations, thread-local storage (TLS) callbacks, imports and entry-point instructions | Static probe implemented | -| X16 — Guest memory and threading | Virtual memory mapping, thread scheduling, synchronization primitives and atomic operations | Implemented subset | -| X17 — System services | Implement a tested subset of Xbox-compatible runtime APIs, memory services, filesystem access and application lifecycle | Implemented subset | -| X18 — Graphics API translation | Translate supported Xbox graphics commands, resource descriptors, command queues, barriers and fences into Metal operations | Planned | -| X19 — Advanced GPU features | Indirect rendering, asynchronous compute, additional texture formats and ray-tracing compatibility research | Planned | -| X20 — Integrated guest runtime | Connect CPU recompilation, executable loading, system services and graphics translation into one persistent runtime | Planned | -| X21 — Application compatibility | Execute increasingly complex independently authored applications through the complete guest CPU and GPU pipeline | Planned | -| X22 — First application boot | Establish a reproducible startup and error-reporting path for supported game-like applications | Planned | -| X23 — Initial game compatibility | Investigate startup and execution of legally supported game software, identifying missing runtime and graphics behavior | Long-term goal | -| X24 — Gameplay and performance | Expand rendering correctness, input, audio, memory management, shader caching and execution performance | Long-term goal | -| X25 — Running games | Achieve reproducible, stable execution of compatible games on native Apple Silicon macOS using Metal | Long-term goal | +The active plan follows demonstrable native macOS workloads. Every phase has +completion checks, dependencies and contributor issues in the +[full development plan](docs/development-phases.md). -**Roadmap note:** X10–X25 are proposed engineering milestones, not completed implementations or a guaranteed sequence. Actual priorities will change as compatibility testing reveals new blockers. Successfully completing one milestone does not guarantee that a particular game will run. +| Phase | Result to demonstrate | +| --- | --- | +| 1 — Compiled guest boot | Reproduce and independently accept the existing original C execution path on native ARM64. | +| 2 — Modular guest runtime | Run an original executable with companion libraries, workers, checked waits and lifecycle cleanup. | +| 3 — Guest-controlled Metal scene | Reach translated textured rendering through compiled guest calls, with checked resource lifetime and pixels. | +| 4 — Interactive application | Combine guest execution, rendering, input, audio, saves and session controls in one original application. | +| 5 — Compatibility corpus | Expand CPU/runtime/shader behavior using varied original workloads and independently derived regressions. | +| 6 — Sustained native execution | Verify bounded long runs and measured performance on the Apple Silicon hosts actually tested. | +| 7 — Xbox compatibility experiments | Resolve public console contracts and demonstrate each separately admitted execution stage before claiming support. | + +These phases replace the previous roadmap. They are targets, not completed +acceptance claims or a game-release timeline. Console-contract research and +bounded subsystem work can proceed in parallel. Historical fixture identifiers +such as X9 remain labels for their original test/evidence records. All existing verification refers to independently authored synthetic programs and shaders. Commercial-game compatibility remains unverified. @@ -353,7 +342,7 @@ Compiling a shader is not equivalent to proving its GPU output is correct. ### Where the work is heading -See the [roadmap table](#development-milestones) for proposed milestones, and the [changelog](CHANGELOG.md) for the current unreleased additions, such as the native blend pass, indexed draws and the depth pass. The remaining research steps are the outstanding items in [current limitations](#current-limitations). +See the [development phases](docs/development-phases.md) for the current work order, and the [changelog](CHANGELOG.md) for the current unreleased additions, such as the native blend pass, indexed draws and the depth pass. The remaining research steps are the outstanding items in [current limitations](#current-limitations). --- @@ -371,6 +360,6 @@ BetterXen is licensed under the [GNU General Public License v3 or later](LICENSE See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for third-party attribution and [docs/legal.md](docs/legal.md) for the project's research and legal boundaries. -BetterXen is an independent open-source project and is not affiliated with Microsoft, Xbox, Rockstar Games or Apple. +BetterXen is an independent open-source project and is not affiliated with Microsoft, Xbox, any game publisher or Apple. --- diff --git a/docs/README.md b/docs/README.md index 3b27d18..f664767 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,6 +8,12 @@ then read the [interface contracts](interfaces.md). Reproduce an [independent validation suite](../tests/validation/README.md) before changing either path. The [changelog](../CHANGELOG.md) records notable changes. +Use the [BetterXen development phases](development-phases.md) for current work +order, existing issue/PR dependencies and measurable completion criteria. +Historical phase checkpoints retain their original evidence scope. +The active plan replaces the former roadmap with workload-based phases, from +compiled guest boot to separately admitted Xbox compatibility experiments. + ## Architecture and technical design - [Interface contracts](interfaces.md) — Translated shader stages, guest services, native command submission, and synthetic textures. @@ -53,6 +59,7 @@ either path. The [changelog](../CHANGELOG.md) records notable changes. ## Research and engineering decisions +- [PortWatch projects and the native macOS plan](research/portwatch-native-macos.md) — Complete pinned tracker screen, native ARM64 gaps, contributor issues and revised phase dependencies; external claims remain unverified. - [Public sources](research/sources.md), [RDNA 2 notes](research/rdna2.md), and [Xbox GPU evidence](research/xbox-gpu.md) — Specifications, evidence scope, and unknown console behavior. - [Shader inputs](research/shader-containers.md) and [risk register](risk-register.md) — Input provenance and unresolved engineering risks. - [Synthetic integration and upstream evidence](research/synthetic-integration.md) — Audited source snapshots and remaining commercial startup prerequisites. diff --git a/docs/development-phases.md b/docs/development-phases.md new file mode 100644 index 0000000..c79c6e1 --- /dev/null +++ b/docs/development-phases.md @@ -0,0 +1,346 @@ +# BetterXen development phases + +BetterXen's objective is to execute supported Xbox Series software through an +original native ARM64 runtime and direct Metal on macOS. Commercial game +execution is currently unsupported. The demonstrated results +are bounded, independently authored programs and shaders. + +This is the sole active phase sequence. It replaces the previous phase plan and +the README's X1–X25 roadmap. Historical fixture names and acceptance records +retain their meaning as evidence for their original candidates; they are not a +second development schedule. + +## Starting position + +The reviewed main revision is +[`b2654e93a42e74e29570183da1f31bb8cdc6f721`](https://github.com/MacosPorters/betterxen/tree/b2654e93a42e74e29570183da1f31bb8cdc6f721), +checked on November 24, 2026 (America/Chicago). The working tree remains based +on `f02eb2678e76e91876be5706ce91dca25dcc3017`; the newer runtime was inspected +in a separate snapshot and has not been merged into this checkout. + +On inspected main, the source contains an x86-64 interpreter, an ARM64 dynamic +binary translator (DBT), PE32+ loading, a partial runtime, a deterministic guest +scheduler, translated graphics, texture/sampler bindings and a native Swift app. +The hosted C fixtures A1 and A2 are implemented and reported locally passing; +both still await independent acceptance. These pieces have not established a +complete commercial game or one integrated threaded 3D application. + +The [public-project review](research/portwatch-native-macos.md) explains the +external comparisons and current-source limits. Windows projects often execute +x86-64 instructions directly and use Windows/D3D12 services. The inspected Mac +guest-execution projects use Rosetta; native asset renderers demonstrate a +different workload. Their progress is a research lead, not BetterXen evidence. +No competitor emulator implementation may be copied or adapted. + +No phase is declared complete by this planning task. It ran documentation and +inventory checks, not new CPU/GPU execution, fuzzing, mutation or benchmarks. + +## Delivery sequence + +| Phase | Demonstrable result | Principal dependency | +| --- | --- | --- | +| 1 | A reproducible compiled guest boots and exits on native ARM64 | Existing A1/A2 and native tool evidence | +| 2 | One modular guest program runs workers and cleans up correctly | Module startup, scheduling and lifecycle contracts | +| 3 | Guest code controls a translated textured Metal scene | Validated guest graphics calls, bindings and completion | +| 4 | An original interactive application combines execution, graphics, input, audio and saves | The supported paths from phases 2 and 3 | +| 5 | A varied original workload corpus exposes and closes specific compatibility gaps | A repeatable integrated application and diagnostics | +| 6 | Sustained execution is measured and verified across native Apple Silicon hosts | Checked workloads, resource bounds and actual host reports | +| 7 | A separately admitted Xbox compatibility experiment has documented contracts and reproducible results | Public console evidence and all behavior required by that input | + +Each result has its own admission profile. A simple scene need not wait for all +AVX2 instructions, mesh shaders or ray tracing. A workload needing an unsupported +feature stops explicitly. Research, diagnostics, CPU expansion and performance +measurement can proceed alongside these phases on independently claimed paths. +A phase's number does not grant exclusive ownership of a subsystem. + +## Phase 1 — Boot a reproducible compiled guest + +**Deliverable:** a contributor can build an original guest from source, start it +through BetterXen's supported test entry point and reproduce its output and exit +without an Intel host executable or Windows compatibility runtime. + +Use the existing [Gate A fixtures](testing/gate-a.md). On inspected main, +[PR #283](https://github.com/MacosPorters/betterxen/pull/283) already supplies the +hosted C program. Reproduce and review that implementation; do not create a +competing CRT startup or mark it unimplemented because this checkout is older. + +The candidate record identifies the exact source revision, local modifications, +native compiler/linker, linked support-code licenses, execution path and limits. +Check host executables/dependencies with `file`, `lipo -archs` and `otool -L`. +Guest x86-64 bytes are permitted data; native host tools must support ARM64. +Use `aarch64-apple-darwin` for BetterXen. + +**Completion checks:** + +- A1/A2 reproduce the specified stdout/stderr, files, callback order, exit status + and cleanup on the named candidate. Missing compilers fail visibly. +- Existing wrong-input, unresolved-import and instruction-budget controls still + fail for their specified reasons. A trapped stub is not implemented behavior. +- The admission profile states which CPU forms, imports and startup features it + supports. The test entry point is distinguished from CLI/app execution. +- Independent reviewers accept the semantic expectations and the scope of the + native evidence. A local pass alone does not close this phase. + +**Contributor work:** [CPU coverage #154](https://github.com/MacosPorters/betterxen/issues/154), +[native reports #303](https://github.com/MacosPorters/betterxen/issues/303), and +[existing compatibility report #254](https://github.com/MacosPorters/betterxen/issues/254). +Use existing audit/test tooling and coordinate schema changes with its owners. + +## Phase 2 — Run a modular program with guest workers + +**Deliverable:** an original executable and companion libraries initialize, +start workers, exchange results, block/resume and exit with checked teardown. + +Begin with [the EXE/two-DLL startup contract #301](https://github.com/MacosPorters/betterxen/issues/301) +and [worker lifecycle design #305](https://github.com/MacosPorters/betterxen/issues/305). +The fixture records dependency initialization, per-module static thread-local +storage (TLS), worker-visible values and supported detach/destructor calls. +Expected order must be derived before implementing the loader or callbacks. +Built-in service-module lookup is not general guest DLL loading. + +Extend the existing serial scheduler under +[#228](https://github.com/MacosPorters/betterxen/issues/228). Its documented +`Sleep` behavior can stall every worker; [#304](https://github.com/MacosPorters/betterxen/issues/304) +owns the narrow yielding fix after parent/runtime ownership coordination. +Handle critical sections, condition variables and other waits as separately +specified gaps, not incidental additions to that fix. + +Broader CPU behavior is driven by the admitted fixture. Start +[AVX/YMM design #299](https://github.com/MacosPorters/betterxen/issues/299) and +[unwind design #300](https://github.com/MacosPorters/betterxen/issues/300) in +parallel, but do not require their entire future scope for a simpler program. +A workload using those features must wait for real support. CPU feature bits +must not advertise unsupported behavior. Stack walking, structured exception +handling (SEH) and C++ exceptions are separate capabilities. + +**Completion checks:** + +- The source-built module graph has independently derived results and + initialization/teardown records, with explicit forwarder/cycle/search policy. +- One worker progresses while another waits. Results hold across specified + scheduling quanta; the injected clock and timeout units remain consistent. +- Static TLS, dynamic TLS, fiber-local storage (FLS), errors, errno and CPU state + retain their specified per-thread isolation. Dropping a value does not count + as executing its registered guest callback. +- Missing exports, failed attach, invalid callback targets, stack faults, + timeouts, deadlock and exhausted budgets have precise, bounded outcomes. +- Repeated runs reclaim owned modules, handles, stacks and callback state. + Unsupported delayed imports or lifecycle paths are rejected explicitly. + +**Contributor work:** reuse [package census #211](https://github.com/MacosPorters/betterxen/issues/211) +and the existing scheduler. Runtime PRs #263/#290 overlap; their authors and +maintainers must resolve ownership before shared production edits. Parallel +host-thread execution remains outside the serial scheduler's ordering claim. + +## Phase 3 — Render a scene controlled by guest code + +**Deliverable:** a compiled original guest creates resources, uploads a texture +and geometry, submits translated rendering, waits for completion and checks the +resulting frame through its guest-visible interface. + +Use [startup-to-frame integration #256](https://github.com/MacosPorters/betterxen/issues/256) +as the integration task. A Rust test calling a host graphics method does not +alone prove the compiled guest can call it. Specify the supported service/call +boundary and check its Win64 argument/return and nonvolatile-state behavior. +Guest addresses must resolve to checked ranges and opaque handles, never host +pointers. + +Existing translated `image_sample_lz`, guest descriptor-table bindings, texture +upload paths, blend/index/depth tests and packed compressed-texture footprints +are starting components. [Binding/entry design #302](https://github.com/MacosPorters/betterxen/issues/302) +specifies expansion beyond the bounded texture/sampler contract. Use an original +scene with distinguishable textures and resource updates so wrong bindings or +stale data change checked pixels. + +**Completion checks:** + +- Actual native Metal execution produces frame readback matching expectations + derived independently of the decoder, compiler and production renderer. +- Changing one guest texture, transform or binding changes the expected frame; + a skipped draw or substituted shader cannot pass as correct rendering. +- Update, submit, completion, readback and retirement order are checked. + Resources remain valid for in-flight work and stale handles are rejected. +- Bad descriptors, overflowing ranges, unsupported shader forms and invalid + resource states fail before unsupported work reaches Metal. +- The report records device capability queries, validation settings, candidate, + commands and hardware. Synthetic gfx1030 success is not Xbox GPU verification. + +**Contributor work:** [resource-update workload #147](https://github.com/MacosPorters/betterxen/issues/147), +[shared lifetime #148](https://github.com/MacosPorters/betterxen/issues/148), +[fences #224](https://github.com/MacosPorters/betterxen/issues/224), and +[format inventory #260](https://github.com/MacosPorters/betterxen/issues/260). +Respect the active format claim; do not duplicate its inventory. + +## Phase 4 — Run an original interactive application + +**Deliverable:** one small original game-like application runs through the guest +CPU/runtime and native app with translated graphics, scripted input, bounded +audio and a save/load cycle in a persistent session. + +Compose the admitted paths from phases 2 and 3. Define the application source, +input replay, frame checkpoints, sample-data checks and save format before +implementation. Start with the CPU/shader subset already justified by the scene. +Add C++ or additional runtime functionality only when an original failing +fixture demonstrates the requirement and linked runtime terms are reviewed. + +Wire the application through the existing Swift/Rust interface and worker +lifecycle. Existing native audio, controller and filesystem demonstrations are +components, not proof that guest code reaches each service. This phase must +exercise those guest connections in one session. + +**Completion checks:** + +- A deterministic replay reaches independently specified state/frame checkpoints. +- Input reaches guest logic; expected audio samples are checked before device + playback; save/load preserves specified state and reports I/O failures. +- Start, pause, resume, stop, restart and worker failure have defined outcomes. + Commands do not report success after a worker has failed. +- Resource/handle counts and cleanup remain bounded across repeated sessions; + invalid guest paths and resource requests fail according to the interface. +- The native app/CLI provide a reproducible quick start and useful stage-specific + failure reports. This fixture still establishes no commercial compatibility. + +**Contributor work:** [audio #227](https://github.com/MacosPorters/betterxen/issues/227), +[session errors #250](https://github.com/MacosPorters/betterxen/issues/250), +[worker diagnostics #255](https://github.com/MacosPorters/betterxen/issues/255), +[app CI #248](https://github.com/MacosPorters/betterxen/issues/248), and +[quick start #247](https://github.com/MacosPorters/betterxen/issues/247). +Execution-admission policy remains with +[#212](https://github.com/MacosPorters/betterxen/issues/212). + +## Phase 5 — Expand compatibility through a varied workload corpus + +**Deliverable:** a versioned set of original source-built workloads exercises +meaningfully different CPU, runtime and graphics behavior through the integrated +path, with precise accepted/rejected profiles and reproducible regressions. + +Choose additions from actual failures. Examples include another compiler or +runtime profile, vector-heavy arithmetic, runtime-dependent shader branches, +bounded loops, multiple resource views and streaming texture updates. Each +addition must demonstrate a gap not already owned by an existing task. + +Use [CPU design #299](https://github.com/MacosPorters/betterxen/issues/299), +[unwind design #300](https://github.com/MacosPorters/betterxen/issues/300), +[runtime uniform branches #179](https://github.com/MacosPorters/betterxen/issues/179), +[bounded shader loops #180](https://github.com/MacosPorters/betterxen/issues/180), +and [RDNA2 expansion #205](https://github.com/MacosPorters/betterxen/issues/205). +Wave divergence, cross-lane operations, local data share (LDS), barriers, mesh +stages and ray tracing require their own public contracts, fixtures and native +capability checks when a selected workload needs them. + +**Completion checks:** + +- Each workload identifies its source/build recipe, required forms/services, + original expected outputs, limits and exact independently accepted candidate. +- Coverage separates declared, decoded, lowered, CPU-tested, locally GPU-tested + and independently accepted behavior. Compilation counts are not compatibility. +- Unsupported behavior retains explicit diagnostic controls; expected values do + not come from the same implementation being tested. +- Targeted mutation/fuzz/regression checks demonstrate sensitivity to the changed + behavior without altering tolerances, gate definitions or mutation counting. +- Earlier integrated workloads still pass. Failures become bounded tasks with + proposed files and dependencies, not a generic rewrite of a subsystem. + +**Contributor work:** [original corpus #150](https://github.com/MacosPorters/betterxen/issues/150), +[shader acceptance #225](https://github.com/MacosPorters/betterxen/issues/225), +CPU coverage #154 and the existing QA owner #219. Reuse their tools and acceptance +rules; do not create another competing status or test framework. + +## Phase 6 — Sustain execution across Apple Silicon + +**Deliverable:** admitted workloads run for a specified duration under bounded +memory/resource use, and performance/correctness reports are reproducible on +the actual native hosts contributors test. + +Specify soak duration, replay, resource limits and failure conditions before the +run. Measure guest execution, translation, service calls, transfers, Metal +startup, submission and readback to identify the actual bottleneck. Record +cold/warm behavior, variance and regressions as well as improvements. + +Use the existing native audit, GPU tests and benchmarks. Reuse merged startup +measurements and DBT comparison tooling; evaluate prewarming/persistence only +under [#258](https://github.com/MacosPorters/betterxen/issues/258) when measurements +justify it. Guest code-cache lifetime and same-block executable writes remain +explicit CPU correctness risks under #95 and #291. + +**Completion checks:** + +- The agreed soak/restart protocol passes on the pinned candidate with recorded + resource accounting and no hidden fallback or silent loss of work. +- Baseline/candidate measurements use equivalent inputs, toolchains, settings + and hardware. Validation-on correctness and validation-off performance are + separate runs; benchmarks use an idle host as required by the protocol. +- [Native reports #303](https://github.com/MacosPorters/betterxen/issues/303) + distinguish host binary architecture, documented capabilities, actual execution, + failure, unavailable tools and skipped tests. Skips are never GPU passes. +- Runtime capability detection selects optional paths. M1–M5/future-device cells + stay unknown until actual reports exist; one machine cannot verify them all. +- Contributor preview preparation follows app/native gates. Signing, notarization, + redistribution review and publication require their own evidence and explicit + release authorization; this phase does not authorize uploads. + +**Contributor work:** [soak #149](https://github.com/MacosPorters/betterxen/issues/149), +[memory pressure #204](https://github.com/MacosPorters/betterxen/issues/204), +[dependency evidence #158](https://github.com/MacosPorters/betterxen/issues/158), +and [preview preparation #259](https://github.com/MacosPorters/betterxen/issues/259). + +## Phase 7 — Attempt documented Xbox compatibility + +**Deliverable:** a separately reviewed compatibility experiment with admissible +inputs demonstrates exactly the supported startup/execution/rendering stages, +or records a specific unresolved contract that prevents the attempt. + +Begin [public console-contract research #306](https://github.com/MacosPorters/betterxen/issues/306) +now, alongside the earlier engineering phases. Maintain evidence for launch and +CPU entry state, executable admission, service ABI, shader entry/bindings, +resource and command layouts, synchronization and memory aliases. Public PE, +AMD desktop ISA and D3D12 documents establish their documented contracts; they +do not automatically establish Xbox behavior. Unknown console details remain +unknown rather than becoming guessed implementations. + +An actual execution attempt depends on demonstrated technical support for its +input, project-permitted authorized/unprotected material, explicit admission +and independent review. Do not obtain or use leaked executables, restricted +SDKs, confidential headers, proprietary shader collections, firmware or keys; +do not implement protection bypasses. A torrent filename or container does not +establish a supported executable, launch environment or compatibility result. +User files stay outside the repository. File validation concerns technical +compatibility and safety; it must not demand receipts, accounts or ownership +provenance uploads. + +**Completion checks:** + +- Required contracts have precise public sources and repository evidence classes, + or are visible blockers. Restricted/unavailable evidence is not bypassed. +- The admitted input profile, candidate, runtime capabilities and expected + outcomes are reviewed before execution and precisely bounded. +- Actual results separately identify inspection, loading, entry, menu/frame, + world simulation, interaction and sustained play. Reaching one does not + certify the next; crashes and missing behavior remain in the report. +- R1 audits evidence/provenance and R2 independently derives semantic expectations. + BetterXen has no Xbox hardware access and must never claim such verification. +- No game title is called supported or playable without a demonstrated repeatable + result. No date, compatibility percentage or release follows from this plan. + +This phase can remain blocked while earlier original workloads continue to +improve. There is currently no demonstrated commercial-title execution in BetterXen. + +## How contributors start + +The [research tracker #298](https://github.com/MacosPorters/betterxen/issues/298) +links the eight new bounded tasks #299–#306 and the existing work they depend on. +The phase plan claims no implementation files. Research/design tasks can begin +on their documented paths; production changes must coordinate subsystem owners +and active claims. Read all comments, including imported archived claims, and +inspect linked open PRs before claiming one issue in a plain reply. + +Every task needs an outcome, proposed files, dependencies, public semantic +sources, meaningful positive/negative checks and independent reviewers. Update +the changelog for meaningful changes. Record candidate-specific results and raw +logs under ignored `artifacts/`; distinguish implementation, local verification +and independent acceptance. Preserve historical evidence and attribution. + +Run the applicable commands from `AGENTS.md`. Across simultaneous work use at +most four Cargo jobs across two CPU-heavy jobs, one GPU job and one fuzz or +mutation campaign. Never count unrun or skipped checks as passes. No commit, +push, merge or release is authorized by a phase or an issue claim. diff --git a/docs/research/phase02-collaboration.md b/docs/research/phase02-collaboration.md index 2bb3dac..9ae1da2 100644 --- a/docs/research/phase02-collaboration.md +++ b/docs/research/phase02-collaboration.md @@ -19,16 +19,16 @@ Request original gfx1030 Wave64 assembly, a mask/lane design note and per-lane e KyTx declares GPL-2.0. Tx's conditional GPL-2.0-or-later offer covers only material they own and can license. Require file-level authorship, explicit compatible terms (GPL-3.0-or-later preferred for new Xenora fixtures), preserved notices and DCO. Inherited GPL-2.0-only code cannot enter the GPL-3.0-or-later combined work under those terms. The separate Kyty MIT notice does not settle a derived file's full provenance. No KyTx submodule is justified for the fixture. [KyTx license and notices](https://github.com/TxCsOffc/KyTx/tree/10f50d3eff0c0df36ee5d7007848a7b0b15072eb/LICENSES), [KyTx license](https://github.com/TxCsOffc/KyTx/blob/10f50d3eff0c0df36ee5d7007848a7b0b15072eb/LICENSE) -## Leonida +## PE-Vulkan project Public revision `2d3369a4c82e6f36c5190c4c534d3df600e135ec`. Candidate study surfaces and limits: | Surface | Evidence and disposition | | --- | --- | | Decode and translation | `decode_bytes` decodes RDNA words with an explicit wave-mode argument. The SPIR-V generator exposes `Gen` and `assemble`. Compare supported operand forms on independent synthetic inputs. Keep Xenora's typed decoder and MSL backend. [Decoder](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/tools/rdna2_decode.py#L1397), [Generator](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/tools/rdna2spirv.py#L219) | -| Containers and GPU API | `wave_size` and `binding_table` expose Leonida's FSSM interpretation. The D3D12 Vulkan shim and its device test are concrete source paths. Their existence does not establish a public authoritative Xbox ABI or PM4 contract. Keep metadata and guest handles outside Xenora's decoder, with explicit wave size, checked byte ranges and validated resource bindings. [FSSM reader](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/tools/fssm_header.py#L155), [Device shim](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/shims/d3d12_vulkan_device.cpp), [Device test](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/test/d3d12_vulkan_device_test.cpp) | +| Containers and GPU API | `wave_size` and `binding_table` expose PE-Vulkan project's FSSM interpretation. The D3D12 Vulkan shim and its device test are concrete source paths. Their existence does not establish a public authoritative Xbox ABI or PM4 contract. Keep metadata and guest handles outside Xenora's decoder, with explicit wave size, checked byte ranges and validated resource bindings. [FSSM reader](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/tools/fssm_header.py#L155), [Device shim](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/shims/d3d12_vulkan_device.cpp), [Device test](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/test/d3d12_vulkan_device_test.cpp) | | Executable and services | `Loader::load` and `Loader::load_runtime_module` establish an implemented Windows PE loading and shim boundary. CMake registers loader, bounds and TLS tests. The upstream stand-in run is reported. For Xenora, study the boundary using original PE fixtures, with checked image metadata, guest address translation and explicit service dispatch. Native Windows execution and the Vulkan runtime conflict with Xenora's host contract. [PE loader](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/src/pe_loader.cpp#L608), [Test registration](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/runtime/CMakeLists.txt#L516) | -The README reports 26,503 translations and SPIR-V validation at specific earlier revisions. It contains conflicting Wave64 counts, so leave that count unresolved. The linked GPU reports cover synthetic cases and include a MoltenVK path. Validation and pipeline creation do not check game shader output. The pinned status explicitly says the game does not boot. Xenora's GTA VI intro remains unverified, and no authorized test input was established in this review. [Pinned status](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/README.md#project-status), [Reported validator run](https://github.com/ItsNotRexed/Leonida/issues/644#issuecomment-7072972586), [Upstream GPU reports](https://github.com/ItsNotRexed/Leonida/issues/166) +The README reports 26,503 translations and SPIR-V validation at specific earlier revisions. It contains conflicting Wave64 counts, so leave that count unresolved. The linked GPU reports cover synthetic cases and include a MoltenVK path. Validation and pipeline creation do not check game shader output. The pinned status explicitly says the game does not boot. Xenora's commercial-title intro remains unverified, and no authorized test input was established in this review. [Pinned status](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/README.md#project-status), [Reported validator run](https://github.com/ItsNotRexed/Leonida/issues/644#issuecomment-7072972586), [Upstream GPU reports](https://github.com/ItsNotRexed/Leonida/issues/166) -Leonida carries GPL v3 text at the inspected pin. Any adoption still requires R1 to establish exact file terms and ownership, check generated tables and SDK-derived material, and review the separate `third_party/rpf9-explorer` gitlink at `e2939175c36a02d6ed25fa2c217b9d6ddcb8b516`. Game-derived metadata, shaders and asset outputs are outside this collaboration. Use public design references and original synthetic inputs. No Leonida submodule is justified. [Leonida license](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/LICENSE), [Submodule declaration](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/.gitmodules) +PE-Vulkan project carries GPL v3 text at the inspected pin. Any adoption still requires R1 to establish exact file terms and ownership, check generated tables and SDK-derived material, and review the separate `third_party/rpf9-explorer` gitlink at `e2939175c36a02d6ed25fa2c217b9d6ddcb8b516`. Game-derived metadata, shaders and asset outputs are outside this collaboration. Use public design references and original synthetic inputs. No PE-Vulkan project submodule is justified. [PE-Vulkan project license](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/LICENSE), [Submodule declaration](https://github.com/ItsNotRexed/Leonida/blob/2d3369a4c82e6f36c5190c4c534d3df600e135ec/.gitmodules) diff --git a/docs/research/phase02-ecosystem.md b/docs/research/phase02-ecosystem.md index 6b54e76..f3c8ec0 100644 --- a/docs/research/phase02-ecosystem.md +++ b/docs/research/phase02-ecosystem.md @@ -5,7 +5,7 @@ Historical reuse discussion records the earlier survey. Xenora uses public specifications and original fixtures, with other emulator projects serving only as references for test selection. -Screened the eight A3 leads on 2026-11-23 against section 6 of the dual-track brief. The pins below identify the default-branch snapshots and their latest observed commits in UTC. The OpenScarlett tip changes documentation. A recent tip establishes activity, and its commit message records the subject of that activity. See the companion notes for [KyTx and Leonida](phase02-collaboration.md) and [CPU engine selection and original interpreter fixture](phase02-cpu-feasibility.md). +Screened the eight A3 leads on 2026-11-23 against section 6 of the dual-track brief. The pins below identify the default-branch snapshots and their latest observed commits in UTC. The OpenScarlett tip changes documentation. A recent tip establishes activity, and its commit message records the subject of that activity. See the companion notes for [KyTx and PE-Vulkan project](phase02-collaboration.md) and [CPU engine selection and original interpreter fixture](phase02-cpu-feasibility.md). GitHub metadata and tree entries establish availability and paths. Pinned text inspection establishes what a selected function does in source. Upstream test counts, captures and README statements remain upstream reports. No upstream code, builds, fixtures or GPU workloads were executed here. Repository-level license labels are provisional for reuse. File-specific grants, origin and transitive terms remain unverified for every code surface below. diff --git a/docs/research/portwatch-native-macos.md b/docs/research/portwatch-native-macos.md new file mode 100644 index 0000000..673d064 --- /dev/null +++ b/docs/research/portwatch-native-macos.md @@ -0,0 +1,354 @@ +# PortWatch review and a native macOS execution plan + +Reviewed November 24, 2026 (America/Chicago). This is a public-documentation and +source-boundary review, not a competitor execution campaign or independent +acceptance. **BetterXen does not support commercial Xbox game execution.** + +## Recommendation + +Continue BetterXen as an original ARM64 runtime with its own x86-64 CPU +translation and direct Metal backend. The Windows projects expose useful +engineering questions, test structures and failure categories. Their code is +not a drop-in native port. Do not fork a Windows emulator into this repository, +replace the CPU with Rosetta, or add a Vulkan/Windows compatibility runtime. + +The next useful result is an original compiled application that starts through +a checked module/runtime path and reaches a translated, checked Metal frame. +Broader vector instructions, thread lifecycle, binding metadata and console +contracts must advance through explicit fixture-backed increments. Completing +synthetic applications alone cannot prove Xbox compatibility. + +## What was inspected + +The tracker snapshot is [PortWatch 2cedf62a](https://github.com/4lwayz/portwatch-vi/blob/2cedf62a16b63697f096763ecb99b4c10d4dbccc/data/tracker.json), +whose update timestamp is `2026-11-25T04:22:56.289Z` (November 24 locally). +Its 35 efforts, 22 tools and 30 candidates were screened. One candidate repeats +XCL. Three efforts have no public repository; seven repository endpoints were +unavailable across the combined list. Available repositories were pinned to +their observed default-branch commit; their metadata, README and public tree +were used to classify target, host assumptions, lineage and evidence scope. +The per-project tables below include every entry in these three lists: 85 +unique repository endpoints were checked, 78 available and seven unavailable. + +This is not a line-by-line audit of every source file, proof of all contributor +provenance, or a claim to understand unavailable/private code. No upstream +project, setup script, Windows executable, game, shader corpus, asset collection, +restricted SDK or decryption tool was run. Archive and protection-related entries +were screened at metadata/README level only; no mirrored implementation or +restricted payload was recovered. The tracker's flagged/ignored discovery/spam +queues are not endorsed engineering candidates and were not imported. + +Selected public architecture/status documentation was read more deeply for +VIctory, VIctory-macOS, TuxBox, NativeX, SeriesX and XValkyrie; XSXEmu's README +provides detailed admission, TLS and graphics boundaries. Those documents +explain their own designs; they do not verify their claimed test/hardware results. +The supplied `/so` website URL was unavailable to the web reader; the public, +pinned repository data was accessible and matched the initial screened JSON. + +BetterXen's working tree started at `f02eb2678e76e91876be5706ce91dca25dcc3017` +with existing local documentation edits. Read-only `git fetch` found newer main +[`b2654e93`](https://github.com/MacosPorters/betterxen/tree/b2654e93a42e74e29570183da1f31bb8cdc6f721). +A separate ignored source snapshot was inspected without switching, resetting +or merging the working tree. This distinction changes the hosted-C status. +Local documentation edits from this review do not install that newer runtime. + +## Why the PC results do not transfer directly + +| Layer | Common PC approach described upstream | Native ARM64 BetterXen requirement | +| --- | --- | --- | +| CPU | Guest x86-64 runs on a matching x86-64 CPU; several projects require AVX2 | Decode/execute or translate each supported form, preserve precise state/faults, and advertise only satisfied guest features. | +| Loader/runtime | Windows APIs or Wine/Proton supply much of PE startup, TLS, exceptions, threads, files and CRT behavior | Original checked guest memory, module lifecycle, service implementations, callback bridges and guest exception design. | +| Graphics API | Console-facing objects dispatch onto desktop D3D12, sometimes through Vulkan | Explicit validated guest handles/commands and native Metal objects, lifetime, resource state and completion. | +| Shaders | RDNA machine code becomes HLSL/DXIL or SPIR-V | Independently verified RDNA-to-IR-to-MSL behavior, entry state and resource bindings. SPIR-V may be an intermediate, not a Vulkan runtime requirement. | +| Assets | Title supplies its own loaders or tools convert game-specific data | No need to become an archive viewer to prove guest execution; codecs/layouts require public contracts and demonstrated workload needs. | +| Evidence | README milestones, streams, screenshots, compilation counts or self-reported FPS | Pinned original fixtures, independent expectations, actual native execution/readback and candidate-specific receipts. | + +PortWatch is a discovery/editorial service. Its percentages are not compatibility +measurements. The observed entries label their verification self-reported; +phrases such as “confirmed” inside editorial summaries do not become BetterXen +acceptance. Several forks share VIctory/XCL/Leonida lineage: ten forks are not +ten independent confirmations. Compilation, shader validation, first pixels, +scene completeness, interactive progress and stable play are distinct outcomes. + +## macOS efforts and what “native” means here + +[VIctory-macOS edba53dd](https://github.com/pragyaangaur/VIctory-macOS/blob/edba53ddc2207e6c537679f4ce06f966b7a63a59/README.md) +uses Rosetta, CrossOver Wine and D3DMetal for the guest route. Native builds of +its portable crates are a different result. Its reported passing tests neither +establish a fully ARM64 runtime nor demonstrate playable game execution here. +Its [port notes](https://github.com/pragyaangaur/VIctory-macOS/blob/edba53ddc2207e6c537679f4ce06f966b7a63a59/docs/macos.md) +provide leads for cache identity, upload visibility, floating-point edge cases, +capability/behavior mismatches and masked-store page faults. Reproduce relevant +questions with original Metal/CPU fixtures; do not copy its workarounds or assume +a D3DMetal defect exists in BetterXen's direct Metal path. + +[XSXEmu 2d937f83](https://github.com/daeken/XSXEmu/blob/2d937f8360fbcdac368a0e363c24df322fa24db2/README.md) +is another macOS effort, so “nobody is working on Mac” would be inaccurate. +Its guest path uses an x86-64 Mach-O process and Rosetta, while owned shader +translation fixtures use Metal. It explicitly separates static audit from +execution admission and says no game frame has been produced. Its useful +lesson is that entry/binding information and DLL/TLS lifecycle are separate +contracts; its Rosetta guest route does not satisfy BetterXen's ARM64 rule. + +[6stars 480d9a4d](https://github.com/meetox80/6stars/blob/480d9a4d00ed11560f7b4d989643723a0f5c451c/README.md) +and the separately listed 6stars engine candidate describe Swift/Metal world-data +rendering. An independent renderer may produce a convincing scene while never +executing the original game program. That is valuable work with a different +scope. No verified reusable component or file-level license clearance was +established by this review. + +[nativ64 3b826108](https://github.com/Ybucaille/nativ64/blob/3b82610882bc55cb27f0ec563c126a226855a8ea/README.md) +targets Linux x86-64. Its central observation is relevant: host Windows APIs +that a Windows project forwards still need implementation on a different OS. +Its Linux syscalls/futexes and x64 ABI are not native Darwin ARM64 services. +BetterXen should prioritize from its own import/fixture failures, not copy that +project's title-specific API totals or implementation. + +## BetterXen's actual starting point + +| Area | Observed on current main b2654e93 | Consequence | +| --- | --- | --- | +| CPU inventory | 498 declared forms, 213 operations; tool classifies 93 operations native and 120 shared-semantics | These are inventory/lowering categories, not 498 independently accepted instructions or a compatibility percentage. VEX remains rejected. | +| Typed runtime registry | 47 services: 7 implemented, 37 partial, 3 stubs; tool reports 0 verified entries | This is the typed subset, not the total handwritten runtime. Named exports alone do not prove behavior. | +| Hosted C | A1 and A2 are present; PR #283 merged as d26af53c. Gate A records local passes awaiting independent review | Do not open another “implement hosted C” issue. Reproduce/accept the candidate and expand from a failing original workload. | +| Modules | startup.rs accepts one image; modules.rs exposes built-in service modules | Built-in LoadLibrary/GetProcAddress is not general EXE plus guest-DLL startup and teardown. | +| Threads | Deterministic serial guest scheduler with worker stacks/TEBs, waits and handles | Sleep can stall all workers; static worker TLS and thread/FLS callbacks remain documented gaps. Serial scheduling does not prove parallel x86 memory ordering. | +| Graphics | Translated image_sample_lz pixel stage, native texture tests and guest descriptor-table bindings already exist | README X10 and generic “no sampling” descriptions are stale for this bounded path. Broader bindings, control flow and sampling still need contracts. | +| Shader inventory | Table records 1,465 identified forms, 189 decoded, 185 IR/MSL, 18 accepted Metal forms; reconciliation finds zero mismatches | Different domains and acceptance stages must stay separate. The compute inventory does not fully describe graphics-only sampling. #225 owns pending acceptance. | +| Texture/resource work | Packed BC footprints and bounded private texture staging merged; original resource/draw tests exist | Reuse them. Do not duplicate #260's active format inventory or assume guest/console integration from host upload success. | +| Native app | Existing Swift/FFI fixtures; app/CI and usability PRs remain separate | UI/audio/input fixtures are not one integrated compiled guest application. #256 is the existing integration task. | +| Console contract | Public AMD desktop ISA/PE/D3D12 documentation and explicit synthetic ABIs | Authentic launch, descriptors/commands and console-specific behavior remain unknown or unverified. No Xbox hardware access exists. | + +Evidence for these boundaries: current-main +[CPU registry](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/docs/cpu/instruction-registry.md), +[Gate A](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/docs/testing/gate-a.md), +[startup](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/crates/loader/src/startup.rs), +[module services](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/crates/loader/src/services/modules.rs), +[threads](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/docs/runtime/threads.md), +[graphics compiler](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/crates/shader/src/graphics.rs), +and [semantic coverage](https://github.com/MacosPorters/betterxen/blob/b2654e93a42e74e29570183da1f31bb8cdc6f721/docs/shaders/semantic-coverage.md). +These are source/inventory observations. Historical hardware results retain +their existing class A scope; none was rerun or independently certified here. + +## What to take forward + +Take **questions and test designs**, then implement independently from primary +sources. No emulator source was copied, ported, translated, vendored or adapted. +Repository-level license labels below are metadata only. They do not establish +per-file grants, GPL-3.0-or-later compatibility or rights to fixtures/data. + +1. Build a small, falsifiable workload before expanding an entire subsystem. + TuxBox/NativeX-style separation of loader, ABI, GPU and presentation tests is + useful; their own expected outputs cannot become BetterXen's oracle. +2. Treat unresolved host services as a concrete inventory. Reuse #211's package + census, #254's report schema and #255's startup diagnostics. Keep unsupported + calls explicit; never return success merely to get farther. +3. Model CPU state and faults before optimizing translation. AVX/YMM, masked + memory accesses, unwinding and lifecycle cannot be supplied by ARM64 host + calling conventions or a renamed Windows DLL. +4. Make shader entry state, resources and pipeline identity explicit. A shader + can compile and still read the wrong descriptor or run under the wrong mask. + A replaced/skipped shader or an empty draw cannot pass a correctness gate. +5. Validate resource ownership and completion before pursuing zero-copy. Apple + unified memory does not remove guest/host address translation, storage modes, + alignment, cache visibility or in-flight lifetime requirements. +6. Expand wave behavior, loops, mesh and ray tracing only as separate reviewed + contracts. A first simple scene does not require all of them; future console + workloads may. Do not infer optional Metal features from a product name. +7. Measure startup/steady-state and correctness separately, with actual host + receipts. Cache keys must cover full relevant identity; prewarming is an + experiment under #258, not a prerequisite or promised performance win. + +Primary semantic authorities are the [Intel SDM](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html), +[public PE format](https://learn.microsoft.com/en-us/windows/win32/debug/pe-format), +[Microsoft x64 exception handling](https://learn.microsoft.com/en-us/cpp/build/exception-handling-x64), +[AMD ISA publications](https://gpuopen.com/amd-gpu-architecture-programming-documentation/), +[public resource-binding specification](https://microsoft.github.io/DirectX-Specs/d3d/ResourceBinding.html), +and [Apple Metal feature tables](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf). +Class B applies only to what the relevant public specification documents; +applying desktop behavior to Xbox needs separate evidence (often C or U). +Feature tables are documentation, not our execution evidence across M1–M5. + +## Contributor work and dependencies + +The review is tracked in [#298](https://github.com/MacosPorters/betterxen/issues/298). +The new tasks below have bounded deliverables, proposed paths, public references, +negative controls and acceptance limits. They are unclaimed implementation work. +Design tasks can begin with public documentation; runtime changes must respect +parent claims and shared-file ownership. Read every issue comment and linked PR +before claiming. Do not claim several tasks in one comment. + +| Priority/order | Work | Dependency and boundary | +| --- | --- | --- | +| First, research | [#299 AVX/AVX2 state and decode contract](https://github.com/MacosPorters/betterxen/issues/299) | Extends beyond existing #120–#124; keeps CPUID honest. No blanket AVX2 implementation claim. | +| First, research | [#300 bounded AMD64 unwind](https://github.com/MacosPorters/betterxen/issues/300) | Separates metadata/stack walking from SEH and C++ exceptions; existing trap stubs remain. | +| First, loader contract/fixtures | [#301 original EXE plus two-DLL startup](https://github.com/MacosPorters/betterxen/issues/301) | Reuses #211 census and supplies a prerequisite to #256. Production mapping changes are separately coordinated. | +| First, GPU contract | [#302 shader entry and resource bindings](https://github.com/MacosPorters/betterxen/issues/302) | Builds on existing #226 sampling/table work; coordinates #205, #179, #180 and #224. | +| First, QA design | [#303 native capability receipts](https://github.com/MacosPorters/betterxen/issues/303) | Reuses #254 schema, #248 app CI and #158 dependency evidence. No automatic fleet posting. | +| Next, scheduler implementation | [#304 Sleep yields ready workers](https://github.com/MacosPorters/betterxen/issues/304) | Narrow #228 child; coordinate parent and runtime PRs before code edits. | +| First, lifecycle design | [#305 worker static TLS and callbacks](https://github.com/MacosPorters/betterxen/issues/305) | Depends on module/scheduler contracts for production; no competing scheduler. | +| Parallel, public research | [#306 console launch/graphics evidence ledger](https://github.com/MacosPorters/betterxen/issues/306) | Links existing public research; unknown console details remain blockers rather than guesses. | + +Reuse existing tasks rather than adding duplicates: #179 runtime uniform +branches, #180 bounded loops, #205 semantic expansion, #225 independent shader +acceptance, #224 fences, #147 resource-update workload, #148 shared lifetime, +#256 startup-to-frame integration, #260 format inventory, #247 quick start, +#250 session errors, #254 compatibility reports and #255 worker diagnostics. +PRs #293–#297 already cover app CI, CPU coverage, selection ordering, Open and +texture inventory respectively. Runtime PRs #263/#290 overlap substantially; +their author/maintainer must resolve them before new runtime edits. These +references are destination-repository numbers, not imported source numbers. + +The replacement [development phases](../development-phases.md) define the sole +active work order, from compiled guest boot through modular workers, a +guest-controlled Metal scene, an interactive application, a compatibility +corpus, sustained native execution and conditional Xbox experiments. +Hosted C is implemented on inspected main, awaiting independent acceptance; +it is no longer an untouched prerequisite. Original integration, then measured +optimization, then only evidence-admissible compatibility experiments is the +path. There is no supported date or estimate for running a commercial game. + +## Complete project screen + +Each pin links to the exact README reviewed. “Unavailable” means that the +observed public GitHub endpoint returned 404; it does not prove why or justify +looking for restricted mirrors. “Unresolved” licenses and NOASSERTION are not +reuse permission. Descriptions below classify documentation, not executed code. + +### Tracker efforts (35) + +| Entry | Pinned public documentation | Classification and BetterXen decision | +| --- | --- | --- | +| ZETTROX (`Zettrox/ztrx`) | [`90b529f8`](https://github.com/Zettrox/ztrx/blob/90b529f878a470fec9bf07b7be316bc769a12232/README.md); license metadata: `GPL-3.0` | VIctory/victory-fork lineage; Windows x64 + D3D12. Hardware tuning and reported gameplay are not independent native-Mac evidence. | +| Uilian (`uiliannn/VItoriaBr`) | [`c2485475`](https://github.com/uiliannn/VItoriaBr/blob/c24854750132af24c10e954765047525e0249bd3/README.md); license metadata: `GPL-3.0` | VIctory-family Windows/DXIL fork; README and tracker differ on readiness. Keep results self-reported; no ARM64 execution path. | +| suri | No public repository in tracker | Private/stream report only; no implementation inspection or reproducibility. No source/fixture reuse proposed. | +| omonkey | No public repository in tracker | Private/stream report only; no implementation inspection or reproducibility. No source/fixture reuse proposed. | +| CGBJ | No public repository in tracker | Private/stream report only; no implementation inspection or reproducibility. No source/fixture reuse proposed. | +| hyphennn (`fxceless/victory-fork`) | [`310c6eb6`](https://github.com/fxceless/victory-fork/blob/310c6eb6c16822ab95076aad61fce19bba86bb98/README.md); license metadata: `GPL-3.0` | VIctory rendering fork, Windows x64/D3D12; useful failure categories include bindings and mesh work. No implementation reuse. | +| VIctory (`Marvisak/VIctory`) | [`940d32f6`](https://github.com/Marvisak/VIctory/blob/940d32f69b22265690a0b5a15d6ded572ba33baf/README.md); license metadata: `GPL-3.0` | Windows x64 direct guest execution, HLE and D3D12/DXIL. Public architecture documents host pass-through and title-specific work. | +| xbox-emulator (`omonkeyz/xbox-emulator`) | [`f89e4106`](https://github.com/omonkeyz/xbox-emulator/blob/f89e4106fe8a1728515afa34ceb5097132cadcda/README.md); license metadata: `GPL-3.0` | TomBox continuation; Windows-process runtime and RDNA shader work. README title reports are unverified here; assets/captures are excluded. | +| XCL (`xcl-dev/xcl`) | [`f5c5bdf0`](https://github.com/xcl-dev/xcl/blob/f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f/README.md); license metadata: `GPL-2.0` | Windows x64 direct execution plus D3D12/DXIL; host services and pipeline behavior matter. GPL-2.0-only README; no reuse clearance. | +| ScarlettX (`Freminet/ScarlettX`) | [`01c642cf`](https://github.com/Freminet/ScarlettX/blob/01c642cf62a6d9978f535e2c438c488ebcb4cd39/README.md); license metadata: `unresolved` | Windows x64 HLE/D3D12; separates console precompiled-shader gaps from desktop paths. Console-binary-derived findings need independent public evidence. | +| TuxBox (`brcly/TuxBox`) | [`97b8ad31`](https://github.com/brcly/TuxBox/blob/97b8ad3192def18d491fe72ea3a55e204bc77a5d/README.md); license metadata: `Apache-2.0` | x86-64 Windows and Linux/Proton; owned guest fixtures and provider-specific failures are useful testing patterns, not an ARM64 solution. | +| americas-recomp (`realdody/americas-recomp`) | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| PE-Vulkan project (`ItsNotRexed/Leonida`) | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| OpenScarlett (`californiaAlmonds/OpenScarlett`) | [`022a8b25`](https://github.com/californiaAlmonds/OpenScarlett/blob/022a8b25148cc08412df8ac7e752b9efed4cd819/README.md); license metadata: `MIT` | Windows x64, D3D12/Vulkan; broad completeness claims are upstream reports. Public-spec-backed original fixtures are the only proposed transfer. | +| scarlett-layer (`jadeowaowa/scarlett-layer`) | [`0e436b3e`](https://github.com/jadeowaowa/scarlett-layer/blob/0e436b3e1c654765b193c1cb705918fbf101b10b/README.md); license metadata: `Apache-2.0` | Windows import interception/shims, D3D12 and synthetic test tiers; useful distinction between desktop samples and console compatibility. | +| Xbox2Windows (`R0Y00/Xbox2Windows`) | [`ab9a020c`](https://github.com/R0Y00/Xbox2Windows/blob/ab9a020c0783f9ce1dd10876cbeb119707b9ada9/README.md); license metadata: `MIT` | x64-to-C++ AOT/loader and DXIL research; distinguishes modified diagnostic startup from original executable compatibility. Host ABI still differs. | +| AnyXboxX (`LooperSalty/AnyXboxX`) | [`b92a71b9`](https://github.com/LooperSalty/AnyXboxX/blob/b92a71b9308e76f8ec9059c01d6e18f21611dc20/README.md); license metadata: `GPL-3.0` | Unicorn research and native Windows routes; current README also uses VIctory lineage. Do not treat its older interpreter label as ARM64 readiness. | +| XValkyrie (`sammwyy/xvalkyrie`) | [`c4c04970`](https://github.com/sammwyy/xvalkyrie/blob/c4c04970930d029a25622743e3ff4ef873ac17a6/README.md); license metadata: `GPL-3.0` | Windows x64 console API and shader translation; useful subsystem boundaries. Console/title-specific ABI claims remain unverified. | +| GTAVI-Recomp (`JamesCicada/GTAVI-Recomp`) | [`71766d8b`](https://github.com/JamesCicada/GTAVI-Recomp/blob/71766d8b5c669bc44639ad85bfd84edd8337c75a/README.md); license metadata: `GPL-2.0` | PS5/AnyPS5 route, not an Xbox launch contract; do not adapt emulator source or transfer PS5 APIs to Series. | +| AnyXboxSeries (`edupode/anyxboxseries`) | [`9ca2d053`](https://github.com/edupode/anyxboxseries/blob/9ca2d05329fe878db6abea6060889f9a95566719/README.md); license metadata: `NOASSERTION` | Windows D3D12 loader/inspection and an original sample; sample presentation does not establish Xbox guest execution. | +| SCARAB (`p-portela/SCARAB`) | [`8140e0be`](https://github.com/p-portela/SCARAB/blob/8140e0be4908499a5c4381eb4532410f05e39369/README.md); license metadata: `GPL-3.0` | Windows/D3D12 bridge, Linux through vkd3d-proton; memory/presentation incompleteness is explicit. Not native ARM64. | +| AnyBox (`Dark3581/AnyBox`) | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| PercyScarlett (`rpatty-dev/PercyScarlett`) | [`64719f96`](https://github.com/rpatty-dev/PercyScarlett/blob/64719f96d32f74d9d68cec69243b515ba675741f/README.md); license metadata: `GPL-2.0` | Windows x64/D3D12; README distinguishes existing DXIL titles from RDNA lifting and reports instability. GPL-2.0-only; no reuse. | +| GrandTheftXbox (`zohaiblazuli/GrandTheftXbox`) | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| Scarlett Windows Compat (`ProhorovIlja/NativeX-Runtime`) | [`b3087ce0`](https://github.com/ProhorovIlja/NativeX-Runtime/blob/b3087ce0ab191227dc9e7af37cab97a0b097bb98/README.md); license metadata: `MIT` | Portable inspection and separate Windows/Linux ABI/graphics probes. Useful test decomposition; not a complete application runtime. | +| DedSec (`Hylanderry/DedSec`) | [`c44b38ca`](https://github.com/Hylanderry/DedSec/blob/c44b38ca0207900cd27c687bb9213a6c8474bc69/README.md); license metadata: `MIT` | Windows x64/direct execution and D3D12; performance/feature claims need reproducible evidence. No Mac execution established. | +| Xbgtasix (`ljm-233/Xbgtasix`) | [`1a767872`](https://github.com/ljm-233/Xbgtasix/blob/1a7678729cd436f9adaa9772b76d97af3d292321/README.md); license metadata: `GPL-3.0` | Windows compatibility DLLs rely on the Windows loader for imports, relocation and TLS. This omitted host work is required on Darwin. | +| SeriesX Emulator (`anrq0/SeriesX-Emulator`) | [`4f07d76f`](https://github.com/anrq0/SeriesX-Emulator/blob/4f07d76f9f641ce85ce4238081c06d1cef1b7521/README.md); license metadata: `MIT` | Interpreter, original test applications and desktop launcher; README explicitly excludes commercial compatibility. Reported vectors are not our oracle. | +| GTA6-COMPAT-LAYER (ScarlettCompat) (`SSTGxf/ScarlettCompat`) | [`b92f060b`](https://github.com/SSTGxf/ScarlettCompat/blob/b92f060b1754580338dc30f57bb50777af38749d/README.md); license metadata: `MIT` | Windows native loader and console shims. Diagnostic bootstrap is a useful stage model; passing imports is not an implemented API. | +| XlaunchVI (`JPTuba9/xlaunch-vi`) | [`40feebd7`](https://github.com/JPTuba9/xlaunch-vi/blob/40feebd73a59c13ac5d65c3e61d21906111294e7/README.md); license metadata: `unresolved` | Windows x64, D3D12/Vulkan and frontend. README explicitly denies game compatibility; UI work is separate from guest execution. | +| OpenScarlett (Community Edition) (`OpenCommunityEdition/OpenScarlett`) | [`d1285fdd`](https://github.com/OpenCommunityEdition/OpenScarlett/blob/d1285fddbe399927581a772f536239b33a1e2cf4/README.md); license metadata: `AGPL-3.0` | Windows/Linux API layer; README build requires GDKX. Do not follow restricted tooling dependencies or import its sources. | +| Five Star Recomp (`ThatRecompDev/five-star-recomp`) | [`fb3b3a2d`](https://github.com/ThatRecompDev/five-star-recomp/blob/fb3b3a2def5af6eef6004c954c11f2cd22574168/README.md); license metadata: `GPL-3.0` | Windows platform, shader and asset tools; title startup claims do not establish a complete scene or native Mac execution. | +| G6Recomp (`Kajcsi/G6Recomp`) | [`82ccaa5d`](https://github.com/Kajcsi/G6Recomp/blob/82ccaa5d4b3fdc1edb9cdd95c8dbab4ee7cde352/README.md); license metadata: `GPL-3.0` | Windows AVX2/direct-execution loader with fixture tests; static-recompilation name does not remove reliance on x64/Windows ABI. | +| GTA6-BootTest (`OnlyMoisties/GTA6-BootTest`) | [`32683d8f`](https://github.com/OnlyMoisties/GTA6-BootTest/blob/32683d8fe2841bddeb0b437109e97bc32cf55724/README.md); license metadata: `unresolved` | Windows debugger/shim/GPU startup harness. Reported first UI frame is not full scene correctness; no root license identified by metadata. | +| Palmetto (`luizwidmer/palmetto`) | [`6416a273`](https://github.com/luizwidmer/palmetto/blob/6416a273336599341dfd31e64cc3da3fd1b855ed/README.md); license metadata: `GPL-3.0` | Windows runtime and RDNA-to-SPIR-V/Vulkan path; behavior-stage reporting is useful, runtime/backend is incompatible with our target. | + +### Tracker tools (22) + +| Entry | Pinned public documentation | Classification and BetterXen decision | +| --- | --- | --- | +| `lynxnathan/rage-tools-vi` | [`547ee9ba`](https://github.com/lynxnathan/rage-tools-vi/blob/547ee9ba2dde236644a597cef65a18f7bd5549be/README.md); license metadata: `MIT` | Asset/catalog tooling; README mentions executable-derived information. No derived corpus imported; not a CPU/runtime shortcut. | +| `fishingpvalues/gta6-pc-port-hub` | [`3a7d8d18`](https://github.com/fishingpvalues/gta6-pc-port-hub/blob/3a7d8d18f6fdc2071f8609f35153fb07ac25d1b5/README.md); license metadata: `CC0-1.0` | Archived coordination hub. Its missing-executable snapshot is historical, not evidence of current file availability or native compatibility. | +| `holdmysocks/SixNG` | [`8897a1f6`](https://github.com/holdmysocks/SixNG/blob/8897a1f60c6700553987954f567d9146f898d882/README.md); license metadata: `GPL-3.0` | Asset exporter with explicit texture fallback limitations; fallback pixels must never become BetterXen correctness evidence. Defer format work to #260. | +| `rpatty-dev/PercyStar` | [`ca4cd4c0`](https://github.com/rpatty-dev/PercyStar/blob/ca4cd4c09bb3a4e29cc2d33e69385725c5fb2220/README.md); license metadata: `NOASSERTION` | Asset/shader/media tools with custom attribution terms. macOS tooling does not establish guest execution or GPL-compatible reuse. | +| `breadbbbb/rpf9-explorer` | [`cab9bb6e`](https://github.com/breadbbbb/rpf9-explorer/blob/cab9bb6ebe6d46fec6ac90ee5004bdd8cfd9e31a/README.md); license metadata: `unresolved` | Cross-platform asset viewer/exporter; root grant unresolved in metadata. Exclude code/assets; sample viewing is not guest execution. | +| `Ahmet-Dedeler/bcpack-rs` | [`b1c3099a`](https://github.com/Ahmet-Dedeler/bcpack-rs/blob/b1c3099a3402de8b76c9263a828791bd8bc0c930/README.md); license metadata: `NOASSERTION` | Texture codec research with reported synthetic tests; useful codec boundary, but exact tables/provenance/file licenses are unreviewed. Defer to #260. | +| `nullbrik/RageForge` | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| `woreksami/ttpf-studio` | [`a2fe110d`](https://github.com/woreksami/ttpf-studio/blob/a2fe110d8e7aeb8ed3be37c365c75078a408c089/README.md); license metadata: `MIT` | Texture/archive/video tooling. No original executable execution; no proprietary payload or replacement asset imported. | +| `walkthestars/GTA6-Asset-Info` | [`bad5bc21`](https://github.com/walkthestars/GTA6-Asset-Info/blob/bad5bc2180ade416eafdb50aa21e21eeec5adbda/README.md); license metadata: `GPL-3.0` | Asset-format notes for SixNG. Discovery only; derived samples/tables remain outside this review. | +| `Ahmet-Dedeler/awesome-gta6-reverse-engineering` | [`34a6e945`](https://github.com/Ahmet-Dedeler/awesome-gta6-reverse-engineering/blob/34a6e945b9698975ccd4e0c2e039034914dcc278/README.md); license metadata: `NOASSERTION` | Discovery index. Linked tools, code and asset claims have separate provenance and terms; no linked payloads were obtained. | +| `HolyRoses/gta6-explorer` | [`8e383a49`](https://github.com/HolyRoses/gta6-explorer/blob/8e383a49d07da5068fa30ebf208025e307018fcc/README.md); license metadata: `MIT` | Read-only package/asset inspection; not a guest runtime. No package bytes or format-derived corpus imported. | +| `meetox80/6stars` | [`480d9a4d`](https://github.com/meetox80/6stars/blob/480d9a4d00ed11560f7b4d989643723a0f5c451c/README.md); license metadata: `unresolved` | Swift/Metal world-data renderer. Native graphics demonstration is a different objective from executing original Xbox CPU/shader code. | +| `Ahmet-Dedeler/rage9-re` | [`30c6d215`](https://github.com/Ahmet-Dedeler/rage9-re/blob/30c6d2150ad9d3021802f509ff3ee232d466f499/README.md); license metadata: `NOASSERTION` | Animation/script asset-format tools, not executable compatibility. No asset samples or derived format tables imported. | +| `Albotterin/AWC_from_RPF9_Extractor` | [`decfde54`](https://github.com/Albotterin/AWC_from_RPF9_Extractor/blob/decfde54243d9a982550b08c7db21c34a20a1775/README.md); license metadata: `MIT` | Audio extraction tooling with upstream dependency/license scopes. Does not implement guest audio APIs; no extracted audio or code reuse. | +| `SentinelInteractive/0x52504639` | [`f1a383a7`](https://github.com/SentinelInteractive/0x52504639/blob/f1a383a72e90706b88d82f0ed1a674a0d7fcba58/README.md); license metadata: `MIT` | Format notes/catalogs, no execution evidence. Do not promote derived counts into console support. | +| `JoshRob297/rpf9-research` | [`144d3451`](https://github.com/JoshRob297/rpf9-research/blob/144d345191bd37de3f6bd5e85df3e8ae8815552e/README.md); license metadata: `GPL-3.0` | Container research/catalogs; protected-index/key questions are outside BetterXen scope. No derived indexes imported. | +| `Librett0/vice-lens` | [`8b8c8a84`](https://github.com/Librett0/vice-lens/blob/8b8c8a847ef926d8d6298ecfade142db19cfce5d/README.md); license metadata: `MIT` | Asset viewer/world renderer and media tooling; viewing a scene is not original-game execution. No asset/capture reuse. | +| `batatinhafcbatatinha-pixel/xseriesrecomp` | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| `sub-north/xbox-hle-lab` | [`8863028b`](https://github.com/sub-north/xbox-hle-lab/blob/8863028b486dedf660303fcd3c756b05bbbebf91/README.md); license metadata: `MIT` | Separate original probes, docs and XCL patches with different license scopes. Useful falsifiable-reproduction discipline; no patch reuse. | +| `kry-vex-gta/XBOX-Inspector` | [`0a3d067f`](https://github.com/kry-vex-gta/XBOX-Inspector/blob/0a3d067f7167a30b5e2517a4e781ec1ada3006d7/README.md); license metadata: `MIT` | Static inspection/recompilation prechecks. Metadata analysis is not guest execution; existing #211/#254 own comparable BetterXen work. | +| `nineforge0/forge9` | [`f40381ca`](https://github.com/nineforge0/forge9/blob/f40381cac62ade007a62e728eaa988fd9677bec4/README.md); license metadata: `MIT` | README advertises decryption and executable-derived key/table workflow. Excluded from implementation/input research; no such code or inputs accessed. | +| `TheoBIET/OpenVI` | [`fd415911`](https://github.com/TheoBIET/OpenVI/blob/fd4159118e750084451b9bad364169660daaa5e2/README.md); license metadata: `GPL-3.0` | Cross-platform asset explorer. macOS UI availability is not native emulation; no content or auto-update workflow executed. | + + +### Tracker candidates (30, including repeated XCL) + +| Entry | Pinned public documentation | Classification and BetterXen decision | +| --- | --- | --- | +| `edsuuu/VI-BR-PORT` | [`7a30f506`](https://github.com/edsuuu/VI-BR-PORT/blob/7a30f5063dafeda1ceab84d251c22dc581d4dfc6/README.md); license metadata: `GPL-3.0` | VIctory-family Windows/NVIDIA memory tuning; wave32 assumptions must not be transferred to Apple GPU capability claims. | +| `xcl-dev/xcl` | [`f5c5bdf0`](https://github.com/xcl-dev/xcl/blob/f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f/README.md); license metadata: `GPL-2.0` | Windows x64 direct execution plus D3D12/DXIL; host services and pipeline behavior matter. GPL-2.0-only README; no reuse clearance. | +| `ZigZagBoi1/ScarlettPort` | [`48ba23a9`](https://github.com/ZigZagBoi1/ScarlettPort/blob/48ba23a91a83121f8d0625a633e88fa463d5a0ca/README.md); license metadata: `NOASSERTION` | Windows x64/D3D12 compatibility route; no native Darwin CPU/runtime established. | +| `Steinkoloss/port-of-the-americas` | [`0f3be36a`](https://github.com/Steinkoloss/port-of-the-americas/blob/0f3be36aaefe69c25f06e05222b88453f3557acd/README.md); license metadata: `unresolved` | Linux x64/Proton/vkd3d-proton shims; README names PE-Vulkan project shader conversion. No implementation reuse. | +| `Leucodermique/VIce` | [`8c7b24fd`](https://github.com/Leucodermique/VIce/blob/8c7b24fda90eb08fe64044726b7c880065a86ee0/README.md); license metadata: `GPL-3.0` | VIctory-based Windows distribution/frontend; consolidation does not independently validate combined changes. | +| `flipflapov/DSTN` | [`7066ae66`](https://github.com/flipflapov/DSTN/blob/7066ae669c7b0e20d0b05675826169cdc7442883/README.md); license metadata: `GPL-3.0` | PE-Vulkan project fork; tool portability on macOS does not establish native guest execution. No implementation reuse. | +| `daeken/XSXEmu` | [`2d937f83`](https://github.com/daeken/XSXEmu/blob/2d937f8360fbcdac368a0e363c24df322fa24db2/README.md); license metadata: `MIT` | macOS Rust host with Rosetta guest execution and separate native Metal shader fixtures; not a fully ARM64 guest CPU path. No game frame claimed. | +| `SixLauncher/VILauncher` | [`bf2f6ca9`](https://github.com/SixLauncher/VILauncher/blob/bf2f6ca9a6445aee6ebdff2b1cef87266f9cf1f4/README.md); license metadata: `GPL-3.0` | Linux launcher selecting VIctory/XCL under Wine/Proton. Not a new guest execution or Metal implementation. | +| `4Sakens/Project-Kalaga` | [`56b41fb4`](https://github.com/4Sakens/Project-Kalaga/blob/56b41fb4a68b89e5e356c1445699ba4ac6b8cc83/README.md); license metadata: `unresolved` | Windows consolidation of existing efforts; aggregated subsystems and local paths are not independent compatibility evidence. | +| `idvwork/rebox` | [`a833078e`](https://github.com/idvwork/rebox/blob/a833078e3366a70a74edef0cbfe01b80a81dd55c/README.md); license metadata: `GPL-2.0` | WineGDK/vkd3d-proton and AnyPS5 shader lineage; incompatible runtime and no emulator adaptation permitted. | +| `Yhozen/series-web` | [`d7512b29`](https://github.com/Yhozen/series-web/blob/d7512b299fe2836e08783665308cd8c4bb924345/README.md); license metadata: `GPL-2.0` | PISCO AOT x86-to-WebAssembly/runtime research; original browser workloads differ from native ARM64/Metal and Xbox compatibility. | +| `DesignWithTommy/Neonbridge` | [`954c00c5`](https://github.com/DesignWithTommy/Neonbridge/blob/954c00c506a8616e985e94e8ea6bcbfba7f80f48/README.md); license metadata: `GPL-3.0` | Windows VIctory-family launcher/runtime; frontend and startup improvements are not CPU translation for ARM64. | +| `moonrelax/basalt` | [`8af09135`](https://github.com/moonrelax/basalt/blob/8af091350e0d5cdf89f3736a756235a72b67bea9/README.md); license metadata: `MIT` | Original interpreter/cooperative scheduler research; GPU objects are fake and no rendering is claimed. Do not reuse stubs as acceptance. | +| `ka1qux/victory-ka1qux` | [`77b8a9eb`](https://github.com/ka1qux/victory-ka1qux/blob/77b8a9eb0d29521f34ffe6061530cc873090e844/README.md); license metadata: `GPL-3.0` | VIctory-family AMD Windows rendering fork. Vendor-specific counters and claimed fixes need independent original tests. | +| `ethan00013/keylime` | [`361c7e94`](https://github.com/ethan00013/keylime/blob/361c7e94ab9d29d88cb1e5bfaadc8c3fb909bebc/README.md); license metadata: `GPL-3.0` | Windows x64 runtime with Vulkan/SPIR-V; no native Mac route. Backend and console-specific claims need independent contracts. | +| `Joaco9020/mangrove` | [`d16326c6`](https://github.com/Joaco9020/mangrove/blob/d16326c652b6f82e7b59b390f63e37cab816acd3/README.md); license metadata: `GPL-3.0` | VIctory-family Windows fork tuned for lower-VRAM NVIDIA GPUs. Settings are not portable Metal correctness work. | +| `chvabalo-interactive/sludgemu` | [`29cf795e`](https://github.com/chvabalo-interactive/sludgemu/blob/29cf795e23bb4917b9a8acd6be95d38a0f3b99b1/README.md); license metadata: `unresolved` | Windows direct guest execution and D3D12/DXIL, early startup with logging stubs. Stubs are not behavior support. | +| `larpingvibecoder/sonoma` | [`835f386a`](https://github.com/larpingvibecoder/sonoma/blob/835f386a144eca0b903b8bec63c0a003d7e07071/README.md); license metadata: `Apache-2.0` | Windows Rust runtime/direct DXIL, early proof of concept; name does not indicate macOS support. | +| `7jycwjmbfn-eng/scenegate-vi` | [`d5908947`](https://github.com/7jycwjmbfn-eng/scenegate-vi/blob/d590894710631a3c6adc6cca526c44d3c0c2bd41/README.md); license metadata: `MIT` | Windows/Vulkan startup and scene work based on PE-Vulkan project; retain only documented failure categories, not code or title-derived inputs. | +| `TaynanGT/victory-windows-anterior-20261125` | Unavailable (404); no source recovered | Unavailable public endpoint; implementation, provenance and current execution status remain unknown. | +| `TaynanGT/victory-windows` | [`cdcff8fe`](https://github.com/TaynanGT/victory-windows/blob/cdcff8fe96182bade41343a10b985c028e9e8968/README.md); license metadata: `GPL-3.0` | VIctory-family Windows work on a non-main default branch; pin the actual branch, not its name. | +| `Archivist-Atlas/gta-vi-astral` | [`ff21332e`](https://github.com/Archivist-Atlas/gta-vi-astral/blob/ff21332e5ea2ea1c254a97c0b3036d36ff8e79ce/README.md); license metadata: `unresolved` | Go Windows runtime research citing VIctory/Leonida designs; no independent ARM64/Metal execution established. | +| `airpiglabs/crouton` | [`faad29e6`](https://github.com/airpiglabs/crouton/blob/faad29e6af4c45804cfa8a42901341a52d9c824c/README.md); license metadata: `GPL-2.0` | XCL/Bathyal lineage, Windows then Wine/Proton; GPL-2.0-only and incompatible host/runtime route. | +| `natedemoss/vice-pc` | [`2f98c053`](https://github.com/natedemoss/vice-pc/blob/2f98c05325237bc8ed8faf0e7b95bc0e6d22b9bb/README.md); license metadata: `MIT` | Windows loader proof of concept; README says nothing boots. No ARM64 or Metal evidence. | +| `JoseArranzSanchez/GTA6_PCPORT_INFO` | [`585b42a1`](https://github.com/JoseArranzSanchez/GTA6_PCPORT_INFO/blob/585b42a184bf1cdf1a5f8e76e0d2e7f8a9102857/README.md); license metadata: `NOASSERTION` | Secondary feasibility report, not implementation or primary legal authority. No legal conclusions adopted from it. | +| `DBWilliamEngineering/IraRationis` | [`67106e80`](https://github.com/DBWilliamEngineering/IraRationis/blob/67106e80ef34407f545b82bbd9b2c244f304ca3c/README.md); license metadata: `GPL-3.0` | C#/.NET AOT adaptation of ztrx; Windows x64 target remains. Review mixed license scopes if ever considering unrelated tooling. | +| `Guernica4u/GTA6-PC-Port-Archive` | [`7b69fa54`](https://github.com/Guernica4u/GTA6-PC-Port-Archive/blob/7b69fa5430ae19fd013b0ba19ffbd7badf3b93e8/README.md); license metadata: `unresolved` | Archive of other projects. Metadata/README screen only; do not use it to recover unavailable or prohibited implementation/material. | +| `idvwork/6stars-gta-vi-engine` | [`26a52ba2`](https://github.com/idvwork/6stars-gta-vi-engine/blob/26a52ba2ce5504c2c94a77c15838573538da5b70/README.md); license metadata: `unresolved` | Swift/Metal asset-world renderer, same stated approach as 6stars. Rendering data is distinct from executing the original guest; license/provenance unresolved. | +| `Ybucaille/nativ64` | [`3b826108`](https://github.com/Ybucaille/nativ64/blob/3b82610882bc55cb27f0ec563c126a226855a8ea/README.md); license metadata: `Apache-2.0` | Linux x86-64 Windows-API replacement library, not CPU translation. Its host-API inventory explains native-port work hidden by Windows pass-through. | +| `sleep10dev/XPORT` | [`2baf2a0f`](https://github.com/sleep10dev/XPORT/blob/2baf2a0f7c2af9f031158e082dfc4a6bb5b8266c/README.md); license metadata: `GPL-3.0` | Windows Rust loader/HLE/partial RDNA/D3D12 research, no demonstrated game compatibility. | + + +### Explicitly supplied Mac project and tracker + +| Project | Pin | Decision | +| --- | --- | --- | +| `pragyaangaur/VIctory-macOS` | [`edba53dd`](https://github.com/pragyaangaur/VIctory-macOS/blob/edba53ddc2207e6c537679f4ce06f966b7a63a59/README.md); license metadata: `GPL-3.0` | Wine/CrossOver + Rosetta + D3DMetal guest route. Native platform unit tests are distinct from Windows-under-Wine GPU tests. | +| `4lwayz/portwatch-vi` | [`2cedf62a`](https://github.com/4lwayz/portwatch-vi/blob/2cedf62a16b63697f096763ecb99b4c10d4dbccc/README.md); license metadata: `unresolved` | Editorial discovery site and JSON data, not an emulator. Scores and live-stream summaries are not independent acceptance. | + +## Verification performed and remaining limits + +Read-only inventories ran for both the working-tree baseline and the extracted +current-main snapshot. Working-tree CPU/runtime counts were 491 forms/206 +operations and 20 typed services; current main reports 498/213 and 47. Shader +reconciliation reported zero mismatches for both. These checks inspect catalogs; +they are not CPU instruction execution, GPU tests or independent acceptance. + +Documentation checks also ran successfully on the working-tree candidate: +`python3 scripts/audit/status.py --check`, `scripts/audit/claims.sh` (22 claims), +`scripts/audit/dependencies.sh` (five graphics crates), Markdown local-file link +checks and `git diff --check`. These audit results do not verify runtime changes +present only on the separately inspected newer main snapshot. + +Research metadata and ignored raw documentation are retained locally under +`artifacts/research-portwatch/`. GitHub API reads and issue/PR state checks +establish accessibility and observed state. Python HTTPS initially failed +certificate verification; authenticated `gh api` reads succeeded without +turning off certificate checks. No dependency was installed to work around it. + +No Rust build, CPU execution suite, native GPU test, demo, fuzz, mutation or +benchmark ran for this documentation task. New acceptance must use the exact +candidate, actual native tool architecture and actual eligible hardware. +Independent reviewers have not certified this report's proposed implementations. +Nothing was committed, pushed, merged, released or installed by this review. +The GitHub research/follow-up issues were created at the user's request. diff --git a/docs/research/synthetic-integration.md b/docs/research/synthetic-integration.md index b1f0c64..cdd0e9b 100644 --- a/docs/research/synthetic-integration.md +++ b/docs/research/synthetic-integration.md @@ -11,8 +11,8 @@ in this checkout uses original fixtures and public specifications. | Project and audited snapshot | Type and observed evidence | Claimed-only behavior or provenance risk | Xenora work and original acceptance fixture | Priority and owner | | --- | --- | --- | --- | --- | | [Xenora `3133d8e`](https://github.com/ranveersoni98/Xenora/tree/3133d8e) | Native Rust guest and shader research. X1–X4 fixtures and gfx1030 compiler in tree. | GPL-3.0-or-later. Console execution unsupported. | Re-run the guest and translated compute fixtures on ARM64. | Immediate, integration | -| [Leonida `3faac55`](https://github.com/ItsNotRexed/Leonida/tree/3faac55) | Windows PE mapping, service shims and Vulkan proxy tests. | GPL-3 family and Xenora no-port rule. Commercial boot absent in audit. | Original PE startup and GPU resource contracts. | Later, CPU and Metal | -| [Project ReCity `cb4840b`](https://github.com/pixl27/ProjectReCity/tree/cb4840b) | Windows/Vulkan implementation and PE tests. | GPL-3, Leonida-derived. Separate retail proof absent. | Same synthetic startup coverage as Leonida, no parallel benchmark. | Later, CPU | +| [PE-Vulkan project `3faac55`](https://github.com/ItsNotRexed/Leonida/tree/3faac55) | Windows PE mapping, service shims and Vulkan proxy tests. | GPL-3 family and Xenora no-port rule. Commercial boot absent in audit. | Original PE startup and GPU resource contracts. | Later, CPU and Metal | +| [Project ReCity `cb4840b`](https://github.com/pixl27/ProjectReCity/tree/cb4840b) | Windows/Vulkan implementation and PE tests. | GPL-3, PE-Vulkan project-derived. Separate retail proof absent. | Same synthetic startup coverage as PE-Vulkan project, no parallel benchmark. | Later, CPU | | [Xbox2Windows `6de5738`](https://github.com/R0Y00/Xbox2Windows/tree/6de5738) | Static recompilation tests for imports, CPU startup, TLS and GPU output. See `tests/cpu/startup_exe.cpp`. | MIT at repository level. Full title startup unverified. | Build a source-authored PE guest and test exact service results. | Immediate, CPU | | [americas-recomp `9bf220e`](https://github.com/realdody/americas-recomp/tree/9bf220e) | Audited main root had a license file. | GPL-2.0. Other branches uninspected. | No fixture justified by audited tree. | Deferred, research | | [6stars `480d9a4`](https://github.com/meetox80/6stars/tree/480d9a4) | Swift/Metal renderer and sampler mapping in `Sources/SixStars`. | No verified root license. Guest CPU execution unverified. | Original translated shader, validated resource range and known readback. | Immediate, Metal | @@ -63,7 +63,7 @@ in this checkout uses original fixtures and public specifications. services, hardware queues, formats and memory initialization need their own sources and tests. [Xbox GPU evidence](../research/xbox-gpu.md) · [PE format](https://learn.microsoft.com/en-us/windows/win32/debug/pe-format) -- GTA VI startup and execution remain unsupported. No authorized retail +- Commercial-title startup and execution remain unsupported. No authorized retail executable was loaded. Actual title imports, startup ordering, resource bindings and pipeline behavior remain unverified. Relocation, thread-local storage, process and thread services, dynamic shader execution and diff --git a/docs/testing/phase-02-baseline.md b/docs/testing/phase-02-baseline.md index 7f34948..0c744c7 100644 --- a/docs/testing/phase-02-baseline.md +++ b/docs/testing/phase-02-baseline.md @@ -48,7 +48,7 @@ separate backend evidence. The [host evidence](../research/host-lab.md) records | Gate | Baseline disposition | | --- | --- | | P2-01 | Baseline captured. Phase 01 evidence and blockers are linked above. | -| P2-02 | KyTx, Leonida and eight additional projects screened. Original fixtures and public specifications are the implementation source. No emulator code, tables or metadata are in scope for adoption. | +| P2-02 | KyTx, PE-Vulkan project and eight additional projects screened. Original fixtures and public specifications are the implementation source. No emulator code, tables or metadata are in scope for adoption. | | P2-03 | VGPR-only OR verified on Apple M5. | | P2-04 | Workspace, LLVM and native GPU regression runs passed after OR integration. | | P2-05 | Independent OR expected values matched CPU execution and Metal readback. | diff --git a/docs/testing/x9-acceptance.md b/docs/testing/x9-acceptance.md index 52e07d7..9449486 100644 --- a/docs/testing/x9-acceptance.md +++ b/docs/testing/x9-acceptance.md @@ -8,7 +8,7 @@ limit. A CPU rejection pass does not certify GPU execution. | Upstream reference | Tested behavior | Xenora equivalent | Current result | Blocker | | --- | --- | --- | --- | --- | -| [Leonida compute](https://github.com/ItsNotRexed/Leonida/blob/3faac557b1584d39004357918e60325b4d4ff0fe/runtime/test/d3d12_compute_test.cpp) | Vulkan replay submits three distinct bindings and compares every readback word. Null, denied, malformed and out-of-bounds views decode to zero descriptors in separate controls. | Guest buffer view and original XOR readback. Persistent lifetime and snapshot tests extend this gate. | PASS for X8 view and readback | Xenora uses explicit faults for bad views. | +| [PE-Vulkan project compute](https://github.com/ItsNotRexed/Leonida/blob/3faac557b1584d39004357918e60325b4d4ff0fe/runtime/test/d3d12_compute_test.cpp) | Vulkan replay submits three distinct bindings and compares every readback word. Null, denied, malformed and out-of-bounds views decode to zero descriptors in separate controls. | Guest buffer view and original XOR readback. Persistent lifetime and snapshot tests extend this gate. | PASS for X8 view and readback | Xenora uses explicit faults for bad views. | | [Xbox2Windows startup](https://github.com/R0Y00/Xbox2Windows/blob/cea1d927f891007262af75e0d907fddcc511b424/tests/cpu/startup_exe.cpp) | CPU startup exercises loading two DLLs, thread notifications and wait failures. | Original named-import PE32+ startup and missing import control. DLL and thread-local storage ordering are separate gates. | UNIMPLEMENTED for DLL and thread ordering | Bounded fixed-base guest profile. | | [Xbox2Windows wave shuffle](https://github.com/R0Y00/Xbox2Windows/blob/cea1d927f891007262af75e0d907fddcc511b424/tests/wave_shuffle.cpp) | D3D12 dispatch maps output by reported wave and lane, checks affine and rotation shuffles plus mirror and uniform controls, and rejects duplicate lanes or wrong widths. Forced variants require device capability. | ARM64 CPU compiler rejects an original gfx1030 cross-lane permute with a supported compile control. Native Wave64 shuffle needs a two-wave exact oracle. | PASS for rejection. UNIMPLEMENTED for Wave64 Metal dispatch. | No cross-lane lowering or Wave64 execution contract. | | [Xbox2Windows compute services](https://github.com/R0Y00/Xbox2Windows/blob/cea1d927f891007262af75e0d907fddcc511b424/tests/cpu/shim_compute_check.py) | Checks allocation, dispatch and free observations. Independently calculates four readback words. Provider rejection must produce zero output bytes. Native hardware is selected for the explicit hardware case. | Exact guest XOR readback, invalid import commands and observable destroy/reuse. | PASS for X8 XOR and malformed commands | Persistent resources have a separate X9 gate. | @@ -57,9 +57,9 @@ data sections, and no native host pointer crosses that boundary. | Upstream reference | Tested behavior | Xenora equivalent | Current result | Blocker | | --- | --- | --- | --- | --- | -| Leonida compute and Xbox2Windows compute services | Repeat dispatch, update and release a resource with observable results | Original X9 PE repeats XOR with a nonzero view, updates words and destroys and reuses a slot. | PASS on Apple M5 | Device buffers are uploaded per completion. | -| Leonida compute | Submission bindings and lifetime are independent of later changes | X9 queues a view, changes or destroys its owner and still gets the captured output. A second queued submission is rejected. | PASS on Apple M5 for queued snapshots | Actual GPU work already in flight during release is UNIMPLEMENTED. | -| Leonida compute | Isolate guest runs and release resources at exit | X9 drops the table and any queued view at guest return. A queued-work exit returns guest status 73 and produces no GPU commands for that submission. | PASS for queued-work exit | Native Metal object residency across guest calls is UNIMPLEMENTED. | -| Leonida compute | Reject malformed resource ranges | X9 rejects invalid or stale handles, out-of-range views, offset overflow, writeback into read-only memory and invalid resource types. | PASS for guest fault controls | The guest profile exposes one bounded submission at a time. | +| PE-Vulkan project compute and Xbox2Windows compute services | Repeat dispatch, update and release a resource with observable results | Original X9 PE repeats XOR with a nonzero view, updates words and destroys and reuses a slot. | PASS on Apple M5 | Device buffers are uploaded per completion. | +| PE-Vulkan project compute | Submission bindings and lifetime are independent of later changes | X9 queues a view, changes or destroys its owner and still gets the captured output. A second queued submission is rejected. | PASS on Apple M5 for queued snapshots | Actual GPU work already in flight during release is UNIMPLEMENTED. | +| PE-Vulkan project compute | Isolate guest runs and release resources at exit | X9 drops the table and any queued view at guest return. A queued-work exit returns guest status 73 and produces no GPU commands for that submission. | PASS for queued-work exit | Native Metal object residency across guest calls is UNIMPLEMENTED. | +| PE-Vulkan project compute | Reject malformed resource ranges | X9 rejects invalid or stale handles, out-of-range views, offset overflow, writeback into read-only memory and invalid resource types. | PASS for guest fault controls | The guest profile exposes one bounded submission at a time. | | Xbox2Windows pixel attributes | GPU pixels agree with a CPU expectation | X9 renders a constant or perspective-interpolated triangle through both translated stages. The PE checks every returned pixel. A separate host oracle checks exact values and the guest report. Changing the expected red byte of one interior pixel makes the PE return 93 after the same GPU readback. | PASS on Apple M5 | Shader selection uses original fixed fixture IDs. | | bcpack-rs round trips and Xbox2Windows texture LOD | Edge data and malformed input distinguish valid subresources | X9 validates a pitched descriptor, rejects wrong usage, layer, size and update requests, and reads selected BC1 mips and layers back through Metal. | PASS on Apple M5 for selected subresource readback | Translated texture sampling and GPU texture lifetime across guest calls are UNIMPLEMENTED. | diff --git a/fixtures/rdna2/ashr.md b/fixtures/rdna2/ashr.md index c9e59e7..c7bad8b 100644 --- a/fixtures/rdna2/ashr.md +++ b/fixtures/rdna2/ashr.md @@ -6,7 +6,7 @@ identified the arithmetic shift as a candidate. Xenora uses the public and its existing pinned AMD XML generator for the VOP2 encoding. The lowering uses signed integer shift from the [Metal Shading Language Specification](https://developer.apple.com/metal/Metal-Shading-Language-Specification). -The implementation and fixture were authored in Xenora. No Leonida code, tables, +The implementation and fixture were authored in Xenora. No PE-Vulkan project code, tables, dependencies or game material were imported. The decoder accepts the VOP2 VGPR/VGPR form. The shader lifter retains the synthetic From 566f803111c878b16f723adee4418fc536bc977a Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 04:18:06 -0600 Subject: [PATCH 4/7] Remove the PR template check Delete the pr-template workflow, its checker script and tests, and the CI step that ran those tests. Update CONTRIBUTING.md and the changelog. Signed-off-by: Arths17 --- .github/workflows/ci.yml | 2 - .github/workflows/pr-template.yml | 38 ----------- CHANGELOG.md | 3 + CONTRIBUTING.md | 2 +- scripts/pr_template_check.py | 105 ------------------------------ tests/pr_template/test_check.py | 99 ---------------------------- 6 files changed, 4 insertions(+), 245 deletions(-) delete mode 100644 .github/workflows/pr-template.yml delete mode 100644 scripts/pr_template_check.py delete mode 100644 tests/pr_template/test_check.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f1b65..f392ec5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,8 +63,6 @@ jobs: run: | PYTHONPATH=scripts python3 -m unittest discover -s tests/agent_queue sh -n scripts/agent-queue.sh scripts/agent-sync.sh - - name: Test pull request template check - run: PYTHONPATH=scripts python3 -m unittest discover -s tests/pr_template - name: Test native audit JSON decoding run: python3 -m unittest discover -s tests/audit - name: Test semantic registry generator and coverage report diff --git a/.github/workflows/pr-template.yml b/.github/workflows/pr-template.yml deleted file mode 100644 index 2c32c37..0000000 --- a/.github/workflows/pr-template.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: PR template - -# Fails when a pull request description does not follow -# .github/PULL_REQUEST_TEMPLATE.md: every section present and filled in, a -# linked issue ("Closes #N" or "No linked issue: "), and the -# claimed-first and DCO checkboxes ticked. Runs again whenever the description -# is edited; comments never start it. Runs on the base branch: pull request -# code is never checked out or executed, and the description is read as data. -# -# To make it blocking, mark the "PR template / description" check as required -# in the branch protection rule for main. - -on: - pull_request_target: - types: [opened, edited, reopened, synchronize] - -permissions: {} - -jobs: - description: - runs-on: ubuntu-24.04-arm - permissions: - contents: read - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - name: Check the description against the template - run: | - set -u - status=0 - python3 scripts/pr_template_check.py --event "$GITHUB_EVENT_PATH" > "$RUNNER_TEMP/result.txt" || status=$? - cat "$RUNNER_TEMP/result.txt" - { echo '## PR template'; cat "$RUNNER_TEMP/result.txt"; } >> "$GITHUB_STEP_SUMMARY" - if [ "$status" -ne 0 ]; then - echo "::error title=PR description does not follow the template::$(tail -n +2 "$RUNNER_TEMP/result.txt" | head -n -1 | tr '\n' ' ')" - fi - exit "$status" diff --git a/CHANGELOG.md b/CHANGELOG.md index c221f8f..0cb33d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ exact revision and known limitations. Guest execution uses original, purpose-built test programs. Commercial Xbox game execution remains unsupported. +### Removed +- Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Pull request descriptions are no longer validated automatically; the template and the claim-first rule in CONTRIBUTING.md still apply to reviewers. + ### Changed - Replaced our own references to a specific commercial game title (README non-affiliation line, research and integration notes, ignored diagnostics folder names) with generic "commercial title" wording. The ignored folder names are now `diagnostics/title-candidate-*` and `diagnostics/title-check`. Third-party repository names, URLs and code-span paths in research notes are unchanged so their provenance stays accurate. Our own prose references to the upstream project formerly named in the research notes now read "PE-Vulkan project". Added the PortWatch native-macOS research notes. No behavior change. - TLS setup now copies templates from 64 KiB up to 1 MiB straight into the zeroed thread data block, after checking that every template byte is readable, instead of staging them in a second buffer (#111). The pointer array and data block layout, the TLS index write and the error for an unreadable template are unchanged, and nothing is mapped when the template cannot be read. On an Apple M2 Pro, median setup time for original synthetic templates over 31 interleaved samples fell by 21.7 % at 64 KiB, 19.0 % at 256 KiB and 14.2 % at 768 KiB. Smaller and larger templates keep the single staged read and showed no change beyond run-to-run variation. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 687f4f6..043727b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ Before incorporating third-party code, verify per-file license compatibility wit ## Pull requests - Branch from the current main branch, keep commits focused, and link relevant issues. -- Fill in every section of the pull request template, keep `Closes #` (or write `No linked issue: `), and tick the claimed-first and DCO checkboxes. The *PR template* check fails until the description does, and runs again each time you edit it. +- Fill in every section of the pull request template, keep `Closes #` (or write `No linked issue: `). Tick the claimed-first and DCO checkboxes only if they are true. - Include a clear explanation, tests and any documentation/status updates. Separate unverified work from supported behavior. - Disclose material AI assistance and personally review generated changes. AI output is not an authoritative source, test oracle or substitute for independent review. - Never include secrets, personal paths, credentials or private data in patches or logs. diff --git a/scripts/pr_template_check.py b/scripts/pr_template_check.py deleted file mode 100644 index 5f48c24..0000000 --- a/scripts/pr_template_check.py +++ /dev/null @@ -1,105 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Check that a pull request description follows .github/PULL_REQUEST_TEMPLATE.md. - -Standard library only. The description is read as data from the GitHub event -file (or a plain text file with --body-file); it is never executed. -Exit status 0 when the description passes, 1 when something is missing. -""" -import argparse -import json -import re -import sys - -SECTIONS = ( - "Summary", - "Implementation and evidence", - "Verification", - "Compatibility and limitations", - "Checklist", - "AI assistance", -) -# Checklist items that must be ticked, found by the start of their text. -REQUIRED_TICKS = ( - ("I claimed the linked issue", "the claimed-first checkbox"), - ("My commits are signed off under the DCO", "the DCO sign-off checkbox"), -) -ISSUE_LINK = re.compile(r"\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+#\d+", re.I) -NO_ISSUE = re.compile(r"^\s*No linked issue:\s*\S", re.I | re.M) -COMMENT = re.compile(r"", re.S) -EMPTY_LINK = re.compile(r"^\s*(?:close|fix|resolve)\w*\s*#\s*$", re.I) -HEADING = re.compile(r"^##\s+(.+?)\s*$", re.M) - - -def sections(body): - """Map each level-2 heading to its text, with HTML comments removed.""" - text = COMMENT.sub("", body.replace("\r\n", "\n")) - found = {} - marks = list(HEADING.finditer(text)) - for i, m in enumerate(marks): - end = marks[i + 1].start() if i + 1 < len(marks) else len(text) - found[m.group(1).strip().lower()] = text[m.end():end].strip() - return text, found - - -def has_content(name, value): - if name == "Verification": - # The empty table from the template does not count: some cell must be filled. - rows = [r for r in value.splitlines() if r.strip().startswith("|")] - filled = [r for r in rows[2:] if [c for c in r.strip().strip("|").split("|")[1:] if c.strip()]] - prose = [r for r in value.splitlines() if r.strip() and not r.strip().startswith("|")] - return bool(filled or prose) - if name == "Checklist": - return "- [" in value - # A bare "Closes #" left over from the template is not content. - rest = [l for l in value.splitlines() if l.strip() and not EMPTY_LINK.match(l)] - return bool(rest) - - -def check(body): - """Return a list of human-readable problems; empty means the body passes.""" - if not body or not body.strip(): - return ["The description is empty. Copy .github/PULL_REQUEST_TEMPLATE.md into it and fill it in."] - text, found = sections(body) - problems = [] - for name in SECTIONS: - if name.lower() not in found: - problems.append('Missing section "## %s".' % name) - elif not has_content(name, found[name.lower()]): - problems.append('Section "## %s" is empty.' % name) - if not ISSUE_LINK.search(text) and not NO_ISSUE.search(text): - problems.append('No linked issue: add "Closes #", or a line "No linked issue: ".') - checklist = found.get("checklist", "") - for prefix, label in REQUIRED_TICKS: - item = re.search(r"^\s*[-*]\s*\[( |x|X)\]\s*" + re.escape(prefix), checklist, re.M) - if not item: - problems.append("Checklist is missing %s." % label) - elif item.group(1) == " ": - problems.append("Tick %s." % label) - return problems - - -def main(argv=None): - ap = argparse.ArgumentParser(description=__doc__) - src = ap.add_mutually_exclusive_group(required=True) - src.add_argument("--event", help="GitHub event JSON file (pull_request or pull_request_target)") - src.add_argument("--body-file", help="file holding the description text") - args = ap.parse_args(argv) - if args.event: - with open(args.event, encoding="utf-8") as fh: - body = (json.load(fh).get("pull_request") or {}).get("body") or "" - else: - with open(args.body_file, encoding="utf-8") as fh: - body = fh.read() - problems = check(body) - if problems: - print("The pull request description does not follow .github/PULL_REQUEST_TEMPLATE.md:") - for p in problems: - print("- " + p) - print("Edit the description to fix this; the check runs again on every edit.") - return 1 - print("The pull request description follows the template.") - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/tests/pr_template/test_check.py b/tests/pr_template/test_check.py deleted file mode 100644 index 2094763..0000000 --- a/tests/pr_template/test_check.py +++ /dev/null @@ -1,99 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -import json -import os -import subprocess -import sys -import tempfile -import unittest - -import pr_template_check as c - -ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -TEMPLATE = open(os.path.join(ROOT, ".github", "PULL_REQUEST_TEMPLATE.md"), encoding="utf-8").read() - -GOOD = """## Summary - -Adds X. - -Closes #12 - -## Implementation and evidence - -Touches crates/texture only. - -## Verification - -| Check | Result / evidence | -| --- | --- | -| Formatting and lint | cargo fmt --check: clean | -| Unit / integration tests | cargo test -p xenora-texture: 40 passed | - -## Compatibility and limitations - -None known. - -## Checklist - -- [x] I claimed the linked issue before starting, and the claim was still mine when I opened this pull request. -- [x] I reviewed the changes and disclosed material AI assistance below, if applicable. -- [x] My commits are signed off under the DCO. - -## AI assistance - -None. -""" - - -class Check(unittest.TestCase): - def test_good_body_passes(self): - self.assertEqual(c.check(GOOD), []) - - def test_unfilled_template_fails_on_every_rule(self): - problems = c.check(TEMPLATE) - text = "\n".join(problems) - for want in ('"## Summary" is empty', '"## Implementation and evidence" is empty', - '"## Verification" is empty', '"## Compatibility and limitations" is empty', - '"## AI assistance" is empty', "No linked issue", "claimed-first", "DCO"): - self.assertIn(want, text) - - def test_empty_and_freeform_bodies_fail(self): - self.assertTrue(c.check("")) - self.assertTrue(c.check("Fixes a bug. Closes #3")) - - def test_missing_section_is_named(self): - body = GOOD.replace("## Compatibility and limitations\n\nNone known.\n", "") - self.assertEqual(c.check(body), ['Missing section "## Compatibility and limitations".']) - - def test_unticked_boxes_fail(self): - body = GOOD.replace("- [x] I claimed", "- [ ] I claimed").replace("- [x] My commits", "- [ ] My commits") - problems = c.check(body) - self.assertEqual(len(problems), 2) - self.assertIn("claimed-first", problems[0]) - self.assertIn("DCO", problems[1]) - - def test_issue_link_forms(self): - for link in ("Fixes #4", "resolves #4", "Closed #4", "No linked issue: requested by the maintainer"): - self.assertEqual(c.check(GOOD.replace("Closes #12", link)), [], link) - self.assertIn("No linked issue", "\n".join(c.check(GOOD.replace("Closes #12", "See issue 12")))) - - def test_link_inside_comment_does_not_count(self): - self.assertTrue(c.check(GOOD.replace("Closes #12", ""))) - - def test_new_claim_checkbox_wording_passes(self): - body = GOOD.replace("I claimed the linked issue before starting, and the claim was still mine when I opened this pull request.", - "I claimed the linked issue with a reply before starting, and nobody else held a live claim on it.") - self.assertEqual(c.check(body), []) - - def test_cli_exit_codes_from_event_file(self): - script = os.path.join(ROOT, "scripts", "pr_template_check.py") - with tempfile.TemporaryDirectory() as d: - for body, want in ((GOOD, 0), (TEMPLATE, 1), (None, 1)): - path = os.path.join(d, "event.json") - with open(path, "w", encoding="utf-8") as fh: - json.dump({"pull_request": {"body": body}}, fh) - run = subprocess.run([sys.executable, script, "--event", path], capture_output=True, text=True) - self.assertEqual(run.returncode, want, run.stdout) - - -if __name__ == "__main__": - unittest.main() From b71db3c25ac5420da301681843ebc75982f6fe5a Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 04:23:03 -0600 Subject: [PATCH 5/7] Remove the pull request template Delete .github/PULL_REQUEST_TEMPLATE.md and update CONTRIBUTING.md and the changelog to match. Signed-off-by: Arths17 --- .github/PULL_REQUEST_TEMPLATE.md | 40 -------------------------------- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 41623da..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,40 +0,0 @@ -## Summary - - - -Closes # - -## Implementation and evidence - - - -## Verification - - - -| Check | Result / evidence | -| --- | --- | -| Formatting and lint | | -| Unit / integration tests | | -| GPU / differential tests | | -| Fuzzing / mutation / benchmarks, if relevant | | - -## Compatibility and limitations - - - -## Checklist - -- [ ] I claimed the linked issue with a reply before starting, and nobody else held a live claim on it. -- [ ] I reviewed the changes and disclosed material AI assistance below, if applicable. -- [ ] The change preserves native ARM64 and Metal-first requirements. -- [ ] I added relevant tests or explained why they are not applicable. -- [ ] I did not report skipped or unrun tests as passing. -- [ ] I updated applicable documentation, claims and status records. -- [ ] Third-party code and fixtures have verified licenses and provenance, or none were added. -- [ ] No restricted materials, credentials or private data are included. -- [ ] My commits are signed off under the DCO. - -## AI assistance - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cb33d1..4948cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Guest execution uses original, purpose-built test programs. Commercial Xbox game remains unsupported. ### Removed -- Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Pull request descriptions are no longer validated automatically; the template and the claim-first rule in CONTRIBUTING.md still apply to reviewers. +- Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Also removed `.github/PULL_REQUEST_TEMPLATE.md`. Pull request descriptions are no longer validated or pre-filled; CONTRIBUTING.md still asks for the same information and the claim-first rule still applies. ### Changed - Replaced our own references to a specific commercial game title (README non-affiliation line, research and integration notes, ignored diagnostics folder names) with generic "commercial title" wording. The ignored folder names are now `diagnostics/title-candidate-*` and `diagnostics/title-check`. Third-party repository names, URLs and code-span paths in research notes are unchanged so their provenance stays accurate. Our own prose references to the upstream project formerly named in the research notes now read "PE-Vulkan project". Added the PortWatch native-macOS research notes. No behavior change. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 043727b..00f92ba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ Before incorporating third-party code, verify per-file license compatibility wit ## Pull requests - Branch from the current main branch, keep commits focused, and link relevant issues. -- Fill in every section of the pull request template, keep `Closes #` (or write `No linked issue: `). Tick the claimed-first and DCO checkboxes only if they are true. +- Describe what changes and why, link the issue you claimed with `Closes #`, state which checks you actually ran, and disclose material AI assistance. Separate unverified work from supported behavior. - Include a clear explanation, tests and any documentation/status updates. Separate unverified work from supported behavior. - Disclose material AI assistance and personally review generated changes. AI output is not an authoritative source, test oracle or substitute for independent review. - Never include secrets, personal paths, credentials or private data in patches or logs. From 5c0c82b3f9afc9b5e9f4d383d0a8d7215f7b8d74 Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 04:24:36 -0600 Subject: [PATCH 6/7] Add a fast repository hygiene check Add hygiene.yml and scripts/audit/docs_hygiene.py: fail on merge-conflict markers, broken relative Markdown links and invalid workflow YAML, and warn (advisory) when source changes lack a changelog entry. Signed-off-by: Arths17 --- .github/workflows/hygiene.yml | 43 +++++++++++++ CHANGELOG.md | 3 + scripts/audit/docs_hygiene.py | 114 ++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 .github/workflows/hygiene.yml create mode 100644 scripts/audit/docs_hygiene.py diff --git a/.github/workflows/hygiene.yml b/.github/workflows/hygiene.yml new file mode 100644 index 0000000..585eec3 --- /dev/null +++ b/.github/workflows/hygiene.yml @@ -0,0 +1,43 @@ +name: Repository hygiene + +# Fast checks on tracked files that need no Rust toolchain and no network: +# merge-conflict markers, broken relative Markdown links and invalid workflow +# YAML (scripts/audit/docs_hygiene.py). A second, advisory step warns when +# source or script changes arrive without a CHANGELOG.md update; it never fails. + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: hygiene-${{ github.ref }} + cancel-in-progress: true + +jobs: + hygiene: + name: Repository hygiene + runs-on: ubuntu-24.04-arm + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + fetch-depth: 0 + - name: Install PyYAML + run: python3 -c 'import yaml' 2>/dev/null || python3 -m pip install --user --break-system-packages pyyaml + - name: Check documentation and workflow files + run: python3 scripts/audit/docs_hygiene.py --require-yaml + - name: Remind about the changelog (advisory) + if: github.event_name == 'pull_request' + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + run: | + changed="$(git diff --name-only "$BASE_SHA"...HEAD || true)" + if printf '%s\n' "$changed" | grep -Eq '^(crates|scripts|shaders|fixtures)/' \ + && ! printf '%s\n' "$changed" | grep -qx 'CHANGELOG.md'; then + echo "::warning title=Changelog::Source or script files changed without a CHANGELOG.md update." + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 4948cdb..321161a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ exact revision and known limitations. Guest execution uses original, purpose-built test programs. Commercial Xbox game execution remains unsupported. +### Added +- Added a fast "Repository hygiene" check (`.github/workflows/hygiene.yml`, `scripts/audit/docs_hygiene.py`). It runs on Ubuntu without a Rust toolchain or network access and fails only on merge-conflict markers, broken relative Markdown links and invalid workflow YAML in tracked files. A separate advisory step warns, without failing, when source or script changes have no changelog entry. A local run over the 626 tracked files found no problems, and planted failures of each kind were caught; it has not yet run on GitHub. + ### Removed - Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Also removed `.github/PULL_REQUEST_TEMPLATE.md`. Pull request descriptions are no longer validated or pre-filled; CONTRIBUTING.md still asks for the same information and the claim-first rule still applies. diff --git a/scripts/audit/docs_hygiene.py b/scripts/audit/docs_hygiene.py new file mode 100644 index 0000000..e8dc127 --- /dev/null +++ b/scripts/audit/docs_hygiene.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +"""Fast, deterministic documentation and repository hygiene checks. + +Checks only tracked files: + 1. no merge-conflict markers in tracked text files; + 2. every relative Markdown link points at a tracked file or directory; + 3. every workflow file under .github/workflows parses as YAML. + +External URLs and in-page anchors are not fetched or validated, so the result +does not depend on the network. Exit status is 1 when a problem is found. Pass --require-yaml to fail, not skip, +when PyYAML is missing. +""" +import re +import subprocess +import sys +from pathlib import Path, PurePosixPath +from urllib.parse import unquote + +ROOT = Path(__file__).resolve().parents[2] +MARKER = re.compile(r"^(<{7}( |$)|={7}$|>{7}( |$))") +LINK = re.compile(r"(? Date: Wed, 25 Nov 2026 11:53:09 +0000 Subject: [PATCH 7/7] Rewrite the README around the development phases and launch target Reorganize the README around the six development phases and the first launchable application tracker, add colour-coded Mermaid diagrams and registry-derived charts, a repository overview and a contributing section, and correct the texture-sampling and recompiler wording. Signed-off-by: Claude --- CHANGELOG.md | 1 + README.md | 173 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 156 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 321161a..9b6bd8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Guest execution uses original, purpose-built test programs. Commercial Xbox game remains unsupported. ### Added +- Rewrote the README around the six development phases and the first-launchable-application target (#311), with colour-coded Mermaid diagrams (system flow, milestone roadmap, CPU, runtime-service and shader-form charts built from the generated registries), badges, a repository overview, a contributing section and corrected texture-sampling wording. The older X1–X25 capability map is kept in a collapsible section. The diagrams were not render-tested locally. - Added a fast "Repository hygiene" check (`.github/workflows/hygiene.yml`, `scripts/audit/docs_hygiene.py`). It runs on Ubuntu without a Rust toolchain or network access and fails only on merge-conflict markers, broken relative Markdown links and invalid workflow YAML in tracked files. A separate advisory step warns, without failing, when source or script changes have no changelog entry. A local run over the 626 tracked files found no problems, and planted failures of each kind were caught; it has not yet run on GitHub. ### Removed diff --git a/README.md b/README.md index 6636935..4f9796d 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,95 @@ +
+ # BetterXen -BetterXen is a community-maintained continuation. Original Git history, licenses and contributor attribution are retained. See the [project history and migration notes](docs/migration.md) for source attribution and imported issue and pull-request records. +**Experimental Xbox Series X|S emulation research, built natively for Apple Silicon.** -**Experimental Xbox Series X|S emulation research for Apple Silicon Macs.** - -BetterXen is an open-source project written primarily in Rust that builds and verifies a native, bounded execution environment on Apple Silicon: an independent x86-64 guest path, original PE32+ loading, AMD RDNA 2 shader translation, and a native Apple Metal graphics backend. +[![Native Rust checks](https://github.com/MacosPorters/betterxen/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/MacosPorters/betterxen/actions/workflows/ci.yml) +![Platform: Apple Silicon](https://img.shields.io/badge/platform-Apple%20Silicon%20(ARM64)-1f6feb?logo=apple&logoColor=white) +![Graphics: Metal](https://img.shields.io/badge/graphics-native%20Metal-8957e5) +![Language: Rust](https://img.shields.io/badge/language-Rust%201.100-dea584?logo=rust&logoColor=white) +![Status: experimental](https://img.shields.io/badge/status-experimental-d29922) +![License: GPL-3.0-or-later](https://img.shields.io/badge/license-GPL--3.0--or--later-2ea043) **No Wine. No CrossOver. No Rosetta. No Vulkan runtime.** -BetterXen is still experimental. Verified work is restricted to independently authored synthetic programs and shaders; authentic Xbox executable loading, system-service compatibility and commercial game execution remain unsupported. See the [current limitations](#current-limitations). +
+ +BetterXen is a community-maintained, open-source project written primarily in Rust. It builds and verifies a native, bounded execution environment on Apple Silicon: an independent x86-64 guest path, original PE32+ loading, AMD RDNA 2 shader translation, and a native Apple Metal graphics backend. The host runs as ARM64 code; the x86-64 code being emulated is guest data. + +> [!IMPORTANT] +> **BetterXen is experimental.** Verified work is restricted to independently authored synthetic programs and shaders. Authentic Xbox executable loading, system-service compatibility and commercial game execution are **not supported**. Progress is measured by reproducible tests, not by estimated game compatibility percentages. See the [current limitations](#current-limitations). > [!CAUTION] > **BetterXen strictly opposes piracy.** BetterXen is an independent, clean-room, general-purpose emulation research project that neither distributes copyrighted game files nor supports unauthorized content, DRM circumvention, or leaked materials. Use only legally obtained software. BetterXen is not affiliated with Microsoft or any other publisher or platform holder. -[![Native Rust checks](https://github.com/MacosPorters/betterxen/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/MacosPorters/betterxen/actions/workflows/ci.yml) +--- + +## How it fits together + +One guest program travels through three native subsystems. Every stage is checked against an independently derived expectation. + +```mermaid +%%{init: {'theme':'base','themeVariables':{'fontFamily':'system-ui, sans-serif','lineColor':'#6e7781'}}}%% +flowchart LR + A["Original PE32+
test program"]:::guest --> B["Loader
relocations, TLS, imports"]:::guest + B --> C["x86-64 interpreter
+ ARM64 translator"]:::cpu + C --> D["Typed runtime
services"]:::cpu + D --> E["Guest graphics
commands"]:::gpu + S["Original gfx1030
shader bytes"]:::shader --> T["RDNA 2 decoder
+ validated IR"]:::shader --> U["Metal Shading
Language"]:::shader + E --> M["Native Metal
pipelines"]:::gpu + U --> M + M --> G["Apple Silicon GPU
+ readback"]:::gpu + G --> V{"Matches the
independent
CPU reference?"}:::check + S -.-> R["Independent
CPU reference"]:::check -.-> V + + classDef guest fill:#ddf4ff,stroke:#0969da,color:#0a3069 + classDef cpu fill:#dafbe1,stroke:#1a7f37,color:#0f5323 + classDef shader fill:#fbefff,stroke:#8250df,color:#512a97 + classDef gpu fill:#fff8c5,stroke:#9a6700,color:#4d2d00 + classDef check fill:#ffebe9,stroke:#cf222e,color:#82071e +``` + +Legend: 🟦 guest loading · 🟩 guest CPU and services · 🟪 shader translation · 🟨 native Metal · 🟥 independent verification. --- -## What works today? +## Milestones -BetterXen has progressed from executing individual x86-64 instructions to running original PE32+ guest programs that interact with translated GPU workloads on Apple Silicon. +BetterXen's work order is the six [development phases](docs/development-phases.md), which lead to one concrete target: the **first launchable application** (tracker [#311](https://github.com/MacosPorters/betterxen/issues/311)). That target is an original C program, built with native ARM64 tools, that runs through the ARM64 translator, controls its own translated shader pipeline, and shows its Metal frame in the native app window. It is **not** a commercial or authentic Xbox title, and no date or percentage is attached to it. -The latest verified milestones include **translated gfx1030 vertex and pixel shaders executing through native Apple Metal**, the native Metal **blend pass** (`NativeCompute::render_blend`) and **indexed triangle draws** (`NativeCompute::render_indexed`) into offscreen targets, with rendered pixels compared against independently calculated reference results. +```mermaid +%%{init: {'theme':'base','themeVariables':{'fontFamily':'system-ui, sans-serif','lineColor':'#6e7781'}}}%% +flowchart LR + P1["Phase 1
Trustworthy baseline"]:::wip --> P2["Phase 2
Hosted C application"]:::wip + P2 --> P3["Phase 3
Coherent threading"]:::wip + P3 --> P4["Phase 4
Resource updates
to translated rendering"]:::wip + P4 --> P5["Phase 5
One integrated
interactive application"]:::plan + P5 --> P6["Phase 6
Measured performance"]:::plan + P2 --> L(["First launchable app
issue 311"]):::goal + P4 --> L + classDef wip fill:#fff8c5,stroke:#9a6700,color:#4d2d00 + classDef plan fill:#eaeef2,stroke:#8c959f,color:#24292f + classDef goal fill:#dafbe1,stroke:#1a7f37,color:#0f5323,stroke-width:3px +``` -### Development milestones +🟨 work under way · ⬜ not started · 🟩 the next original-workload target. Nothing here is independently accepted. + +| Phase | Goal | State | What exists now | +| --- | --- | --- | --- | +| **1 · Baseline** | Contributors can tell what exists on `main`, what is pending review, and which checks ran | 🟡 In progress | CODEOWNERS review, a fast repository hygiene check, claim-before-work rules, generated status tables and claim audits | +| **2 · Hosted C application** | An original hosted C program starts, uses the runtime, reports results and exits with checked cleanup | 🟡 In progress | CRT startup, arguments, exit handlers, formatted output, file streams and the hosted-C fixture (A2) are integrated; a stdio follow-up is still open and the result is not independently accepted | +| **3 · Threaded behavior** | A worker-based application can block and resume without stalling other guest work | 🟡 In progress | Deterministic scheduler, guest thread contexts, guarded stacks and thread services. Guest `Sleep` still delays all guest threads (#304); worker TLS and callback lifecycle is a design draft (#312) | +| **4 · Resource updates to rendering** | A guest updates a texture and geometry, submits translated rendering and gets a checked frame | 🟡 In progress | Persistent resources, descriptor-table texture binding, translated vertex and pixel stages, blend, depth and indexed draws. Guest-selected pipelines and the typed graphics bridge are open (#314–#316) | +| **5 · Integrated interactive app** | Guest execution, rendering, input, audio, filesystem and lifecycle in one session | ⚪ Planned | Swift app with frame loop, input, audio and sandboxed filesystem fixtures exists, but those demonstrations are not guest-integration evidence | +| **6 · Measured performance** | Faster execution of workloads whose correctness is already checked | ⚪ Planned | Startup, DBT and TLS measurements recorded; bottlenecks are chosen from measurements, not assumed | + +The launch milestone's proposed acceptance is **60 bounded frames containing two independently distinguishable guest-controlled states, then a clean close and one restart**. Sixty is a fixture criterion, not a measured frame rate. The work is tracked as issues [#313](https://github.com/MacosPorters/betterxen/issues/313)–[#323](https://github.com/MacosPorters/betterxen/issues/323). + +
+Capability reference: the original X1–X25 map + +The X1–X25 names are an older, broad capability map. Keep them as a reference; use the phases above for the next work order. X10–X25 are proposed engineering milestones, not completed implementations or a guaranteed sequence. | Milestone | Implementation | Status | | --- | --- | --- | @@ -36,7 +102,7 @@ The latest verified milestones include **translated gfx1030 vertex and pixel sha | X7 — Imported services | Named imports, guest-to-host service dispatch and result validation | Verified | | X8 — Translated compute | Original gfx1030 compute shaders executing on Metal, partial Wave32 handling and BC1 readback | Verified subset | | X9 — Translated graphics | Persistent resource handles, translated vertex/pixel stages and offscreen Metal rendering | Verified subset | -| X10 — Texture sampling | Translated image instructions are still planned; upload, readback and decode of BC compressed formats is implemented (see [Texture support](#texture-support)) | Planned | +| X10 — Texture sampling | One translated `image_sample_lz` pixel stage with point/clamp sampling of RGBA8 and BC1 2D textures bound through descriptor tables, locally verified on Apple M5 Pro; upload, readback and decode of BC compressed formats (see [Texture support](#texture-support)). Other image instructions and formats are not implemented | Implemented subset | | X11 — Graphics pipeline | Bounded multi-draw passes into offscreen RGBA8 targets: translated vertex and pixel stages, indexed triangle draws, colour write masks and blend state | Implemented | | X12 — Wave execution | Expand Wave32/Wave64 semantics, divergent control flow, cross-lane operations, LDS and barriers | Planned | | X13 — Advanced shaders | Mesh, geometry and additional compute shader capabilities with verified Metal execution | Planned | @@ -53,10 +119,60 @@ The latest verified milestones include **translated gfx1030 vertex and pixel sha | X24 — Gameplay and performance | Expand rendering correctness, input, audio, memory management, shader caching and execution performance | Long-term goal | | X25 — Running games | Achieve reproducible, stable execution of compatible games on native Apple Silicon macOS using Metal | Long-term goal | -**Roadmap note:** X10–X25 are proposed engineering milestones, not completed implementations or a guaranteed sequence. Follow the [BetterXen development phases](docs/development-phases.md) for the current work order and existing issue/PR dependencies. Actual priorities will change as compatibility testing reveals new blockers. Successfully completing one milestone does not guarantee that a particular game will run. +
All existing verification refers to independently authored synthetic programs and shaders. Commercial-game compatibility remains unverified. +--- + +## Repository at a glance + +Counts below come from the generated registries and were read from the repository, not measured on new runs. They describe synthetic fixtures only. + +| Area | Where | What exists today | +| --- | --- | --- | +| Guest CPU | `crates/loader` | A generated x86-64 decoder and interpreter, plus a native ARM64 dynamic binary translator (DBT) for a bounded subset. The instruction registry declares 213 operations, 403 forms and 498 opcode slots; 93 operations have at least one form lowered to ARM64 and the rest run through shared interpreter semantics. See the [instruction registry](docs/cpu/instruction-registry.md). | +| Executable loading | `crates/loader` | PE32+ loading, relocations, thread-local storage, import binding and a static inspection report. | +| Runtime services | `crates/loader`, `crates/import-gen` | A typed service registry: 47 declared services (7 implemented, 37 partial, 3 stubs), all exercised through guest dispatch, none independently accepted. See the [registry](docs/runtime/registry.md) and [generated coverage](docs/runtime/services.md). Guest threads run on a deterministic scheduler on one host thread. | +| Shader ISA | `crates/isa`, `crates/decoder`, `crates/shader`, `crates/ref` | The RDNA 2 (gfx1030) instruction snapshot lists 1,465 forms; 189 are decoder-supported, 185 are lowered to Metal Shading Language, and 18 are Metal-verified on fixtures. See the [semantic coverage](docs/shaders/semantic-coverage.md). An independent CPU reference checks GPU output. | +| Metal backend | `crates/metal` | Native compute, blend, indexed-draw, depth and sampled-texture passes, with Metal API and shader validation. | +| Textures | `crates/texture` | Upload, readback, BC1 to BC7 decoding and sampler code. | +| Application | `app`, `crates/ffi` | A Swift macOS app over a versioned C interface: frame loop, interactive input, persistent resources, audio and a sandboxed virtual filesystem, all against synthetic guests. | +| Test and tooling | `tests`, `fuzz`, `benchmarks`, `scripts` | Original guest programs, independent validation, fuzz targets (CPU decode, PE parse, instruction streams, fixtures, reference, runtime services), mutation testing, correctness-gated benchmarks, and audit scripts for claims, status tables and dependency direction. | + +The `betterxen` command-line tool provides `info`, `demo`, `inspect `, `probe --pe --mode static`, `run`, `imports` and `shaders`. Run `cargo run -p betterxen` with no arguments to see its usage. + + +### Where the numbers stand + +Counts come from the repository's generated registries at this revision. They describe synthetic fixtures only and are not compatibility percentages. + +```mermaid +%%{init: {'theme':'base','themeVariables':{'pie1':'#1a7f37','pie2':'#d0d7de','pieTitleTextSize':'16px','pieStrokeColor':'#ffffff','pieOuterStrokeColor':'#ffffff','fontFamily':'system-ui, sans-serif'}}}%% +pie showData title Guest CPU — 213 declared x86-64 operations + "Lowered to ARM64 (at least one native form)" : 93 + "Shared interpreter semantics only" : 120 +``` + +```mermaid +%%{init: {'theme':'base','themeVariables':{'pie1':'#1a7f37','pie2':'#d4a72c','pie3':'#cf222e','pieStrokeColor':'#ffffff','pieOuterStrokeColor':'#ffffff','fontFamily':'system-ui, sans-serif'}}}%% +pie showData title Runtime services — 47 declared, none independently accepted + "Implemented" : 7 + "Partial" : 37 + "Stub" : 3 +``` + +```mermaid +%%{init: {'theme':'base','themeVariables':{'xyChart':{'plotColorPalette':'#8250df'}}}}%% +xychart-beta + title "gfx1030 instruction forms by stage (1,465 identified)" + x-axis ["Decoder-supported", "Lowered to MSL", "Metal-verified"] + y-axis "Forms" 0 --> 200 + bar [189, 185, 18] +``` + +--- + ## Native graphics translation BetterXen's graphics pipeline translates a supported subset of AMD RDNA 2 instructions into Metal Shading Language. @@ -177,9 +293,9 @@ Implemented and tested functionality includes: - Edge-block and transparency tests. - Invalid descriptor and bounds rejection. -**Translated texture-sampling instructions are not yet implemented.** +**Translated texture sampling covers one instruction and one sampler mode.** A guest draw with the translated `image_sample_lz` pixel stage and a point/clamp sampler matched the software reference and hand-derived images on a local Apple M5 Pro run (one-level RGBA8 and an 8×8 BC1 texture). Other image instructions, filtering modes and formats are not implemented, and this is local verification, not independent acceptance. -The existing texture readback path uses authored Metal kernels. It should not be confused with executing arbitrary RDNA2 texture-fetch instructions. +The texture upload and readback paths use authored Metal kernels. They should not be confused with executing arbitrary RDNA2 texture-fetch instructions. Xbox-specific texture layouts and additional compression formats require further research and validation. @@ -230,13 +346,22 @@ flowchart TD L --> M K --> M end + + classDef guestNode fill:#dafbe1,stroke:#1a7f37,color:#0f5323 + classDef shaderNode fill:#fbefff,stroke:#8250df,color:#512a97 + classDef metalNode fill:#fff8c5,stroke:#9a6700,color:#4d2d00 + classDef checkNode fill:#ffebe9,stroke:#cf222e,color:#82071e + class A,B,C,D guestNode + class E,F,G,H shaderNode + class I,J,K metalNode + class L,M checkNode ``` BetterXen's host execution environment is native ARM64. The guest architecture being interpreted is x86-64. The native graphics pipeline runs translated vertex and pixel stages, the indexed-draw and blend passes and the depth pass into offscreen Metal targets, with GPU readback compared against independent CPU references. -The project does not currently provide a general-purpose x86-64 dynamic recompiler or a complete Xbox operating-system implementation. +The native ARM64 dynamic recompiler covers a bounded subset of x86-64 instructions; the rest run through the shared interpreter semantics (see the [CPU coverage map](docs/testing/cpu-coverage.md) once it lands). The project does not provide a complete Xbox operating-system implementation. See [Interface Contracts](docs/interfaces.md) for the documented execution and resource boundaries. @@ -254,8 +379,8 @@ The following remain unsupported or incomplete: | Executable loader | General relocations, TLS, DLL initialization and authentic Xbox startup | | Xbox runtime | Console-specific services, system APIs, filesystem and application lifecycle | | RDNA2 shaders | General control flow, broader instructions, Wave64, cross-lane operations and mesh stages | -| Graphics | Translated texture sampling and broader resource binding | -| Textures | Authentic Xbox memory layouts and translated sampling | +| Graphics | Broader translated texture sampling (one instruction and sampler mode exist) and broader resource binding | +| Textures | Authentic Xbox memory layouts and broader translated sampling | | Performance | Production-scale workloads, CPU/GPU profiling and optimized execution | | Game compatibility | No demonstrated execution of commercial Xbox titles | @@ -351,9 +476,21 @@ Testing distinguishes between: Compiling a shader is not equivalent to proving its GPU output is correct. +### Contributing + +Contributions are welcome, and several people and coding agents work in this repository at once. To avoid duplicated work: + +1. Read every comment on an issue and check for open pull requests that link it. +2. Claim the issue with a plain reply (for example "I'm taking this. Plan: ...") before you edit anything. The earliest live claim wins, and a claim is stale only after about seven days without a pull request. +3. Stay inside the files the issue lists, and put `Closes #` in the pull request description. +4. Sign off every commit (DCO) and use only public documentation and original code. Anyone who has seen leaked or confidential Xbox material must not contribute. +5. Update `CHANGELOG.md` for meaningful changes. Changes to `main` need maintainer review through [CODEOWNERS](.github/CODEOWNERS). + +See [CONTRIBUTING.md](CONTRIBUTING.md), [docs/legal.md](docs/legal.md) and the [documentation index](docs/README.md) for the full rules. + ### Where the work is heading -See the [roadmap table](#development-milestones) for proposed milestones, and the [changelog](CHANGELOG.md) for the current unreleased additions, such as the native blend pass, indexed draws and the depth pass. The remaining research steps are the outstanding items in [current limitations](#current-limitations). +See the [milestones](#milestones) for proposed milestones, and the [changelog](CHANGELOG.md) for the current unreleased additions, such as the native blend pass, indexed draws and the depth pass. The remaining research steps are the outstanding items in [current limitations](#current-limitations). ---