Commit Graph
1345 Commits
Author SHA1 Message Date
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 424a66bba3 Merge pull request #1295: the Tenbez Shrine launchers throw the ball into the other launcher's seat above 30 fps on 1.4.3, with its own switch shutter_fix (shinodanpen, #1215)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:02:44 +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 Dzerakh 1bcb8acfed Merge branch 'pr1295-head' into task/pr1295 2026-11-19 21:15:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8eec0eeedf Merge pull request #1155: game 1.1.0 gets the climbing speed and gear rotation fixes above 60 fps, and the patch tools write their files as UTF-8 (shenjackyuanjie, #35, #276, #1001, #330, #984)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:08:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 aec59b033b The 1.1.0 patch doc lists climb and gears with the other sets and describes their sites, register contract and tests in one short section
The section the pull request added named the set count wrong (RT_PATCH_COUNT 12 to 14; the table goes from 14 to 16
sets), quoted branch hashes as baselines, and carried the author's audit history and WSL toolchain notes, which do
not describe the current state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:07:35 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a7f24442b6 The cheat, ExeFS patch and plugin tools read and write their patch files as UTF-8, the encoding recomp/patches.py load now reads them in
Without Python's UTF-8 mode these tools used the locale code page, so a plugin image path with non-ASCII characters
(tools/exefs_plugins.py plugin_lines) would reach the generator in a code page it no longer reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:07:01 +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 Dzerakh f780b3d216 Merge pull request #1155 into task/pr1155 2026-11-19 21:00:35 +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
Valiantsin Dzerakh 5278e137ff Merge commit 'refs/pull/1301/head' of https://github.com/valentderah/totk-pc-recomp into task/pr1301 2026-11-19 20:37:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0c5ef2d355 Merge pull request #1288: the audio_drain_fix texts say when the game's guard fires, evenly paced audio frames, not any run above 200 fps (shinodanpen, #337)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:36:16 +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 DzerakhandClaude Opus 5.5 db7d6603a6 Merge task/cmdmem: command memory grows by nothing on CallCommands and by the hardware size on CopyCommands, as on the console, and a call takes control memory; the game sizes renderer memory from these numbers (MacNativeGames 6909dbb7)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:16:24 +03: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 629ca89b16 Merge task/rumble: rumble writes go to a worker thread, so a controller whose rumble write blocks no longer holds up the game thread that sends vibration or the input lock (#329)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 08:40:08 +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
shinodanpenandClaude c4928ff77f Scale the Tenbez Shrine launchers' speed by the frame on 1.4.3 so the ball lands above 30 fps (#1215)
The two launchers of Tenbez Shrine (DgnObj_BoxShutter_4x4x4, AI ShutterFence) throw the stone ball less far the
shorter the frame is: at 60 fps and above it lands on the rim of the receiving launcher and is juggled there or
knocked into the pit. The shrine's map raises their speed by 1 % for what looks like Nintendo's 60 fps Switch 2
build (SpeedForOunce and shouldUseOunceSpeed), which the Switch build of QueryBlackboardGetF32FromActorForOunce
ignores. The new set shutter (TOTK_HIGHFPS_FIX) multiplies the value that node returns by 1 + 0.065 * (1 - ratio)^2
when its shouldUseOunceKey input is true: the factor that keeps the flight of 30 fps at 45 to 144 fps, and 1 at a
ratio of 1 or more.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-19 00:23:33 +00:00
shinodanpenandClaude bb6523a080 The audio_drain_fix texts say when the game's guard fires: evenly paced audio frames, not any run above 200 fps (#337)
The texts that came with the audiodrain set (docs/settings.md, totk.ini.example, the comments in patches-v121.txt and
patches-v143.txt) said that above about 200 game updates a second the game switches its sound off. Every run behind
them had captured the mix with audio = none. With a device playing, on Linux with PipeWire, the game keeps its sound at
240 fps without the set.

The guard (1.2.1 main+0x9bcdc4) sets its count back to 0 whenever a free list is there (0x9bce00), which takes two
audio frames between two updates of the game. The mixer's timer renders one frame every 5 ms, so at 240 updates a
second that never happens and the count reaches 300. A device paces the render thread in bursts after each period
(audren.c, gap_ns: 4 ms apart on Linux; 0 on Windows, read from the code and not measured), so it happens several times
a second. Sampled on the render thread on Linux with PipeWire's 1024-frame periods: 200 frames a second either way, 76%
of them 4 ms after the one before with the device, 939 of 940 at 5 ms with the timer. The count and the switch have
not been read in a run.

The mixer also keeps time by its timer while a device takes nothing. Measured at fps_limit 240, same save and input
script, with the game's audio stream paused from outside (pw-cli on its PipeWire node, not a real device stalling)
while the game ran at 240 fps. On 1.2.1 with the set off a pause of 5 s (two runs) and of 2 s (two runs) left the game
silent to the end of the run, also after the device resumed, and a pause of 1 s (one run) did not; with the set on a
pause of 5 s (two runs) left only the gap. On 1.4.3, one run each: silent after a pause of 5 s and of 2 s with the set
off, sound after a pause of 5 s with it on, sound with a device and no pause with the set off.

The numbers without a device now come from runs that can be named: 1.2.1 6 of 119 and 111 of 119, 1.4.3 3 of 119 and
113 of 120 (set off and on). They replace 5 of 118 / 108 of 118 and 2 of 118 / 110 of 119, which I cannot match to a
run any more.

Text only: no code, no site and no default changes. Not measured: Windows, a device with periods of 240 frames or
less, a real device stalling, 1.4.3 with a device and the set on.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 18:18:43 +00:00
Valiantsin DzerakhandClaude Opus 5.5 ebce67b367 Merge task/psp: PlayStation button prompts from #741 (fabiomode2), and the game makes a missing layout or prompts folder itself after a resolution or prompts change (#180, #378)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:14:27 +03: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 4c4f3b150f Merge pull request #1275: with sync_ahead the game waits for a GPU result it reads once and takes depth queries one frame older, so Link no longer gets gloom on clean ground and shrine reflections no longer go out (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:59:15 +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 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 b9f104ef6b Merge pull request #1276: dlss_fixed_exposure creates DLSS without auto exposure, so distant fogged blocks in the Depths no longer change brightness for a frame (ipavlin98)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:47: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 6f03ccd30d The build and controls docs show the romfs-patches folder paths again, which held a carriage return in place of the backslash before romfs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:44:22 +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
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 6ed99acddb Merge pull request #1283: water volume mask draws get a depth bias toward the viewer, so puddles stop flickering (ipavlin98, #1126)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:20:25 +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