Commit Graph
200 Commits
Author SHA1 Message Date
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 18482e0af0 Gyro drift learning at rest gets its switch on the Controls tab, below the gyro calibration row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 09:17:28 +03:00
ipavlin98 efb896235a DLSS without auto exposure is a setting, dlss_fixed_exposure, next to the other DLSS settings, off by default: 0 creates DLSS with AutoExposure as before, 1 without it, and a change recreates the features at once 2026-11-18 00:58:32 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6b0974f08d Merge pull request #1188: opt-in quick save and quick load on rebindable keys with no menu on the screen, game 1.4.3 (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:17:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 358b7916d8 Merge task/hud: hud_width keeps the HUD within the middle 21:9 or 16:9 of a wide screen, from pull request #1262 (Marjaperse, ProSep, #643)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:15:16 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f801169e1c Merge pull request #1188: opt-in quick save and quick load with no menu on the screen (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:07:20 +03:00
Valiantsin Dzerakh 006c186928 Merge pull request #1262 into task/hud: hud_width keeps the HUD narrower than a wide screen on the Shapes step (Marjaperse, ProSep) 2026-11-17 20:06:17 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c76a38852e The DLAA effects switch sits with the other DLSS settings and is read only while DLSS runs
dlaa_effects_after moves to the Screen tab under the DLSS rows, to [display] in totk.ini and totk.ini.example next
to dlss_char_mask, and vk_dlaa_frame reads it after the dl_active check, so a game without DLSS does no new work
per frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:05:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e031ac596a Merge dev into task/pr1263
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 19:59:52 +03:00
ipavlin98 40c0071dd2 With DLAA, DLSS runs before the fog and the particles, which are drawn over its picture without jitter, so the dust in shrine fog no longer vanishes
DLSS ran at the bloom, after the volumetric fog composite and the particle pass. Neither has motion vectors or jitter
of its own, and DLSS wiped out the smallest motes. In DLAA mode DLSS now runs right after the deferred lighting: the
light target is the G-buffer's scene colour target, the lighting is the first pass into it after the G-buffer, with
a D16 depth, and the first pass into it with any other depth (the scene's, none, or the D16 of an ability's highlight)
is an effect. The order of the effects changes from frame to frame (the yard's half-size effects pass is in some
frames only; with Ultrahand or Ascend open the highlight comes before or after the fog layer), and rules that waited
for one of them, or took any D16 pass for the lighting, flickered. As a safety net the point is used only after it
held for 60 frames with nothing of the scene drawn after it; otherwise DLSS stays at the bloom.

dlaa_effects_after (Advanced tab, Render fixes, default 1, live) turns it off. The upscaling DLSS modes are unchanged.
2026-11-17 09:41:08 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d865000929 A mod plugin's init runs at every start and its hooks go on when it writes what the build recorded (#845)
After the design in #845 by itaskaev2, with one change: no image taken after a build-time run. When a
plugin's patch set is on, sdk's DT_INIT runs first, then the plugin's, in the environment of the service
run (rtld image below main, the QueryMemory view, the alias pool, process-memory aliases), then the game's
constructors. That is rtld's order on the Switch (oss-rtld, librtld/source/ld.cpp __rtld_modules_init
runs the modules from the last loaded to the first). sdk's first DT_INIT only registers it with its musl
and main's DT_INIT finishes it, so its flag stays 1 and it is not called a second time. The plugin keeps
its heap blocks, GOT and alias addresses.

The words the init wrote into the game modules and the plugin's .text after it are compared with
patches.h: equal, the set stays on; different, it goes off for this run, the reason is logged, the Mods
tab row says so and build-cache/plugins.stale has the next start run the rebuild. The branches written
into main's .text are taken back. mods.c reads build-cache/plugins.status: a built plugin's set joins its
mod's sets and the Mods tab order, a refused one keeps its mod off with the reason (the catalog texts in
en, ru, pt-BR, zh-Hans), a plugin without a line waits for the rebuild. A plugin file changed after the
build is left out by the loader. TOTK_PLUGIN_TRACE=1 logs the first call of each hook entry.

Without a plugin in the build nothing of this runs. --probe-mods covers a plugin set against another mod's
patch on one site, a refused plugin, one the build lacks and one whose start differs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:48:23 +03:00
Marjaperse 3a9e8ea50a Verify selective HUD shape preparation and fallback (#643) 2026-11-17 03:58:35 +02:00
ProSepandClaude Sonnet 5.5 757ee0b2bf Add hud_width to keep the HUD narrower than a wide screen
On a game resolution wider than 16:9, hud_width = 21:9 or 16:9 keeps the HUD within the middle 21:9 or 16:9 of the
screen instead of its left and right edges; full, the default, is the old behaviour. tools/ultrawide_layout.py takes
the HUD's aspect in place of the corner flag and moves the HUD panes out only as far as that area, and
make_romfs_patches.py --hud writes the layout as romfs-patches-<w>x<h>-hud21x9 or -hud16x9. The runtime loads that
folder when the setting asks for it (the plain shaped folder otherwise, with a log line naming the command that
makes the missing one), the settings menu offers the choices that fit the game resolution, and the installer builds
the folders for every size wider than 16:9 (and wider than 2.5 for 21:9).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 03:28:55 +02:00
Valiantsin DzerakhandClaude Opus 5.5 873903d98f The Mods tab order decides code sites too, conflicts show per mod, and each mod can be used without its code
Load order: mods_exefs_apply ranks each mod's patch sets by its position (rt_patch_rank) and runtime/patches.c fills
the pick byte of every contested site from the sets that are on, lowest rank first; a tie (two files of one mod)
goes to the later file, as emulators apply a mod's files in name order. Reorder and restart, no rebuild. The pick is
redone when an ordered set is switched at run time. Nothing changes for sites one set patches.

Conflicts: one table (mods_conflict) of winner, loser, part (files, data bytes, code sites) and count. romfs.c fills
it for files, mods_exefs_apply for the data bytes two mods stored and for the contested code sites. The log has both
directions per entry and one line per contested code site; each row of the Mods tab lists what the mod overrides and
what overrides it.

Use without its code: a per-mod switch under the row of a mod with a code module or an ExeFS patch file the port
cannot apply (mods_no_code in totk.ini, off by default). On, that code is left out and the rest of the mod is used;
the row says what is left out and why. mods_without_code = 1 holds it on for every mod and now covers the
unsupported patch files too.

--probe-mods: order to winner at contested sites in both orders, the same-mod tie, a switched-off mod, a run-time
switch of the winner, the conflict table for data and code, the per-mod switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:11:43 +03:00
8e098e95a8 A mod with a code module the port cannot run can be used without it (mods_without_code)
Taken from PR #790, which carries Eric Dallo's work from his fork (ericdallo/totk-pc-recomp, 6241358f): only its
mods_without_code part, adapted to dev, which has the ExeFS data writes already (#835) and no plugin runner. A mod with
an exefs/subsdk* or a replaced exefs/main stays off as a whole; mods_without_code = 1 under [mods] uses the rest of it
(RomFS files, cheats, ExeFS patch files) without that code. ModInfo.code names the modules that do not load; the
scan logs it, the Mods tab says it on the mod's row and shows the switch once such a mod is there.

Co-Authored-By: itaskaev2 <165683571+itaskaev2@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:56:42 +03:00
itaskaev2andClaude Opus 5.5 7bd1c539bd Quick save and quick load with no menu on the screen
F6 asks the game for its own autosave, as the sequence node OneShotAutoSaveMgrRequestAutoSave does, after the game's
own check (its wait between autosaves skipped), from the pad read: the game itself makes that request from several
threads. The slot the commit wrote is copied to <profile>/quicksave; a request the game holds back for 5 s is taken
back. F7 holds the window on its last picture, runs the game's load list underneath and, from the confirmation until
the load is over, opens the quick save's files for every read of a slot folder. A toast at the top of the picture says
what happened. The two keys are set on the Controls tab by pressing them. Keyboard and mouse keys only, game 1.4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:42:34 +01:00
Valiantsin DzerakhandClaude Opus 5.5 0efa904d90 A new controller no longer inherits the previous one's gyro bias, and a calibration where the pad moved is rejected
The bias reset in sensors_ready only ran when sensor_pad was nonzero, but scan_pads zeroes it on every disconnect,
so a pad connected after another one kept the old pad's bias, and an attempt still collecting finished on the new
pad under the old pad's name. The bias was also loaded only once, at the first StartSixAxisSensor.

- input.c pad_bias_select runs for every pad the sensor code sees: it drops the old bias and attempt, then loads the
  saved bias when gyro_bias_pad names this pad. scan_pads drops them on disconnect. The bias loads with
  gyro_calibration off too, so turning the switch on mid-run applies it.
- The pad identity is the name plus an FNV-1a hash of SDL's serial when the pad reports one, so two pads of one
  model no longer share a bias; the hash keeps the Bluetooth address out of totk.ini and the log.
- An attempt skips 0.5 s of samples (the button press shakes the pad), then averages 1 s. It is rejected when the
  largest per-axis standard deviation exceeds 0.04 rad/s; a steady bias of any size passes. The row then says the
  controller moved (new UI_MENU_GYRO_CALIBRATE_MOVED in all four catalogs) and the bias in effect stays.
- The timeout counts 5 s without a sample, not 5 s from the start.
- Calibrate gyro starts the sensor thread when the game has not yet (title screen) instead of doing nothing.
- Row states are an enum (MOTION_CALIB_*); motion_calibrate_start takes the clock, and only the gamepad's fusion
  instance writes totk.ini, so --probe-services now checks a measured bias, a rejected attempt and the timeout.
- The duplicate copy_name in motion_fusion.c is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:32:05 +03:00
Valiantsin Dzerakh 0a792f22c1 Merge pull request #1197 into task/pr1197: a Calibrate gyro row on the Controls tab removes the aim drift of a controller with a large gyro bias (palxex) 2026-11-15 09:21:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 94eb3d4628 Merge pull request #322: Steady detail under load, a switch that stops the game lowering model and texture detail when the frame rate drops (ProSep)
The PR's level-of-detail distance part is left out: it made no visible difference in play, and the emulator mod it came from was dropped there as a placebo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:07:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5f1d74023b Remove the lod_range setting and the lodrange patch set; lod_steady stays
Playtests showed no visible difference from lod_range, and the emulator mod scene dropped the same change as a placebo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:07:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6347b8262a The audio output device can be chosen on the Sound tab and in totk.ini (audio_device), and a change moves the sound to it while the game runs (#1014)
TOTK_AUDIO_DEVICE names the device as SDL lists it; unset, empty or default keeps the system default and the same open
as before. audio_mixer.c output_open opens the named device, or the default with one log line when it is not
connected. Once a device is chosen, an output worker thread (output_worker) owns the SDL stream: on a cfg change and
once a second it resolves the name again and output_switch opens the new device with the same spec, destroys the old
stream (which waits for its callback), restarts the prefill and resumes. The render thread only wakes or starts the
worker (output_watch), so the game's audio never waits for a device open. A chosen device that disappears falls back
to the system default and comes back within a second of being plugged in again. TOTK_AUDIO_CHANNELS=auto reads the
channels of the device chosen at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:28:42 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0ce53aa7c7 The DualSense and DualShock 4 touchpad click is a bindable gamepad input named touchpad, shown and captured on the Controls tab (#482)
PAD_TOUCHPAD follows the paddles in input_map.h and reads SDL_GAMEPAD_BUTTON_TOUCHPAD in input.c pad_physical, so
input_capture sees the click when a Controls cell waits for a press (#852 had no pad id to report it). It is unbound by
default; pads without a touchpad never report it held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 22:19:51 +03:00
Valiantsin DzerakhandClaude Opus 5.5 cf3acd0a2f Model detail range replaces the distant detail switch: lod_range scales the depth at which models leave their detailed level (1x, 1.5x, 2x, 3x or max) (#949)
The pick patched before (main+0x1ee8424) is reached through its vtable only when the method is overridden; the culling
passes run about 20 inlined copies of it, so the switch changed almost nothing. The lodrange set patches the two places
per version that compute the level depth B at model setup (the setter and its inlined copy); the slope of the coarser
levels follows from B there, and max takes B = 1e30. The menu row sits under Grass range, with Steady detail under load
after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:58:48 +03:00
palxex dc13b194ce Add gyro bias calibration for the six-axis sensor
The yaw axis has no gravity reference, so it drifts with the gyro's
manufacturing bias. Two controllers of the same model can drift in
opposite directions, and the sensor fusion had no way to estimate or
remove the offset: aiming with motion turned slowly on its own and
needed constant correction.

A Calibrate gyro row on the Controls tab collects 250 gyro samples
(about a second) while the controller is held still, averages them per
axis into a bias, subtracts that bias from every sample before the
fusion integrates it, and restarts the angle so the estimate starts
clean. Collection has no motion threshold: a controller whose bias
exceeds any absolute threshold would otherwise never finish, which is
how the first version of this stalled with no way out. Five seconds
without the expected samples ends the attempt, from the sample path and
from the menu alike, so a sensor thread that stops feeding it is
reported instead of leaving the row on "calibrating". The first raw
sample and the final bias are logged, so a report carries the numbers
that were measured.

The row's value says where the controller stands: calibrating,
"<controller>, calibrated" once it is done or when the bias was loaded
from totk.ini at start, and "calibration failed" when an attempt timed
out with no bias in effect. A controller change cancels a calibration
that is in progress and clears the bias and the label, so neither is
carried over to the new controller.

The behaviour sits behind gyro_calibration (the Controls tab's "Gyro
bias calibration", default on, live): off, the fusion takes the raw
gyro, an attempt in progress is dropped, and nothing is loaded at
start, while the saved keys stay in totk.ini so turning it back on
restores the last calibration.

The bias and the controller's name go to totk.ini when calibration
completes, outside the fusion's lock, and are loaded at the next start
only when the connected controller has the same name.

Tested with a Switch Pro Controller on the 1.4.3 build: the log shows a
z-axis bias of 0.139 rad/s (8 degrees per second), calibration finishes
in about a second, the yaw drift is gone, and the row reports each state.
2026-11-15 02:26:30 +08:00
Valiantsin DzerakhandClaude Opus 5.5 517a161457 Merge pull request #322: distant model detail settings, brought up to date with dev (ProSep)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:16:19 +03:00
Valiantsin DzerakhandClaude Opus 5.5 25f42aa84e Merge pull request #1146 into task/pr1146: separate Music, SFX and Voice volume sliders
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 08:26:13 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e6839387fc Merge task/abilityguard: a stale Recall / Ultrahand target is dropped only where the game would fault on it, replacing the 4 GiB target check, and the model scene report loop gets a bound (#1005, #1137, #1145)
The ability guard (runtime/ov_ability.c) checks the holder, the actor, its component and the reference word the game
writes, so it catches every bad target seen in the reports: -1, 0x80, an empty bounding box (FLT_MAX) and a vtable in
main's data. The optref site at main+0x1bd01c8 (1.2.1: 0x1622bf4) is dropped: set ability patches the same address and
must win there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:57:07 +03:00
Valiantsin DzerakhandClaude Opus 5.5 bc578148ab Write RomFS layout folders only for the screen shapes and prompts this player uses
The setup wrote 64 patch folders: every prompts style for all 15 shaped game resolutions. The new shapes step
(installer/screens.py) writes romfs-patches-<w>x<h> only for the shapes of the connected displays, the output_res the
game defaults to on each and the totk.ini output_res, and the prompts' shaped folder only for the style totk.ini
selects. One folder per shape: the runtime maps the game resolution to its shape's size (cfg.c cfg_shape_size, the
closest ratio within 1%), and an exact-size folder from an older install still wins. The settings menu marks a game
resolution whose shape has no folder and can start the generator for it in the background, for the next start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:02:31 +03:00
0xEmz 1f224dc0f9 Add separate Music, SFX, and Voice volume sliders (#722)
Add volume_music, volume_sfx, and volume_voice sliders under the Sound tab
in the F1 settings menu and in totk.ini to control background music, sound
effects, and character voices independently.

Classifies audio streams by file path in RomFS, parses BARS and BWAV headers
for ADPCM coefficient tables and stream formats, tags decompressed Opus streams
from nn::codec, and applies per-category gain factors in the audio mixer
during voice rendering.

Localized across English, Russian, Brazilian Portuguese, and Simplified Chinese.
Documented in totk.ini.example.
2026-11-12 17:25:33 +02:00
Valiantsin DzerakhandClaude Opus 5.5 d14e2a8f62 Merge pull request #1136 into task/pr1136
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 18:21:53 +03:00
0xEmz 312e59a9f7 Add optional mouse wheel and keyboard gameplay tweaks (gameplay_tweaks_enabled, off by default). 2026-11-12 03:29:24 +02:00
Valiantsin DzerakhandClaude Opus 5.5 42c458712d Crash guards switchable from totk.ini: optref_guard, ability_guard, report_guard (#1005)
The three patch sets read their switch through cfg, so the keys already worked from totk.ini but logged as unknown and
were undocumented. They are now known keys with defaults (on), in [performance] of totk.ini.example; the settings menu
does not show them. The settings table reached 128 rows, the size of the menu's reset list, so that list grows to 256
and logs if the table ever outgrows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:16:10 +03:00
itaskaev2andClaude Opus 5.5 fc985e690e Bring back the game window's pointer image as pointer_image, off by default
#1092's pointer image (runtime/cursor_art.c: a gold arrowhead with a dark edge, a turquoise gem and a soft shadow,
drawn at the window's DPI) was left out of dev because it changed the pointer for every player with no way to keep
the system arrow. It now comes with pointer_image (input section, live, default 0): 0 leaves the window class's arrow
as dev has it, 1 shows the image while the cursor is not captured. Win32 reads the setting at WM_SETCURSOR (the
next mouse move after a change); SDL sets the image or its default cursor when the settings change (input_sdl_idle).
The setting has its row under the mouse rows of the Controls tab, its text in the four menu languages, and
totk.ini.example and docs/controls.md describe it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:48:24 +01:00
Valiantsin Dzerakh 873fc64b41 Merge pull request #1087 into task/pr1087 2026-11-11 13:20:43 +03:00
Valiantsin Dzerakh fc1cf24c42 Merge pull request #1097 into task/kbmwave
# Conflicts:
#	docs/controls.md
#	runtime/cfg.c
#	runtime/input.c
#	runtime/menu_cursor.c
#	runtime/ui/menu.cpp
#	runtime/ui_text.c
#	runtime/ui_text.h
#	totk.ini.example
2026-11-11 13:11:10 +03:00
Valiantsin Dzerakh 24bcc546e9 Merge pull request #1096 into task/kbmwave 2026-11-11 13:10:00 +03:00
Louis JusticeandClaude Opus 5.5 34ee6684a9 In dialogue the left mouse button presses B and the right one A instead of their bindings (dialogue_click, game 1.4.3).
By default the left button is Y, which opens the dialogue log in a dialogue box. While MessageDialog_00 is open the
left button now presses B, which advances the text and shows the rest of a scrolling line, and the right one A.
Dialogue choices keep the menu pointer, where a left click picks the choice under it, so clicking through a
conversation does not pick the choice the focus starts on. The setting is live and independent of menu_cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 19:38:43 -05:00
Louis JusticeandClaude Opus 5.5 1becabd8f6 The left mouse button presses A on the Purah Pad's map instead of its binding (map_click, game 1.4.3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:27:03 -05:00
itaskaev2andClaude Opus 5.5 9680b8e6ec Add grass_range: how far around the camera grass grows
The game grows grass blades only inside its near grass map, a 62.5 m square around the camera drawn into 256x256 and
128x128 textures, so on open meadows the grass appears a short way in front of the player. grass_range (percent, 50
to 400, default 100) scales the map's extent, step and both textures together through a new grass patch set (1.2.1
and 1.4.3) that loads them from patch page +128..+144, and grows the HeapDef grass heap and the application pool for
the larger textures. At 100 the set stays off and nothing changes. A row in the Display menu, text in all four menu
languages, and totk.ini.example describe it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:13:59 +01:00
Tears of the SteelTemple 3209ea4358 Implement Native NVIDIA Reflex Low Latency (VK_NV_low_latency2)
- Enable VK_NV_low_latency2 and VK_KHR_present_id with present ID features
- Add VkSwapchainLatencyCreateInfoNV to swapchain creation
- Link present and submission IDs with standard Vulkan latency types
- Insert latency markers: simulation start/end, input sample, render submit, and present
- Gate all extensions and latency chains on reflex != off (RESTART setting)
- Log graceful notice when Reflex is requested on unsupported hardware
- Add UI menu setting and translations for en, ru, pt-BR, zh-Hans
- Document reflex setting in totk.ini.example and docs/settings.md
2026-11-10 18:20:16 +01:00
Valiantsin DzerakhandClaude Opus 5.5 27a63dfb0f Merge pull request #1065: Xbox prompts at every game resolution the setup lays the UI out for (cdonatom, #378)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:59:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 06811330e7 Extend the climb controller's frame-rate factor above 60 fps, so Link climbs walls and ladders at full speed (#35, #276, #1001)
The climb velocity step (1.4.3 main+0x1f49754, 1.2.1 main+0x1918220) multiplies the requested velocity by Nintendo's
factor for a movement loss that grows with the frame rate. 1.4.3 fits it at 30 and 60 fps and caps it at 2 from about
77 fps (63% climb speed at 120, 34% at 240); 1.2.1 has no 60 fps branch (78% at 60). Below a 1/60 s step the set climb
continues the factor with a curve fitted to a replayed ladder climb, taking the patch page's frame ratio without the
time scale, so 30 and 60 fps keep the shipping factor bit for bit, slow motion included. Only the player's climb
modules reach this code. Its own setting, climb_fix under [frame rate], with a menu toggle; off without the real-time
step. Ladder replay, 1.4.3: 1.665 / 1.663 / 1.669 / 1.681 m/s at 30 / 60 / 120 / 240 (shipping 120 1.046, 240 0.563).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:44:18 +03:00
Carlos DonatoandClaude Opus 5.5 fb34177cfd Make the Xbox prompts for every game resolution the setup lays the UI out for (#378)
The setup wrote romfs-patches-xbox and romfs-patches-xbox-label for 16:9 only, so prompts = xbox on a 21:9, 32:9,
16:10 or 3:2 screen (the Steam Deck's 1280x800 among them) kept the game resolution at 1920x1080 (cfg.c) or, with
output_res set to the screen's shape, fell back to the Switch prompts. #979 fixed this for prompts = pc; this extends
the same mechanism to both Xbox folders, the shared-files option of #378 by way of #979's --reuse.

- The setup builds romfs-patches-xbox-<w>x<h> and romfs-patches-xbox-label-<w>x<h> for each of ASPECT_SIZES, from
  their 16:9 folder with --reuse, as it does for romfs-patches-pc-<w>x<h>.
- romfs.c overlay_init: at a game resolution of another shape any prompts' folder loads from <folder>-<w>x<h> in place
  of romfs-patches-<w>x<h>, not only the PC one; without it the Switch prompts stay, and the log names the missing
  folder and the command that makes it. romfs_shaped_pc_ready becomes romfs_shaped_prompts_ready(folder, w, h).
- cfg.c: the display-shaped output_res default applies with prompts = xbox when the folder of the pad layout
  (romfs-patches-xbox with the Nintendo layout, romfs-patches-xbox-label with any other) is there for that size.
- The menu's note for a missing shaped folder reads "off at this game resolution (no layout made for it)" in every
  menu language, since 16:9 is no longer the only shape with prompts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:53:49 +01:00
itaskaev2 59eb026bd7 Merge branch 'dev' into carry/dynamic-res-100 2026-11-09 09:55:24 +01:00
Valiantsin DzerakhandClaude Opus 5.5 7e440be7ca Merge pull request #978: draw amiibo file names in any script in the F1 menu (KyokoMiki)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 21:13:04 +03:00
Valiantsin DzerakhandClaude Opus 5.5 bdb41dff7e Merge pull request #979: PC prompts for every game resolution the setup lays the UI out for (Wintego)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:36:02 +03:00
ipavlin98 6b4d84ec50 Record large submissions in chunks on several threads
replay_workers = N (0, the default, keeps the sequential replay) records a submission of enough draws in chunks that start between passes, on N threads and in twice as many chunks, and submits them in order. In the town at 4K on an RTX 5070, 4 threads take the replay from 8.2 to 4.5 ms a frame and the frame rate from 71 to 79.

A sequential scan on the submitting thread applies only what is queue state (fixed-function and bind ops, render targets, render enable and conditions, samples-passed counting) and keeps a copy of it where each chunk starts, with how far its lists got: inline uniform updates, RENDER_COND results, contact shadow marches and the ops that drop uniform copies. A chunk takes those from the lists instead of from the chunks before it, starts with every image in GENERAL and ends with a full barrier, so its recording depends only on the copy and the lists.

Each thread records with a context of its own: the replay's memos, descriptor state, occlusion query segments and per-command-buffer state moved from file statics into VkExec and VkExecDraw, and the tables the contexts share (stand-ins, depth twins, views, mirrors, timestamps, completion callbacks, crumbs) take locks or atomics. The scan makes render targets live in replay order and notes the op (vk_texture_revive), since a chunk can sample a storage before the chunk that renders it got there or after the scan went past a later target there: a chunk's texture slots resolve as of its own op, and the chunks after a texture with no entry yet wait for the chunk that makes it. Uniform copies are dropped at the op that writes them (vk_usnap_drop_at).

Contact shadows plan their march in replay order (vk_contact_plan) and the chunk that holds its op records it; the HDR source keeps the copy that comes last in replay order. DLSS and fxaa = 0 act on the frame draw by draw and keep the replay sequential. TOTK_REPLAY_STATE_CHECK=1 compares the state after the last chunk with the scan's.

A draw or dispatch whose shaders write storage buffers drops the uniform copies they cover from its own op on, as the other GPU writes do (scan_writes). The scan still translates no shader: it reads the shaders the recording contexts translated from a table shared with them (vk_exec_draw_writes), and an op whose shader no context translated yet holds the chunks after it until it is recorded. Before, the chunk that recorded such a write dropped the copies for every position at that moment, so a later chunk recorded first bound the copy taken at the submit call: on an RX 7800 XT on RADV the grass near the camera came out dark or unshaded in some runs with 4 threads.

TOTK_TRACE=perf counts the chunks held per submission by reason and logs when each chunk of the last submission began. The settings menu has the thread count under Advanced, Scheduling, with the count this run uses under it.

The recorder thread begins, ends and submits the submission's open part (vk_rec.c rec_end_cb), so a chunk's mirror prologue stays off it: vk_sync_part waits until the recorder is idle, as the part pool allows one thread at a time, then records, ends and submits the prologue itself. Through the recorder the prologue could reach the queue before it was ended, and the GPU lost the device at the title screen.

(cherry picked from commit b94e2e9642)
2026-11-08 19:39:17 +03:00
美樹杏子 9382686c12 Fix Amiibo file names with non-ASCII characters displaying as garbled text in F1 menu 2026-11-08 18:39:21 +08:00
Wintego ceece5683a Make the PC prompts for every game resolution the setup lays the UI out for
The setup wrote romfs-patches-pc for 16:9 only, so prompts = pc on a 21:9, 32:9, 16:10 or 3:2 screen kept the game
resolution at 1920x1080 (cfg.c) or, with output_res set to the screen's shape, fell back to the Switch prompts.

- make_romfs_patches.py --reuse <folder>: a file of an earlier overlay whose contents match is hard-linked (copied
  where links fail) instead of compressed again; the output is byte for byte the same.
- The setup builds romfs-patches-pc-<w>x<h> for each of ASPECT_SIZES from romfs-patches-pc with --reuse: only the
  Common archive is compressed, so the fifteen folders take about two minutes and 6 MiB each instead of 22 minutes
  and 73 MiB each.
- cfg.c: the display-shaped output_res default applies with prompts = pc when romfs-patches-pc-<w>x<h> is there
  (romfs_shaped_pc_ready); Xbox prompts keep 1920x1080 as before.
2026-11-08 13:20:17 +03:00
ProSepandClaude Opus 5.5 a6c33b072c Hold the game's dynamic resolution at 100 % and let the scene grow past 4096 wide
The game picks a scene tier of 100, 90 or 80 % mostly from a fixed cost model made for the Switch that grows with the
scene width squared, so on a wide output it drops to 80 % on any GPU: at 5120x1440 every frame drew 80 % of the scene.
Patch set fixres replaces the one instruction that moves the tier's scale into the controller's result (1.2.1
main+0xcc2c00, 1.4.3 main+0x5848a8 as MacNativeGames patches it) with 1.0. The new setting dynamic_res (menu toggle,
live) brings the game's stepping back and is on by default in the Steam Deck profile.

The scene cap goes from 4096 to 8192 a side, so render_scale above 80 works on a 32:9 output, and the scene also stays
within a DynamicTextureAllocatorMem under 2 GiB; the log says when it was made smaller. The memory selftest now maps
past the real pool size instead of a fixed 4 GiB, which a larger scene grows past.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:55:54 +01:00