Commit Graph
861 Commits
Author SHA1 Message Date
efee9bcf16 Frame generation gets a row on the Game tab under the frame limit (Off or AMD FSR 3) that applies at once, and the fps overlay reads "N fps drawn, M shown" while it runs
The row and its description (for displays of 120 Hz and more, the game at half the limit, about half a frame more input delay, not with DLSS or HDR) are in the menu's catalog for English, Russian, Portuguese (Brazil) and Simplified Chinese. frame_gen is live: vk_fg.cpp vk_fg_engine reads it again after a settings change, the contexts are made at the first frame after it is turned on (a hitch of about 0.1 s once), turned off they stay unused until exit, and gfx_present.c builds the swapchain again when the extra image for the pair comes or goes. The full overlay gets a Shown row. totk.ini.example describes frame_gen.

The shown-frames counter and the overlay lines follow PR #1089 by xellow78-lgtm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: xellow78-lgtm <336264245+xellow78-lgtm@users.noreply.github.com>
2026-11-20 13:48:10 +03:00
451813aa17 Frame generation shows its pictures: each drawn frame goes out as a pair, the generated picture once the GPU has drawn the frame and the game's half the smoothed interval later, and the game draws at half the frame limit while it does
vk_backend.c present_pair: both blits are submitted at once (gfx_present.c vk_present_blit_pair, the flip queue of two), the generated picture is presented after a timeline wait on the frame's last submission and not before the pacer's display time, the game's frame after a wait on the value after both blits and half the smoothed interval between generated pictures (factor 0.1) after it, as AMD's frame interpolation swapchain and Savage Wind's present_wait_turn do: spaced by the CPU clock alone both pictures went on screen together under FIFO and G-SYNC. The swapchain gets one image more while frame_gen names a generator, for the two images held at once; the present slots stay at two (each blit waits on the fence of the blit two before, the previous frame's same picture, already shown). The generated picture's blit lays the menu and overlay out, the game's draws them again; colour and FSR 1 run per blit; the flight recorder keeps the game's frames; the generated present carries no present ID. frame_rate.c frame_step_cap_ns halves the limit, 30 drawn at least, while the last frame went out with a generated picture, so menus and fades keep the whole limit; the real-time step follows the game's presents and stays the drawn interval. With frame_gen = off the present path is unchanged. "fg present" log lines give shown and drawn fps and the present intervals (mean, sd, p99, each half of the pair) in the world.

Measured on the RX 9070 and the 7900X on 4 cores, field save, camera turning, 1080p output: limit 120 immediate 117 shown and 60 drawn, intervals 8.34 ms sd 0.16 from generated to game's, 8.38 sd 1.71 back; FIFO at 144 Hz the same at 120, and 141 shown and 72 drawn without a limit; immediate without a limit 169 shown and 86 drawn against 94 drawn with frame_gen = off. Replay-thread cost 0.59-0.65 ms a drawn frame.

The flip queue, the pair blit, the halving rule and the present without an ID follow PR #1089 by xellow78-lgtm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: xellow78-lgtm <336264245+xellow78-lgtm@users.noreply.github.com>
2026-11-20 10:38:58 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a7275e6644 frame_gen names the frame generator, off or fsr3 (default off), instead of 0 or 1, so later generators (FSR 4 through AMD's DLL, DLSS) become values of the same setting
vk_fg.cpp vk_fg_engine is the one place that reads the string and maps it to VkFgEngine; an unknown value is off and logged once. The setting was never released, so 0 and 1 are not kept as aliases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 10:20:18 +03:00
1ea8838da9 Frame generation inputs and dispatch with DLSS off: the replay follows the scene for it, records the camera motion vectors and the SDK's prepare at the scene's end, copies the picture before the HUD sRGB-encoded as the window texture holds it, and runs the optical flow and the interpolation after the frame's window texture, nothing shown yet
vk_dlaa.c follows the scene while frame_gen is live and DLSS is off (track: the arming and end of the DLSS path, without jitter, reactive mask or per-object motion), fg_motion runs mv_pass on the camera alone and vk_fg_prepare, vk_dlaa_hud takes the picture before the HUD by PR #1089's rule once the bloom chain began, vk_dlaa_sub_end runs the interpolation at the end of the submission that drew the window texture. vk_fg.cpp reads the camera's planes and depth convention from the scene block's projection (standard depth, near 0.1 m, far 25 km in TotK 1.4.3), makes the contexts again when sizes or the convention change, resets the history on a cut (10 m or 35 degrees, as Savage Wind), a frame without camera motion and after any frame without a generated picture, and stays off with DLSS, replay workers, sync_ahead, HDR and while a menu background or a fade is open. fg_test, fg_debug, fg_shot and fg_times are the checks; GPU timestamps and the replay thread's recording time go to the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Revivedx <82332536+Revivedx@users.noreply.github.com>
Co-Authored-By: xellow78-lgtm <336264245+xellow78-lgtm@users.noreply.github.com>
2026-11-20 10:09:58 +03:00
4e48669c86 FidelityFX SDK 1.1.4 frame interpolation and optical flow built into totk.exe behind frame_gen, contexts created and destroyed only, no frame-path change
The SDK subset, its compat header and the SPIR-V shader header come from Savage Wind (MIT); tools/ffx_shaders.py regenerates the header with glslangValidator, build_game.py compiles the SDK sources with ffx_compat.h force-included, and runtime/vk_fg.cpp makes the backend, optical flow and frame interpolation contexts after the device exists when frame_gen = 1 (default 0, read at start).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Revivedx <82332536+Revivedx@users.noreply.github.com>
2026-11-20 09:40:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8c3831a1f3 The free camera is off by default behind its own switch, Free camera on the Controls tab (freecam_patch, read at start), so the camera update runs the game's code as shipped for players who never use it; the combo and key rows stay greyed until the switch is on and the game restarted, and the freecam set sits at the end of the 1.4.3 table so the sets before it keep their numbers (#1199)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:16:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 53f9e9bb5f Merge pull request #1213 into task/pr1213
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:13:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 aa60148df1 Merge pull request #1299: with pcss on, soft shadows keep their width on the ground from one sun cascade to the next instead of turning 3.5 to 5 times softer at each step (itaskaev2, #1291)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:05:10 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f0011b89dd Merge task/cjkfont: the shared fonts reach the game decoded as on the console, so Chinese and Korean text no longer draws with the wrong font's metrics and the ellipsis sits on the line (#591)
Same fix as MacNativeGames pull request #2145 by lostars, pointed out by rcyggdra.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:05:23 +03:00
Valiantsin DzerakhandClaude Opus 5.5 dba68c903d The shared font comment in ov_system.c wraps at 120 columns (#591)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:05:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 41eb234db4 The nn::pl shared fonts reach the game decoded to plain sfnt after the BFTTF header, as the pl shared memory holds them, so the font loader no longer hands the encoded payload to Decode and Chinese text keeps its ellipsis on the line (#591)
The firmware files keep the font XOR-encoded. The game's font loader reads the data at GetSharedFontAddress as a font only when it starts with an sfnt tag; otherwise it calls nn::fontll::ScalableFontEngineHelper::Decode, which returns NULL for the encoded payload, and the face is left without a name. font_data now decodes the payload in place after ov_bfttf_size accepts the file and checks for an sfnt tag. The services probe checks the unchanged header at Address - 8 and plain sfnt at Address. Same fix as MacNativeGames pull request #2145 (shared_font.c load).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:04:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 02220fc879 The Tenbez Shrine launcher set has its own switch, shutter_fix, and sits at the end of the 1.4.3 table, so the sets after it keep their numbers and a lift changes one chunk; the comment names the second AI file that uses the node (#1215)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:02:34 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e90732bca1 Merge pull request #1219: contact shadows darken only the pixels the game's lighting puts in the sun, so caves and shade keep their light (itaskaev2, carries #439 by Specht2010)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:04:48 +03:00
Valiantsin DzerakhandClaude Opus 5.5 43bd965e69 A chunked replay's contact shadow march takes the lighting target's image at the time it records, as it does the scene colour and the linear depth, not the entry the scan saw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:00:43 +03:00
Valiantsin DzerakhandClaude Opus 5.5 06ebf18f5d Merge pull request #1301: the mouse turns Autobuild's placement camera and other cameras without a direct hook as the right stick (itaskaev2, #1300)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:53:20 +03:00
Valiantsin DzerakhandClaude Opus 5.5 91aa744907 TOTK_TEST_PAD_RUMBLE_MS is read with cfg_get like TOTK_TEST_PAD, so a test gamepad without it no longer stops the game at start: cfg_int stops on a name with no row in the settings table (#329)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:53:19 +03:00
Valiantsin DzerakhandClaude Opus 5.5 939eeed175 The mouse shake's right-stick side is cleared when the camera input leaves the direct path, so a camera without a direct hook never keeps the stick at full tilt (#1300)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:52:25 +03:00
Valiantsin Dzerakh d87d43a4eb Merge commit 'refs/pull/1219/head' of https://github.com/valentderah/totk-pc-recomp into task/pr1219 2026-11-19 20:38:08 +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
itaskaev2andClaude Opus 5.5 715070e267 The DLSS scaling draw is found again after translator patch 0017 (#1291)
Patch 0017 adds two support buffer fields, which every translated shader declares, so the SPIR-V hash of the game's FXAA shader changed (0x5c43ae18948d52cb to 0xde20aef90fea4ce6, with zero_locals 0xaad42238801d31d8 to 0x755964e8dce7f34d). vk_dlaa_skip_draw then no longer skipped the scaling draw DLSS replaces, and on 1.4.3 that draw, sampling DLSS's output-sized picture in place of the scene, stretched the picture's top left over the whole screen in every DLSS mode but dlaa. FXAA_FS gets the two new hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:42:45 +01:00
itaskaev2andClaude Opus 5.5 4edf63a6dd Soft shadows keep their width on the ground across the sun cascades
The pcss radii and penumbra factor were in UV of whichever cascade map a pixel read, the same in every cascade. Each cascade's map spans 3.5 to 5 times the ground of the one before (measured on 1.4.3: the cascades end at about 4, 27, 120 and 450 m), so a soft shadow turned that much softer at every cascade step, a step that moves with the camera (issue #1291).

The runtime now measures each cascade from the camera block the lighting shaders read (c4 rows 42 to 57, a projective matrix per cascade, and row 58, the cascade ends): the UV and depth per metre where the cascade begins and ends. It passes two factors per cascade in two new support buffer fields, pcss_depth and pcss_scale, and translator patch 0017 applies them in the PCSS lookup. The values keep their meaning in the second cascade, which holds most shadows on screen, so the look at a given pcss value stays where most players see it. The narrowest radius stays in texels. The HDR field moves from byte 1440 to 1472. With pcss = 0 nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 11:41:00 +01:00
Valiantsin DzerakhandClaude Opus 5.5 d547d27939 Merge dev into task/cmdmem
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:14:48 +03:00
Valiantsin DzerakhandClaude Opus 5.5 7795c0a5a9 nvnCommandBufferCallCommands adds 24 bytes of control memory per called handle, so a buffer that only called recordings no longer reads as empty
A call adds no command memory since the previous commit. Control memory grew only at EndRecording, so a buffer queried
after calls and before its first EndRecording reported 0 command and 0 control bytes, which the game treats as an empty
buffer. The game's inline copy of the driver's call (1.4.3 main+0x2d33a4) writes one 24-byte control entry per segment
of the called handle; each called handle now adds that much. The NVN probe checks that a call-only buffer reports 0
command and some control memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:14:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 054390ef1d nvnCommandBufferGetCommandMemoryUsed no longer grows on CallCommands and grows by the copied recording's hardware size on CopyCommands
The real driver puts a call in control memory, so a call adds no command memory; a copy adds what the copied commands
take on hardware. We added our record bytes of the inlined recording for both. On 1.4.3 the game queries recordings
that hold calls every frame (field save, 20 s: 15,700 such queries from six call sites, up to 14,604 bytes reported
where the driver rule gives 3,204); copies were not seen. Each recording now keeps its hardware size from EndRecording
(copy_prefix.hw), and memory added while recording keeps that size whole. Same accounting as MacNativeGames 6909dbb7,
which measured 40 bytes on the original driver where their port reported 88 and traced a renderer heap crash near
Zora's Domain to the larger sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:02:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 693019c440 Rumble writes go to a worker thread, so a slow Bluetooth HID write no longer blocks the thread that sends vibration or the input lock
input_rumble used to call SDL_RumbleGamepad under the input lock; on a Bluetooth pad the write can take tens of milliseconds and stalled SendVibrationValue and every other user of the lock. It now stores the newest request and wakes a rumble worker, which sends only the latest one. The worker takes its own handle on the open pad (SDL_OpenGamepad of its id) under the lock and writes without it, so closing the pad meanwhile cannot free it under the write. A pad going away drops the pending request, and exit sends a zero request. TOTK_TEST_PAD_RUMBLE_MS makes the test gamepad rumble with a slow write. Idea from Savage Wind Recomp commit a8ad674 (issue #730).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 08:38:50 +03:00
lebomisandClaude Opus 5.5 9ab4192bcc The free camera key is set on the Controls tab by pressing it, as quick save's keys are
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:28:13 +11:00
lebomisandClaude Opus 5.5 5fdacca237 The free camera steps through move, lock and off: locked, the view stays and Link walks where the left stick points on screen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:28:13 +11:00
lebomisandClaude Opus 5.5 58930c152c The free camera combo counts the gamepad and an input script, not the keys bound to its buttons.
The previous commit read the combo from the merged buttons, where a key bound to ZL is the same bit as the left
trigger: with freecam_pad = zl+zr, the right mouse button and F switched the free camera in play. The keyboard has
freecam_key for that, so the gamepad combo now counts the gamepad and the input script, which stands in for one.

runtime/input.c poll_merged: script_apply writes its buttons into script_seen, which is then merged into the buttons as
before. freecam_gate counts a position of the combo when pad_seen has it or script_seen has the Switch buttons it stands
for; Home stays gamepad only. docs/controls.md ("Free camera") says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:23 +11:00
lebomisandClaude Opus 5.5 8dfc3609c4 The free camera combo also switches from the keys bound to its buttons and from an input script.
freecam_gate read the combo from the physical gamepad only, so a tester's input script that pressed ZL+ZR+L3
sent it to the game instead (#1213). Each position of the combo now also counts when the Switch buttons it stands
for are down in the merged buttons, as the Minus+Plus menu combo already does; Home has no Switch button and stays
gamepad only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:23 +11:00
lebomisandClaude Opus 5.5 88f9a965af Change freecam default binds for keyboard and controller to none, configurable through totk.ini or the Controls tab.
freecam_key and freecam_pad were F6 and ZL+ZR+L3 for everyone, potentially causing unwanted toggles. F6 is also the
quick save key of #1188. Both are none now.

runtime/cfg.c: the FREECAM_PAD and FREECAM_KEY rows of the settings table default to none. runtime/input.c
freecam_pad_mask reads the combo with cfg_value instead of falling back to its own zl+zr+lstick, so an unset combo is
the table's none like the key. The comments in runtime/freecam.c, runtime/input.c and runtime/ui/menu.cpp
rows_freecam, docs/controls.md ("Free camera") and totk.ini.example say so and keep F6 and ZL+ZR+L3 as examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:23 +11:00
lebomisandClaude Opus 5.5 5fa6db3c70 The free camera works on the keyboard and mouse: freecam_key switches it, the bound keys fly it and the mouse turns it
input.c freecam_gate also switches the free camera on a press of TOTK_FREECAM_KEY (f6 by default, none for no key).
While it is on, ZL, ZR, L and R come from the merged Switch buttons, so the keys bound to them (Z, X, Q and R by
default) go down, up and change the speed like the gamepad's; the keys' sticks already flew and turned it. The mouse's
counts are taken in the poll and turn it at the game camera's rate (0.08 degrees a count times mouse_sens, through
freecam_mouse), and input_direct_mouse_sample gives the game's mouse camera none meanwhile; in the stick emulation mode
the mouse arrives in the right stick as before. The Controls tab gets a Free camera key row (off, F2 to F7, F9), with
text in all four menu languages; docs/controls.md lists the keyboard column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:23 +11:00
lebomisandClaude Opus 5.5 34b6b380ac The Controls tab picks the free camera combo
A row under the walk rows offers the trigger pair or the shoulder pair with either stick click, or off, named as the
open pad labels its buttons (binds_page.cpp binds_pad_label, the Controls tab's labels). TOTK_FREECAM_PAD gets a live
row in the cfg table with its default zl+zr+lstick; totk.ini still takes any combo of button positions, shown as
written. On other game versions than 1.4.3 the row is off and says so. Text in all four menu languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:23 +11:00
lebomisandClaude Opus 5.5 29eec07245 ZL+ZR+L3 detaches the view from Link on 1.4.3 and flies it with the gamepad (freecam_pad)
The camera component update (main+0x628460) copies each component's eye, target and up into its sead camera. The site
freecam (main+0x6286d4, the load every path to that copy runs first) calls runtime/freecam.c freecam_hook, which
writes the component's one-shot eye and target overrides (+0x180, +0x198) while the free camera is on; the update
takes them in place of the pose and clears them, so the game camera's own state is never changed and resumes the
frame the free camera ends. The up vector is levelled through the component's up offset (+0x200), which is kept and
put back. Of the three components a frame updates, the hook drives the two that share the player camera's eye, leaves
the one at the default pose and picks again after a load; with the free camera off it does only the displaced load.

input.c freecam_gate latches TOTK_FREECAM_PAD (zl+zr+lstick when unset, none for no combo) like Minus+Plus and, while
the free camera is on, gives it the sticks, the trigger axes and L and R presses and the game nothing. The left stick
flies along the view and sideways, the triggers straight up and down, the right stick turns, each L or R press halves
or doubles the speed (0.25 to 512 m/s, 8 at the start); the flight follows the wall clock. TOTK_FREECAM_PATCH=0
removes the hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:22 +11:00
lebomisandClaude Opus 5.5 94c33b1d85 The gamepad poll keeps its buttons by position, the Home button and the trigger axes, and input_pad_combo reads a combo setting
pad_read stores what pad_physical saw (pad_seen, by PAD_* position, with the Home / Guide button after the Switch
buttons as PAD_GUIDE) and the two trigger axes (trigger_seen), under the input lock, for gamepad combos that are no
Switch buttons and for analog trigger readers. input_pad_combo parses a setting of button positions joined with +
(the bind_ lines' pad: names plus guide or home) into a mask, logging a name that is no button. input_map.c exports
input_key_id and input_pad_id, and ui/binds_page.cpp binds_pad_label gives the label the open pad has on a button,
so menu rows can name buttons as the Controls tab does. No behaviour changes on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:22 +11:00
Valiantsin Dzerakh 6c48e7a364 Merge dev into task/psp 2026-11-18 19:12:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 74c1cde876 The Controls tab names a PlayStation pad's shoulder, stick and menu buttons L1, R1, L2, R2, L3, R3, Options and Share (#180)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:12:42 +03:00
Valiantsin DzerakhandClaude Opus 5.5 234a10f413 With sync_ahead an exit line gives the run total of the waits at a pool invalidate, as the shadow log lines stop at frame 1800 without TOTK_TRACE=perf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:55:13 +03:00
Valiantsin DzerakhandClaude Opus 5.5 bc579c62e8 The qstamp patch set is switched off when sync_ahead is refused, so TOTK_SYNC_AHEAD=1 without shadow storage leaves the game's depth query check as it was
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:55:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 ee6d5a6183 Merge dev into task/pr1275
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:54:52 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4a59088f04 Without an output_res the game makes the missing folders for the display's shape, so a prompts change on a wide display brings that shape back at the next start (#180)
The default output_res keeps the display's shape only while that shape has the
prompts' folder (cfg.c shape_keeps_prompts). After a switch to PlayStation
prompts on a 21:9 display the default was 1920x1080, so the start and the menu
asked only for the 16:9 folder and the game stayed 16:9. cfg_screen_size gives
the display's size while the player set no output_res.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:46:52 +03:00
Valiantsin Dzerakh 792d5398ab Merge branch 'pr1276-head' into task/pr1276
# Conflicts:
#	docs/agents/symptoms.md
#	runtime/cfg.c
2026-11-18 18:46:16 +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 65e6dc50d3 Merge pull request #1284: on 1.4.3 DLAA's jitter goes into the game's camera instead of the viewport, so water seen at a low angle stops flickering (ipavlin98, #1126)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:34:05 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c145f2bd5d The camera jitter checks where each copy puts its matrix in the block: f_70000e31d4 takes the offsets from the shader's layout (x8), so only a projection at 0x70 and a view-projection at 0x30 take the offset, a projection whose view-projection lies elsewhere gets its centre terms back, and a block counts as given only once both matrices carry it (#1126)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:29:28 +03:00
Valiantsin DzerakhandClaude Opus 5.5 902d91a94e Merge pull request #1275 head into task/pr1275
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:27:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0ae38dd34a Merge pull request #1278: a VRAM mirror copies from the shadow only after the shadow sync, so loads with sync_ahead and replay_workers no longer leave stretched slabs (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:26:25 +03:00
Valiantsin Dzerakh c1449b2a9b Merge commit 'refs/pull/1284/head' of https://github.com/valentderah/totk-pc-recomp into task/pr1284
# Conflicts:
#	docs/agents/symptoms.md
2026-11-18 18:22:56 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0350d91b72 The water volume mask bias is decided once per state change and only for LEQUAL and GEQUAL draws (#1126)
prepare_draw sets ex->volume_bias where the draw's dynamic state changes, so record_fixed reads a flag instead of
checking the pipeline state on every draw. A census of the matching draws in the field, the town and rain found two more
states with the same blend and depth signature, both tested GREATER: the volume's back faces into the same channel and
another shader's front faces into red. GREATER's equal case fails, and the bias toward passing turned the game's tie
the other way for them; they are now left as the game sets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:18:22 +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 593eeeb8ed The lock order comments name the new edge: mirror_sync and mirror_create take shadow_lock under mirror_lock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:08:44 +03:00