QueryMemory still reports the permission the game asked for. Material Columns swaps 11 dispatch slots in main's
RELRO from its own code at switch time; on the platforms the mod is made for that write goes through, here it
faulted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new setting starts off: on by default, Steam Deck (1280x800) and other 16:10, 3:2 and 4:3 players would get a
wider view than the game's with a GPU cost nobody measured on the weakest target. The toggle is live, as
resolution.c res_fov_live re-reads it. res_fov_live starts from the game's own view (shown_vp 0), so at 16:9 the
first present writes nothing and logs nothing, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin built with default visibility calls its own exported functions
through its PLT. Challenge Mode's Enemy Health Regeneration plugin
(exefs subsdk8) does so for the std::vector<const char*> constructor it
carries, and the service run counted that as a library call outside the
reviewed list, so the plugin was refused and its whole mod stayed off.
runtime/loader.c resolve binds such a JUMP_SLOT straight to the plugin's
own definition (a host override still wins and stays counted), and
tools/exefs_plugins.py plt_imports maps the PLT stub to that code, so
the reach check follows into it instead of naming an import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game converts the end and then the begin report of a pair and subtracts them unsigned. With the frame wait one
frame late the end could be unwritten (0) or hold the value of the report before it, and the difference wrapped to
about 2^64: an over-budget frame for the controller, two in a row drop the game to its lowest quality level. Reads of
a report that holds 0, a time after the bound, or whose newest replayed report is not done read the bound instead,
so a pair in submission order never reads end < begin. Guest memory, RENDER_COND and samples-passed counts are
unchanged. TOTK_SYNC_AHEAD_TIMESTAMPS=0 turns it off, =check counts without replacing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "save to the album?" window showed a 4:3 or 16:10 photo in a 16:9 frame, stretched across: N_FirstOut_00's
scale_y k, there for the compendium's square photos, also undid N_InOut_00's taller frame for the album photo under
it. The scale goes on N_PictureBook_00 and the album's question and buttons (N_AlbumCon_00) instead, and those move
out by the frame's extra half height. The clock of an inn's choices (Time_00) stayed in the middle 16:9 while
MessageDialog_00 went to the bottom edge, so it covered the last choices; it goes to the bottom edge too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppMap_00's capture, cut, backing and shadow panes are 1080 high, the height of a 16:9 layout, in the layout and in the full map's keys of AppMap_00_MiniMap, which win over the layout's sizes. On a 4:3 or 16:10 canvas they now take the screen's height, 1080 / k, so the map reaches the Purah Pad frame at the top and bottom.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The libSDL3.so.0 the release puts next to the game links system libraries a minimal system may lack (libXss.so.1 on AnataseOS in #1315 and #1428, libdecor-0.so.0 on Batocera in #1419). The loader then stopped totk --prepare-shaders with exit code 127 after the half hour of lift and compile, and the setup reported only that preparing the shaders failed.
The check step now runs ldd on the release's libraries (Linux, not in a repository build) and stops with check.libraries_missing, naming the missing files and, for the common ones, the package that provides them on Fedora, Debian/Ubuntu and Arch (LIBRARY_PACKAGES). When the game still fails to start in the prepare step, the loader's "error while loading shared libraries" lines in its log give prepare.libraries_missing in place of prepare.shaders_failed. Both messages are in all twelve catalogs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gameplay_tweaks.c map_zoom_allowed zooms only on the map that menu_cursor.c finds in eui's open screens, and with menu_cursor = 0 that scan did not run, so the scroll wheel neither zoomed the map nor did the mouse move its cursor, with gameplay_map_zoom = 1 set. menu_cursor_poll now scans for the map while that zoom is on, as it scans for the dialogue box for dialogue_click; the pointer, the menus, the strips and the camera stay off with menu_cursor = 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #971, SDL passes gamepad events to the game while its window has no focus (SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS). On Linux the window is SDL's, and under Steam the focus goes to Steam's overlay and menus while they are open (the Quick Access menu in SteamOS's Game Mode): the game took the presses meant for them too, which 0.4.1 did not.
The new setting pad_background (auto, 1, 0; read at start) decides the hint. auto, the default, keeps it on unless Steam started the game (SteamGameId or SteamOverlayGameId in the environment, set for Steam games and non-Steam shortcuts alike); 1 keeps the gamepad playing behind other windows under Steam too, 0 pauses it everywhere. input_map.c input_pad_background_pick holds the decision and cfg_probe checks it. On Windows the game window is not SDL's, and nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The full map's width was held at 2250 by AppMap_00_MiniMap's size keys (they win over the layout's sizes): wide_anim sets them to 2250 / k, so the map is drawn across a 32:9 screen; the layer tabs and the time and position move to the screen's edges. The loading map is a capture of the 3 x 3 world map tiles of 840 units around the player's tile (TOTK_DUMP: nine 840x840 tile draws into the capture), so a capture wider than about 1680 shows black where the player stands near a tile's edge: loading_map keeps it at most 1660 wide from the screen's left edge, moves the map's slide keys (LoadingFade_00_BarIn and BarOut) with it, and widens the side panel, a window whose frame keeps its proportions, to the screen's right edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppMenuOverlay_00 keeps a full-width root, so the stone and light pieces of the map's side frame (N_Frame_00, P_Frame{L,R}*) were stretched across a 21:9 or 32:9 screen; they now take scale k at the edges. The loading screen widened N_Base_00 back to the screen, which stretched the map capture inside it; instead the capture panes and their pictures get a size of 1920/k - 450 (1470 at 16:9), so more map shows unstretched, and the side panel stays at the right edge at its own width. The map's cut and backing panes (AppMap_00 N_Cut_00 and the others) take 2250/k as a size. ultrawide_layout.py gains the pane width field (+76); tests/hud_layout_test.py leaves these three layouts out of its byte comparison with the older implementation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It takes the 32:9 layout folder (3840x1080's, cfg.c cfg_shape_size); totk.ini.example names the common 21:9 and 32:9 sizes and hud_width for the HUD in the middle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The camera kept the game's vertical view angle at every shape, so 16:10, 3:2 and 4:3 showed less of the world at the sides than 16:9. res_fov_live now also multiplies the fov patch's factor by 2 atan(tan(v/2) k) / v, k = 16:9 over the aspect and v = 51.2 degrees, the game's default vertical angle measured from a 4:3 frame at fov 130 against 16:9 (scale 0.730). Measured after: 4:3 frames are 16:9 ones scaled by 0.752 (0.750 is exact), 16:10 by 1.000 (1.106 without). vert_plus = 0 keeps the game's vertical view; it multiplies with fov.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game resolution whose shape the fifteen listed sizes did not cover (13:6 on a phone streamed to, 4:3) drew 16:9 with bars: neither the setup's Shapes step (installer/screens.py shape_size) nor the game's background generator (runtime/romfs.c romfs_folders_prepare) made a layout for it, though tools/ultrawide_layout.py handles any aspect ratio and runtime/romfs.c overlay_init already loads a folder of the exact size. cfg.c cfg_shape_size and screens.py shape_size now give an unlisted shape from 4:3 to 32:9 its own size, so both make romfs-patches-<w>x<h> for it; a display of an unlisted shape still keeps the 1920x1080 default and gets no folder. The list gains 4:3 (1440x1080, 1600x1200, 2048x1536, 2732x2048) and 19.5:9 and 20:9 phone sizes (2340x1080, 3120x1440, 2400x1080, 3200x1440), in the menu's game resolution row too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-cache/plugins.stale changes no input of the lift or compile key, so the rebuild the game started planned only
check and cleanup, never ran the plugin's service run again, and the plugin stayed stale. A non-empty plugins.stale
now makes Lift and Compile not current (installer/steps.py plugins_stale); Compile too, since the transient lift runs
only with the step after it. Lift.run clears the file, so the next start plans nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The expect line of such a word says `* *` (tools/exefs_plugins.py plugin_lines), recomp/patches.py carries it into
RT_PLUGIN_WRITES as a flag, and runtime/plugin_init.c check_writes accepts any value there through
runtime/plugin_writes.h plugin_write_find. Hook branches in .text and pointers into a plugin's .text keep the exact
match. Zonai Fieldworks' Self Recall takes its storage off a pool size at main+0x3ad6eb8 that grows with the texture
heap of render_scale, so its plugin went off at every start with a grown heap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #1402 reports a GPU hang on Intel (Mesa ANV) right after the startup logo on game 1.2.1, which the pass marks put in one dispatch of cs 75be3722f62cb67e. #994 reports the same freeze on Intel's Windows driver with 1.2.1, while 1.4.3 boots. The cause is not found yet. skip_cs takes the named dispatches out so a tester can confirm the shader is the cause and get past it, at the cost of what the shader would write. An id shorter than 16 hex digits matches every shader whose id starts with it. The log names each listed id and the first dispatch skipped of each. The setting is registered in cfg.c, documented as Risky in docs/settings.md, and docs/agents/symptoms.md gets a row for the freeze.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the unwritten-read rule every read that stays merged comes from a draw that samples a target it also writes,
the case Savage Wind runs the same way on every GPU. Shrine on the RDNA2 iGPU (AMD Windows driver, 1080p): passes
581 -> 128 a frame, GPU time unchanged (37.2 ms off, 38.0 and 36.5 ms on), the picture the same. PR #1237 measured
the waterfall on RADV at 1105 -> 117 passes and GPU 8.3 -> 4.1 ms, and an RTX 4080 shrine at +3% mean fps with the
1% low 83 -> 98. barrier_merge = 0 brings back a full barrier at each such Barrier.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The by-region barrier inside a merged pass orders only the pixel a fragment writes. A draw that reads a target other
draws wrote, without writing it, may read neighbouring pixels (blur, ambient occlusion, light composites), which only
the game's full Barrier orders on every driver. Such a draw now ends the pass, as Savage Wind does for the same case.
TOTK_TRACE=gfx counts these restarts by colour and depth. Shrine, town and field on 1.4.3: 0 restarts; every read
after a merged Barrier comes from a draw that writes the target it samples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spirv_demote turned every OpKill inside a selection into OpDemoteToHelperInvocation on AMD's Windows driver. A
demoted fragment runs the rest of the shader, so every alpha-tested draw (grass, foliage, hair) paid for its
discarded pixels. The cloud fringe of #164 came from OpImageQueryLod after the discard. Now a discard is demoted only
when an OpImageQueryLod, an explicit derivative or a function call follows it in its function; the rest keep the
plain discard, as before 0.4.1. On the field save 1 of 128 shaders with a discard is demoted, and the picture keeps
the fix.
demote has a row in the settings table and a description in totk.ini.example, so demote = 0 or 1 in the ini no
longer logs an unknown key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>