From 8cab0b1de84a67d9f7c91bf07c4df82d41607e79 Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 14:06:27 -0600 Subject: [PATCH] Describe the hybrid direction in README, CONTRIBUTING, docs index and changelog Only this task's hunks are committed; unrelated local edits to CHANGELOG.md and docs/README.md remain uncommitted. --- CONTRIBUTING.md | 6 +- README.md | 77 +++--------------------- docs/README.md | 11 +++- docs/archive/readme-native-milestones.md | 70 +++++++++++++++++++++ 4 files changed, 92 insertions(+), 72 deletions(-) create mode 100644 docs/archive/readme-native-milestones.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00f92ba..d6f0e78 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,10 @@ # Contributing to BetterXen -BetterXen is an experimental Xbox Series X|S recompilation framework for Apple Silicon. Its graphics subsystem, XenoMetal, targets native Metal execution. Contributions should improve verified behavior rather than expand untested claims. +BetterXen is hybrid-first Apple Silicon compatibility research built around an externally installed CrossOver, with a preserved but paused independent native implementation. Contributions should improve verified behavior rather than expand untested claims. + +## Which work is active + +The only active development track is the CrossOver-based hybrid architecture in [docs/roadmap.md](docs/roadmap.md). Issues labelled `track: hybrid` or `track: shared` are active; issues labelled `track: native` and `status: deferred` are preserved research and are not in the contributor queue. Do not start native work unless a maintainer reclassifies the issue because hybrid development needs it. Start with issues labelled `status: ready`. The engineering rules in `AGENTS.md` permit CrossOver, Wine-based infrastructure, Rosetta 2 and D3DMetal (subject to licensing) and allow evaluating DXMT, DXVK, VKD3D-Proton and MoltenVK. CrossOver is proprietary: do not bundle or redistribute any of it, and record the exact versions you test. Before adopting or copying any upstream code, verify its license and provenance and add it to the [upstream registry](docs/research/upstream-registry.md); projects built around leaked or unauthorized game builds are not a source of code. Use the issue templates (hybrid task, bug, research, performance, validation, documentation) and fill in the licensing and provenance section. ## Getting started diff --git a/README.md b/README.md index 4f9796d..bef4aec 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # BetterXen -**Experimental Xbox Series X|S emulation research, built natively for Apple Silicon.** +**Hybrid-first Apple Silicon compatibility research built around CrossOver, with preserved independent native ARM64 and Metal research (paused).** [![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) @@ -11,11 +11,14 @@ ![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.** +**The paused native implementation described below uses no Wine, CrossOver, Rosetta or Vulkan runtime. The active hybrid direction intends to use CrossOver and Rosetta 2, subject to research and licensing review.** + +> [!IMPORTANT] +> **Current direction.** BetterXen's only active development track is a CrossOver-based hybrid architecture: CrossOver (installed externally) as the compatibility foundation, with BetterXen providing whatever integration, configuration, diagnostics, benchmarking and optimization research shows is missing. This is the *intended* architecture, **not a verified Xbox compatibility stack**: no Xbox title has been shown to run through it, and CrossOver is not assumed to provide Xbox runtime compatibility. Work is at the research stage (Phase 1). Planning is progressive: only the current phase has open issues. The independent native implementation described below is **preserved but paused indefinitely**. See the [roadmap](docs/roadmap.md), [ADR 0005](docs/adr/0005-crossover-hybrid-direction.md), the [upstream research registry](docs/research/upstream-registry.md) and the [deferred native roadmap](docs/research/native-roadmap.md). The rewritten engineering rules are in [AGENTS.md](AGENTS.md). -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. +BetterXen is a community-maintained, open-source project written primarily in Rust. Its native research implementation (paused) 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). @@ -54,72 +57,10 @@ Legend: ๐ŸŸฆ guest loading ยท ๐ŸŸฉ guest CPU and services ยท ๐ŸŸช shader transla --- -## Milestones +## Roadmap -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 active plan is the [roadmap](docs/roadmap.md): **Phase 1 โ€” CrossOver Research, Feasibility and Baseline** is the only active phase, and later phases are provisional and will be defined from its findings. The current issues are in the [Phase 1 milestone](https://github.com/MacosPorters/betterxen/milestone/9). The native implementation's six phases and the X1 to X25 capability map are archived in [docs/archive/readme-native-milestones.md](docs/archive/readme-native-milestones.md) and the [native-first plan](docs/archive/development-phases-native-first.md). Native work is paused indefinitely and resumes only after an explicit maintainer decision. -```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 -``` - -๐ŸŸจ 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 | -| --- | --- | --- | -| 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 | 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 | -| 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 | - -
All existing verification refers to independently authored synthetic programs and shaders. Commercial-game compatibility remains unverified. @@ -490,7 +431,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md), [docs/legal.md](docs/legal.md) and the [ ### Where the work is heading -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). +See the [roadmap](docs/roadmap.md) for the current phase and the [changelog](CHANGELOG.md) for unreleased additions. The paused native implementation's open research items are listed under [current limitations](#current-limitations). --- diff --git a/docs/README.md b/docs/README.md index 66d5eea..befd4b2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,9 +8,14 @@ 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. +Use the [roadmap](roadmap.md) for the active CrossOver-based hybrid plan, phases, +critical path and completion criteria; see [ADR 0005](adr/0005-crossover-hybrid-direction.md) +for the decision and [project board setup](planning/project-board.md). Native work is +paused: [deferred native roadmap](research/native-roadmap.md) and the archived +[native-first plan](archive/development-phases-native-first.md) with +[retired milestones](archive/native-first-milestones.json). Research inputs: the [upstream research registry](research/upstream-registry.md) and +[component reuse matrix](research/component-reuse-matrix.md). Historical phase +checkpoints retain their original evidence scope. ## Architecture and technical design diff --git a/docs/archive/readme-native-milestones.md b/docs/archive/readme-native-milestones.md new file mode 100644 index 0000000..b5c67aa --- /dev/null +++ b/docs/archive/readme-native-milestones.md @@ -0,0 +1,70 @@ +# Native-first README milestones (archived) + +**Archived 2026-11-25; paused native research, not the active plan.** This section was the README's "Milestones" content on `main` when BetterXen moved to the CrossOver-based hybrid direction. Statuses describe the native implementation only, with synthetic evidence. The active plan is the [roadmap](../roadmap.md). Links below were written for the repository root README and may need adjusting. + +## Native-first milestones + +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. + +```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 +``` + +๐ŸŸจ 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 | +| --- | --- | --- | +| 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 | 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 | +| 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 | + +
\ No newline at end of file