Commit Graph
179 Commits
Author SHA1 Message Date
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 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 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 Dzerakh f8eabdad46 Merge pull request #1367 head 2026-11-22 15:50:35 +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 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
ICUMADETHIS 5bbd461d35 Keep installer actions visible on small screens (#744) 2026-11-22 12:26:32 +00: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 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 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
Valiantsin DzerakhandClaude Opus 5.5 f5fbe9df15 The sync-ahead check counts every frame as if the GPU were behind, and compares bytes as well as written pages
Whether the game writes what the GPU still reads does not depend on this machine's timing, so check mode now takes the
late wait's value at every frame wait (the frames where the GPU really was behind are counted apart). The set's bytes
are copied at the snap: a written page counts its changed bytes too, and the mirror sync copies are narrowed to the
bytes the frame binds from the mirror (class bound), since a page written only outside them races nothing it reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 09:42:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1ab3856fdd TOTK_SYNC_AHEAD=check measures what a one-frame-late frame wait without shadow storage would race, with the wait left exact
The replay notes each GPU-timeline access of guest memory with its submission's value (in-place bindings of imported
pools without a mirror, mirror sync copies, GPU deswizzle sources, mirror write-backs); at the frame wait the notes of
the frame the late wait would leave running form its read set, snapped with the write watch and checked again at the
next frame-wait entry. Invalidates and small-target write-backs of GPU results from that frame count as stale
readbacks. One summary line per second and a run summary with the largest offenders by pool (runtime/vk_ahead.c).
--probe-vkmem checks the detector with a synthetic write after the wait; tests/sync_ahead_check.py checks that check
mode keeps the wait exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 09:19:54 +03:00
itaskaev2andClaude Opus 5.5 8427d8e006 The setup speaks German, French, Spanish, Italian, Dutch, Japanese and Korean, picked from the Windows display language, with every Chinese Windows on the Simplified Chinese setup and the game language starting as the window's where the game has it (the setup part of pull request #497; its in-game menu part stays out, as it covers about two thirds of today's menu)
Taken from #497: the seven catalogs, the language choice in installer/guilogic.py and the launcher, the launcher header and bundle check in the release scripts, the tests. Added here: the ids dev and this branch gained since (kit, PC prompts and display shapes steps, the locked exe and skipped plugins messages, the form sections and More details), and new translations of the ids whose English changed after #497 was translated (NSZ and XCZ input, the missing shared fonts warning, the PlayStation prompts). README gains a Languages table that shows the menu in four languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 19:45:37 +03:00
Valiantsin Dzerakh f780b3d216 Merge pull request #1155 into task/pr1155 2026-11-19 21:00:35 +03:00
itaskaev2andClaude Opus 5.5 300f88e95f The mouse turns cameras that run no direct mouse hook, such as Autobuild's placement camera, as the right stick (#1300)
With mouse_mode = direct the mouse reached only the cameras the direct hooks cover. Autobuild's placement camera runs
none of them on games 1.4.3 and 1.2.1 and turns by the right stick, so the mouse moved nothing there. mouse_direct.c
now notes each camera step that runs a hook; after two steps without one the mouse acts as the right stick
(input.c mouse_camera), as with mouse_mode = stick, until a hook runs again. A script's MOUSE lines move that stick
too, also under TOTK_INPUT=none, so the path can be tested with scripted input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:54:58 +01:00
Valiantsin Dzerakh 6c48e7a364 Merge dev into task/psp 2026-11-18 19:12:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a9abffdba6 tests/sync_ahead_check.py checks that a refused sync_ahead switches the qstamp set off on 1.4.3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:57:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 00b04df8b2 The game makes a missing layout or prompts folder in the background, at start and when a setting asks for it (#180, #378)
When the game resolution, the HUD width, the button prompts or the pad layout need a folder the install lacks (an
older setup, a failed setup step, a new display), totk.exe starts the setup's generator for it in the background
with the tools build-cache/rebuild.txt names, once per folder and process: at start for the settings in effect
(the resolution output_res asks for, also when the missing layout made this start 16:9), and from the settings
menu once a changed choice has stayed for 1.5 seconds or the menu closes. A missing 16:9 prompts folder is made too,
the PC prompts from totk.ini's bindings. The notes under Game resolution and Button prompts say the files are being
made and are used at the next start; when the tools did not start they say so and Try again starts them again.
The Prepare button is gone. Source builds without rebuild.txt and TOTK_ROMFS_PATCHES keep the old behaviour.

romfs_shape_missing and romfs_shape_prepare become romfs_folders_missing (a mask of the missing folders) and
romfs_folders_prepare; --probe-cfg and tests/romfs_shapes_check.py check the new decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:34:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 77dce74028 The RomFS patch generator renames a finished folder into place, so a folder is never half written (#180, #378)
tools/make_romfs_patches.py writes into <out>.part-<pid> and renames it to <out> once every file and the manifest
are there. With --background (for runs the game starts) it runs at below-normal priority, does nothing when <out>
already has a manifest, and drops its own result when another run finished <out> first, so two runs for one folder
do not mix their files and a folder a running game loaded is never written into. Without the flag <out> is replaced
whole, as the setup and source builds expect. A .part folder left by a stopped run goes once it is an hour old: the
next run for that folder or the setup's clean-up removes it. build_game.py copy_romfs_patches skips .part folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:34:41 +03:00
fabiomode2andClaude Opus 5.5 bae687a10d Add PlayStation button prompts (#180)
prompts = playstation shows the face buttons as circle, cross, triangle and square, L1 R1 L2 R2, Options and Share.
The setup writes romfs-patches-playstation (pad_layout = nintendo) and romfs-patches-playstation-xbox (xbox, auto) on
every install, next to the Xbox folders, and the Shapes step and the settings menu make their shaped folders like the
other styles. playstation-xbox lays the action prompt's diamond out as xbox-label does, cross at the bottom.

Rebased onto dev from pull request #741 by fabiomode2: the shaped folders, hud_width, the Xbox diamond and the
keyboard prompts' text glyphs of dev are kept, and cfg.c's shape default uses input_prompts_folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:10:32 +03:00
Valiantsin DzerakhandClaude Opus 5.5 cedc0a63ad The setup's compile step runs again when the release string changes, so totk.exe carries the version of the release that built it (#1078)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:32:47 +03:00
shenjack 90bf2f25aa Test and document the 1.1.0 climbing and gear patch contracts
Add native and Unicorn numeric comparisons, switch gating, register and stack preservation checks, and optional local ExeFS anchor validation. Document supported sites and acceptance boundaries.
2026-11-18 01:39:06 +08:00
Valiantsin DzerakhandClaude Opus 5.5 6b0974f08d Merge pull request #1188: opt-in quick save and quick load on rebindable keys with no menu on the screen, game 1.4.3 (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:17:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6efa75f3dd romfs_shapes_check.py links its harness with lld, which MSYS2 UCRT64 Clang needs for LTO objects
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:12:56 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c781238d6d The Shapes step keeps its old key when it writes no capped HUD folder, so an install with hud_width full does not prepare its shaped folders again (#643)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:12:56 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f801169e1c Merge pull request #1188: opt-in quick save and quick load with no menu on the screen (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:07:20 +03:00
Valiantsin Dzerakh 006c186928 Merge pull request #1262 into task/hud: hud_width keeps the HUD narrower than a wide screen on the Shapes step (Marjaperse, ProSep) 2026-11-17 20:06:17 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f53b86c61d Merge pull request #1253: sync_ahead works on game 1.1.0, and game-time scripts find the player there (Marjaperse)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:01:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1ccefb46f2 Merge pull request #1252: the dynamic resolution switch holds the full scene size on game 1.1.0 (Marjaperse)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:01:25 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a5c3e0f9f5 A game with a mod plugin no longer stops at start: plugin_trace has its row in the settings table (#845)
plugin_init.c reads TOTK_PLUGIN_TRACE through cfg_bool, which stops the game when the key is unset and metas[] has no
row. Every test run set the key, so only a plain start hit it. tests/settings_doc_check.py now fails on any
cfg_value/cfg_int/cfg_double/cfg_bool reading without a metas[] row that is not guarded by cfg_get of the same key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:49:27 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e7c901b864 The setup's builds name every path relative to the build kit, so a moved game folder rebuilds incrementally (#845)
tools/build_game.py --portable writes build.ninja paths on the tools' drive relative to the kit, also through '..'
(the generated C and objects in build-cache/work), names the compiler, windres and ar the same way (backslashes:
CreateProcess does not find a relative program with forward slashes), and passes clang -resource-dir and --sysroot
relative to the kit, because clang names its own headers by its absolute folder whatever argv[0] says. The Ninja deps
log then holds no absolute path. installer/steps.py build_args passes --portable for the build kit.

Measured on an install moved after a portable build: the rebuild compiled modules.c only, 3.5 s; before, the move cost
a full compile of 430 objects (335 s on 12 cores). Without --portable build.ninja is byte-identical to before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:57:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 501f0d3e6f The setup installs a build kit into the game folder, and the game's rebuild for code mods runs from it (#845)
The rebuild for ExeFS patches, code cheats and mod plugins ran the setup window from the setup folder, whose absolute
path build-cache/rebuild.txt held, with the generated C and objects in that folder's temp/. A moved or deleted setup
folder left code mods without a rebuild.

- A new Kit step after the check copies the release folder without TotK-Setup.exe into <game>/build-kit
  (installer/layout.py KIT_ITEMS), and every later step runs its tools from there. A newer setup replaces the kit,
  the kit's own rebuild keeps it.
- The release's temp folder is <game>/build-cache/work, so the lift cache and the objects stay with the game.
- rebuild.txt names the kit relative to the game folder; runtime/cheats.c and runtime/romfs.c resolve relative
  entries against the exe's folder.
- runtime_key drops the lines of clang --version that name its folder, so a rebuild from the kit or a moved game
  folder keeps the compile and prepare steps the setup recorded.
- An update over an install of an older setup moves that setup's temp folder into build-cache/work when both are on
  one disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:54:17 +03:00
Valiantsin DzerakhandClaude Opus 5.5 81c004094d The installer's plugin service run finds its DLLs: they go beside the totk.exe it builds in temp (#845)
On the release path the service run's totk.exe in <temp>/build stopped before main with 0xc0000135 (SDL3.dll not
found): the DLLs are copied next to totk.exe in the install folder only by the compile step, after the lift. Every
plugin was skipped with warn.plugins_skipped. The fake-tool tests did not see it; installer_test now checks the copy.
exefs_plugins_test covers run()'s hang and crash reasons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:52:37 +03:00