Files
EonaCat.XSBox/README.md
T
EonaCat 53e6e612c9
Rust validation / Windows x64 build and tests (push) Waiting to run
Rust validation / Formatting (push) Failing after 26s
EonaCat/ci-workflows: SonarQube / sonar (push) Successful in 47s
Initial
2026-12-04 21:27:30 +01:00

376 lines
22 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# EonaCat XS
**EonaCat XS** (workspace/package name: `EonaCat.XSBOX`) is a Windows-first host/runtime for the Xbox title implementation included in this repository. It provides a Windows launcher and a Rust runtime with a Direct3D 12 graphics backend. The codebase includes title/package handling, console-facing compatibility services, shader and pipeline translation, GPU resource management, input/audio integration, and performance/diagnostic tooling.
> **Important:** This is an experimental compatibility project, not an official Microsoft, Xbox, Rockstar Games, NVIDIA, AMD, or Intel product. Compatibility depends on the title build, game data, Windows version, GPU, driver, runtime components, and the current state of the implementation. A successful launch does not guarantee that every scene, feature, or save operation works correctly. Use only game data that you are legally entitled to use.
## Contents
- [What is included](#what-is-included)
- [Latest performance profile](#latest-performance-profile)
- [What unlimited FPS means](#what-unlimited-fps-means)
- [Frame generation](#frame-generation)
- [Requirements](#requirements)
- [Build from source](#build-from-source)
- [First launch](#first-launch)
- [Launcher overview](#launcher-overview)
- [Graphics and performance tuning](#graphics-and-performance-tuning)
- [Shader preparation and cache](#shader-preparation-and-cache)
- [Command-line tools](#command-line-tools)
- [Configuration and data locations](#configuration-and-data-locations)
- [Troubleshooting](#troubleshooting)
- [Project structure](#project-structure)
- [Development and validation](#development-and-validation)
- [License](#license)
![alt text](image.png)
![alt text](image-1.png)
## What is included
The repository is organized as a Rust workspace plus a separate Windows launcher:
| Component | Purpose |
|---|---|
| `crates/engine` | Runtime entry point, process hosting, command-line interface, title execution flow, and console compatibility services |
| `crates/graphics` | Direct3D 12/DXGI integration, GPU resources, descriptors, shaders, pipelines, memory/residency, frame scheduling, and presentation |
| `crates/game` | Title-specific metadata, package/container handling, build identities, and compatibility hooks |
| `launcher/windows` | Windows Forms launcher, game library, settings UI, launch workflow, and engine output log |
| `assets` | Application icon and artwork |
| `bindings.ini` | Default keyboard/mouse binding definitions |
| `.github/workflows` | Windows CI workflow definitions |
The Rust engine executable is named `eonacat-xsbox.exe`. The Windows launcher is published as `EonaCat.XSBOX.Launcher.exe` in the `launcher` subfolder beside the engine's profile output.
## Latest performance profile
This source package applies a shared CPU-submission optimisation baseline to **every in-game graphics preset** and the launcher profile. Every preset also explicitly turns Frame Generation OFF, preserving your earlier preference. The **LOW CPU (UNLIMITED / NO FRAME-GEN)** preset remains the most aggressive image-quality/performance starting point, but switching to FPS, Ultra Performance, Low, Medium, High, Very High, or Max no longer drops the command-submission optimisations or silently re-enables generated frames.
The LOW CPU preset selects these image/rendering values; the shared CPU-submission optimisations and Frame Generation OFF apply to all presets:
| Setting | Preset value | Meaning |
|---|---:|---|
| Console target | Series S | Uses the Series S configuration path exposed by the menu |
| Output resolution | 2560 × 1440 | Display/output target |
| Internal game resolution | 960 × 540 | Lower internal rendering resolution |
| Upscaling | DLSS Performance | Requests the Performance upscaling mode |
| Ray tracing | Off | Disables the menu's RT option |
| Frame-rate cap | None (`1000` menu value) | Removes the artificial frame pacing cap |
| Frame generation | Off (`0`) | Explicitly disables frame generation, including automatic enablement based on detected capability |
Every preset now applies these resolution-independent command-submission optimizations:
- Batch-checks large groups of resource refreshes rather than repeatedly checking each range against the write journal.
- Processes refresh work in larger helper-thread chunks to reduce scheduling overhead.
- Drops immediately repeated, byte-identical D3D12 state-setting calls before translating the list.
- Joins up to 16 queue parts when preparing host submissions, reducing repeated per-submission setup.
These changes target CPU-side work; they do not depend on whether the selected output is 720p, 1080p, 1440p, or 4K. They are intended to reduce the CPU bottleneck, not guarantee that it disappears on every scene or machine. GPU rendering, game-side CPU work, driver overhead, and memory bandwidth can still become limiting.
To use it:
1. Start EonaCat XS and select the game you want to launch.
2. Open the in-game graphics/settings menu.
3. Choose the preset that matches your image-quality preference. All presets now retain the shared CPU-submission optimisations; choose **LOW CPU (UNLIMITED / NO FRAME-GEN)** for the lowest internal resolution, uncapped frame pacing and explicit Frame Generation OFF.
4. Save/apply the settings if the menu offers that action, then restart the title if prompted or required for the selected options to take effect.
5. Confirm the displayed settings after restart. If you have a custom profile or external environment variables, check that they are not overriding the menu values.
The preset is a starting point, not a promise of a particular frame rate or image quality. You can change individual settings afterward; doing so may make the active configuration differ from the preset described here.
## What unlimited FPS means
“Unlimited” means EonaCat XS does not intentionally wait to enforce a target such as 30, 60, or 120 frames per second. Internally, the menu's `NONE` value is represented by `1000`; the runtime translates that special value into a **zero-millisecond frame interval** and removes the old microsecond interval override.
It does **not** mean that the game will reach 1000 FPS, or that the frame rate will be stable. Actual performance is limited by the slowest part of the workload, including:
- CPU execution and translation of title instructions;
- API/command submission and synchronization;
- GPU rendering and memory bandwidth;
- shader and pipeline compilation;
- asset streaming, decompression, and storage speed;
- driver and operating-system scheduling.
An uncapped renderer can also increase CPU/GPU utilization, power draw, heat, and fan noise. If you prefer lower temperatures or more consistent frame pacing, select a finite cap such as 60 or 120 instead.
## Frame generation
The LOW CPU preset stores frame generation as `0` (OFF). The runtime treats an explicit saved menu value of `0` as a hard OFF state. It also explicitly sets `EONACAT_XS_FRAMEGEN_X=0` and removes the DLSS/FSR frame-generation enable switches. This is important because the graphics backend otherwise defaults an unspecified multiplier to 2×; title depth/motion-vector submissions could then turn generation back on later in the run.
Frame generation is separate from the base rendering frame rate. Disabling it means the displayed frame rate will no longer include generated intermediate frames. This can make the displayed FPS number lower than a configuration that uses 2×/3×/4× generation, even when the underlying rendered-frame performance is unchanged.
If you want to re-enable it, use the Frame Generation setting in the menu and choose a supported multiplier. Availability depends on the installed runtime, GPU, driver, and the implementation's current support. The preset's OFF value takes precedence until you change it.
## Requirements
### To run
- Windows 10 or Windows 11, 64-bit.
- A Direct3D 12-capable GPU and a current compatible graphics driver.
- The required game/title files in a supported layout.
- Any optional graphics runtime required by the selected upscaler/frame-generation path. The launcher includes actions for NVIDIA, AMD FSR, and D3D12 runtime setup; use only the runtime appropriate for your hardware and configuration.
### To build from source
- Rust stable with the `x86_64-pc-windows-msvc` target; the workspace declares Rust 1.89 or newer.
- Visual Studio 2022 Build Tools with **Desktop development with C++** and a Windows SDK.
- .NET 8 SDK to publish the Windows launcher.
- .NET 8 Desktop Runtime to run the framework-dependent launcher.
- Cargo dependencies available locally or network access for the first dependency resolution.
- A Visual Studio Developer Command Prompt so `cl.exe` and the MSVC linker are available on `PATH`.
## Build from source
Open a **Visual Studio Developer Command Prompt** in the repository root and run:
```bat
build.bat release
```
Supported build profiles:
```bat
build.bat release
build.bat fast
build.bat diag
```
- `release` — optimized release build; the default.
- `fast` — quicker incremental build profile for development.
- `diag` — release-derived diagnostic build with the `diagnostics` feature enabled.
The script builds the Windows x64 Rust engine and then publishes the .NET launcher. Expected output locations:
```text
target\x86_64-pc-windows-msvc\release\eonacat-xsbox.exe
target\x86_64-pc-windows-msvc\release\launcher\EonaCat.XSBOX.Launcher.exe
```
For the `fast` and `diag` profiles, replace `release` in the paths with the selected profile name. The launcher is published as framework-dependent and therefore requires the .NET 8 Desktop Runtime on the target PC.
You can also build the engine directly:
```powershell
rustup target add x86_64-pc-windows-msvc
cargo build --target x86_64-pc-windows-msvc --profile release -p eonacat-xsbox-engine
```
Show the engine's command-line help:
```powershell
.\target\x86_64-pc-windows-msvc\release\eonacat-xsbox.exe --help
```
## First launch
1. Build the project or obtain a build from a trusted source.
2. Keep the launcher in the published `launcher` folder next to the engine executable in the profile output directory. The launcher locates the engine relative to its own location.
3. Start `EonaCat.XSBOX.Launcher.exe`.
4. Use **Scan for Xbox games** or **Add game folder…** to locate the game files. You can also browse directly to the executable when supported by the launcher.
5. Select the detected game entry and review the graphics and runtime settings.
6. Use **Save settings** before launching if you changed options.
7. Select **Launch game** and monitor the **Installer log** tab for engine output and errors.
The launcher can also run the shader-preparation workflow before gameplay. The first preparation may take several minutes; completed work is cached for later launches.
## Launcher overview
The Windows launcher provides:
- A game library with automatic scanning and manual folder selection.
- A selected-game view and launch action.
- Graphics, display/statistics, frame-generation, texture/streaming, memory, controls, and advanced settings pages.
- A quick profile action labelled **RTX 4090 - UW**. This is a preset/profile starting point; review it for your own GPU and display before applying it.
- Save-settings and launch controls.
- Actions to install/check NVIDIA, AMD FSR, and D3D12 runtime components.
- Shader and pipeline preparation tools, cache maintenance, and an engine output log.
Some settings require a restart to take effect. Runtime availability and the settings actually honored depend on the installed driver and hardware. Do not assume that selecting an option guarantees that the relevant vendor runtime or feature is present.
## Graphics and performance tuning
For a useful baseline, change one setting at a time and compare the same repeatable scene. Record both base FPS and frame time, along with CPU and GPU utilization. Generated frames should be considered separately from rendered frames.
General guidance:
- Lower internal resolution can reduce GPU work, but may make the image softer or expose aliasing/shimmering.
- DLSS modes require the appropriate NVIDIA runtime and supported hardware. If unavailable, use a supported alternative or turn upscaling off.
- Ray tracing can be expensive and is disabled in the LOW CPU preset.
- Unlimited FPS removes the cap, not the underlying CPU/GPU bottleneck.
- All presets enable batched refresh checks, larger refresh-worker chunks, duplicate state-call coalescing, and more queue-part joining. These are command-processing optimizations and remain active regardless of output resolution or selected quality preset.
- More shader/pipeline worker threads may improve preparation throughput but can increase CPU contention and memory use during gameplay.
- Avoid changing several advanced memory, synchronization, or experimental options at once; it makes regressions difficult to isolate.
The runtime has conservative worker defaults. Runtime pipeline compilation defaults to a bounded number of workers based on logical processor count (and host-memory conditions). Offline shader translation and cache warming also use bounded worker counts. Relevant overrides documented in the source include:
```powershell
$env:EONACAT_XS_PIPELINE_WORKERS = "2"
$env:EONACAT_XS_CPU_THREADS = "2"
```
These are examples, not universal recommendations. Remove the environment variables to return to the runtime's automatic defaults.
## Shader preparation and cache
Shader translation and pipeline creation can cause stutter the first time a scene or effect is encountered. The launcher exposes preparation and cache-maintenance actions to reduce some first-use work.
- **Preload/warm:** translates or prepares shader/pipeline data ahead of gameplay where supported. It can take several minutes and uses CPU time and memory.
- **Clear shader cache:** use only after a translator/driver change or when corruption is suspected. Clearing the cache can make the next launch slower because work must be repeated. Game saves and ordinary game settings are not intended to be removed by this action.
- Keep the cache between normal launches; it is intended to make subsequent runs smoother.
The exact amount of stutter reduction varies by title build, driver, scene, and cache state. Preloading cannot guarantee that every runtime shader or pipeline will be ready in advance.
## Command-line tools
The engine uses subcommands. The exact options available in a particular build are shown by `eonacat-xsbox.exe --help` and by each subcommand's `--help` output.
The source currently defines these main command families:
| Command | Purpose |
|---|---|
| `inspect` | Inspect an executable or binary file; optional import/export details |
| `census` | Scan supplied paths and report discovered/missing items |
| `lib-exports` | Inspect/list exports from a library |
| `shader-info` | Inspect shader-related files; optional verbose/disassembly output |
| `translate` | Translate shader-related input, optionally validate/list/warm pipelines, and set job count |
| `shaders` | Run shader processing for supplied paths |
| `warm` | Windows shader/pipeline cache warming operations |
| `preload` | Windows preload workflow for supplied paths or selected cache scope |
| `clear-shaders` | Windows shader-cache maintenance |
| `play` | Windows title launch workflow |
| `get-dlss`, `get-fsr`, `get-d3d12` | Runtime setup/check actions used by the launcher |
| `pads` | Input/controller diagnostic command |
| `run` | Run a supplied executable using the compatibility host |
| `config` | Print configuration information |
| `upscaler-check` | Windows upscaler/presentation/frame-generation diagnostics |
Example help commands:
```powershell
.\eonacat-xsbox.exe play --help
.\eonacat-xsbox.exe translate --help
.\eonacat-xsbox.exe upscaler-check --help
```
Use the launcher for normal game selection and settings unless you specifically need a command-line workflow. Do not copy command-line switches from another build without checking that build's `--help` output.
## Configuration and data locations
The launcher reports that settings, shaders, caches, and game data are stored under:
```text
%LOCALAPPDATA%\EonaCat\XS
```
The engine's in-game menu settings file is selected through `EONACAT_XS_MENU_FILE`; when that variable is not set, the menu can use `EONACAT_XS_HOME` and the `eonacat-xs-settings.txt` file under that home directory. The launcher separately stores its game-library and selected-game metadata in its application data location.
If you use custom environment variables, batch files, or a third-party launcher, remember that they can affect the final runtime configuration. In particular, stale values can override menu selections if a setting is explicitly read by the runtime. When troubleshooting, temporarily remove custom `EONACAT_XS_*` overrides and test with the saved menu profile only.
## Troubleshooting
### The game opens to a black screen
1. Confirm that the selected game folder and executable belong to a title/build supported by this source version.
2. Check the **Installer log** and the engine's console output for the first error, not only the final black-screen symptom.
3. Temporarily use a conservative profile: Series S, lower internal resolution, ray tracing off, and frame generation off.
4. Confirm that the Direct3D 12-capable GPU driver is current and that the required runtime components are installed.
5. If the launcher or an external script sets `EONACAT_XS_*` variables, remove custom overrides for one test run.
6. Keep the log from a repeatable launch attempt so the failure stage can be compared.
A visible presentation test or a successful device/present check does not by itself prove that the game rendered a valid frame. A black screen can still originate earlier in title execution, resource loading, shader translation, or the graphics pipeline.
### The frame rate is unexpectedly capped
- Confirm that the active preset is **LOW CPU (UNLIMITED / NO FRAME-GEN)** or that **FRAME RATE CAP** is set to **NONE**.
- Check that the saved settings are loaded after restart and that no external `EONACAT_XS_FRAME_INTERVAL_*` value is overriding them.
- The `NONE` setting removes the artificial pacing wait; it does not remove synchronization imposed by the display, driver, or game itself.
### Frame generation turns itself back on
- Set **FRAME GENERATION** to **OFF** and save the menu settings.
- Restart the title if needed.
- The current source explicitly treats a saved menu value of `0` as a hard OFF state. If it still appears enabled, verify that the updated executable was built and that the expected settings file is being read.
### First launch is slow or stutters
- Allow shader and pipeline preparation to finish.
- Keep the shader cache between launches.
- Avoid clearing caches unless there is a specific reason.
- Check CPU and memory pressure while shader compilation is running.
### Launcher cannot find the engine
- Keep `EonaCat.XSBOX.Launcher.exe` in the `launcher` folder produced by `build.bat`.
- Keep `eonacat-xsbox.exe` in the parent profile output folder.
- Re-run `build.bat` if the expected engine executable was not produced.
### Runtime setup fails
- Check the launcher log for the exact failed action and exit code.
- Install only the runtime appropriate for your GPU and selected feature.
- Restart the launcher/game after installing or changing graphics runtime components.
## Project structure
```text
.
├── .github/workflows/ CI workflows
├── assets/ Icons and artwork
├── crates/
│ ├── engine/ Runtime, CLI, title launch, compatibility services
│ ├── game/ Title metadata and package handling
│ └── graphics/ D3D12/DXGI, shaders, pipelines, GPU memory/presentation
├── docs/ Engineering and performance notes
├── launcher/windows/ Windows Forms launcher source
├── scripts/ Benchmarks and engineering utilities
├── settings/ Example graphics settings/profiles
├── bindings.ini Default input bindings
├── Cargo.toml Rust workspace definition
├── Cargo.lock Locked Rust dependency versions
└── build.bat Windows build entry point
```
Some optional folders may not be present in every source archive or branch. The Rust workspace is defined by the members listed in the root `Cargo.toml`.
## Development and validation
Useful checks from a Windows Developer Command Prompt:
```powershell
cargo fmt --all -- --check
cargo check --workspace --target x86_64-pc-windows-msvc
cargo test --workspace --target x86_64-pc-windows-msvc
cargo clippy --workspace --all-targets --target x86_64-pc-windows-msvc
```
The repository also contains a Windows CI workflow and a graphics hot-path benchmark script when present in the checkout. Benchmarks of individual CPU routines are not substitutes for full-game CPU/GPU profiling.
For performance investigations, capture:
- Base/rendered FPS and frame time;
- CPU utilization and per-core load;
- GPU utilization, GPU frame time, and VRAM use;
- RAM/commit use;
- shader/pipeline compilation activity;
- the exact title build, settings profile, driver version, and log.
Change one variable at a time and compare the same repeatable scene. Avoid interpreting frame-generation output as the base rendering rate.
## License
The root `Cargo.toml` declares `GPL-3.0-or-later`. The archive may not include a root `LICENSE` file, so verify that the corresponding license text and any required third-party notices are included before redistribution. Do not assume that the game files, firmware, vendor runtimes, or other separately supplied assets are covered by this repository's license.
---
**Project:** EonaCat XS / EonaCat.XSBOX
**Engine executable:** `eonacat-xsbox.exe`
**Windows launcher:** `EonaCat.XSBOX.Launcher.exe`
## In-game menu and overlays (F9 / F10 / F11)
- **F9** opens the branded EonaCat XS control center. The **PAGE** selector is the first row at the top; **PRESETS** is immediately below it.
- The EonaCat logo is rendered in the F9 menu, F10 performance advisor and F11 statistics panel.
- **F10** toggles the performance advisor. It is **off by default**, including on the first launch of a new build. It starts enabled only when the launcher explicitly saves `EONACAT_XS_ADVISOR=1`.
- **F11** toggles the statistics panel. Its default remains controlled by `EONACAT_XS_PANEL`.