diff --git a/.github/workflows/linux-appimage.yml b/.github/workflows/linux-appimage.yml new file mode 100644 index 00000000..55f9b57e --- /dev/null +++ b/.github/workflows/linux-appimage.yml @@ -0,0 +1,68 @@ +# The Linux AppImage of each release (tools/make_appimage.py), built on a Linux runner and attached to the release +# itself: the release is assembled on Windows (tools/make_release.py), and the AppImage needs Linux (the translator's +# NativeAOT build for linux-x64, appimagetool). It holds the build kit only, no game files, as the setup does. +name: Linux AppImage + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Release tag to build the AppImage for (it replaces one already attached)' + required: true + +permissions: + contents: write # gh release upload + +concurrency: + group: linux-appimage-${{ github.event.release.tag_name || inputs.tag }} + +jobs: + appimage: + runs-on: ubuntu-24.04 + timeout-minutes: 60 + env: + TAG: ${{ github.event.release.tag_name || inputs.tag }} + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name || inputs.tag }} + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + - uses: astral-sh/setup-uv@v6 + - name: Shader compilers + # make_appimage.py compiles the runtime's own shaders (tools/build_shaders.py: glslc, spirv-as, spirv-val) + run: sudo apt-get update && sudo apt-get install -y glslc spirv-tools + - name: Shader translator and VMA + run: | + uv venv -q --python 3.12 .venv + uv pip install -q --python .venv/bin/python pillow + .venv/bin/python tools/build_xlate.py + .venv/bin/python -c 'import sys; sys.path.insert(0, "tools"); import build_game; print("VMA:", build_game.vma_include())' + - name: Button art from the release's app zip + run: | + # make_release.py uploads the zip with the release; wait for it if the release was published first + for i in $(seq 1 20); do + gh release download "$TAG" -p 'NX2navi-app-*.zip' -D "$RUNNER_TEMP/app" && break + echo "no app zip on $TAG yet ($i)"; sleep 30 + done + unzip -q "$RUNNER_TEMP"/app/NX2navi-app-*.zip 'prompt-art/*' -d "$RUNNER_TEMP/app" || true + ls -d "$RUNNER_TEMP/app/prompt-art" 2>/dev/null || echo "::warning::no prompt-art in the app zip: the AppImage's builds keep the Switch prompts" + - name: AppImage + run: | + uv python install -q 3.14 + py=$(find "$(uv python dir)" -maxdepth 1 -type d -name 'cpython-3.14.*-linux-x86_64-gnu' | sort -V | tail -1) + curl -fsSL -o "$RUNNER_TEMP/appimagetool" \ + https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage + chmod +x "$RUNNER_TEMP/appimagetool" + art=(); [ -d "$RUNNER_TEMP/app/prompt-art" ] && art=(--prompt-art "$RUNNER_TEMP/app/prompt-art") + APPIMAGE_EXTRACT_AND_RUN=1 .venv/bin/python tools/make_appimage.py --python "$py" \ + --appimagetool "$RUNNER_TEMP/appimagetool" --out dist "${art[@]}" + appimage=$(ls dist/NX2navi-Linux-*-x86_64.AppImage) + APPIMAGE_EXTRACT_AND_RUN=1 "$appimage" --help | head -3 + (cd dist && sha256sum NX2navi-Linux-*-x86_64.AppImage > SHA256SUMS-linux.txt && cat SHA256SUMS-linux.txt) + - name: Attach to the release + run: gh release upload "$TAG" --clobber dist/NX2navi-Linux-*-x86_64.AppImage dist/SHA256SUMS-linux.txt diff --git a/README.md b/README.md index ea4395ef..39abd0f3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - In-game settings menu (F1, or Minus and Plus together on a gamepad) and performance overlay (F10) - Keyboard, mouse and gamepads with remapping, Nintendo, Xbox or PlayStation button layout, rumble and gyro; the game follows whichever connected gamepad you press, and DualShock 3 controllers are read directly when enabled -- Xbox, PlayStation and keyboard and mouse button prompts in the game's own text, drawn on your PC when the game is +- Xbox, PlayStation, Steam Deck and keyboard and mouse button prompts in the game's own text, drawn on your PC when the game is built; the keyboard prompts follow your key bindings - Stereo or 5.1 surround sound output, on the output device of your choice; the default microphone for the game's microphone input diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 46e8a33a..26317abd 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -123,8 +123,9 @@ folder's `licenses/` and in each component's own folder. | zlib 1.4 (MSYS2 `mingw-w64-ucrt-x86_64-zlib`), static library | https://zlib.net, Copyright (C) Jean-loup Gailly and Mark Adler | zlib | linked into `NX2navi-Setup.exe` (its unzip) | | mingw-w64 CRT startup code and winpthreads 14.0.0, GCC 16.2.0's `libgcc` (MSYS2 packages), static | https://www.mingw-w64.org, https://gcc.gnu.org | mingw-w64: ZPL-2.1 / MIT / public domain; libgcc: GPL-3.0 with the GCC Runtime Library Exception | linked into `NX2navi.exe` and `NX2navi-Setup.exe` | | NVIDIA DLSS 310.9.1 (`nvngx_dlss.dll`, NVIDIA's own build, unmodified; pinned with its size and sha256 in `tools/dlss_pin.py`) | https://github.com/NVIDIA/DLSS @ `v310.9.1` (`lib/Windows_x86_64/rel/nvngx_dlss.dll`), Copyright NVIDIA Corporation | NVIDIA RTX SDKs License (https://github.com/NVIDIA/DLSS/blob/v310.9.1/LICENSE.txt); licensed for systems with NVIDIA GPUs only | `app//bin/` with `nvngx_dlss-NOTICE.txt`, also in the build kit's `bin/`; `tools/make_game.py` copies both beside the built game, where NGX loads the library (`runtime/vk_dlaa.c`) | +| NVIDIA DLSS 310.9.1 for Linux (`libnvidia-ngx-dlss.so.310.9.1`, NVIDIA's own build, unmodified; pinned with its size and sha256 in `tools/dlss_pin.py`) | https://github.com/NVIDIA/DLSS @ `v310.9.1` (`lib/Linux_x86_64/rel/libnvidia-ngx-dlss.so.310.9.1`), Copyright NVIDIA Corporation | NVIDIA RTX SDKs License (https://github.com/NVIDIA/DLSS/blob/v310.9.1/LICENSE.txt), the one licence of the repository's Windows and Linux libraries; licensed for systems with NVIDIA GPUs only | the Linux build kit's `bin/` (the AppImage of `tools/make_appimage.py`, unless made with `--no-dlss`) with `libnvidia-ngx-dlss-NOTICE.txt`; `tools/make_game.py` copies both beside the built game, where NGX loads the library (`runtime/vk_dlaa.c`) | | NVIDIA Streamline 2.14.16 runtime (`sl.interposer.dll`, `sl.common.dll`, `sl.dlss_g.dll`, `sl.pcl.dll`, `sl.reflex.dll`, NVIDIA's own builds, unmodified) and NVIDIA DLSS Frame Generation 310.9.16 (`nvngx_dlssg.dll`, as the Streamline SDK ships it) | https://github.com/NVIDIA-RTX/Streamline, SDK release 2.14.16 (`bin/x64/`), Copyright NVIDIA Corporation | Streamline: MIT; `nvngx_dlssg.dll`: NVIDIA RTX SDKs License, licensed for systems with NVIDIA GPUs only | `app//bin/dlssg/` with both licence texts and `dlssg-NOTICE.txt` (each file's sha256), when the release is made with `tools/make_launcher.py --dlssg`, and the build kit's `bin/dlssg/` with `tools/make_kit.py --dlssg` (the SDK release pinned with its size and sha256 and each file's sha256 in `tools/streamline_pin.py`); `tools/make_game.py` copies them beside the built game, where `nx2navi_dlssg.dll` (this repository's `runtime/dlssg/`, built with the Streamline SDK's MIT headers) loads them (`runtime/vk_dlssg.c`) | -| Button prompt art: the 128x128 PNGs of the Input Prompts Pack V7 (`XGamepad`, `P5Gamepad` and `Keyboard_Mouse` styles), unmodified | the pack as licensed to the repository owner; never in this repository | the pack's licence, which allows redistributing these pictures in NX2navi's releases (confirmed by the repository owner, 2026-11-09) | `app//prompt-art/` and the build kit's `prompt-art/` when made with `--prompt-art` (`tools/prompt_art.py`); `tools/pad_prompts.py` draws the game's Xbox, PlayStation and keyboard and mouse prompts from them on the player's PC | +| Button prompt art: the 128x128 PNGs of the Input Prompts Pack V7 (`XGamepad`, `P5Gamepad` and `Keyboard_Mouse` styles), unmodified | the pack as licensed to the repository owner; never in this repository | the pack's licence, which allows redistributing these pictures in NX2navi's releases (confirmed by the repository owner, 2026-11-09) | `app//prompt-art/` and the build kit's `prompt-art/` when made with `--prompt-art` (`tools/prompt_art.py`); `tools/pad_prompts.py` draws the game's Xbox, PlayStation, Steam Deck (from the Xbox and PlayStation pictures) and keyboard and mouse prompts from them on the player's PC | Downloaded on the player's PC by the launcher, not distributed: the MSYS2 UCRT64 packages that `toolchain.lock.json` pins (clang and LLVM, Apache-2.0 with LLVM exception; GCC and binutils, GPL-3.0; the diff --git a/docs/README-BuildKit.md b/docs/README-BuildKit.md index cb48cdb9..04cb8871 100644 --- a/docs/README-BuildKit.md +++ b/docs/README-BuildKit.md @@ -25,7 +25,7 @@ downloads included, and keeps the game up to date. This page is the same build b ``` `zbic` unpacks the game's compressed program files. It is a separate GPL-2.0 package you install yourself; the kit - only calls it. `fonttools` and `pillow` draw the Xbox, PlayStation and keyboard and mouse button prompts, when the + only calls it. `fonttools` and `pillow` draw the Xbox, PlayStation, Steam Deck and keyboard and mouse button prompts, when the kit has a `prompt-art` folder. 2. **MSYS2** from [msys2.org](https://www.msys2.org/), installed to the default `C:\msys64`. Open **MSYS2 UCRT64** from @@ -53,7 +53,7 @@ The build checks the version, unpacks the program files, packs the 26 GB RomFS i the dump's own checksums) while it turns the game's code into C and compiles it (about 6 minutes on a 16-thread Ryzen 7; longer on fewer cores), then prepares every one of the game's shaders for your graphics card (about 5 more minutes), so the game does not stop to compile shaders while you play. When the kit has a `prompt-art` folder, it -last draws the Xbox, PlayStation and keyboard and mouse button prompts from that art (about a minute) into the +last draws the Xbox, PlayStation, Steam Deck and keyboard and mouse button prompts from that art (about a minute) into the `romfs-patches-*` folders beside the game. The game it builds is for this PC's processor. You can use your PC meanwhile. If it stops, run the same command again: finished steps are skipped. @@ -80,7 +80,9 @@ RADV). It takes clang, clang++ and lld from `PATH` and links against the system' pinned 3.4.0 into `toolchain/vma/` and checks its hash. 2. The shader translator: a kit with `bin/nx2navi_xlate` has it; from a source checkout, build it once with - `python tools/build_xlate.py` (needs the .NET 10 SDK). The build copies it beside the game. + `python tools/build_xlate.py` (needs the .NET 10 SDK). The build copies it beside the game. A kit also carries the + runtime's own shaders compiled; from a source checkout the build compiles them first, with `glslc`, `spirv-as` and + `spirv-val` (on Arch the packages `shaderc` and `spirv-tools`). 3. Build, then play: @@ -93,13 +95,42 @@ With 16 GB of RAM, add `--jobs 4`: the compiles run beside the 26 GB RomFS image processor can fill memory and swap until the kernel stops processes of the desktop session (about 10 minutes on a 12-thread Ryzen with 4 jobs). Do not play or prepare shaders while it builds. -On NVIDIA, start the game with `NX2NAVI_SHADOW=0` if the 3D world stays black while the HUD draws (issue #72). The -profile, logs and settings are in the `--out` folder as on Windows. +The profile, logs and settings are in the `--out` folder as on Windows. On NVIDIA the driver keeps the shaders it compiled in `nvidia-cache` beside `ocarina`, not in `~/.cache/nvidia`, where -one run adds at most 1 GiB while the preparation at the end of the build makes about 1.5 GB. The game sets the folder -and a limit of 8 GiB itself (`__GL_SHADER_DISK_CACHE_PATH` and `__GL_SHADER_DISK_CACHE_SIZE` in the environment take -precedence). Deleting the folder costs one slow start; `./ocarina --warm-shaders` fills it again. +one run adds at most 1 GiB while the preparation at the end of the build makes about 1.5 GB. The game makes and sets +the folder unless the environment sets `__GL_SHADER_DISK_CACHE_PATH`, and a limit of 8 GiB unless it sets +`__GL_SHADER_DISK_CACHE_SIZE`. When it cannot make or write the folder, it sets neither and the driver keeps its own +folder and limit; the log says which (`vk: NVIDIA's shader disk cache`). Deleting the folder costs one slow start; +`./ocarina --warm-shaders` fills it again. + +The game reads the memory it may use: the limit of its cgroup v2 (`systemd-run --user --scope -p MemoryMax=16G +ocarina`, a container's) and the machine's `MemAvailable`, whichever leaves less. Linux does not fail an allocation when +memory runs short, it ends the process, so while less than the larger of 4 GB and a tenth of that limit is left the game +drops stale textures and evicts idle ones. The log names the limits at the first check (`platform: memory limits`). That +cannot give back what the game needs after its start: about 10 GB in Kokiri Forest at a 2160p game resolution. + +AMD FSR 3.1 loads AMD's `amd_fidelityfx_vk.dll`, which only the Windows build can use: on Linux the menu offers neither +FSR 3.1 upscaling nor FSR 3.1 frame generation, and `taa = fsr3` or `framegen = fsr3` in `nx2navi.ini` leave the +game's own scaling and swapchain as they are (the log says so). + +NVIDIA DLSS (RTX cards) needs the driver's own `libnvidia-ngx.so.1` on the library path (the proprietary driver's +utilities package, `nvidia-utils` on Arch) and NVIDIA's DLSS library `libnvidia-ngx-dlss.so.` beside +`ocarina`. The AppImage's kit has the library in `bin/` with `libnvidia-ngx-dlss-NOTICE.txt`, which names its licence, +and the build copies both beside `ocarina` (`tools/make_appimage.py --no-dlss` leaves it out; such an AppImage +downloads the same pinned library from NVIDIA's repository after a build on a machine with NVIDIA's driver, checks its +SHA-256 and writes the notice, unless `NX2NAVI_NO_DLSS=1` is set or a library is already there). From a source checkout, +or to use another DLSS version, put the library there yourself: NVIDIA publishes it as +`lib/Linux_x86_64/rel/libnvidia-ngx-dlss.so.` in [its DLSS repository](https://github.com/NVIDIA/DLSS), tagged +`v`, and `tools/dlss_pin.py` names the version the kit carries. Later builds keep a library they did not +place. Without it DLSS does nothing on Linux. + +DLSS Frame Generation (RTX 40 and 50 cards) runs through NGX itself on Linux, without Streamline. It needs NVIDIA's +`libnvidia-ngx-dlssg.so.` beside `ocarina` (the same repository, `lib/Linux_x86_64/rel/`; no kit carries it) +and DLSS upscaling on when the game starts. *Frame generation* in the Screen menu then offers NVIDIA DLSS, which +switches at once, with a *DLSS multiplier* of 2x to 6x (above 2x on RTX 50 cards) or Dynamic, which generates only the +frames needed to reach the display's refresh rate (`framegen = dlss` and `fg_mult` in `nx2navi.ini`). The log says +`ngxfg: DLSS Frame Generation available` when NGX found the library. `tools/make_appimage.py` packs this kit into one `NX2navi-Linux--x86_64.AppImage` with its own Python, for players without a source checkout: it checks for the packages above, installs zbic with pip on its first run, picks @@ -113,18 +144,20 @@ beside the game. "Preparing shaders" once while the driver rebuilds them. With a driver that has Vulkan's graphics pipeline library it lasts at most about 20 seconds once the shaders are translated, and the remaining pipelines are built in the background while you play. -- **Screen** in the menu has Texture filtering (anisotropic, up to 16x, at once), Upscaling (DLSS on NVIDIA RTX cards, FSR 3.1 on any card), Frame generation (NVIDIA DLSS - on RTX 40 and 50 cards, with a DLSS multiplier of 2x, or 3x and 4x on RTX 50 cards; FSR 3.1 on any card; it needs - DLSS or FSR 3.1 upscaling on, and the frame limit then counts the frames on screen; with no limit chosen it is the - display's refresh rate), HDR (the game's picture tone mapped to your display, with its own grading rows, or Native, the game's own HDR; turn HDR on in Windows first) and the +- **Screen** in the menu has Texture filtering (anisotropic, up to 16x, at once), Upscaling (DLSS on NVIDIA RTX cards, + FSR 3.1 on any card where `amd_fidelityfx_vk.dll` loads), Frame generation (NVIDIA DLSS on RTX 40 and 50 cards, with + a DLSS multiplier of 2x, or 3x and 4x on RTX 50 cards; FSR 3.1 on any card where it loads; it needs DLSS or FSR 3.1 + upscaling on, and the frame limit then counts the frames on screen; with no limit chosen it is the display's refresh + rate), HDR (the game's picture tone mapped to your display, with its own grading rows, or Native, the game's own HDR; turn HDR on in Windows first) and the resolution. Those marked "after restart" take effect when the game starts again. -- **Controls** in the menu has Button prompts: the game's own, or Xbox, PlayStation or keyboard and mouse ones when +- **Controls** in the menu has Button prompts: the game's own, or Xbox, PlayStation, Steam Deck or keyboard and mouse ones when the build drew them (a kit with `prompt-art`). It takes effect after a restart. The keyboard and mouse prompts show the keys `nx2navi.ini` binds when the build runs: after rebinding keys, run `py -I tools\make_game.py --rebuild --out "C:\Games\Ocarina"` to draw them again (it skips everything else). - The build copies NVIDIA's DLSS library `nvngx_dlss.dll` (with `nvngx_dlss-NOTICE.txt`, which names its licence) and FSR 3.1's `amd_fidelityfx_vk.dll` beside `ocarina.exe` from the kit's `bin\`. To use another DLSS version, put - your own `nvngx_dlss.dll` there: later builds keep it. + your own `nvngx_dlss.dll` there: later builds keep it. On Linux the library is `libnvidia-ngx-dlss.so.` + (see "Linux"). - A kit with `bin\dlssg\` (made with `tools/make_kit.py --dlssg`) also brings DLSS Frame Generation on GeForce RTX 40 and 50 cards: the build copies `nx2navi_dlssg.dll`, NVIDIA Streamline's runtime, `nvngx_dlssg.dll` and their licence texts beside `ocarina.exe`, and Frame generation in the Screen menu then offers DLSS too. diff --git a/docs/building.md b/docs/building.md index 3b561114..670a002a 100644 --- a/docs/building.md +++ b/docs/building.md @@ -235,17 +235,38 @@ NVIDIA's Linux driver compiles into a disk cache of its own. A process adds at m folder, `~/.cache/nvidia`, is shared with every program. `--prepare-shaders` of game 1.1.1 builds 42,142 variants, about 1.5 GB: on the default limit about 30,700 of them were stored and the rest compiled again at their first draw in play. `runtime/vk_device.c` therefore points `__GL_SHADER_DISK_CACHE_PATH` at `nvidia-cache` beside `ocarina` and the size at -8 GiB before the first Vulkan call, each unless the environment sets it, as it does `MESA_SHADER_CACHE_DIR` for RADV. The +8 GiB, each unless the environment sets it, as it does `MESA_SHADER_CACHE_DIR` for RADV, and only while NVIDIA's kernel +driver is loaded (`/proc/driver/nvidia/version`). The driver does not make that folder and caches nothing in a folder it +cannot write, so the game makes it, and when it cannot make or write it sets neither variable. A game run sets them in +`main` before any of its threads starts, since a thread can load the Vulkan driver before the instance is made. The folder can be deleted; `ocarina --warm-shaders` fills it again. Memory: on Windows the GPU imports guest memory and `GetWriteWatch` tracks the CPU's writes to it. On Linux, re-protecting imported memory invalidates the driver's userptr buffer on every submit (about 1.3 ms per 16 MiB on amdgpu), and importing pins the pages, which drops their write protection. Each CPU-visible pool therefore gets a host-visible copy (shadow storage, `runtime/vk_memory.c`): the pages the CPU wrote go in before each submit, and the GPU's -writes come back at its fence. In play that costs about 0.2 ms a frame and doubles the memory of those pools (about -1.1 GB). `NX2NAVI_SHADOW=1` turns it on under Windows too. The Steam Deck's RADV has `VK_EXT_external_memory_host` as +writes come back at its fence. Pages both sides write keep a base copy, so each direction moves only its own bytes; +a VRAM mirror's write-back merge marks the pages it changed, and only those are compared at the fence; a lookup that +reads guest memory itself (the uniform snapshot, `vk_mem_lookup`) does not queue its pool for the copy-in. In Kokiri +Forest (1.1.1, RTX 4090) that costs about 1 ms a frame (copy-in 0.5 ms, write-back 0.6 ms), and the copies hold about +5 GB. `NX2NAVI_SHADOW=1` turns it on under Windows too. The Steam Deck's RADV has `VK_EXT_external_memory_host` as well: the shadow copies are chosen for the measured cost above, not for a missing extension. +The device address table (`runtime/vk_gpa.c`) names a pool's shadow copy as it names an import, so shaders follow guest +pointers into either. A shader that reads through the table resolves nothing, so the pool it reaches is not queued for +the copy-in: a part whose pipelines declare the table is marked at its draws and dispatches, and its prologue brings +the shadow of every pool in the table up to date with the pages the CPU wrote and queues the same pages for those +pools' VRAM mirrors (`vk_memory.c` `vk_mem_gpa_sync`). That copies the written pages of every CPU-visible pool in +each such part, which the cost above does not include. What a shader stores through the table into a shadow copy does +not come back to guest memory. `--probe-vkmem` checks the read: a shader follows the table to a word of a pool that is +never bound, and must read `0x13579BDF` and, after a plain CPU write, `0x2468ACE0`. On Linux, run it for each backing: + +```sh +for shadow in 0 1; do for memory in import mirror; do + NX2NAVI_GPA=1 NX2NAVI_SHADOW=$shadow NX2NAVI_MEMORY=$memory ./ocarina --probe-vkmem +done; done +``` + The Deck's GPU (Van Gogh) has no native ASTC, so its textures go through the compute decoder (`runtime/vk_astc.c`, `NX2NAVI_ASTC`) as on desktop AMD GPUs without it; frame times measured there include it. diff --git a/docs/controls.md b/docs/controls.md index add8c150..a5f00305 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -23,7 +23,7 @@ letters unless *Button prompts* says otherwise (below). ## Button prompts -`NX2NAVI_PROMPTS` (`prompts`, the *Button prompts* row on the Controls tab) picks the buttons the game's prompts show: `nintendo` (default, the game's own), `xbox`, `playstation` or `pc` (*Keyboard and mouse*). It changes three things the game draws: +`NX2NAVI_PROMPTS` (`prompts`, the *Button prompts* row on the Controls tab) picks the buttons the game's prompts show: `nintendo` (default, the game's own), `xbox`, `playstation`, `steamdeck` or `pc` (*Keyboard and mouse*). It changes three things the game draws: - the button font every prompt in text uses (dialogue, the button guides, the controls screen): A B X Y, L R ZL ZR, Plus and Minus, the d-pad and the sticks with their directions become that pad's buttons (LB RB LT RT, Menu and View; L1 R1 L2 R2, Options and Create; its d-pad and sticks), or the keys. Power, Home and the console stay; - the letter in the action prompt (top right); @@ -35,13 +35,13 @@ A, B, X and Y show the button the *Button layout* presses: with `nintendo` (by p The game reads the font and the interface textures once at start, so a change shows after a restart (the row says so; the menu's Restart button restarts). A button or key remapped on this tab keeps its old prompt until the folders are made again. -The prompts live in overlay folders next to the exe, `romfs-patches-xbox`, `romfs-patches-xbox-label`, `romfs-patches-playstation` and `romfs-patches-playstation-label` (by position and by label) and `romfs-patches-pc`, which `runtime/romfs.c` loads in place of the game's files. `tools/pad_prompts.py` draws them on the player's machine from the player's own RomFS and a folder of button art, which the repository does not hold. A launcher release or build kit made with `--prompt-art` carries that art (`prompt-art`, `tools/prompt_art.py`), and `tools/make_game.py` draws every folder in its last step, again whenever the art, the tools or the `bind_` lines change (so a rebuild after rebinding keys brings the keyboard prompts up to date). By hand: +The prompts live in overlay folders next to the exe, `romfs-patches-xbox`, `romfs-patches-xbox-label`, `romfs-patches-playstation`, `romfs-patches-playstation-label`, `romfs-patches-steamdeck` and `romfs-patches-steamdeck-label` (by position and by label) and `romfs-patches-pc`, which `runtime/romfs.c` loads in place of the game's files. `tools/pad_prompts.py` draws them on the player's machine from the player's own RomFS and a folder of button art, which the repository does not hold. A launcher release or build kit made with `--prompt-art` carries that art (`prompt-art`, `tools/prompt_art.py`), and `tools/make_game.py` draws every folder in its last step, again whenever the art, the tools or the `bind_` lines change (so a rebuild after rebinding keys brings the keyboard prompts up to date). By hand: ``` python tools\pad_prompts.py --art \Source --game ``` -`--style xbox|playstation|pc` makes one style; the keys come from `\nx2navi.ini` (`--binds` names another). The art folder holds `XGamepad/Default`, `XGamepad/Light`, `P5Gamepad/Default`, `P5Gamepad/Light`, `Keyboard_Mouse/Dark` and `Keyboard_Mouse/White` with the file names of `STYLES` and `KEY_ART` in the tool; a key it has no picture of is written on `Keyboard_Mouse/Blanks`. Without the folders the row says *prompt files missing* and the Switch prompts stay; so they do when a RomFS mod replaces one of the same files (*off: a RomFS mod replaces their files*). The log has a `RomFS overlay: ... button prompts` line for the folder in use. The tool needs fontTools, Pillow and zstandard (`tools/requirements-py314.txt`). +`--style xbox|playstation|steamdeck|pc` makes one style; `steamdeck` shows the Deck's own labels (A B X Y where an Xbox pad has them, L1 R1 L2 R2 and L3 R3, Menu and View) and is drawn from the Xbox and PlayStation pictures, as the art has no Deck style; the keys come from `\nx2navi.ini` (`--binds` names another). The art folder holds `XGamepad/Default`, `XGamepad/Light`, `P5Gamepad/Default`, `P5Gamepad/Light`, `Keyboard_Mouse/Dark` and `Keyboard_Mouse/White` with the file names of `STYLES` and `KEY_ART` in the tool; a key it has no picture of is written on `Keyboard_Mouse/Blanks`. Without the folders the row says *prompt files missing* and the Switch prompts stay; so they do when a RomFS mod replaces one of the same files (*off: a RomFS mod replaces their files*). The log has a `RomFS overlay: ... button prompts` line for the folder in use. The tool needs fontTools, Pillow and zstandard (`tools/requirements-py314.txt`). The actions are the game's own, as its *Basic Controls* screen (Plus menu, System) names them: @@ -148,6 +148,8 @@ The PS button is not used. The Controls tab binds and remaps its buttons like an `NX2NAVI_INPUT_RECORD=` (`input_record` in `nx2navi.ini`) writes the merged input in the same format, one line per button press and per stick segment. The file replays as a script, which makes it the repro to attach to a bug report. +`tools/run_game.py --save --seconds --wall [--script ] [--shot ]` runs the game on a copy of its profile with a save swapped in, under the script (default `tools/input/load_save.txt`: title screen to the first save slot). `` names one of the game's save backups (`profile/save-backup/