On a laptop with the vendor's processor graphics and a card of the same vendor, both installed drivers list the
card, and pick_device took the first listing of the best device type. That listing can come from the older driver
installed for the processor graphics, which was reported to crash in its shader compiler with the card. Among
listings of equal rank with the same vendor and device ID, the one with the higher driver version is taken now, and
the log says so. A GPU chosen by index or name is unaffected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The job (main+0x415300) hands the time manager's step to the sound system in its phase 0 and runs the sound objects'
and the system's updates in phases 1 and 2. With the set ostep that step is a fraction of a frame above 60 fps, and fed
fractions the game has been reported to keep sounds held after an area unloaded until no voice was free, new sounds
and then the music going silent until a restart. The new set osound (sound_steps, on by default) calls the page's
+0xf10 after the job's prologue: phase 0 adds the step to what the job is owed and runs once a whole step has built
up, phases 1 and 2 follow that choice, and a job that does not run gets phase 3, which returns through its own
epilogue. After phase 0's load of the step the page's +0xf00 makes a fraction one whole step. At 60 fps and below
the job runs every frame with the game's step. Both sites were checked against the module; frame_step_check covers
the gate at 60, 30, 144 and 240 fps. Needs the game code generated again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every interactive floor of a place and both water managers ask frame_rate_sim_host once an update, each for its own
object. With 8 slots, a place with more such objects than that had them take each other's slot in turn, start
without a remainder every update and stand still above 60 fps, as before the set owater. The table now has 64 slots,
as the ripples' has, and frame_step_check runs 32 surfaces at 144 fps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Steam co-op took the setting name of the old beta's switch, coop. A player whose nx2navi.ini still had coop = 1 from that beta got the new co-op switched on at the first start of the new build, unasked: the game signed in to Steam as its test app. The switch is now coop_steam (NX2NAVI_COOP_STEAM), off by default, and coop is a retired key like the old co-op's other settings: known, read by nothing.
--probe-cfg now loads a file of the old co-op and checks that its keys are no unknown keys, that coop = 1 leaves the new co-op off, and that coop_steam = 1 turns it on; it passes on a build of this commit. The game itself was not started with the change.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Scan run 2 showed the platform moving at full speed above 60 fps while Link stays behind, so the fault is in what
carries him. Once the scan has its survivors, it logs the 0x500 bytes around the one deepest below Link, names the words
there that point into main's data (vtables), and walks the heap once more for the words that point at the starts of
the nearest objects, each logged with its own object's vtable, so one run names the classes to trace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On an RX 580 the second device-local heap (2 GiB) takes what the first has no room for. On a GPU with one device-local
heap (an RTX 3050 Laptop, 4 GiB, 16 GiB of RAM) the budget wrapper and the texture placement sent everything past the
heap's reserve to system memory instead: 4096 and more texture images and every other allocation, held in the
process's commit (21 GiB). The system's commit ran out (31730 of 32023 MB), host memory imports failed, a pool was
left without a GPU buffer and the GPU wrote through its address: device lost. Now an allocation leaves out a full heap
only when another device-local heap has room, and a texture's second step allocates as before, past the budget, where
the driver keeps it in video memory or moves it out itself, and NX2navi's own VRAM pressure drops textures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scan run 1 armed on a floor that only sinks and found points 3.4 m above Link that follow him (the camera's). The scan
now arms on a straight horizontal drift at a steady height, snapshots from 4 m below Link to 0.5 m above, keeps the
triplets that moved with him and lie more than 0.3 m below him or more than 0.5 m from his feet, and logs each of them
(64 at most) once a second with its move over that second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Deku Tree's floating platform is not one of the engine's ground groups, and where its position lives is not known.
With floor_scan set (off by default), once Link has been carried at 60 fps for 30 frames with the left stick at rest,
one snapshot of the game's heap and alias regions keeps every float triplet near him; 30 frames later the triplets
that moved as far as he did are kept, and from then on each frame logs the twelve of them farthest from him with their
addresses, positions and moves. The snapshot logs how long it took.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 5 named only the four nearest groups, and the still map pieces nearer to Link may have crowded out the platform's
group, whose translation is its pivot rather than its surface. A line now names up to six groups within 12 m: those
that moved since the last present first, then the nearest still ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game derives every time category from the patched frames per update (main+0x3b4e300 and main+0x2c84c make the
inverse, seconds and rate from it), so the lines can show whether what a floor's motion reads matches the step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-op loads steam_api64.dll from beside ocarina.exe, and the repository may not hold that file. Before Play and before a start from the Steam shortcut, when the file is not there, launcher/steamlib.py now copies one: one a release ships in its bin folder if it has one, else the newest one in the games of the player's own Steam libraries that Valve signed (WinVerifyTrust and the signer's name) and that has every call runtime/steam.c uses. Nothing is downloaded, the search takes a second or two once, and with no Steam or no suitable file the game starts as before and the Co-op tab says what is missing. The tab's two texts about the file say so in the four languages.
Checked: four new tests on made-up library folders (too old, unsigned, too deep, a second library, a shipped file first, none said once) and the launcher's 190 tests pass; on this PC the search found 40 files in 1.2 s, 25 suitable, and copied a Valve-signed one; that file's library version, an older one than the game was run with, signs in as app 480 and makes a lobby in a program without the game. Not run: Play in the launcher itself with this change.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The last run found no moving group near the drifting platform, which leaves open whether its drift is a ground group
at all. Each line now gives up to four groups within 8 m with their translation and move since the last present, and
with none that near, one line in 30 presents still gives Link's position and move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to four players, each in their own game and save, meet in a room. Rooms are Steam lobbies and the games talk through Steam's networking, so nobody forwards a port and nobody runs a server. The game signs in to Steam as its test app (480), so Steam shows the player as playing Spacewar. Off by default; the menu has a Co-op tab with Create a room, Join a room by its ID, Invite a friend, the players, chat and Leave, in English, Russian, Brazilian Portuguese and Simplified Chinese.
runtime/steam.c loads steam_api64.dll from beside the exe at run time and declares the C functions it calls itself; nothing of the Steamworks SDK is in the repository, and a player copies the file from a Steam game they have. runtime/coop.c is the room: the lobby's owner is the host, lets games of the same protocol and game build in and lists them, and every game takes positions, chat and progress only from the players on that list. runtime/coop_game.c reads Link from the Player actor and shares progress, items, songs and quest items through the game's own flag routines, each value only ever raised; small keys, rupees, ammunition and hearts stay each player's own, and the save is copied to coop-backup before anything of a room reaches it. The other players show as a name with a distance where their Link stands, projected with the upscaler's camera.
One Steam account cannot be in a lobby twice, and this PC has not the memory for two games, so the room and the game side were run with one game and tests/coop_peer.py as the second player over runtime/coop_local.c, a stand-in for Steam on 127.0.0.1 that only the environment turns on: the peer was let in, saw the game's Link in Hyrule Field, chat went both ways, the save was copied, one flag the save lacked was set and a flag the game does not share was refused. On Steam itself one game signed in as app 480, made a room, showed its ID and the player's Steam name on the Co-op tab and left. Not run: two Steam accounts in one room, an invite, a join by room ID over Steam, a host that leaves, a removal, and the menu's text probe on this build.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The manager there holds 5345 entries, which the 512 cap skipped. The probe now checks the entries' range once a present
and copies them and the rows of the groups they name (those in the guest heap) with mem_copy_readable, which takes one
lock and no system call per read; the cap is 16,384 again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every read checks the address with a system call, and before the save loads the probe read a count from a manager that is not one yet: up to 16,384 groups a present made every frame about 1.9 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Above 60 fps Link stands still on the Deku Tree's floating platform while it moves under him, and the code that carries
him is not found yet. With floor_probe set (off by default), each present logs the frame's step, Link's position and
how far he moved, and the nearest moving ground group of the engine's ground manager with how far it moved, so one run
at 60 and one above it show where the carry is lost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The physics' two water managers and the game's interactive floor simulation (the Deku Tree's ground webs) step their
surfaces in fixed steps of 1/60 s, as many whole steps as the frame's time holds, and drop the fraction, so every
frame shorter than 1/60 s ran none and the surfaces stood still above 60 fps. The new set owater (water_steps, on by
default) calls the page between the division and the game's cut, which keeps the fraction per object; at 60 fps the
count is the game's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After an update that keeps the prepared shaders, --warm-shaders built all 42,000 of them into the graphics driver's
cache again: 10 to 20 s at every update on a player's PC while the driver gave every one back at once, and the full
build when it no longer had them (380 s there once, after a change of what they are built with). It now builds twelve
fragment libraries spread over the list first, into the driver's cache alone, as the game's check at every start
does, and builds the whole list only when fewer than three quarters of them came from that cache.
On copies of an install's caches (RTX 5090): with the driver's cache partly cold after a relink, 5 of 12 came from it
and the whole list was built (313 s); the run after it found 12 of 12 and built nothing more, the step taking 3 s.
lib_warm = force builds the whole list whatever the sample says.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hidden beta shared story progress through a relay a player had to run and never showed the other players. A new co-op replaces it. Gone are runtime/coop*.c and their headers, the menu's Co-op tab and its texts in four languages, tools/coop_relay.py, the co-op tests, docs/coop.md, the [coop] section of nx2navi.ini.example, the --probe-coop mode, the coop trace item, and Monocypher, which only this layer used.
The old settings stay known as retired keys, so an nx2navi.ini that still sets them logs no unknown key, and they stay on the list of private settings, so a bug report keeps a room's secret, a relay's address and a name out. The platform layer's UDP sockets and fs_save_snapshot stay for the new co-op; cfg_ini_now and fs_profile_path, which nothing else called, are removed.
Checked: the game builds and starts, the menu shows its four tabs, --probe-cfg and --probe-fs pass, and the launcher's private-settings test passes. tests/save_share_check.py builds without its co-op stub; it cannot run from this worktree because the folder's path is longer than Windows allows, on main too.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The comment added to the replay_workers row swallowed the replay_pipe row behind it on the same line, so every start stopped with "NX2NAVI_REPLAY_PIPE has no row in the settings table".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The patch set text_speed scales the typewriter speed of a message the game lets the player skip (fast, three times as
fast, its scripted waits as long) or runs the game's own skip on the first frame of each page (instant). Messages the
game marks unskippable, such as those that turn their page on a timer, keep the game's speed. The setting is live and
has a row on the Game tab in all four menu languages; with it at normal the set is off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release of what the upscaler leaves now waits for frame generation's own inputs too: in that mode the DLSS sizes
are made for frame generation alone while the upscaler does not run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line freed the upscaler stand-in's scratch images, FSR 1's and SMAA's images and the DLSS sizes on its own while
this pass did: its versions stay. Of this pass's versions, what they do not cover stays: the stand-in's views of a game
image it read as it is now go with that image (vk_tonemap_forget from vk_exec_image_gone, under a lock), and the
upscaler release frees only what the line's idle release leaves, the reactive mask's snapshots, the FSR upscale
contexts and the DLSS sizes after a failure, at the same 600 presents and with vram_use = high keeping them as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With frame generation running and no DLSS or FSR upscaling, vk_dlaa.c arms and ends the frame in the same places and,
where the upscaler's evaluation would run, makes only frame generation's inputs (fg_only_frame): the scene's depth and
camera found as before, motion vectors from the same pass at the scene's size, no jitter at all, and the picture without
the HUD copied from the game's own scaled picture. DLSS Frame Generation and AMD's frame generation no longer need an
upscaler set; NVIDIA's through NGX still needs DLSS at the start and then keeps running when the upscaler is switched
off. The menu's Frame generation row stays usable with every Upscaling choice and the Upscaling row keeps frame
generation as set, with texts in all four menu languages. The log says at the start and at each change whether frame
generation takes its inputs from the upscaler or runs without one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each made its images at the picture's or the scene's size the first time it ran and kept them until the process
ended, also after the menu switched it off:
- the HDR encode's picture and menu image (28 and 14 MiB at 2560x1440, 63 and 32 MiB at 2160 lines) now go when the
swapchain is made without HDR, after a wait for the presents that may still read them;
- FSR 1's two images (56 MiB, 127 MiB at 2160 lines) go after 300 presents it did not scale, with the same wait;
- SMAA's three work images (35 MiB, 79 MiB at 2160 lines) go after 600 frames of another anti-aliasing, deferred past
the submission being recorded.
Each makes them anew when it runs again; one log line says when they go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A frame generation failure turns it off for the run, but the present compared what is wanted with what runs only when
a setting changed, so AMD's swapchain and both of its contexts stayed until some other setting moved. A frame
generator that runs and is no longer wanted is now noticed at every present, and the swapchain is made again without
it, as when it is switched off in the menu. The other way round, wanted and not made, is still tried only at a
settings change, so a swapchain that cannot be made is not tried at every frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Frame dumps show the upscaler reads the bloom composite's output, which the game has already exposed, bloomed and
tonemapped to 0..1. With dlss_prebloom = 1 it runs at the bloom chain's first pass on the scene's linear light. Without
upscaling its picture goes back into the light target. With upscaling the lens flares and the bloom composite are
drawn at the picture's size and that picture replaces the game's upscaler's output. Off by default; with it off
nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switched off in the menu or failed, the upscaler kept everything it had made for the process: per scene size its
output, motion vector, mask and sharpening images and a DLSS feature (81 MiB of images at 2560x1440 with DLAA, 182 MiB
at 2160 lines, and about 0.5 GB per DLSS feature), the reactive mask's snapshots, the HUD-less pair and the FSR 3.1
and FSR 4 upscale contexts. Eight presents after it goes off they are freed on the replay thread, which makes every
evaluation, after a wait for the device to be idle, as the code already does for a size it replaces. Switched on
again, it makes them anew with a new history, as any switch on does.
The HUD-less picture was made and copied every frame, and kept, after frame generation went off, since the flag that
asks for it was never cleared on Windows: the frame generator's release clears it now, and the pair goes once no frame
generation swapchain is up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row writes scene_share = 1 with dlaa = 0, which the start already sized the render-target heap for; widescreen.c now
reads the share live, says when the heap needs a restart for it (the row's note and the Restart count), and logs the
scene size, the picture size and how the scene is scaled once the fixed share takes over and at each change. The
stand-in copies a scene of the picture's size texel for texel with a nearest sampler, and the performance overlay shows
Ocarina's real scene size instead of the other builds' placeholders. scene_share gets its settings row and its ini
text; the row's texts are in all four menu languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scratch images of the fallback blit, one per size and format, were kept for the process, the first eight ever
asked for. Their sizes follow the scene's resolution, which DLSS modes, the dynamic resolution and a window or
picture size change move, at up to 32 MiB each at 2160 lines; a ninth size got no scratch and its blit was left out.
A new size now takes the place of the one used longest ago, which goes once the GPU is past the submission being
recorded, and never one the submission being recorded uses. The cache is under a lock, since replay workers record
blits side by side.
The tonemap pass's views were kept by image handle for the process, a game image's view naming a destroyed image that
a new image could get the handle of, and no view at all past sixteen. A view now goes with its image: at a scratch
image's replacement, and with a game image through the replay's image-gone hook.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mirror is made on the replay thread after a look at the pool index; a pool finalized on another thread in between
had no mirror to forget, and the new mirror then joined the list for a record already retired: freed twice, or
never. The index is searched again under the exclusive lock where the mirror joins the list, and a pool that is gone
has its new buffer deferred past the submission being recorded instead. The count of mirrors waiting for their table
hand-over is raised under the same lock that the finalize and the prologue take it down under.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The back end's record of the old pool was left behind with nothing naming it: its import, a VRAM mirror that stayed
on the mirror list and in its byte count until some later mirror evicted it, a physical pool's device-local memory
for good, its device address table record and its GPU address range. Initialize now runs Finalize's work first when
the object still holds a live pool, as texture initialize already does, and the back end lets the memory go once the
GPU is past the submissions that may use it. The log counts it (the first four, then at each doubling), since how
often the game does this is not known.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the graphics pipeline library a draw's first pipeline is linked from stage libraries, and the optimised build
replaces it when ready. The fast link was kept until the process ended, so each pipeline a run drew held the driver
memory of two: one play session replaced 907 fast links while the video memory outside the allocator, where the
driver keeps compiled pipelines, grew by 491 MiB, and a 68,400-frame session grew it from 1,672 to 2,485 MiB.
The replaced fast link is now destroyed on the completion thread once the GPU is past the submission being recorded
and one after it. The draws read the pipeline from the cache entry each time they record and keep no handle past
their submission, so none can name the old one later. The gpl log line counts the fast links given back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto gives half the physical cores less one, at most 6: 2 on 6 cores, 3 on 8 (the count measured best on an 8-core CPU), 5 on 12. Four cores or fewer get none, and so does AMD's Windows driver for RX 6000 and older, where a player's device was lost with workers on and the cause is not known. The menu's row lists Automatic first with the count it gives on this PC, and the log says how many were started and why.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rows keep their plain names. Their descriptions now say what the number counts and that 0 turns the setting
off: 0 to 4 for replay_pipe, 0 to 64 in steps of 4 for replay_small.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The rows are now CPU helper threads, Helpers work ahead, Helpers take small jobs and Start next frame early, each
with a short description of what it does and what it gained. Helpers work ahead and Helpers take small jobs are
switches: on writes replay_pipe = 4 and replay_small = 16, the values measured best, and another value set in
nx2navi.ini shows as on and stays.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A window minimized for minutes, a frozen game or a long load aged every released texture past its hold while nothing could take it back, so the first frames after it would make again the textures the frames just before it released. A gap between two submissions now counts at most a second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Low, the default, lets released textures go after the hold and frees what switched-off upscalers and SMAA hold; High
keeps both for the session. The row shows Low for any setting but high, the old balanced among them. The descriptions
in all four languages no longer promise simpler surfaces or missing objects, since the default no longer trades them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A released texture now goes once nothing has used it for three minutes (six for content only the GPU made), measured
in wall seconds from a clock of the presents. In two players' sessions the game took released textures back within a
minute of the release or never, so the hold drops nothing it would ask for again. The size bound stays as the safety
net for a burst of area changes, and young textures may pass it, up to twice it, while the card and the system's
commit have room. vram_use defaults to low, which now means this hold; high turns it off and keeps the released
textures up to the bound as before, and balanced reads as low. The old low's values stay available as their own keys.
The reuse log line counts drops past the hold and splits its ages around it. tests/tex_release_check checks the rules
and the clock, and simulates sessions shaped by the logs against the old and new defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Worker groups in flight (replay_pipe), Small groups to one worker (replay_small) and Early frame end (tail_early)
sit under Replay workers. A row whose setting does nothing without another one is greyed out and says which it needs.
The example settings file and the draft release notes name the rows, and the notes gain the replay_pipe and
replay_small entry.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Balanced, the default, is what the earlier commits made the default. High keeps what DLSS, frame generation's
HUD-less picture, FSR 1 and SMAA made after they are switched off, as before them. Low also sets, for the keys the
player leaves unset: released textures keep at most 1 GiB (tex_released_mb), textures give way from 70% of the video
memory budget (tex_vram_pressure) and the shared pipeline list is built at first draw (pipe_seed_boot = 0). Unsampled
live textures are not dropped in any of them: that eviction left the ground see-through for good. The values come
after the device profile and the low-end mode (cfg.c VRAMLOW); the row is in the Screen tab under Texture detail and
takes effect after a restart. The architecture notes describe the new memory report lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cache kept the first eight sizes and formats for the whole run and refused every other one, so after a few
window, resolution or DLSS mode changes the stand-in's blit of a new size was left out, while the old sizes' images
stayed. A new size now takes a free entry or the one used longest ago, whose image goes through the deferred
destruction after the tonemap pass drops its views of it (vk_tonemap_forget), before another image can take its
handle. tests/scratch_lru_check.py checks the choice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DLSS's sizes (their images and features), the HUD-less picture for frame generation, FSR 1's two window-size
images and SMAA's three work images stayed for the rest of the run after their setting was turned off. They now go
after ten seconds without use (SMAA's after a minute, since its passes only run where the game's own SMAA does): the
DLSS sizes on the replaying thread with no wait for the GPU, FSR's once every present slot that read them has been
waited for, SMAA's through the deferred destruction. Switching a feature on again makes them again, as its first
frame in a run does. At 5120x2142 that is about 0.9 GiB with DLSS off, 168 MiB of FSR and 109 MiB of SMAA.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>