Commit Graph
187 Commits
Author SHA1 Message Date
Valiantsin Dzerakh 18ce808d03 Merge task/pr1363 into task/pr1357 2026-11-22 16:21:08 +03:00
Valiantsin Dzerakh d6b484a5c9 Merge task/pr1362 into task/pr1357 2026-11-22 16:21:03 +03:00
Valiantsin Dzerakh 3fd3eb7be9 Merge PR 1357 2026-11-22 16:17:39 +03:00
Valiantsin Dzerakh 2bfde7ac0c Merge PR 1363 2026-11-22 16:17:00 +03:00
Valiantsin Dzerakh cfbfa70c63 Merge PR 1362 2026-11-22 16:14:22 +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 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 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 e18eb68b6d tools/check_isa.py scans the instructions of linked images too
An instruction line of llvm-objdump starts with its address: short and indented in an object, 9+ hex digits at the
start of the line in a linked .exe or .dll. The scan kept only lines with leading whitespace, so it skipped every
instruction of a linked image and reported it clean, although the usage line names executables. It now keeps lines
that start with an address. tests/check_isa_test.py covers both forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:17:23 -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 7b53833a04 Run standalone regression suites with their prerequisites 2026-11-22 08:59:49 +00: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