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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.