Commit Graph
362 Commits
Author SHA1 Message Date
Deon FoucheandClaude Opus 5.5 4c17621045 Write both Xbox prompt folders in the setup, the release and the builds
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>
2026-10-31 20:50:17 +10:00
Deon FoucheandClaude Opus 5.5 50f7f5a86c Pick the button prompts with a setting of their own, matched to the pad layout
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>
2026-10-31 20:50:17 +10:00
Deon FoucheandClaude Opus 5.5 f7d563db05 Draw Xbox button icons into the prompts overlay with make_romfs_patches.py --prompts
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>
2026-10-31 20:50:17 +10:00
Valiantsin DzerakhandClaude Opus 5.5 0aa529b4ce Offer the dynamic alpha to coverage switch in the menu and fix stale comments
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>
2026-10-31 12:54:05 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5cbabc4e77 Merge pull request #187: Offer the 32:9 sizes 3840x1080 and 5120x1440 with their HUD layout (Lucas-blip-png)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5f1a94c5e3 Merge pull request #196: Size thread pools by the CPUs of the process's affinity mask (Lucas-blip-png)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:48 +03:00
Valiantsin DzerakhandClaude Opus 5.5 833d04be17 Merge pull request #195: Offer the keep-running-out-of-focus switch in the Game tab (shenjackyuanjie)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:47 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4f7403550d Merge pull request #194: Take a compiler cache in front of clang from SCCACHE (shenjackyuanjie)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1681ad1bd6 Merge pull request #193: Detach the game window from the input method (shenjackyuanjie)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 577d8efbaf Merge pull request #190: Document how to connect a Switch 2 Pro Controller with motion (applezra)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6c445ede2b Merge pull request #188: Take alpha to coverage out of the dynamic state on AMD's RDNA 2-and-older driver (fixes #67) (tuwary)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:43 +03:00
Valiantsin DzerakhandClaude Opus 5.5 59e7884174 Merge pull request #184: Keep long menu descriptions whole in the description pane (Lucas-blip-png)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:51:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4b6158f883 Merge task/rdna2hires: depth images that outgrow their NVN storage get their own memory (RDNA2 garbage above 1080p)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:05:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c33af6020b Give a depth image its own memory when it needs more bytes than its NVN storage
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>
2026-10-31 12:01:24 +03:00
Lucas-blip-png 91c5312932 Size thread pools by the CPUs of the process's affinity mask
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.
2026-10-31 04:51:14 -04:00
shenjack e4eef8ae0c Offer the keep-running-out-of-focus switch in the Game tab
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.
2026-10-31 16:50:32 +08:00
shenjack 7508469b6e Take a compiler cache in front of clang from SCCACHE
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.
2026-10-31 16:49:40 +08:00
shenjack 1f87069e50 Detach the game window from the input method
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.
2026-10-31 16:49:16 +08:00
Valiantsin DzerakhandClaude Opus 5.5 c944f9f945 Split the issue form into crash, graphics, other bug and feature request
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>
2026-10-31 11:44:37 +03:00
tuwaryandClaude Opus 5.5 bca7e8aea5 Take alpha to coverage out of the dynamic state on AMD's RDNA 2-and-older driver
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
2026-10-31 16:19:45 +08:00
Lucas-blip-png 76563b34a9 Offer the 32:9 sizes 3840x1080 and 5120x1440 as game resolutions with their HUD layout
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).
2026-10-31 04:16:55 -04:00
applezraandClaude Opus 5.5 bbc6212d16 Document how to connect a Switch 2 Pro Controller with motion
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>
2026-10-31 01:08:17 -07:00
Lucas-blip-png 48d9f0f719 Keep long menu descriptions whole in the description pane
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.
2026-10-31 03:40:09 -04:00
Valiantsin DzerakhandClaude Opus 5.5 adf9c768c3 Raise the version to 0.1.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.1.9
2026-10-31 08:20:31 +03:00
Valiantsin Dzerakh 9044d4c02b Merge task/xboxprompts: Xbox button prompts layout, from pull request #126
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	installer/steps.py
#	runtime/romfs.c
#	tools/make_romfs_patches.py
2026-10-31 08:19:29 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f705ceff9f Merge task/ultrawide: game resolutions wider than 16:9 on 1.4.3, from pull request #137 (#6)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 08:16:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 61dccff1a0 Say that the Xbox prompts do not follow remapped buttons
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>
2026-10-31 07:52:59 +03:00
Valiantsin DzerakhandClaude Opus 5.5 301fc19aa3 Fall back to romfs-patches when romfs-patches-xbox fails its check at boot
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>
2026-10-31 07:52:41 +03:00
mrtink125792andClaude Opus 5.5 7923e2da6e Let the setup go on without the Xbox prompts, and put the Xbox prompts docs below the controls table
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>
2026-10-31 07:51:03 +03:00
mrtink125792andClaude Opus 5.5 bb85bc8a80 Add an Xbox prompts button layout: Switch positions with the A/B and X/Y prompts swapped to the Xbox labels
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>
2026-10-31 07:51:03 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9745206f2a Document the ultrawide sizes, the fit default of aspect and the 1.4.3 limit
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>
2026-10-31 07:45:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 09da9f1687 Credit the TOTK-Ultrawide mod for the pane list and offsets in the third-party notices
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:45:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b63d4fbf55 Check the root pane scale in ultrawide_layout.py, report a missing member clearly and fix its docstring
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>
2026-10-31 07:45:21 +03:00
Valiantsin DzerakhandClaude Opus 5.5 583f4b45c2 Build the wide UI overlays for 1.4.3 only and share the 16:9 test between resolution.c and romfs.c
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>
2026-10-31 07:44:30 +03:00
Seth 582f675e88 Render a game resolution wider than 16:9 at its own shape, with black bars as the fallback
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.
2026-10-31 07:43:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 87e0275991 Credit MacNativeGames for the 1.4.3 fade fix in the third-party notices
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:43:02 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4e1edd7584 Merge task/astcbc: ASTC textures encoded to BC3 on request, from pull request #87
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:38:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 fc133df1c0 Merge task/shaderpack: shader cache in one pack file from pull request #64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:36:02 +03:00
Valiantsin DzerakhandClaude Opus 5.5 67b1c03b0d Skip BC3 texel writes that end inside a block, and check the BC3 encoder in --probe-astc
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>
2026-10-31 07:35:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c67ef58763 Build the BC3 encoder header with tools/build_shaders.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:34:59 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b69f44be78 Merge task/paddles: bindable back paddles from pull request #156 (#140)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:29:30 +03:00
arthurhfcardosoandClaude Sonnet 5.5 dd496bfd5d Encode decoded ASTC textures to BC3 on GPUs without ASTC (astc_bc)
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>
2026-10-31 07:27:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 202ace4e9e Name the back paddles in the pad text order comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:25:46 +03:00
Seth 70a83837b0 Let the back paddles be bound
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.
2026-10-31 07:25:27 +03:00
Pasha Kagan 4d871c7920 Describe the shader cache pack in the installer documentation 2026-10-31 07:24:10 +03:00
Pasha Kagan 58b15ed069 Copy tools/pack_shader_cache.py into the release 2026-10-31 07:24:10 +03:00
Pasha Kagan 82af209b2b Add the Russian texts of the pack phase and its failure 2026-10-31 07:23:59 +03:00
Pasha Kagan 06ae18fe93 Add the English texts of the pack phase and its failure 2026-10-31 07:23:53 +03:00
Pasha Kagan dc5bd01a15 List tools/pack_shader_cache.py among the files a release needs 2026-10-31 07:23:40 +03:00
Pasha Kagan 00da267dcd Run tools/pack_shader_cache.py at the end of the prepare step 2026-10-31 07:23:40 +03:00