Files
larp/README.md

133 lines
12 KiB
Markdown
Raw Permalink 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.

# larp (Community Enhanced Fork)
A modified version of [VIctory](https://github.com/Marvisak/VIctory), a
compatibility layer that runs an Xbox Series title natively on Windows from
files the user supplies.
**This repository contains no game files, code or assets.** You need your own
copy of the game. It is not affiliated with or endorsed by the game's
developer or publisher.
> **Community & Backup Channel (Fluxer):** Join **[https://fluxer.gg/AIsq2bg7](https://fluxer.gg/AIsq2bg7)** for release announcements, AMD/Linux testing, troubleshooting, and backup updates.
>
> **Codeberg Mirror (backup if GitHub is unavailable):** **[https://codeberg.org/gamingwithhomie/larp](https://codeberg.org/gamingwithhomie/larp)** — same code, branches, tags, and release ZIPs (`larp-v1.0.11-windows-nvidia.zip`, `larp-v1.0.11-linux-proton.zip`, `larp-v1.0.11-windows-amd.zip`).
---
## Documentation Hub
| Guide | What It Covers |
|---|---|
| **[Releases — Which One Do I Download?](docs/releases.md)** | Stable vs AMD channels, FULL vs UPDATE zips, updating without recompiling shaders, verifying SHA-256 |
| **[Setup, Quick Start & Save Migration](docs/setup-and-quickstart.md)** | Required `Larp\` folder structure, `nv-profile`, VRAM presets (`series-s` vs `series-x`), laptop iGPU fix, save transfers, AmericasLauncher |
| **[Troubleshooting, Exit Codes & Crash Offsets](docs/troubleshooting-and-crashes.md)** | Instant fixes for `-2005270523`, `-1073741819` (AMD), `-1073740791` (`WaterTarget`), `-2147483645` (`+0x3e42541`, `+0x247af2d`, etc.) |
| **[Controls, Mouse & Keyboard, DualSense & Mods](docs/controls-and-input.md)** | Raw Input mouse capture, default PC GTA keys, custom [`controls.example.ini`](docs/controls.example.ini), native DualSense USB/BT, `mods\` loader |
| **[Community FAQ (Q&A)](docs/faq.md)** | Why RAM/FPS is better (UMA), Ray Tracing & resolution defaults, 5–10 min 8 GB crash fix, Profile Inspector `victory.exe` mistake, building from source |
| **[CLI & Environment Variables Reference](docs/environment-variables.md)** | Every `larp.exe` command and `LARP_*` environment switch |
---
## Original Stock Source vs. Enhanced Fork
Both the **untouched original `larp` release (`1c2a608`)** and our **Community Enhanced Fork** are preserved in this repository:
| Version | Branch / Release | Direct Source ZIP |
|---|---|---|
| **Enhanced Fork (Recommended)** | [`main`](https://github.com/gamingwithhomie/larp/tree/main) / [**Latest Release**](https://github.com/gamingwithhomie/larp/releases/latest) | [Download Enhanced Source (.zip)](https://github.com/gamingwithhomie/larp/archive/refs/heads/main.zip) |
| **Original Stock `larp` (`1c2a608`)** | [`stock-original`](https://github.com/gamingwithhomie/larp/tree/stock-original) branch / `v1c2a608-stock-original` git tag (archive — not on the Releases page) | [Download Stock Source (.zip)](https://github.com/gamingwithhomie/larp/archive/refs/tags/v1c2a608-stock-original.zip) |
---
## 5-Step Quick Start
> **Easiest (v1.1.0+):** Download the **FULL** zip from [**Releases**](https://github.com/gamingwithhomie/larp/releases/latest) (`larp-v1.1.0-windows-nvidia-FULL.zip`) — it is the complete ready-to-run `Larp\` folder (`configure.cmd`, `series-s.cmd`, `series-x.cmd`, `bin\larp.exe`, `bin\dlss\`, `bin\fsr\`, `bin\D3D12\`, `bin\shader-replace\`). No separate base/CNF package needed. Extract it, run `configure.cmd` once (point it at your own game folder), then `series-x.cmd` / `series-s.cmd`. The smaller **UPDATE** zip is only for people who already have a working `Larp\` folder (it replaces `bin\larp.exe`).
1. **Extract the FULL release zip** (or, if updating, extract the UPDATE zip over your existing `Larp\` folder).
2. **Run `configure.cmd`** and select your unpacked game folder (containing `game_scarlett_master.exe` and `.rpf` files).
3. **NVIDIA GPUs — Set Shader Heap once** (open **Windows PowerShell as Administrator** and paste one line):
```powershell
& "C:\path\to\Larp\bin\larp.exe" nv-profile --mb 2048
```
*(Use `--mb 1024` for 8 GB VRAM cards; no NVIDIA Profile Inspector needed!)*
4. **Laptops / CPUs with Integrated Graphics:** Go to **Windows Settings > System > Display > Graphics**, add `Larp\bin\larp.exe`, and set it to **High Performance** (your dedicated GPU).
5. **Launch via `series-s.cmd`** (recommended for 8–12 GB VRAM) or **`series-x.cmd`** (16 GB+ VRAM). **Wait for the shader compilation counter at the top of the window to reach 100%** — keyboard, mouse, and controller input are intentionally held until compilation finishes!
---
## Fast Self-Diagnosis (Most Common Issues)
*(Full details and register/offset tables in **[docs/troubleshooting-and-crashes.md](docs/troubleshooting-and-crashes.md)**.)*
| Symptom / Error | Cause & Fix |
|---|---|
| **`exit -2005270523`** (`0x887A0005` after loading screen) | **GPU Device Removed.** On NVIDIA, run `& "C:\path\to\Larp\bin\larp.exe" nv-profile --mb 2048` (or `1024`) from **Admin PowerShell**. On 8–12 GB cards, use `series-s.cmd` and set `stream_budget = 2500` in `options.ini`. |
| **`exit -1073741819`** (`0xC0000005` on **AMD RX 9060 XT / 9070 / 9070 XT**) | **AMD `amdxc64` shader compiler crash.** Replace `Larp\bin\larp.exe` with [**v2+**](https://github.com/gamingwithhomie/larp/releases/latest) AND **delete the entire `Larp\cache` folder** before launching so broken cached DXIL is rebuilt. |
| **`exit -1073740791`** (`WaterTarget: no host copy`) | **Wrong GPU or out of VRAM.** Force `Larp\bin\larp.exe` to **High Performance** in Windows Graphics Settings (fixes laptops/iGPUs), launch `series-s.cmd`, and set `stream_budget = 2000` in `options.ini`. |
| **`exit -2147483645`** (`+0x3e42541` in `crashes.log` after title screen) | **Missing texture DB file.** Verify `<game_dir>\data\ttdb\graphics\ttdb_graphics.ttpf` (`34,411,776` bytes) exists — incomplete game dumps sometimes omit the `graphics\` subfolder. |
| **`exit -2147483645`** (`+0x247af2d` at `System Init`, Frame 0) | **Custom output resolution assert.** **Fixed in [v4+](https://github.com/gamingwithhomie/larp/releases/latest)** (`2560x1440`, `1920x1080`, `1664x936`, `1280x720` now launch cleanly via legacy UI layout + 2 MiB-aligned UI pool sizing). On older builds, delete `resolution = ...` from `settings.ini`. |
| **`Error: no replacement shaders: none of these folders exists`** | You ran `larp.exe` outside the full Larp package. Place `larp.exe` inside **`Larp\bin\`** next to `shader-replace\`, `dlss\`, and `fsr\`, and launch via `series-s.cmd` / `series-x.cmd`. |
| **Keyboard / Mouse / Controller doesn't respond at startup** | Wait for the pipeline compilation bar at the top of the screen to finish! For DualSense/controllers, also **close Steam and DS4Windows** so they don't hijack the controller. |
| **Where is `controls.ini`? / How to transfer Darner saves?** | `controls.ini` is optional — copy [`docs/controls.example.ini`](docs/controls.example.ini) to `Larp\controls.ini` to customize keys. For saves, copy **both** `saves\` and `storage\` into `Larp\data\7952987A\` ([guide](docs/setup-and-quickstart.md#4-migrating-game-saves-darner--victory--foxhound--larp)). |
| **Missing voice audio on phone calls** | **Fixed in [v5+](https://github.com/gamingwithhomie/larp/releases/latest)** — ported `DECODE_CONVERT_OPUS` + `CONVERT_PCM` sample-rate conversion (`xapu.dll`) and XMA2 overlap carry/resume (`acphal.dll`). Update `Larp\bin\larp.exe` to the latest release. |
---
## Reporting Bugs (`larp zip-logs`)
If you hit an issue not covered above, generate a sanitized log archive (your **Windows username is automatically stripped**):
```powershell
& "C:\path\to\Larp\bin\larp.exe" zip-logs
```
Attach the generated `Larp\logs\larp-logs-*.zip` along with your GPU, driver version, CPU, RAM, and launcher (`series-s` / `series-x`) in **[GitHub Issues](https://github.com/gamingwithhomie/larp/issues)** or our **[Fluxer Community Channel](https://fluxer.gg/AIsq2bg7)**.
---
## What's Added in This Fork
Features ported from **Darner** (`GPL-3.0-or-later`) and community patches into `larp.exe`:
- **Phone Call & Voice Audio Fix (`xapu.dll` + `acphal.dll` + XMA2)** — full `DECODE_CONVERT_OPUS` and `CONVERT_PCM` sample-rate/pitch conversion, unaligned output safety, `ApuHeapGetState`, and XMA2 overlap-buffer carry/resume so in-game phone calls play cleanly.
- **Custom Output Resolution Fix (`1440p` / `1080p` / `936p` / `720p`)** — prevents the `System Init` Frame 0 (`+0x247AF2D`) assert when setting custom output resolutions in `settings.ini` or `F10`.
- **v1.1.2** — input batch (#146 pad/KB+M ownership + short taps, #134 opt-in keyboard driving, #136 key-cap prompts in auto, #144 output-size HUD compositing), FG pacing judder fix (#186); AMD/Linux branches add PR #183 wide-heap (2M) lighting/water/facial replacement shaders (``bin\shader-replace\heap-2097152``) — use the UPDATE zip so the new shaders land too.
- **v1.1.1 Hotfix** — wave64 stall-guard retry fixes the 3 refused lighting pipelines (`CS_CalcRasterClassificationListCounts`) broken since v1.0.10 on 32-lane hosts (NVIDIA + Linux/Proton), faster pipeline prewarm (only previously-used variants), Wine/Proton fixes (worker stack, sparse, guard), Streamline FG backend (opt-in `LARP_FG_BACKEND=streamline`), DittoSR upscaler/frame generator, device-removal diagnostics (`LARP_D3D12_DRED=1`, `LARP_BYTE_VIEWS=0`, `LARP_SHADER_REPLACE=0`). **Note:** shader-translator changes mean one full shader recompile on first launch after updating — after that the cache is reused.
- **9-Language UI Localisation (`--lang` / `LARP_LANGUAGE` / `F10` Language Menu)** — English, Deutsch, Français, Español, Polski, Português (Brasil), Türkçe, 简体中文, and 繁體中文 with automatic OS language detection and Unicode/CJK overlay rendering (PR #13, #53, #48).
- **Standalone CPU DSP Reverb (`chad.dll`)** — real partitioned frequency-domain FFT convolution for room/tunnel/environment acoustic reverb instead of dry silence (PR #1).
- **Opt-in Stutter-Free Pipeline Wait Budget (`LARP_PIPELINE_WAIT_MS=8`)** — caps per-frame graphics pipeline compilation wait so new shaders while driving don't hitch the render thread (PR #3).
- **Full Mouse & Keyboard Support (`LARP_CONTROLS=auto|mnk|pad`)** — Raw Input (`WM_INPUT`) mouse look, LMB/RMB triggers, MMB/XButton1/XButton2, scroll-wheel cycling, sensitivity/invert options, and custom `controls.ini`.
- **Native DualSense / DualSense Edge / DualShock 4 HID** (USB & Bluetooth) with rumble, lightbar (`LARP_DS_LIGHTBAR=RRGGBB|off`), **adaptive triggers** (`LARP_DS_TRIGGERS=1`), and trigger rumble (`LARP_DS_TRIGGER_RUMBLE=1`).
- **PlayStation & PC Keyboard Button Prompts** (`LARP_PROMPTS=auto|playstation|keys|xbox`).
- **Auto NVIDIA Shader Heap Fix (`larp nv-profile`)** — sets `0x001ABC0F` (`1024` or `2048` MiB) via NVAPI without NVIDIA Profile Inspector.
- **AMD `amdxc64` Crash Fixes** — includes both the DXIL `size_view_handle` non-uniform buffer query fix and automatic skip of `cad3ecfdcdcf2a7d` on AMD GPUs (`LARP_LEAVE_OUT` also supported).
- **MFGUnlocker Support (`LARP_MFG_UNLOCKER=1`)** — unlocks DLSS Frame Gen / Multi-Frame Gen on RTX 30-series GPUs.
- **Built-in `mods\` DLL/ASI Loader + Z-ROX Controller Hold (`LARP_TRAINER=1`)**.
- **Display Mode, Refresh Rate & Dark Title Bar** (`LARP_DISPLAY_MODE=borderless|fullscreen|windowed`, `LARP_DISPLAY_REFRESH=<Hz>`, `LARP_DARK_TITLE=auto|1|0`).
- **Live Exposure / Brightness Slider (`LARP_EXPOSURE` + `F10` Menu)** (`-2.0` to `+2.0` EV live).
- **Native HDR10 Output (`LARP_HDR=1`)** (`DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020`).
- **Startup Hardware & Driver Advisor** + **One-Click Log Packager (`larp zip-logs`)** + **DirectStorage & Preload Thread Tuning** (`LARP_DSTORAGE_WORKERS`, `LARP_DSTORAGE_STAGING_MB`, `LARP_PRELOAD_THREADS`).
---
## Building from Source
Requirements: Windows 10/11 x64, Rust (`1.98+` or latest `stable`), Visual Studio 2022 C++ Build Tools, and Windows 10/11 SDK (`dxc.exe`).
```powershell
$env:RUSTUP_TOOLCHAIN = 'stable'
cargo build --release -p larp
# Then copy target\release\larp.exe into your Larp\bin\ folder!
```
---
## Credits & License
- **[VIctory](https://github.com/Marvisak/VIctory)** by Marvisak and contributors (`GPL-3.0-or-later`).
- **[Darner](https://github.com/tyr0nsur/Darner)** and contributors (`GPL-3.0-or-later`) for DualSense HID, button prompts, `nv-profile`, HDR10, exposure, AMD `amdxc64` fixes, and Z-ROX controller hold.
- **[XCL](https://github.com/ivall/xcl)** by ivall and contributors (`GPL-2.0-only`) as behavioral reference.
Licensed under **GPL-3.0-or-later**. See [LICENSE](LICENSE).