Commit Graph
1440 Commits
Author SHA1 Message Date
Valiantsin Dzerakh 2bfde7ac0c Merge PR 1363 2026-11-22 16:17:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 57137cb108 Merge pull request #1355: the setup reads output_res, prompts, pad_layout and hud_width with the game's INI rules (quotes, last non-empty value), so it prepares the layouts the game will use (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:13:17 +03:00
Valiantsin DzerakhandClaude Opus 5.5 85c0de3aa3 Merge pull request #1352: the installer reads and rewrites the last non-empty lang setting in totk.ini, as the game does (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:13:16 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9812378665 Merge pull request #1350: the installer rejects a state file with malformed fields as unreadable before prefill and resume, instead of a traceback (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:13:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 af60f6a062 Merge pull request #1349: the shader-cache packer checks a pack's entry count and index size against the runtime's limits before it reads the index, and rebuilds a broken pack from the loose files (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:13:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9db523827d Merge pull request #1366: the recent-install module's docstring is a raw string, so Python 3.14 compiles it without an invalid escape warning (ShannoonRuaaa)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:13:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6322727b67 Merge pull request #1351: the NSZ block reader skips stored padding after a raw block and bounds each compressed block by its declared size, as nsz's reader does; a block of the wrong size is still a damaged file (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:12:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 589bd9e08f A block that decompresses to the wrong size is a damaged file again, so the installer asks for a fresh copy
The size check added in this pull request raised a plain ValueError, which the installer maps to
check.unpack_failed. Before it, such a block ended in a hash or length mismatch and the player saw
check.input_damaged. ncz.unpack_ncz now turns the new BlockSizeError into DamagedFile, like ZstdError and EOFError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:11:48 +03:00
Valiantsin Dzerakh 936b0e264c Merge pull request #1355 head 2026-11-22 16:05:01 +03:00
Valiantsin Dzerakh 516b1d2ab5 Merge branch 'pr1351-head' into task/pr1351 2026-11-22 16:04:59 +03:00
Valiantsin Dzerakh 0894366f29 Merge pull request #1352 head 2026-11-22 16:04:58 +03:00
Valiantsin Dzerakh ea3c78de37 Merge pull request #1350 head 2026-11-22 16:04:46 +03:00
Valiantsin Dzerakh 7949484a40 Merge pull request #1349 head 2026-11-22 16:04:43 +03:00
Valiantsin Dzerakh 274d811d2d Merge pull request #1366 head 2026-11-22 16:04:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c902d85db0 Merge pull request #1356: the plugin patch table quotes a plugin's image path, so an install folder with a space or # in its path no longer drops an accepted plugin (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:03:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4c4d1310a5 A quoted plugin image path that is empty is a patch table error with its line, not a read of the folder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:02:34 +03:00
Valiantsin Dzerakh 2593618a65 Merge branch 'pr1356-head' into task/pr1356 2026-11-22 15:59:02 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6e38d6d8b7 Merge pull request #1367: the setup's screens scroll when the window would be taller than the display, with Start, Cancel and Close kept in view (ICUMADETHIS) (#744)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:53:56 +03:00
Valiantsin Dzerakh f8eabdad46 Merge pull request #1367 head 2026-11-22 15:50:35 +03:00
Valiantsin DzerakhandClaude Opus 5.5 313e12715d Merge pull request #1361: the setup's computer check survives a crashing Vulkan layer and names it with how to turn it off, and names an App Control or antivirus block instead of a traceback (ShannoonRuaaa) (#1345, #875)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:49:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d181714398 The installer stops with the crashing Vulkan layer named instead of going on with a warning (#1345)
A layer that crashes hostcheck at vkCreateInstance also breaks totk.exe --prepare-shaders in the prepare step and the
game (runtime/vk_device.c create_instance loads the same implicit layers): with the PR's warning the install failed
again after lift and compile. Check.probe_host now turns each listed implicit layer off alone, names the one whose
absence lets the probe pass with its manifest path in check.vulkan_layer_crash, and says how to turn it off
(VK_LOADER_LAYERS_DISABLE=<name> for the user account); when no single layer explains it, check.vulkan_layers_crash
lists the installed ones and offers ~implicit~. The list covers the loader's places: VK_(ADD_)IMPLICIT_LAYER_PATH, the
registry in the 64-bit view or the Linux implicit_layer.d folders, with names read from the manifests. A failed host
check is kept on the context, so key() and run() no longer build and crash it twice, and the App Control reputation
codes 4557-4559 and 4581-4583 count as a block too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:49:04 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5634a14f6b Merge pull request #1333: above 30 fps a thunderstorm draws its distant bolts and lightning flashes with chances scaled by the frame, so it has the lightning of 30 fps; lightning_fix = 0 runs the game's chances (shinodanpen) (#1287)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:47:42 +03:00
Valiantsin Dzerakh 08e44f43ad Merge pull request #1361: Installer host check survives a crashing Vulkan layer and explains an App Control block (ShannoonRuaaa) (#1345, #875) 2026-11-22 15:37:53 +03:00
Valiantsin Dzerakh 1ee4c57cba Merge dev into task/pr1333 2026-11-22 15:37:52 +03:00
Valiantsin Dzerakh e721b582d8 Merge pull request #1333 into task/pr1333 2026-11-22 15:37:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3b656f91ff Merge pull request #1348: the installer accepts a verified merge when hactool reports a failed NPDM ACID signature, as it already did for the fixed-key and NPDM signatures (ICUMADETHIS) (#1326)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:36:47 +03:00
Valiantsin Dzerakh 35553d80d5 Merge pull request #1348 2026-11-22 15:35:16 +03:00
ICUMADETHIS 5bbd461d35 Keep installer actions visible on small screens (#744) 2026-11-22 12:26:32 +00:00
Ruan ShannonandClaude Opus 5.5 df953b5062 installer/recent.py: raw docstring, so its Windows path no longer holds an invalid escape
The docstring names %LOCALAPPDATA%\TotK Recomp\setup.json; "\T" is an invalid escape sequence, which Python 3.14 (the
setup's bundled Python) reports as a SyntaxWarning every time the module is compiled, and which a later Python turns into
a SyntaxError that would stop the setup from starting. A raw docstring keeps the text as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:21:11 -08:00
Ruan ShannonandClaude Opus 5.5 78f8362a9e tools/build_game.py sizes the compile jobs by the free memory too
The budget was the smaller of 50 GiB and 80% of the RAM, so RAM that other programs held counted as available: on a
16 GiB laptop with 2 GiB free it allowed 16 jobs of JOB_MEM (12 GiB), and the compile paged or a job ran out of
memory. compile_budget also takes 80% of hostmem.available_ram (free physical memory, capped by a job memory limit),
as recomp/gen.py already does for the lift workers; off Windows, where that is unknown, the budget is as before. The
build prints the budget and the free memory it saw. tests/compile_budget_test.py covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:19:44 -08:00
Ruan ShannonandClaude Opus 5.5 d240181005 The installer's host check survives a crashing Vulkan layer and names an App Control block
hostcheck flushes what it found before each Vulkan call, so a probe killed inside Vulkan still shows how far it got.
Check.probe_host logs the exit code as Windows reports crashes (0xC0000005), runs a probe that died inside Vulkan once
more with the implicit layers off (VK_LOADER_LAYERS_DISABLE=~implicit~) and, when that passes, goes on with a warning
that lists the installed implicit layers; when it crashes again it stops with check.vulkan_crash. A probe Windows
refuses to start (Smart App Control and other App Control policies, group policy, an antivirus) now stops with
check.host_blocked instead of an uncaught OSError. Issues #1345 and #875.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:10:51 -08:00
ICUMADETHIS d4497da8c7 Preserve plugin image paths in generated patch tables 2026-11-22 08:50:14 +00:00
ICUMADETHIS 8bbc6c7ade Bound compressed NCZ blocks by their declared output size 2026-11-22 08:37:42 +00:00
ICUMADETHIS 84ca8a96b6 Read installer layout settings with the game's INI rules 2026-11-22 08:33:41 +00:00
ICUMADETHIS c97fc1b3be Honor the last language override in installer settings 2026-11-22 08:14:57 +00:00
ICUMADETHIS 4ef0e2bd4a Skip stored padding in raw NCZBLOCK blocks 2026-11-22 08:10:07 +00:00
ICUMADETHIS 83831e8ebd Validate installation state before prefill and resume 2026-11-22 08:05:04 +00:00
ICUMADETHIS daddc3e3fb Check shader-cache index bounds before allocating 2026-11-22 07:56:27 +00:00
ICUMADETHIS 6e66c8b81d Keep verified merges after an NPDM ACID signature warning (#1326) 2026-11-22 07:30:39 +00:00
Valiantsin Dzerakh afae80c908 Update inctructs v0.5.0 2026-11-22 08:26:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0d8801a253 The FidelityFX SDK sources build with libc++ (llvm-mingw, the Windows release toolchain): ffx_compat.h includes <mutex> for the std::lock_guard in ffx_vk.cpp, which ffx_types.h left to libstdc++'s <shared_mutex>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:25:30 +03:00
shinodanpenandClaude fb252ebf6b Scale the thunderstorm's lightning chances by the frame so a storm above 30 fps has the lightning it has at 30 fps (#1287)
In a thunderstorm the world manager's lightning update (1.4.3 main+0x62aac4, 1.2.1 main+0xab849c) runs once per frame
and draws, each update, a random number in [0, 1) for each of three fixed chances: 0.013333 for a distant bolt (the
effect Far_Lightning), 0.01 to pick a near strike and 0.01 for the environment's lightning flag. Its timers follow the
frame step, the draws do not: above 30 fps a storm has more distant bolts and lightning flags the higher the frame
rate. The new set lightning (TOTK_LIGHTNING_FIX, lightning_fix, on by default) multiplies each chance by the time
object's frame ratio (+0x38), at most 1, on 1.2.1 and 1.4.3: above 30 fps the rates per second of 30 fps, and at 30 fps
and below the game's own chances.

Counted on 1.4.3 in the reporter's storm (205 s with the storm on, Link standing still) with a local build that logs
each draw that succeeds, which this change does not contain: distant bolts 22, 52 and 94 to 96 a minute at 30, 60 and
120 fps with lightning_fix = 0, and 26, 27 and 20 to 24 with lightning_fix = 1, each one a Far_Lightning effect; the
lightning flag 19, 34 and 64 to 80 times a minute of the storm's lightning phase with 0, and 12 to 17 with 1. Near
strikes stayed at 14 to 18 per run at every rate with either value: each lightning phase lets its last pick strike in
the phase after it, where nothing is drawn, and that phase ends with a strike of its own.

On 1.2.1, which the logging build does not cover, the distant bolts were counted in screenshots of a storm in Hyrule
Field (one every 0.2 s of game time, a detector of thin bright lines, each counted screenshot checked by eye at 30 fps
and at 120 fps with lightning_fix = 1, a sample of 48 with 0): 19 screenshots with a distant bolt a minute at 30 fps,
about 61 at 120 fps (105 to 107 fps in the storm) with lightning_fix = 0, and 15 with lightning_fix = 1. The same count
on the 1.4.3 runs gives 25 to 26, 65 to 68 and 16 to 20 a minute: at high rates it misses bolts that share a
screenshot.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-21 15:24:43 +00:00
Valiantsin Dzerakh 3a73548a92 Up version 0.5.0 2026-11-21 16:19:33 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d27ba2eb9f Merge task/overlap: sync_ahead = 1 also works without shadow storage on a discrete GPU, as Savage Wind's overlap: the GPU reads the game's memory in place behind guards (staged mirror syncs, word-merged write-backs, CPU deswizzle of rewritten textures, invalidates that wait for their writer, one-off small targets), and TOTK_SYNC_AHEAD=check measures what a late wait would race; off by default. On machine B the frame is 1.0 ms (fort) to 2.3 ms (islands) shorter with the 1% lows within noise (#1129, #1192)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:07:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9422939cb7 totk.ini.example: sync_ahead no longer needs shadow storage on a discrete GPU; without it the GPU reads the game's memory in place behind guards, and only memory = import still refuses the switch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:48:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 54b4e092cd The in-place frame ahead merges every mirror write-back by words, is refused with import memory, and the probe checks its pending-write list
Without shadow storage a plain GPU copy back into a mirrored range lands after the game, told the value is done a
frame early, may have written other words of that range for the next frame; with TOTK_SYNC_AHEAD_WBMERGE (1 by
default) the copies' and updates' write-backs go through the word merge as a shader's do. With memory = import the
GPU reads vertex, index and storage data in place, and a check run on the islands saw the game rewrite about 10 KiB of
them a frame after the wait, so the switch is refused there unless shadow storage is on. --probe-vkmem checks the
pending-write list (newest writer below a bound, pruning, joining when full). The one-off readback rule copied from
Savage Wind gets its THIRD_PARTY_NOTICES.md row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:43:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c5fba2f2bc Merge pull request #1330: a perf trace can run without its dirty census (perf_census = 0), which costs a traced Steam Deck frame about 3 %; the census runs only in the import memory mode (klikso, #946)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:12:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 ce47fdda3f perf_census: the settings row says the census runs only in the import memory mode, since a mirror prints its own mem lines (#946)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 14:10:35 +03:00
Valiantsin Dzerakh a4c761c98c Merge pull request #1330: switch to turn off the perf trace's dirty census (klikso) (#946) 2026-11-21 14:04:42 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b558317a7a TOTK_SYNC_AHEAD=1 works without shadow storage: the frame wait is answered one frame late with the GPU reading the game's memory in place, as Savage Wind does
With shadow off the back end turns on guards, each with its own switch: the mirror syncs copy the synced pages into staging on the CPU at submit and wait for an earlier write-back into the same range first (TOTK_SYNC_AHEAD_MSYNC), a texture the CPU rewrote takes the CPU deswizzle (TOTK_SYNC_AHEAD_DESWZ), an invalidate of a range not read lately waits for the pending GPU write into it, from a bounded list pruned at completion (TOTK_SYNC_AHEAD_READS), and the frame wait waits up to the value of a one-off small target (Savage Wind's 16-frame, 64-entry rule, TOTK_SYNC_AHEAD_ONESHOT) or, off by default, of a samples-passed report (TOTK_SYNC_AHEAD_QUERIES). TOTK_SYNC_AHEAD_CHECK=1 runs the check-mode detector with the late wait itself. The shadow form and the default are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 10:42:03 +03:00