Commit Graph

67 Commits

Author SHA1 Message Date
Michael Schienbein
d8ea169fcb Fix CPU-backed texture fixtures in the Vulkan memory probe 2026-11-09 20:51:07 -05:00
Michael Schienbein
033bf85625 Release Linux NGX before destroying the Vulkan device 2026-11-09 20:51:06 -05:00
Chris Toph
b88439e2e0 Reflect every location in vertex and fragment interface arrays. 2026-11-09 20:51:04 -05:00
chrg6
52cf976857 Merge the 0.6.1 fixes from the 0.6.1.x test builds.
This brings in the test branch up to the shader reads, not the texture eviction by disuse still in progress there:
- black frames: a released or taken-back texture keeps its content, and a new texture over a live one of another size gets the region both cover;
- the menu font atlas uploaded through the runtime's checked upload batch;
- the game held to 240 frames a second, which stops the quick menu's crash;
- the FSR 3.1 contexts evicted instead of turning FSR off after a few render scales;
- AMD frame generation kept off while NVIDIA's holds the device;
- less device memory held that only costs the system's commit;
- shaders read from the disk cache off the render thread past a small budget;
- the exit code 70 text;
- pull requests #260, #261, #270 and #271.
The tool lists in make_kit.py and make_launcher.py and the setting names in cfg.c take both sides: romfs_check.py and pack_shader_cache.py, FOG_CULL, SCENE_SHARE and GPA_TWIN_MAX_KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:39:51 -05:00
chrg6
87f51f94a9 Read shaders from the disk cache off the render thread past a small budget, and pack the cache on carried updates.
A profiled traversal session had 9 of its 16 worst hitches (100 to 500 ms) inside the render thread's shader lookup,
reading <key>.res.json and <key>.spv of shaders met for the first time: opening a loose file costs about 3 ms the first
time on Windows. get_async_one now reads in place while those reads stay within 1/8 of the wall time (2 ms at once);
past that three loader threads read them and the draws wait as for a translation. The perf line counts both.

The launcher's updates carry the shaders over and never packed the cache, which held 44,000 loose translations in the
test install. An update now packs it once it holds 1,000 loose ones, and the pack tool reads the loose files on 16
threads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:34:45 -05:00
epicmeme546
91003c3227 Check every player's game files during setup, and stand in for damaged textures.
A dump can hold files whose first pages are zeros, with a container checksum that passes because the damage was packed along with them. The game then opens such a file over and over and gives up on whatever needs it: one damaged normal map left the Great Fairy Fountain without walls.

The game build's new last step, tools/romfs_check.py, decompresses every file of the game data once, in worker threads and never while the game runs, and writes romfs-check.json beside the game. A damaged texture gets a stand-in, an undamaged texture of the same kind renamed to it, in an ordinary mod folder the Mods menu can turn off, so the game can load what needs it. Other damaged files are reported, since only a clean dump restores them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:16:19 -05:00
Michael Schienbein
b6a5cc302c Key the shaders step by the translator the build actually uses.
The shaders step key hashed only the kit's bin/nx2navi_xlate.id, but the build takes the translator from the kit's bin/ or, in a source checkout, from build/xlate/ (xlate_source). From a source checkout, main() worked out the shaders key right after the compile step and stopped with a FileNotFoundError on bin/nx2navi_xlate.id before any shader was prepared.

The key now hashes the identity file beside the translator xlate_source finds, so a source checkout is keyed by build/xlate/nx2navi_xlate.id and a kit's key is unchanged. A build without a translator stops with the existing message that names tools/build_xlate.py. The prompts test kit gets a translator stand-in beside its identity file, and a new test covers a kit that has the translator only under build/xlate/.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 13:49:43 -05:00
chrg6
813f256dbc Keep AMD frame generation off while NVIDIA's frame generation holds the device, so switching between them no longer crashes.
With frame generation set to NVIDIA DLSS at the start, the device is made through Streamline's proxies. Switching the menu to AMD FSR 3.1 then made AMD's frame generation swapchain on that device at once, and NVIDIA's driver crashed with an access violation. vk_fg_wanted now stays false while Streamline's proxies are in use, so the switch takes effect at the next start, as the menu's Frame generation row already says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:31:28 -05:00
chrg6
a5763d14af Keep FSR 3.1 running when the render scale changes more than a few times.
Each render and output size gets its own FSR 3.1 context, and there were six, never freed. Stepping through the render scales in the menu, plus the game's second scenes, used them up; the seventh size found no context, and FSR 3.1 went off for the rest of the run, leaving the game's own upscaler stand-in to show the picture. When all six are taken, the least recently used one not used in the last few calls is now destroyed once the GPU is idle, as DLSS's sizes already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:20:05 -05:00
chrg6
cb234fade1 With frame generation and no frame limit chosen, limit to the display's refresh rate.
Since the pacer divides the limit by frame generation's factor, the default limit of 60 held the game to 30, 20 or 15 rendered frames a second at 2x, 3x or 4x on any monitor, 15 at DLSS 4x on a 165 Hz one. While AMD's or NVIDIA's frame generation swapchain is in use and neither fps_limit nor the older fps60 = 0 is set, the limit is now the monitor's rate, as with fps_limit = display: 4x on 165 Hz draws about 41 and shows 165. A limit the player set is kept, and the menu's Frame rate limit row shows the display choice while this applies.

The mouse camera divided its input by the limit's frame ratio, which counts generated frames, so frame generation turned it faster by its factor; it now uses the rate the game draws at (frame_step_game_hz).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:18:17 -05:00
chrg6
5fb384b906 Add DLSS multi frame generation, the Intel pipeline cache crash and the pinned Streamline runtime to the 0.6.1 notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:18:17 -05:00
itaskaev2
7341eec727 Download the pinned Streamline runtime for DLSS Frame Generation, and let the build kit carry it too.
make_launcher.py --dlssg needed --streamline, a Streamline SDK folder unpacked by hand, and make_kit.py could not
carry DLSS Frame Generation at all, so a game built from the kit always left it off. tools/streamline_pin.py now pins
the Streamline 2.14.16 SDK release (its archive's size and SHA-256, and the SHA-256 of each file the game loads):
without --streamline the scripts download the archive once, check it, keep only sl.interposer.dll, sl.common.dll,
sl.dlss_g.dll, sl.pcl.dll, sl.reflex.dll, nvngx_dlssg.dll and the two licence texts, each checked, and delete the
archive. A folder given with --streamline must hold the pinned files.

The bin/dlssg/ assembly moves from make_launcher.py into streamline_pin.place, so the release and the kit write the
same set and the same dlssg-NOTICE.txt: a kit made with --dlssg and the 0.6.0 release's nx2navi_dlssg.dll has a
bin/dlssg/ identical to the 0.6.0 release's, byte for byte. make_kit.py takes --dlssg [--streamline] like the
launcher. nx2navi_dlssg.dll itself still comes from tools/build_dlssg.py.

tests/launcher_test.py test_streamline_pin covers the extraction, the cache, refused archives and folders, and the
notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:18:17 -05:00
chrg6
c745a9ef2f Offer DLSS multi frame generation at 2x, 3x and 4x.
framegen_multiplier (2, 3 or 4, live) sets how many frames the display gets per rendered frame while NVIDIA DLSS frame generation runs, and a DLSS multiplier row under Frame generation in the Screen tab sets it. nx2navi_dlssg.dll now passes that count to Streamline and reports the GPU's limit (numFramesToGenerateMax) through a new optional export, nx2sl_frames_max; with an older DLL the game keeps to 2x. A value above the limit is clamped to it with a log line, and the menu lists only what the GPU and driver allow, with a note saying why the rest are missing. The Frame generation row now says "in use: off" and why when DLSS frame generation was set but does not run.

The pacer divides the frame limit by the multiplier in effect, as it already halved it for FSR 3.1, so the display gets the limit and VSync at the display's rate drops no generated frames; RivaTuner Statistics Server stays out while DLSS frame generation runs, since it counts generated frames. With DLSS 2x a limit of 60 now shows 60 on screen instead of 120.

nx2navi_dlssg.dll has to be rebuilt (tools/build_dlssg.py) for 3x and 4x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:18:17 -05:00
chrg6
78ee0ddb1e Say in the 0.6.1 notes that an update from 0.5.0 keeps its compiled game too, and that the device-lost fix covers low memory.
Checked with the 0.6.0 launcher's own update path against a local copy of the 0.6.1 release: 552 of the game's 562 objects
were taken over, 10 compiled, the prepared shaders kept with the translator that made them named, done 0.2 minutes after
the download.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:44:39 -05:00
chrg6
8a4cb72b61 Set the version to 0.6.1 and write its release notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:28:41 -05:00
chrg6
66927b8f94 Ask every driver but NVIDIA's to keep NaN and infinity in the game's shaders, which should bring Navi's orb back on AMD GPUs.
The game's shaders rely on IEEE NaN and infinity results: unordered comparisons compile to x > c || isnan(x), a
zero-length normalisation gives an infinity that a later test catches, integer masks travel through float selects,
and the translator's own NaN guards are isnan tests. Our SPIR-V never declared SignedZeroInfNanPreserve, which lets a
driver assume floats are never NaN or infinite. NVIDIA's driver keeps the IEEE results anyway; AMD's compilers do not
(issue #156: a NaN-bit select read as a signed integer gave 2^32; #41 and #110: black and white blocks on Navi and on
Link next to her). The player report: AMD GPUs draw Navi's sparkles but not her orb, whose light sits at her own
centre.

vk_pipeline.c spirv_nan_preserve now adds the capability, SPV_KHR_float_controls and the mode for 32-bit floats (16
and 64 where the module declares them and the driver can) to every game shader module. NX2NAVI_VK_NAN_PRESERVE: unset
on every driver except NVIDIA's own, 1 everywhere, 0 off. --selftest checks the rewrite; the rewritten modules of 600
translated game shaders pass spirv-val for Vulkan 1.3. Not yet seen on an AMD GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:17:08 -05:00
chrg6
10ea0a2eb2 Keep serving the previous translator's shader translations after a translator update, and translate them again in the background.
Every shader cache key names the translator, so a release with a new translator had no cached translation at all:
the launcher re-translated about 42,000 programs before play, and play waited for any program not prepared.

The cache now lists the translator identities it holds translations of in shader-cache/identities.txt, newest first.
A shader the current translator has no translation of uses a previous one's, looked up with that identity mixed with
this machine's host options and read with the usual checks; it keeps that translation for the rest of the session, so
no pipeline is built twice. After the boot prewarm a background pass translates every stored input that has a previous
translator's entry again under the current one, on its own translator child at idle priority that waits while the
game translates. A program the new translator refuses keeps its old translation and is logged. Once the pass has gone
through every such input, the old entries of what it covered are dropped: loose files are deleted, and a pruned copy
of shader-cache.pack replaces the pack at the next start when the pack is still the one it was copied from.
--prepare-shaders still translates everything under the current translator. NX2NAVI_SHADER_CARRY=0 keeps the earlier
behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:42:36 -05:00
chrg6
3ccc33b3e8 Describe in docs/launcher.md how an update now keeps the compiled game and the prepared shaders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:42:36 -05:00
chrg6
cd20bdf09f Download and stage updates in the background, and install them only when the game is not running.
A check that finds a newer release (at start, then hourly while the launcher runs, also hidden during play) stages
it on a background-priority thread: the app into app/<version>, a new Python into app/<version>/python.staged rather
than python.next (which the stub would swap in under the running version), and staged.json written last to mark it
complete. Nothing is switched and nothing restarts. A failed staging is logged and tried again after the next check.

The staged release installs, through the existing switch, restart and ContinueUpdateJob path, when the launcher
starts and right after the game exits, never while a copy of the game runs. Install Updates Automatically (on by
default) can leave it to the Updates row instead. A version the stub rolled back from is not staged or installed by
itself again, prune keeps a staged release, and the Settings rows now fit the window with the new toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:42:36 -05:00
epicmeme546
26be3f9c3c Keep the launcher hidden through the game's own Restart.
The game's Restart ends the process the launcher started and starts another. The launcher took that for the game ending: it came back over the game and forgot a game was running, so its Play could start a second copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:12:45 -05:00
chrg6
dfc5b90b59 Fix what the 0.6.0 review found, and ship DLSS Frame Generation in the launcher release.
The commit census of the perf trace walked the address space on the presenting thread outside mem_census, which
brought back the hitch mem_census was added to remove; it now runs only with mem_census = 1. DLSS's output pass at
the mode's share fell back to no pass at all when the scene was not at that share (the first presents, a dynamic
resolution step): after such a frame the first pass wider than the scene is taken again for 120 frames. The launcher's
nx2navi.ini editor no longer rewrites a file it cannot read, keeps the byte order mark and bytes that are not UTF-8,
reads an empty line as the game does, and leaves no temporary file behind. The build kit carries the two modules
build_game.py imports on Linux, the Linux steps list the right packages and Python, and stale comments and notes are
corrected (Discord on by default, two prebuild threads, Enhanced HDR gone).

DLSS Frame Generation needs nx2navi_dlssg.dll, NVIDIA Streamline's runtime and nvngx_dlssg.dll beside the game, which
no release carried, so the menu offered it and the game turned it off. tools/make_launcher.py --dlssg and --streamline
put them with their licences and a notice in the release's bin/dlssg/, and tools/make_game.py place_dlssg copies the
whole set beside the game. THIRD_PARTY_NOTICES.md has the row; the notes and README say RTX 40 and 50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 09:10:36 -05:00
chrg6
43ac4b6b03 Show Navi as the game's icon, and start the game from the launcher without an empty console window.
runtime/nx2navi.ico (the game window's title bar, taskbar button and Alt+Tab icon) is now the launcher's Navi, written
from launcher/ui/art.py navi_ico at the same ten sizes, in place of the Triforce. ocarina.exe is a console program
and the launcher has none, so Windows opened a console window titled with the exe's path beside the game;
winsys.start_game now passes CREATE_NO_WINDOW.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:54:25 -05:00
chrg6
097421e634 Say in the 0.6.0 release notes that the update from 0.5.0 compiles the game again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:53:13 -05:00
chrg6
6dd88ec578 Add the Discord status to the 0.6.0 release notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:51:57 -05:00
chrg6
f58ad1d23e Cover the pull requests, the new HDR and the shipped button art in the 0.6.0 release notes, and thank the contributors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:29:30 -05:00
chrg6
7530ca5044 Build on Linux without libunwind, and ship build_game.py in the kit for the Linux build's VMA header.
The Linux build linked libunwind for a frame walk the runtime no longer uses: platform/linux.c walks the stack with
libgcc's unwinder. make_game.py's Linux toolchain imports build_game.vma_include, so the kit carries that file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:22:06 -05:00
loteran
f3daf7e2b4 Build Ocarina natively on Linux with tools/make_game.py, and pack the kit as an AppImage.
make_game.py only knew MSYS2. On Linux it now does what tools/build_game.py's Linux path does:
- clang, clang++ and lld from PATH (checked at start), the system's headers and libraries, vk_mem_alloc.h from the
  system or the pinned copy build_game.py fetches into toolchain/vma;
- the runtime's *_sdl.* files and platform/linux.c in place of the Win32 ones; no shim.c (ui/menu_sdl.cpp defines
  menu_sdl_event), no windres, no DLLs to copy;
- -fdeclspec for C++, as third_party/ffx_api/ffx_api.h declares __declspec(dllexport) unconditionally;
- build_game.py's Linux link flags (-no-pie, noexecstack, rpath $ORIGIN, libstdc++ static) and libraries, plus
  dav1d (the AV1 movies), libatomic and libunwind (the previous commit's plat_frame_capture);
- ocarina and nx2navi_xlate without .exe; the translator from the kit's bin/ or a checkout's build/xlate.
Windows is unchanged: every difference is under os.name.

tools/make_appimage.py packs the kit (tools, recomp, runtime, the built translator, VMA) with a relocatable CPython 3.14
and numpy, lz4, zstandard and fonttools into NX2navi-Linux-<version>-x86_64.AppImage. Its AppRun checks for the
compiler and headers and names the packages for Arch, Fedora and Debian/Ubuntu, installs zbic (GPL-2.0, not bundled)
with pip into ~/.local/share/nx2navi/pydeps on the first run, picks --jobs from the memory, builds and writes play.sh
beside the game. README-BuildKit.md has a Linux section.

Tested on CachyOS (kernel 7.3, clang 23, RTX 3080, NVIDIA 620.70.06, 16 GB): make_game.py --nup ... --jobs 4 builds
ocarina in 9.9 minutes from a 1.1.1 dump, which passes --probe-cfg; a build with the same sources and flags
(compiled by hand before this script could) starts, loads a save and plays. With one compile per thread on 16 GB
the build filled memory and swap and the kernel stopped desktop processes, hence the --jobs advice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:21:36 -05:00
FemOrWhat
844940c6fb Add DualShock 3 support on Windows, read straight from the controller when no driver presents it, off by default.
runtime/input_ds3_win.c finds a DualShock 3 through hid.dll and setupapi (loaded at run time), sends it the command
that makes it report, sets its first player light and decodes its reports (runtime/input_ds3.c, tested by
tests/ds3_check) into the pad state, with rumble through its light motor. input.c follows whichever pad was pressed
last when an SDL pad is connected too. ds3 = 1 in nx2navi.ini turns it on: it starts a scan for the controller every
three seconds and opens it read-write, so it stays off unless a player asks for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:21:07 -05:00
Gonzalo Castro
45a8cc3d8b Capture the default microphone for Ocarina input streams 2026-11-09 08:19:19 -05:00
Thiago Cabral
d0c8588e3f Open the game window on a chosen monitor: the monitor setting and --monitor pick it by index, primary, or part of its device or monitor name, and --list-monitors prints the monitors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:18:08 -05:00
Thiago Cabral
bb0ac8caeb Play the sound on a chosen output device: the audio_device setting and --audio-device pick it by index or part of its name, --list-audio-devices prints the devices, and a chosen device that goes away hands the output to the default one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:17:35 -05:00
chrg6
8e30ad7927 Carry the button art in releases and draw the button prompts during the game build.
make_launcher.py and make_kit.py take --prompt-art (folders holding XGamepad, P5Gamepad and Keyboard_Mouse, or those
folders) and copy only the pictures pad_prompts.py reads into the release's prompt-art folder; tools/prompt_art.py
holds the art tables and that list, with no imaging packages. make_game.py's new last step, prompts, runs
pad_prompts.py on that art into the game folder's romfs-patches-* folders. Its key names everything it reads (the
RomFS, the art, the tools, the bind_ lines of nx2navi.ini, the folders being there), so it runs again only when one of
those changed, and it makes no other step run. A kit without art skips it. The launcher's Python gets fonttools and
pillow, and its jobs show a Draw the Button Prompts row when the version has art.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
7f25329e72 Stop saying that shader preparation keeps play from ever stopping to compile.
The preparation translates the game's shaders in their default bind state and builds their stage libraries and
compute pipelines into the driver's own cache. Variants met in play with another bind state are still translated then,
pipelines are still linked in play, and the driver cache is kept per executable and is lost when the driver clears
it. The launcher's step text, the README, make_game.py and docs/launcher.md now say it makes such stops far rarer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
9e56d5a316 Add keyboard and mouse button prompts, drawn from the art's keys.
The Button prompts row gains Keyboard and mouse (prompts = pc). tools/pad_prompts.py --style pc writes
romfs-patches-pc: every button glyph shows the first key its bindings give it (Ocarina's defaults, with the bind_
lines of the install's nx2navi.ini over them), the mouse buttons as a mouse, the d-pad and the left stick as their
keys laid out as on the keyboard (1 to 4, W A S D), and the camera as the mouse moving. The action prompt shows the
key's label, the ocarina's notes the light keys. A key the art has no picture of is written on a blank key. The pad
styles draw the same bytes as before.

The prompts description says so in each menu language, and the Chinese one no longer splits words across its lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
ef08fed45f Ship NVIDIA's DLSS library in the setup and the build kit, and put it beside the game.
The release carried AMD's FSR 3.1 library but not nvngx_dlss.dll, so DLSS ran only where the NVIDIA driver supplied the model itself; elsewhere players had to fetch the DLL by hand. tools/make_launcher.py and tools/make_kit.py now download NVIDIA's own build from the DLSS SDK repository at a pinned tag (tools/dlss_pin.py: 310.9.1, checked against its size and SHA-256, cached), and put it in the release's bin/ with a notice naming the NVIDIA RTX SDKs License that covers it. --dlss FILE takes a copy on disk instead, --no-dlss leaves it out.

tools/make_game.py copies the DLL and its notice beside the game. A different nvngx_dlss.dll the player put there is kept; the one an earlier build placed (named by the notice's sha256 line) is replaced, so a newer release can bring a newer DLSS. The compile step's key covers make_game.py and the kit version, so existing installs get the DLL with their next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
adbbbedf1e Draft the 0.6.0 release notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
938676d57f Refuse plain http and manifests without a size and sha256 in the launcher, stop oversize downloads, and keep the token on its host.
Plain http goes only to this PC (the tests' servers), a redirect to http is refused, the Authorization header is
dropped when a redirect leaves its host, a download that runs past its size stops at once, and a manifest file entry
needs a plain file name, a size and a sha256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
epicmeme546
dd1192b655 Import a single save slot into its own slot folder and keep the rest of the save.
A slot folder holds only progress.sav and caption.sav, and Import Saves took those two files for a whole save: it replaced the save and left them at its top, where the game does not read them, so the game started a new one. A folder with progress.sav at its top now replaces that slot alone. A backup made by the import no longer brings its save-tx folder back with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 06:10:58 -05:00
tangerineturtle1
9e574f84ec Replace the enhanced HDR with a port of RenoDX's tone mapper.
The game's ACES tonemap shader gets a GLSL function linked into its SPIR-V where it clamps each channel: the game's SDR result upgraded to the HDR range by luminance and mapped to the display with the RenoDRT curve, exposure, highlights, shadows, contrast, saturation, highlight saturation, blowout, flare and hue correction. The settings reach it as four vec4 the support buffer gains at 1440. The present encode is a port of the swap chain pass: gamma correction, gamut compression, the peak clamp and PQ. Without an HDR10 swapchain the shader gives the game's own SDR picture; native HDR is unchanged.

The menu offers Off, RenoDX and Native, with gamma correction, the tone mapper and its grading rows. The shader build compiles sources marked "keep functions" without optimisation so their functions survive for the splice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 06:06:33 -05:00
chrg6
b0d420db3d Land the shader and pipeline stutter pass, and the fixes it needed.
Large compute shaders that no cache holds are built on one background thread after the boot prebuild, smallest first, so their first dispatch no longer compiles them on the replay thread. NX2NAVI_BIG_BUILD_MAX_MB stops that builder once the process has grown by that much: on a 31 GB machine one of these shaders took the process up by 12.8 GB and the game stuttered while Windows paged. The builder takes the queue under its lock and copies each entry out before compiling it, so a shader queued meanwhile cannot free the arrays under it. The same change reports what pipeline-cache.bin gives back, and starts over when the file grows past NX2NAVI_PIPELINE_CACHE_MAX_MB.

A tensor-core program is now tested before its shader is asked for, in both dispatch paths. It runs the stand-in while NX2NAVI_NATIVE_TENSOR is off, and translating it anyway recorded four AI-upscaler shaders of 0.87 to 4.4 million SPIR-V words that this game never dispatches natively. Process memory went from 29.3 GB to 24 GB and the multi-gigabyte builds during play are gone.

The frame-time summary says which part a slow frame went to, and with NX2NAVI_REPLAY_TIME how the replay splits between draws, binds and transfers; NX2NAVI_SVC_SLOW_MS logs the kernel services that block, with the thread they blocked on. prof_report.py reads the map this build writes and adds the image base to a runtime Rip, so a profile resolves to function names instead of question marks.

build_xlate.py applies the patches with GIT_CEILING_DIRECTORIES set to the build folder's parent. Inside a checkout git read 0021-prmt-byte-permute.patch's paths from the repository's top, skipped every file of it and still exited 0, so PRMT was missing from locally built translators and every byte permute was a no-op. A Skipped patch line now fails the build. The note in AmpereLowering.cs that said the translator emits nothing for PRMT is corrected.
2026-11-09 03:34:46 -05:00
chrg6
276325d9ff Add a PlayStation choice to the button layout.
pad_layout = playstation plays a pad by label as xbox does, named for a PlayStation pad: cross A, circle B, square X,
triangle Y. The prompts follow it like the Xbox layout, by label. Under Automatic the note says PlayStation for a pad
whose bottom button is labelled cross. The layout description in each menu language now says what every choice does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 03:34:46 -05:00
chrg6
612c02311d Add Xbox and PlayStation button prompts, drawn from button art on the player's machine.
The Controls tab has a Button prompts row again, with Nintendo, Xbox and PlayStation. prompts = playstation is a new
value next to xbox; nintendo, xbox and pc read as before, and pc stays out of the row as nothing makes its files for
this game. The game reads its prompts at start, so the row says when a restart would change them.

tools/pad_prompts.py writes the overlay folders romfs-patches-xbox, -xbox-label, -playstation and -playstation-label
from the player's RomFS and a folder of button art that stays outside the repository. The button font's glyphs become
outlines traced from the art, the action prompt's letters and the ocarina's note buttons are painted again in their
own BC4 and ASTC formats, and the font's entry in the resource size table grows with it. The by-position folders show
Switch A as B or circle, the by-label ones as A or cross, following the pad layout. The settings probe checks the new
value and folder names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 03:34:46 -05:00
Claude
b1421faaf9 Show Prepare the Shaders moving in the launcher: the game prints its counts and the step sends them on.
The step sat at 0 % until it was done, an hour on some PCs, because nothing it ran reported progress to the launcher. nx2navi.exe --prepare-shaders now prints how many shaders it has translated and how many it has built into the driver's cache every 2 s. make_game.py reads them as they come and fills the bar, the translation the first half and the build the second, with the counts in the step's text. An event every 10 s keeps the text current while nothing is printed, and after 3 minutes without a count moving it says so, and that the step is still running.

The selftest draws the step as a tenth screen. Its made-up update was version 0.3.11, so from 0.4.0 on the update-ready screen showed Up to Date and was no longer drawn; it is now a minor version past the launcher running it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BSHQpLnScF9sNv4LNAaaS3
2026-11-09 08:32:13 +00:00
chrg6
aaea991191 Uninstall only what the launcher put in its folder, so a kept game folder inside it stays.
Uninstall ran rmdir /s on the whole launcher folder, which holds the default game folder (<launcher>\game) and, with
the setup's --dest, whatever else the player keeps there: "Remove the Built Game" Off would have deleted the game and
its saves. It now deletes NX2navi.exe, python, app, pydeps, data, toolchain and python.old-*, then the folder only
when that left it empty, and for a toolchain in C:\NX2navi that toolchain, then C:\NX2navi only when empty.

The command also never ran: it went to cmd.exe as a list, whose quotes Python escapes as \", which cmd.exe does not
understand, so every rmdir failed and nothing was removed. It is now one command line. tests/launcher_test.py runs it
on a folder with spaces and a character outside ASCII.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:51:48 -05:00
chrg6
f57a327a86 Keep saves safe in Import Saves and Quit, draw no traced game art, and recompile the game for a new processor.
Import Saves: the saves folder picked in the dialog imports what waits in it (it had made the folder's README the
save); the save backed up is the one the game would load, in runtime/fs_host.c save_recover's order, so an interrupted
commit's only copy is kept, and the rest of the commit journal moves into the backup instead of being deleted; the
imported save goes into place before the old one is deleted, which comes back if that fails; another NX2navi install's
finished commit counts as its save. Tests cover each.

Quit waits while the game writes a save, as Restart does: the game runs on under the menu, and closing the window
finishes only a commit that has begun. The VSync row says "in use: Immediate" when VSync On falls back to tearing, and
its default follows the device profile (cfg_default). Without the game's textures the menu's divider is a plain line
and diamond of its own, not a tracing of the game's ornament.

make_game.py: the compile key holds the processor's features (cpu_tag), so a game folder moved to a PC without AVX2
compiles again instead of crashing; the main thread gets 16 MiB of stack with GNU ld too; any error waits for the
RomFS image, so its .part file is not cut short. The launcher tests use a neutral title id; tools/menu_preview.cpp
has cfg_default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 03:57:02 -05:00
chrg6
8daedbd806 Redraw the in-game menu with the game's own interface textures, and bring in the launcher's save import and faster builds.
In-game menu: the settings window, its tabs, rows, buttons and cursor, the performance overlay and the Preparing
shaders box are drawn with the game's interface textures where the RomFS holds them (runtime/ui/menu_skin.cpp,
perf_panel.cpp; plain shapes until they are decoded). Restart joins Continue and Quit, each behind a confirmation;
VSync is an on/off switch; DLSS is listed only on NVIDIA GPUs; the menu sounds are quieter; Picture shape is gone and
the setting descriptions are shorter; edge cases of input, layout and fonts are fixed. tools/menu_preview.py draws the
menu without the game.

Launcher: Import Saves takes a save from the game folder's saves/ folder or one the player picks; downloads fall back
to Windows' own certificate check when Python's refuses a server; updates are faster; the title bar is drawn in the
window and Navi is every icon. tools/make_game.py builds with CLANG64's clang where the launcher installed it, packs
the RomFS beside the lift and the compile, takes a prebuilt runtime, and compiles the game's resources without cmd.exe,
so a user folder with a space in its name builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 03:57:01 -05:00
chrg6
8702ddb356 Default to the Switch's own button positions on every gamepad, and fix menu edge cases.
pad_layout defaults to nintendo: Switch A on the right face button, B bottom, X top, Y left, on an Xbox pad too, where
auto had picked the Xbox layout. The settings probe checks every button's position.

Menu: the "default" mark follows the Steam Deck profile's values (cfg_default); Left on a value the list does not hold
goes to the last entry; the HDR row says "in use: off" when the swapchain is not HDR10; the open state is read again
after taking the reset, so a menu opened by F1 while the overlay alone was drawn starts with its focus row; the font
atlas is rebuilt only for a scale more than 12% off or one that held for half a second, so dragging the window's edge
no longer rebuilds it every frame.

A shader that fails to translate keeps its request and code in the shader cache. NX2NAVI_GPA_TWIN=0 turns the guest
copy of device address table stores off (diagnosis). The memcpy override no longer prints its first 500 calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 00:34:29 -05:00
chrg6
d0da862c87 Release 0.5.0: fix the white haze in fog and the flickering foliage.
The float atomic add's compare-and-swap loop (patch 0033) carried its expected value round the loop in a local, but the
pass runs on SSA form and the optimizer's copy propagation takes every value as assigned once, so the loop compared
against a stale value and the froxel fog added up wrong: Kokiri Forest was washed out white. Each attempt now reads the
word with an atomic OR of 0, which also cannot return a stale cached copy.

Writes through the device address table go to the guest copy for stores only (patch 0034). An atomic on the guest copy
started from its stale value, so a counter the GPU reset with a buffer fill kept counting there, and the page's next
sync copied the wrong count into the mirror: culled foliage drew garbage for a frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 22:05:43 -05:00
chrg6
65ad25faaf Release notes and README: the tree columns are fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:27:34 -05:00
chrg6
8102b6a222 Release 0.4.0: the first public release, with its notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:26:28 -05:00