The setup runs make_romfs_patches.py --prompts xbox and --prompts xbox-label and warns once when either fails, the
release bundles tools/button_icons.py and fontTools, and build_game.py and package_build.py copy both folders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prompts = nintendo or xbox (the Button prompts row of the Controls tab, read at start) takes over from
pad_layout = xbox_prompts, which is read as pad_layout = nintendo with prompts = xbox. overlay_init loads
romfs-patches-xbox for the Nintendo layout and romfs-patches-xbox-label for xbox and auto (input_prompts_folder), loads
romfs-patches instead of stopping when the RomFS mods folder replaces one of their files, and the menu says why the
prompts in use differ from the setting. The settings probe checks the folder against the layout's button table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/button_icons.py, adapted from MacNativeGames' make_button_icons.py, draws LB, RB, LT, RT, Menu, View and a d-pad
cross into the button font of every font archive and into the button guide's L and ZL images, with the letters cut out
in the game's own text fonts, and raises the resource size table for the archives that grow. --prompts xbox swaps the
face buttons as --xbox-prompts did (now its older name); --prompts xbox-label keeps their letters for the xbox and auto
pad layouts. The plain overlay is unchanged. tests/romfs_prompts_test.py runs both on a RomFS it builds itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TOTK_VK_DYN_A2C from pull request #188 gets the settings row, the Advanced tab choice and the totk.ini.example
line that TOTK_VK_DYN_VERTEX has. The IME comment in gfx_window.c window_main named a walk key the runtime does not
have, and ov_system.c still said TOTK_ASSUME_FOCUS opens the window without focus, which TOTK_BACKGROUND_WINDOW does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AMD's RDNA2 driver places the depth compression metadata after the depth data. Above 1080p that tail of a depth
target bound into the game's texture heap lay over the next texture, and every depth write scrambled it: a garbage
band at the top of the screen, a pink glow, blocks in the grass and a blue checkered scene in the menu (RX 6600 to
6800, issue #185). Reproduced at 2560x1440 on an RDNA2 iGPU with driver 26.10.1; all 63 oversize images there were
D16 or D32 depth targets. Colour images keep their place in the pool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eight places sized a pool (pipeline workers, library prebuild, translator prewarm and seeding, the multithreaded ASTC decoder) by GetActiveProcessorCount, every logical processor of the machine. A process limited with start /affinity, Task Manager or a launcher then started a pool for 16 CPUs on 4. plat_cpu_usable counts the affinity mask (all active processors for a process that spans processor groups); plat_cpu_count, the machine's count, stays for the system info. Idea from MMadmer's UsableCpuCount in a fork of the Shadow of the Colossus PC port.
The game pauses whenever its window loses focus, as it does on the Switch when Home is pressed, and ASSUME_FOCUS was the
only way to change that: a known key with no row in the settings table. The runtime reads it at each focus change rather
than once at start, so the row takes effect the next time the window is left, and the build guide says what an unfocused
window now does.
A lift rewrites every generated chunk with the same contents, so a local sccache hits all of their objects and the
compile step costs seconds instead of minutes. build_game.py writes it into the ninja file ahead of cc when the
environment names one; the build guide describes the setting.
A Chinese IME switched on over the game attached to the window, then showed its candidate window and took the keys it
composes although there is nothing to type into here; Shift, which a player may have bound as the walk key, is one of
the keys such an IME takes. The software keyboard's edit box is a window of its own and keeps the IME it needs, so only
the game's window is detached.
Each form applies its own labels, asks whether the reporter can keep playing,
and requires a check of the pinned and existing issues. Questions go to
Discussions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AMD's Windows driver branch for RDNA 2 and older (vk_caps.amd_sc, driverInfo
"(AMD proprietary shader compiler)") applies alpha to coverage even while
vkCmdSetAlphaToCoverageEnableEXT sets it to false. TotK never turns alpha to
coverage on (a TOTK_DUMP frame showed it off in all 1170 pipelines), yet on an
RX 590 with driver 24.9.1 the character draws kept their depth and lost their
colour in the G-buffer, so Link and the NPCs were black silhouettes, and other
surfaces were dithered into checkerboards (issue #67, RX 470/570/580).
On that driver branch vk_pipeline.c ensure_init now leaves alpha to coverage out
of the dynamic state, so it goes into the pipeline key as on GPUs without EDS3.
TOTK_VK_DYN_A2C=0/1 (ini vk_dyn_a2c) forces either behaviour. NVIDIA and RDNA 3/4
are unchanged. Tested on the RX 590 with 1.4.3: characters, the checkerboards and
the black blocks all render correctly.
Fixes#67.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DcYzeu7eb2txzmu4brvcgh
tools/ultrawide_layout.py computes every edit from the canvas aspect, so 32:9 needs no new layout data: the installer now builds romfs-patches-3840x1080 and -5120x1440 beside the four 21:9 sizes, and the menu lists both. Before, a 32:9 output_res got the wide camera with the 16:9 HUD stretched over it (issue #181).
SDL does not open the Switch 2 Pro Controller on Windows by itself, so it needs a bridge program. Tested with the
game: hbashton's DS4Windows fork emulating a DualSense gives buttons, rumble, gyro, accelerometer and calibrated
sticks, read directly by the game. Bridges that output a ViGEm DualShock 4 (ProCon2Windows, connectyourpro) give rumble
but frozen motion values, so motion controls do nothing with them. docs/controls.md gets a short section with the log
lines that show a working setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pane copied each description into 512 bytes. The Russian button layout description is 840 bytes of UTF-8, so it stopped mid-sentence, and the English one (507 bytes) lost the note appended after it. The pane now holds UI_DESC_BYTES (2048), and probe_menu_text checks every English and Russian menu text leaves room for a note.
The swapped letters are baked into the game's textures, fonts and messages, so a button remapped with a bind_ line or on the Controls tab keeps the old letter on screen. The menu description (English and Russian) and docs/controls.md now say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Xbox prompts folder is optional, so a manifest that no longer matches the RomFS logs the reason and drops that folder instead of stopping the game. The main romfs-patches and the mods folder keep their fatal checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
romfs-patches-xbox is optional: when make_romfs_patches.py --xbox-prompts fails (a game update whose prompts it does
not recognise), the setup removes the partial folder, warns (warn.xbox_prompts_failed) and finishes, where it stopped
the whole install before. The game then keeps the Switch prompts and the menu says the files are missing. Its log is
prepare-xbox-make_romfs_patches.log, so it no longer replaces the 60 fps run's log, and Prepare no longer counts the
folder as part of a finished step.
The Xbox button prompts section of docs/controls.md sat between the layout list and the controls table it introduces;
it now follows the table. The building.md note follows the paragraph it interrupted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With pad_layout = nintendo on an Xbox pad the right button does Switch A but is labelled B, the bottom one does B but is
labelled A, and the game's prompts still name the Switch buttons. A fourth Button layout choice, Xbox prompts (A right)
(pad_layout = xbox_prompts), maps the buttons as nintendo and swaps the prompts to the labels, so each prompt names the
button to press. Automatic, Nintendo and Xbox are unchanged and keep the game's own prompts. The buttons change at once;
the prompts at the next start, as the game reads its UI archive and fonts at boot (the menu says so).
At start, xbox_prompts loads romfs-patches-xbox in place of romfs-patches (runtime/romfs.c overlay_init).
tools/make_romfs_patches.py --xbox-prompts writes it from the player's own RomFS, with the 60 fps patches; nothing from
the game or a mod is added to the repository. It swaps A with B and X with Y in:
- the letter images Nt_KeyTexA/B/X/Y_00 of the action prompt (DoCommand_00), in the Common archive's __Combined.bntx
(same format, size and tiling, so the image data trades places);
- the action prompt's diamond of the other face buttons: one-letter text panes the game fills from
LayoutMsg/DoCommand_00.msbt in each language's Mals archive (both the messages and the layout's own text);
- the button glyphs U+E040 to U+E043 of scft/External.bfotf in each Font/Font*.bfarc, which every other prompt uses
(CFF outlines and metrics in the deobfuscated OpenType font, then its checksums).
The diamond's shape shows the button's position and stays. The setup writes both folders; the menu notes when the Xbox
prompt files are missing and when the prompts in use differ from the choice until a restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wide sizes other than the four the installer prepares get the wide camera with a 16:9 HUD stretched over it. aspect = fit letterboxes a 16:9 game in a wider window where it used to stretch. Ultrawide is 1.4.3 only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root pane's shipped scale_x must be 1.0 before the tool writes the narrowed scale. A layout or animation member missing from the archive stops with a SystemExit naming it instead of a bare KeyError. The docstring no longer describes nvn_mtl.m's UI squeeze or scripts/ paths from upstream, and says where the pane list and distances come from (the GPL TOTK-Ultrawide mod, values only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.2.1 has no camera aspect patch, so the installer no longer builds romfs-patches-<w>x<h> for it (the layout tool is checked against 1.4.3 and could fail the whole install), and romfs.c overlay_init skips that overlay on 1.2.1 through res_wants_wide_overlay. overlay_init and res_init now both call res_is_16x9 (1% tolerance), so 1366x768 counts as 16:9 and logs no missing overlay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An output_res such as 3440x1440 now widens the camera's view to that shape on 1.4.3: patches-v143.txt
sets the aspect ratio at the camera and viewport sites that hand it to the perspective projection.
The HUD and menus come from a romfs-patches-<w>x<h> overlay that make_romfs_patches.py --aspect
builds through tools/ultrawide_layout.py, and romfs.c overlay_init picks that overlay when the game
resolution is not 16:9. The installer prepares it for 2560x1080, 3440x1440, 3840x1600 and 5120x2160.
When the window's shape differs from the game resolution's, the new aspect setting keeps the
picture's shape with black bars (fit, the default) or stretches it over the window.
A BC3 image takes whole 4x4 blocks or a part ending on the mip's edge; a WriteTexels region of a 5x5 or 6x6 footprint may end inside one. --probe-astc encodes every footprint to BC3 and holds the blocks to alpha, palette-place, flat-colour and PSNR bounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A GPU that cannot sample ASTC gets the textures decoded to RGBA8, four times the video memory of the ASTC blocks. With astc_bc = 1 (default 0, GPU decoder only) a second compute pass, bc3_encode.comp, encodes the decoded texels to BC3 and the image is BC3_UNORM or BC3_SRGB: 8 bits per texel instead of 32. The encoder is the usual bounding-box method with the box diagonal turned to the sign of the colour covariance, and the eight-value alpha mode.
A region of a WriteTexels that does not start on a 4x4 block corner is left as it was and logged. The setting is in totk.ini and the Advanced tab. The SPIR-V header was built with glslang 16.6 (build_shaders.py uses glslc) with the same source hash.
On a GTX 1650 (4 GiB) in the Fire Temple the GPU time per frame went from 10-23 ms to 3-12 ms and the frame rate held at 59-60 fps.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SDL reports the back buttons of an Xbox Elite, DualSense Edge or Steam
Controller as four paddle buttons, but the pad table stopped at the
triggers, so they could not be mapped. They are now pad inputs lpaddle1,
rpaddle1, lpaddle2 and rpaddle2, with no default action, bindable from
totk.ini or the remapping rows.