diff --git a/docs/tester-guide.md b/docs/tester-guide.md index 45e6e9bd..931df55e 100644 --- a/docs/tester-guide.md +++ b/docs/tester-guide.md @@ -69,8 +69,8 @@ Build or install on Linux ([installer.md](installer.md), "Linux release"), in De mode; for Game Mode, add `totk` from the install folder to Steam as a non-Steam game. The game recognises the Deck (LCD and OLED) and uses its device profile for every setting `totk.ini` does not set: -fullscreen, the screen's own 1280x800 (16:10: on 1.2.1 the camera and interface take that shape; 1.4.3 draws 1280x720 -with black bars until its aspect patch exists), the game's own 3D scale, vsync and a 40 fps limit. These are starting points, not measurements. What helps most: +fullscreen, the screen's own 1280x800 (16:10: the camera and interface take that shape), the game's own 3D scale, +vsync and a 40 fps limit. These are starting points, not measurements. What helps most: 1. The performance overlay (F10, or both stick clicks L3 + R3) in full mode: the frame rate, mean and longest frame time over a minute in Lookout Landing, in the Depths and in the Sky, with the settings named. diff --git a/recomp/patches-v143.txt b/recomp/patches-v143.txt index 16189169..a3ad10ac 100644 --- a/recomp/patches-v143.txt +++ b/recomp/patches-v143.txt @@ -10,6 +10,7 @@ set cloth TOTK_CLOTH_REALTIME 1 set bounce TOTK_HIGHFPS_FIX 1 set output TOTK_PATCH_OUTPUT 0 set scene TOTK_PATCH_SCENE 0 +set aspect TOTK_PATCH_ASPECT 0 # 60 fps: the adaptive present-interval controller (main+0x2db174, 1.2.1 0x8f26c8) gets the minimum interval 1. site fps60 main 2db204 6b08015f 7100055f # clamp: cmp w10, #1 (was cmp w10, w8 = minimum) @@ -936,3 +937,16 @@ spin subsdk0 1c4e54 1c4e60 # 4 instructions; loads spin sdk 2d3654 2d3668 # 6 instructions; loads spin sdk 443864 443884 # 9 instructions; loads spin sdk 541e54 541f98 # 32 instructions; loads + +# Aspect ratio: the 1.2.1 set's sites (patches-v121.txt, which explains them and the page) found in 1.4.3 by their code. +# Three of 1.2.1's five canvas-size loads (main+0x1ae1ae4, 0x12c7bd4, 0x12c7fbc) have no match found here; with them +# switched off 1.2.1 draws the gameplay HUD and the system menu the same at 21:9, so what they adjust is not known yet. +# - DefaultAspect's default (main+0x2d06910, 16/9): the camera parameter reader takes the page's. +site aspect main 1aa0ac4 d0009328 @page:x8 # adrp x8, 0x2d06000 -> adrp x8, page +site aspect main 1aa0ac8 91244108 91010108 # add x8, x8, #0x910 -> add x8, x8, #64 +# - The two camera-viewport updates: the division becomes a load of the page's aspect (x9 is set again just after). +site aspect main 1ff04f4 1e211800 @page:x9 bd404120 # fdiv s0, s0, s1 -> adrp x9, page; ldr s0, [x9, #64] +site aspect main 253fbb0 1e211800 @page:x9 bd404120 # fdiv s0, s0, s1 +# - Loads of the 2D canvas size {width, height}, each followed by the multiplication (x9 and s2 saved around it). +site aspect main 2136fa8 2d4307a0 2d4307a0 f81f0fe9 bd000be2 @page:x9 bd404522 1e220800 bd404922 1e220821 bd400be2 f84107e9 # ldp s0, s1, [x29, #0x18] +site aspect main 213641c 2d4103e1 2d4103e1 f81f0fe9 bd000be2 @page:x9 bd404522 1e220821 bd404922 1e220800 bd400be2 f84107e9 # ldp s1, s0, [sp, #8] (width in s1) diff --git a/runtime/cfg.c b/runtime/cfg.c index 19b35ecf..17dcc172 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -204,9 +204,8 @@ int cfg_load(const char *path) { // (default: the Steam Deck when the firmware says so), desktop (none) or deck. // // The Steam Deck (LCD Jupiter, OLED Galileo; 1280x800, 16:10, 4 Zen 2 cores, RDNA 2 with 8 CUs sharing 16 GB): the game -// at the screen's 1280x800 with its own 5/6 scene (a version without the aspect patch draws 1280x720, letterboxed, -// resolution.c); fullscreen and vsync, as gamescope composes Game Mode; 40 fps, which divides 40 Hz (and 120 Hz on the -// OLED). +// at the screen's 1280x800 with its own 5/6 scene (the aspect patch gives camera and interface its 16:10, resolution.c); +// fullscreen and vsync, as gamescope composes Game Mode; 40 fps, which divides 40 Hz (and 120 Hz on the OLED). // Starting points to replace with measured ones (docs/tester-guide.md, Steam Deck). static const struct { const char *key, *value; } DECK[] = { {"FULLSCREEN", "1"}, {"WINDOW_SIZE", "1280x800"}, {"OUTPUT_RES", "1280x800"}, {"RENDER_SCALE", "game"}, diff --git a/totk.ini.example b/totk.ini.example index cf2fba27..e7a660dd 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -111,8 +111,8 @@ # gpu_index = 0 # gpu_name = NVIDIA # Game resolution: the size the game draws its picture and interface in (1280x720 to 7680x4320). Another shape than -# 16:9 (1280x800, 2560x1080) gives the camera and the interface that shape (1.2.1; 1.4.3 draws the largest 16:9 size -# inside it, with black bars). Above 1920x1080 the game's texture heap and memory pool grow with it. Read at start. +# 16:9 (1280x800, 2560x1080) gives the camera and the interface that shape. Above 1920x1080 the game's texture heap and +# memory pool grow with it. Read at start. # output_res = 1920x1080 # 3D render scale: the scene's size relative to the game resolution, game (5/6, the game's own 1600x900 at 1080p) or # a percentage (25 to 400, at most 4096 pixels a side); above 100 supersamples the scene (anti-aliasing). Read at start.