From 11cdd8f7971c346c3c930d91976de8939b871ef3 Mon Sep 17 00:00:00 2001 From: ProSep <9l0mhe7e@prosep.anonaddy.me> Date: Sun, 1 Nov 2026 03:11:07 +0100 Subject: [PATCH 1/4] Add distant model detail settings for 1.2.1 lod_detail and lod_steady (default 0) are two patch sets after the emulator mods "LOD Improvement v2" (theboy181, sweetmini) and "Disable LOD Quality Reduction": the model level picker returns its finest allowed level at any distance, and the graphics settings setup skips the reduction of detail under load. The mods turn a conditional branch into an unconditional one; the generator patches only plain instructions, so the sites feed those branches instead. The sites are for 1.2.1 only. 1.4.3 and 1.1.1 declare the sets without sites until theirs are found in those builds. On the Screen tab of the settings menu (English and Russian) and in totk.ini.example. Co-Authored-By: Claude Opus 5.5 --- README.md | 1 + recomp/patches-v111.txt | 3 +++ recomp/patches-v121.txt | 17 +++++++++++++++++ recomp/patches-v143.txt | 3 +++ runtime/cfg.c | 5 +++-- runtime/ui/menu.cpp | 2 ++ runtime/ui_text.c | 8 ++++++++ runtime/ui_text.h | 1 + totk.ini.example | 8 ++++++++ 9 files changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc6c2bb8..2d434c67 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - Custom resolutions (1080p, 2k...), supersampling and AMD FSR 1 upscaling - 16:10 (Steam Deck, handhelds), 21:9 and 32:9 (ultrawide) game resolutions, with the camera and the interface in that shape - Anisotropic texture filtering up to 16x, for sharp ground into the distance +- Optional full model detail at any distance (1.2.1) - In-game settings menu (F1) and performance overlay (F10) - Keyboard, mouse and gamepad with remapping, rumble and gyro - Xbox button prompts: a layout that keeps the Switch button positions and shows the Xbox labels diff --git a/recomp/patches-v111.txt b/recomp/patches-v111.txt index 905a11b6..95aa0e9d 100644 --- a/recomp/patches-v111.txt +++ b/recomp/patches-v111.txt @@ -10,6 +10,9 @@ set cloth TOTK_CLOTH_REALTIME 1 set bounce TOTK_HIGHFPS_FIX 1 set output TOTK_PATCH_OUTPUT 0 set scene TOTK_PATCH_SCENE 0 +# Distant detail (patches-v121.txt explains both): no sites found in this version yet, so the switches do nothing. +set lod TOTK_LOD_DETAIL 0 +set steady TOTK_LOD_STEADY 0 # 60 fps: the adaptive present-interval controller (main+0x8f26c8, 1.0.0 0x8f6bec) gets the minimum interval 1. site fps60 main 90e978 6b08015f 7100055f # clamp: cmp w10, #1 (was cmp w10, w8 = minimum) diff --git a/recomp/patches-v121.txt b/recomp/patches-v121.txt index 7dbb63ed..1080026f 100644 --- a/recomp/patches-v121.txt +++ b/recomp/patches-v121.txt @@ -81,6 +81,23 @@ site aspect main 12521cc bd414260 f81f0fea @page:x10 bd403940 f84107ea # ldr s0 site aspect main 19b36f0 1e211800 f81f0fea @page:x10 bd403940 f84107ea # fdiv s0, s0, s1 (viewport) site aspect main 1ecdf68 1e211800 f81f0fea @page:x10 bd403940 f84107ea # fdiv s0, s0, s1 (viewport) +# Distant detail, after the emulator mods "LOD Improvement v2" (theboy181, sweetmini) and "Disable LOD Quality +# Reduction" (main-1.2.1.pchtxt). Those turn a conditional branch into an unconditional one; the generator patches +# only plain instructions (recomp/gen.py, the emitter's patch), so these sites feed the branch instead, with the same effect. +# Model level of detail: the level picker main+0x27d225c (a virtual method, vtable slot at data 0x43723f0) returns the +# floor at its parameters' +0x28 when the distance term is past the threshold, and otherwise interpolates towards the +# coarsest level; a one-level model returns count - 1 at once. Here every model takes that early return with the floor +# in w0, so distant models keep the detail they have up close. +set lod TOTK_LOD_DETAIL 0 +site lod main 27d2264 71000520 b9402840 6b00001f # subs w0, w9, #1 -> ldr w0, [x2, #0x28]; cmp w0, w0 (b.eq taken) +# Load-dependent quality: the graphics settings setup (main+0xc7e9xx, it also reads the FSR and FXAA switches) walks a +# list at its +0x120 and passes three floats of each entry to virtual setters, which the mod describes as the drop of +# model and texture detail when the frame rate falls; it skips all of it, to the epilogue, when the value it reads at +# main+0xc7eb24 is above 8. Reading 9 there skips it as the mod does; w21 is not read again on that path (the epilogue +# restores it). +set steady TOTK_LOD_STEADY 0 +site steady main c7eb24 b9400815 52800135 # ldr w21, [x0, #8] -> mov w21, #9 (b.gt 0xc7ee4c taken) + # Spin waits, from tools/spin_waits.py --exefs build/extracted/v121/exefs --patches recomp/patches-v121.txt: loops that only # another thread can end; their back-edges pass rt_spin_gate (runtime/kernel.c), TOTK_SPIN=0 keeps the core. spin main ac600 ac620 ac630 # 13 instructions; loads diff --git a/recomp/patches-v143.txt b/recomp/patches-v143.txt index c1a839fe..2b392773 100644 --- a/recomp/patches-v143.txt +++ b/recomp/patches-v143.txt @@ -10,6 +10,9 @@ set cloth TOTK_CLOTH_REALTIME 1 set bounce TOTK_HIGHFPS_FIX 1 set output TOTK_PATCH_OUTPUT 0 set scene TOTK_PATCH_SCENE 0 +# Distant detail (patches-v121.txt explains both): no sites found in this version yet, so the switches do nothing. +set lod TOTK_LOD_DETAIL 0 +set steady TOTK_LOD_STEADY 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) diff --git a/runtime/cfg.c b/runtime/cfg.c index 995d976f..d82cfd22 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -39,7 +39,7 @@ static const char *const known[] = { "EXEFS", "FEEDBACK", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FREEZE_IDLE", "FREE_CORES", "FULLSCREEN", "GPL", "GPL_DRAW_BUILD", "GPU", "GPU_INDEX", "GPU_NAME", "HIGHFPS_FIX", "INPUT", "INPUT_RECORD", "INPUT_SCRIPT", "LANG", "LIB_PREBUILD", - "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_GUARD", "MEMORY", "MENU_LANG", "MENU_TEST", + "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_DETAIL", "LOD_GUARD", "LOD_STEADY", "MEMORY", "MENU_LANG", "MENU_TEST", "MENU_TEST_DIR", "MENU_TEST_SET", "MINIMAL_LAYOUT", "MIRROR_GAP", "MOTION", "MOUSE_SENS", "MOVIE_HOST", "MOVIE_PACE", "ONE_PER_CORE", "OPERATION_MODE", "OUTPUT_RES", "PAD_LAYOUT", "PATCH_OUTPUT", "PATCH_SCENE", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PREWARM_XLATE", "PROBE_MOVIE", "PROBE_MOVIE_SHOT", "PROFILE", "PROFILE_CHAINS", "PROFILE_DIR", "PROFILE_FRAMES", @@ -60,7 +60,7 @@ static const struct { const char *key, *section; } sections[] = { {"FULLSCREEN", "display"}, {"WINDOW_SIZE", "display"}, {"PERF_OVERLAY", "display"}, {"VK_PRESENT", "display"}, {"GPU_INDEX", "display"}, {"OUTPUT_RES", "display"}, {"RENDER_SCALE", "display"}, {"UPSCALER", "display"}, {"SHARPNESS", "display"}, {"ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"}, - {"COLOR_PRESET", "display"}, + {"LOD_DETAIL", "display"}, {"LOD_STEADY", "display"}, {"COLOR_PRESET", "display"}, {"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"}, {"COLOR_GAMMA", "display"}, {"DEVICE_PROFILE", "display"}, {"ASSUME_FOCUS", "display"}, @@ -100,6 +100,7 @@ static const CfgMeta metas[] = { {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, {"ASPECT", "fit", "fit|stretch", LIVE}, {"FOV", "100", "70..140", LIVE}, {"ANISO", "16", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features + {"LOD_DETAIL", "0", "0|1", RESTART}, {"LOD_STEADY", "0", "0|1", RESTART}, // patch sets lod and steady (1.2.1) // colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses {"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE}, {"COLOR_CONTRAST", "100", "70..150", LIVE}, {"COLOR_SATURATION", "100", "50..200", LIVE}, diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 4250569a..891a44fb 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -632,6 +632,8 @@ static void tab_screen(float scale) { static const char *const aniso[] = {"game", "2", "4", "8", "16"}; const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"}; opt_choice_list("TOTK_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC); + opt_toggle("TOTK_LOD_DETAIL", UI_MENU_LOD_DETAIL, UI_MENU_LOD_DETAIL_DESC); + opt_toggle("TOTK_LOD_STEADY", UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC); rows_color(); opt_end(); } diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 19db02b2..6a17dd5d 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -72,6 +72,10 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_ANISO] = "Texture filtering", [UI_MENU_ANISO_DESC] = "Anisotropic filtering of surface textures: ground, roads and walls seen at a shallow angle stay sharp into the distance instead of blurring. Game: the level the game asks for, as on the Switch.", [UI_MENU_ANISO_GAME] = "Game", + [UI_MENU_LOD_DETAIL] = "Distant model detail", + [UI_MENU_LOD_DETAIL_DESC] = "Distant models keep the detail they have up close instead of switching to simpler versions. Game version 1.2.1 only.", + [UI_MENU_LOD_STEADY] = "Steady detail under load", + [UI_MENU_LOD_STEADY_DESC] = "Skips the game's setup for lowering model and texture detail when the frame rate drops, as the emulator mod Disable LOD Quality Reduction does. Game version 1.2.1 only.", [UI_MENU_SHARPNESS] = "FSR sharpness", [UI_MENU_SHARPNESS_DESC] = "Sharpening after FSR scaling; 0 turns it off.", [UI_MENU_COLOR] = "Colour", @@ -335,6 +339,10 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_ANISO] = "Фильтрация текстур", [UI_MENU_ANISO_DESC] = "Анизотропная фильтрация текстур поверхностей: земля, дороги и стены под острым углом остаются чёткими вдали, а не размываются. Игра: уровень, который запрашивает игра, как на Switch.", [UI_MENU_ANISO_GAME] = "Игра", + [UI_MENU_LOD_DETAIL] = "Детализация дальних моделей", + [UI_MENU_LOD_DETAIL_DESC] = "Дальние модели сохраняют детализацию, как вблизи, а не переключаются на упрощённые версии. Только для версии игры 1.2.1.", + [UI_MENU_LOD_STEADY] = "Стабильная детализация под нагрузкой", + [UI_MENU_LOD_STEADY_DESC] = "Пропускает настройку игры, снижающую детализацию моделей и текстур при падении частоты кадров, как эмуляторный мод Disable LOD Quality Reduction. Только для версии игры 1.2.1.", [UI_MENU_SHARPNESS] = "Резкость FSR", [UI_MENU_SHARPNESS_DESC] = "Повышение резкости после масштабирования FSR; 0 выключает его.", [UI_MENU_COLOR] = "Цвет", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index ece761c2..1decc917 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -38,6 +38,7 @@ typedef enum { UI_MENU_ASPECT, UI_MENU_ASPECT_DESC, UI_MENU_ASPECT_FIT, UI_MENU_ASPECT_STRETCH, UI_MENU_FOV, UI_MENU_FOV_DESC, UI_MENU_ANISO, UI_MENU_ANISO_DESC, UI_MENU_ANISO_GAME, + UI_MENU_LOD_DETAIL, UI_MENU_LOD_DETAIL_DESC, UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC, UI_MENU_SHARPNESS, UI_MENU_SHARPNESS_DESC, UI_MENU_COLOR, // group heading over the colour rows UI_MENU_COLOR_PRESET, UI_MENU_COLOR_PRESET_DESC, UI_MENU_COLOR_DEFAULT, UI_MENU_COLOR_VIVID, UI_MENU_COLOR_CLARITY, diff --git a/totk.ini.example b/totk.ini.example index 35850d27..13f267d0 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -148,6 +148,14 @@ # ground, roads and walls seen at a shallow angle sharp into the distance. Only filtered, mipmapped textures that tile # are raised; shadow maps, data maps and screen-sized buffers keep the game's setting. Read at start. # aniso = 16 +# Distant model detail: 1 keeps the detail models have up close at any distance, 0 (the default) lets the game switch +# to simpler versions as they recede (recomp/patches-v121.txt, set lod). Costs GPU time. Game version 1.2.1 only. +# Read at start. +# lod_detail = 0 +# Steady detail under load: 1 skips the game's setup for lowering model and texture detail when the frame rate drops, +# as the emulator mod "Disable LOD Quality Reduction" does (set steady); 0 (the default) leaves it. Game version 1.2.1 +# only. Read at start. +# lod_steady = 0 # Colour adjustment of the picture, HUD included, before it is scaled to the window: brightness (-30 to 30, added in %), # contrast and saturation (70 to 150 and 50 to 200 %), gamma (0.8 to 1.2, below 1 brightens dark tones). At 0, 100, # 100 and 1 nothing runs. color_preset is the menu's profile (default, vivid, clarity, custom), which sets the four. From a211c4cb3e4adb45834b7d50eedb376ac9d80eac Mon Sep 17 00:00:00 2001 From: ProSep <9l0mhe7e@prosep.anonaddy.me> Date: Sun, 1 Nov 2026 04:14:56 +0100 Subject: [PATCH 2/4] Keep the game's level for one-level models in the lod patch set The level picker returns 0 for a model with one level, and the emulator mod returned the floor at its parameters' +0x28 for those too, without checking it against the level count; a floor above 0 would index past the one-level list. The site now masks the floor to 0 when the count is 1, without flags (a site may use them once), and every other model still takes the early return with the floor. Co-Authored-By: Claude Opus 5.5 --- recomp/patches-v121.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recomp/patches-v121.txt b/recomp/patches-v121.txt index 1080026f..3f64f7a3 100644 --- a/recomp/patches-v121.txt +++ b/recomp/patches-v121.txt @@ -83,13 +83,15 @@ site aspect main 1ecdf68 1e211800 f81f0fea @page:x10 bd403940 f84107ea # fdiv s # Distant detail, after the emulator mods "LOD Improvement v2" (theboy181, sweetmini) and "Disable LOD Quality # Reduction" (main-1.2.1.pchtxt). Those turn a conditional branch into an unconditional one; the generator patches -# only plain instructions (recomp/gen.py, the emitter's patch), so these sites feed the branch instead, with the same effect. +# only plain instructions (recomp/gen.py, the emitter's patch), so these sites feed the branch instead. # Model level of detail: the level picker main+0x27d225c (a virtual method, vtable slot at data 0x43723f0) returns the # floor at its parameters' +0x28 when the distance term is past the threshold, and otherwise interpolates towards the -# coarsest level; a one-level model returns count - 1 at once. Here every model takes that early return with the floor -# in w0, so distant models keep the detail they have up close. +# coarsest level; a one-level model returns count - 1 (0) at once. Here every model takes that early return, with the +# floor in w0, so distant models keep the detail they have up close. Unlike the mod, a one-level model still returns 0: +# the floor is not checked against the level count, and an index past a one-level list would read past its end. set lod TOTK_LOD_DETAIL 0 -site lod main 27d2264 71000520 b9402840 6b00001f # subs w0, w9, #1 -> ldr w0, [x2, #0x28]; cmp w0, w0 (b.eq taken) +# A site may use the flags only once, so the one-level case is a mask (all ones unless count - 1 is 0) on the floor. +site lod main 27d2264 71000520 5100052b 4b0b03ec 2a0b018c 131f7d8c b9402840 0a0c0000 6b00001f # subs w0, w9, #1 -> sub w11, w9, #1; neg w12, w11; orr w12, w12, w11; asr w12, w12, #31; ldr w0, [x2, #0x28]; and w0, w0, w12; cmp w0, w0 (b.eq taken) # Load-dependent quality: the graphics settings setup (main+0xc7e9xx, it also reads the FSR and FXAA switches) walks a # list at its +0x120 and passes three floats of each entry to virtual setters, which the mod describes as the drop of # model and texture detail when the frame rate falls; it skips all of it, to the epilogue, when the value it reads at From 47eed81122964b54e882b5441e64d75041b2bc60 Mon Sep 17 00:00:00 2001 From: ProSep <9l0mhe7e@prosep.anonaddy.me> Date: Wed, 4 Nov 2026 00:08:28 +0100 Subject: [PATCH 3/4] Add the Portuguese and Chinese texts of the distant detail settings Co-Authored-By: Claude Opus 5.5 --- runtime/ui_text.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/runtime/ui_text.c b/runtime/ui_text.c index f2feff09..f3e29c27 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -1289,6 +1289,13 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "ângulo raso continuam nítidos ao longe em vez de borrar. Jogo: o nível que o jogo pede, " "como no Switch.", [UI_MENU_ANISO_GAME] = "Jogo", + [UI_MENU_LOD_DETAIL] = "Detalhe de modelos distantes", + [UI_MENU_LOD_DETAIL_DESC] = "Modelos distantes mantêm o detalhe que têm de perto em vez de trocar por versões " + "mais simples. Só na versão 1.2.1 do jogo.", + [UI_MENU_LOD_STEADY] = "Detalhe estável sob carga", + [UI_MENU_LOD_STEADY_DESC] = "Pula a configuração do jogo que reduz o detalhe de modelos e texturas quando a taxa " + "de quadros cai, como faz o mod de emulador Disable LOD Quality Reduction. Só na " + "versão 1.2.1 do jogo.", [UI_MENU_COLOR] = "Cor", [UI_MENU_COLOR_PRESET] = "Perfil de cor", [UI_MENU_COLOR_PRESET_DESC] = "Define os quatro valores abaixo. Vívido: mais contraste e saturação, sombras um " @@ -1910,6 +1917,11 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_ANISO] = "纹理过滤", [UI_MENU_ANISO_DESC] = "表面纹理的各向异性过滤:以小角度看到的地面、道路和墙壁在远处依然清晰,而不会模糊。游戏:使用游戏请求的级别,与 Switch 上相同。", [UI_MENU_ANISO_GAME] = "游戏", + [UI_MENU_LOD_DETAIL] = "远处模型细节", + [UI_MENU_LOD_DETAIL_DESC] = "远处的模型保持近处的细节,而不会切换为简化版本。仅适用于游戏版本 1.2.1。", + [UI_MENU_LOD_STEADY] = "负载下保持细节", + [UI_MENU_LOD_STEADY_DESC] = "跳过游戏在帧率下降时降低模型和纹理细节的设置,与模拟器模组 Disable LOD Quality " + "Reduction 的作用相同。仅适用于游戏版本 1.2.1。", [UI_MENU_HDR_GROUP] = "HDR", [UI_MENU_HDR] = "HDR 输出", [UI_MENU_HDR_DESC] = "在 HDR 显示器上呈现明亮的高光。需要在 Windows 中开启 HDR(“使用 HDR”),或使用带色彩管理的 Wayland 合成器;否则画面保持 " From 1584d1ae231af6d059b40609959db9e5ea945a95 Mon Sep 17 00:00:00 2001 From: ProSep <9l0mhe7e@prosep.anonaddy.me> Date: Thu, 5 Nov 2026 01:13:01 +0100 Subject: [PATCH 4/4] Add the 1.4.3 sites of the distant detail settings The level picker is the same function in 1.4.3 (main+0x1ee8424) with the same first words and an early return straight to its ret, so the lod site takes the 1.2.1 words as they are. The graphics settings setup (main+0x5868c4) inlines the getters that 1.2.1 calls, and their slow paths come back before the compare, so the steady site is the compare itself: w10 is set to 9 there and the list walk is skipped to the epilogue, which does not read w10. The menu texts, README and totk.ini.example now name both versions. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- recomp/patches-v143.txt | 9 ++++++++- runtime/cfg.c | 2 +- runtime/ui_text.c | 18 +++++++++--------- totk.ini.example | 8 ++++---- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 94c803bb..f78e785e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - HDR10 output with peak, game and HUD brightness settings - 16:10 (Steam Deck, handhelds), 3:2 (Surface, Framework), 21:9 and 32:9 (ultrawide) game resolutions, with the camera and the interface in that shape - Anisotropic texture filtering up to 16x, for sharp ground into the distance -- Optional full model detail at any distance (1.2.1) +- Optional full model detail at any distance (1.2.1 and 1.4.3) - In-game settings menu (F1) and performance overlay (F10) - Discord Rich Presence ("Playing TotK Recomp" with the play time), off by default, own application id supported - Setup and in-game menu in English, Russian, Brazilian Portuguese and Simplified Chinese diff --git a/recomp/patches-v143.txt b/recomp/patches-v143.txt index 13f045df..15183444 100644 --- a/recomp/patches-v143.txt +++ b/recomp/patches-v143.txt @@ -12,9 +12,16 @@ set output TOTK_PATCH_OUTPUT 0 set scene TOTK_PATCH_SCENE 0 set shadow TOTK_PATCH_SHADOW 0 set cascade TOTK_PATCH_CASCADE 0 -# Distant detail (patches-v121.txt explains both): no sites found in this version yet, so the switches do nothing. +# Distant detail (patches-v121.txt explains both). The level picker main+0x1ee8424 is 1.2.1's main+0x27d225c with the +# same first words, and its early b.eq goes straight to the ret, so the 1.2.1 site words fit as they are. set lod TOTK_LOD_DETAIL 0 +site lod main 1ee842c 71000520 5100052b 4b0b03ec 2a0b018c 131f7d8c b9402840 0a0c0000 6b00001f # subs w0, w9, #1 -> the 1.2.1 words (one-level mask, floor in w0, cmp w0, w0: b.eq taken) +# The graphics settings setup (main+0x5868c4) inlines the three getters 1.2.1 calls: the value 1.2.1 reads at +# main+0xc7eb24 is the ldr w10, [x10, #0x38] at main+0x58692c, and the getters' slow paths (main+0x586bc8, 0x586c18, +# 0x586f44) come back before the compare. So the site is the compare, which every path reaches: w10 = 9 skips the +# list walk to the epilogue (main+0x58729c), which does not read w10. set steady TOTK_LOD_STEADY 0 +site steady main 586954 7100215f 5280012a 7100215f # cmp w10, #8 -> mov w10, #9; cmp w10, #8 (b.gt 0x58729c taken) # 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) diff --git a/runtime/cfg.c b/runtime/cfg.c index fa4a2436..4da94e49 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -121,7 +121,7 @@ static const CfgMeta metas[] = { {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"FXAA", "1", "0|1", LIVE}, {"ASPECT", "fit", "fit|stretch", LIVE}, {"FOV", "100", "70..140", LIVE}, {"ANISO", "game", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features - {"LOD_DETAIL", "0", "0|1", RESTART}, {"LOD_STEADY", "0", "0|1", RESTART}, // patch sets lod and steady (1.2.1) + {"LOD_DETAIL", "0", "0|1", RESTART}, {"LOD_STEADY", "0", "0|1", RESTART}, // patch sets lod and steady (1.2.1, 1.4.3) // colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses {"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE}, {"COLOR_CONTRAST", "100", "70..150", LIVE}, {"COLOR_SATURATION", "100", "50..200", LIVE}, diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 6a220031..f1b6d015 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -91,9 +91,9 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_ANISO_DESC] = "Anisotropic filtering of surface textures: ground, roads and walls seen at a shallow angle stay sharp into the distance instead of blurring. Game: the level the game asks for, as on the Switch.", [UI_MENU_ANISO_GAME] = "Game", [UI_MENU_LOD_DETAIL] = "Distant model detail", - [UI_MENU_LOD_DETAIL_DESC] = "Distant models keep the detail they have up close instead of switching to simpler versions. Game version 1.2.1 only.", + [UI_MENU_LOD_DETAIL_DESC] = "Distant models keep the detail they have up close instead of switching to simpler versions. Game versions 1.2.1 and 1.4.3.", [UI_MENU_LOD_STEADY] = "Steady detail under load", - [UI_MENU_LOD_STEADY_DESC] = "Skips the game's setup for lowering model and texture detail when the frame rate drops, as the emulator mod Disable LOD Quality Reduction does. Game version 1.2.1 only.", + [UI_MENU_LOD_STEADY_DESC] = "Skips the game's setup for lowering model and texture detail when the frame rate drops, as the emulator mod Disable LOD Quality Reduction does. Game versions 1.2.1 and 1.4.3.", [UI_MENU_SHARPNESS] = "FSR sharpness", [UI_MENU_SHARPNESS_DESC] = "Sharpening after FSR scaling; 0 turns it off.", [UI_MENU_COLOR] = "Colour", @@ -558,9 +558,9 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_ANISO_DESC] = "Анизотропная фильтрация текстур поверхностей: земля, дороги и стены под острым углом остаются чёткими вдали, а не размываются. Игра: уровень, который запрашивает игра, как на Switch.", [UI_MENU_ANISO_GAME] = "Игра", [UI_MENU_LOD_DETAIL] = "Детализация дальних моделей", - [UI_MENU_LOD_DETAIL_DESC] = "Дальние модели сохраняют детализацию, как вблизи, а не переключаются на упрощённые версии. Только для версии игры 1.2.1.", + [UI_MENU_LOD_DETAIL_DESC] = "Дальние модели сохраняют детализацию, как вблизи, а не переключаются на упрощённые версии. Только для версий игры 1.2.1 и 1.4.3.", [UI_MENU_LOD_STEADY] = "Стабильная детализация под нагрузкой", - [UI_MENU_LOD_STEADY_DESC] = "Пропускает настройку игры, снижающую детализацию моделей и текстур при падении частоты кадров, как эмуляторный мод Disable LOD Quality Reduction. Только для версии игры 1.2.1.", + [UI_MENU_LOD_STEADY_DESC] = "Пропускает настройку игры, снижающую детализацию моделей и текстур при падении частоты кадров, как эмуляторный мод Disable LOD Quality Reduction. Только для версий игры 1.2.1 и 1.4.3.", [UI_MENU_SHARPNESS] = "Резкость FSR", [UI_MENU_SHARPNESS_DESC] = "Повышение резкости после масштабирования FSR; 0 выключает его.", [UI_MENU_COLOR] = "Цвет", @@ -1314,11 +1314,11 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_ANISO_GAME] = "Jogo", [UI_MENU_LOD_DETAIL] = "Detalhe de modelos distantes", [UI_MENU_LOD_DETAIL_DESC] = "Modelos distantes mantêm o detalhe que têm de perto em vez de trocar por versões " - "mais simples. Só na versão 1.2.1 do jogo.", + "mais simples. Só nas versões 1.2.1 e 1.4.3 do jogo.", [UI_MENU_LOD_STEADY] = "Detalhe estável sob carga", [UI_MENU_LOD_STEADY_DESC] = "Pula a configuração do jogo que reduz o detalhe de modelos e texturas quando a taxa " - "de quadros cai, como faz o mod de emulador Disable LOD Quality Reduction. Só na " - "versão 1.2.1 do jogo.", + "de quadros cai, como faz o mod de emulador Disable LOD Quality Reduction. Só nas " + "versões 1.2.1 e 1.4.3 do jogo.", [UI_MENU_COLOR] = "Cor", [UI_MENU_COLOR_PRESET] = "Perfil de cor", [UI_MENU_COLOR_PRESET_DESC] = "Define os quatro valores abaixo. Vívido: mais contraste e saturação, sombras um " @@ -1952,10 +1952,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_ANISO_DESC] = "表面纹理的各向异性过滤:以小角度看到的地面、道路和墙壁在远处依然清晰,而不会模糊。游戏:使用游戏请求的级别,与 Switch 上相同。", [UI_MENU_ANISO_GAME] = "游戏", [UI_MENU_LOD_DETAIL] = "远处模型细节", - [UI_MENU_LOD_DETAIL_DESC] = "远处的模型保持近处的细节,而不会切换为简化版本。仅适用于游戏版本 1.2.1。", + [UI_MENU_LOD_DETAIL_DESC] = "远处的模型保持近处的细节,而不会切换为简化版本。仅适用于游戏版本 1.2.1 和 1.4.3。", [UI_MENU_LOD_STEADY] = "负载下保持细节", [UI_MENU_LOD_STEADY_DESC] = "跳过游戏在帧率下降时降低模型和纹理细节的设置,与模拟器模组 Disable LOD Quality " - "Reduction 的作用相同。仅适用于游戏版本 1.2.1。", + "Reduction 的作用相同。仅适用于游戏版本 1.2.1 和 1.4.3。", [UI_MENU_HDR_GROUP] = "HDR", [UI_MENU_HDR] = "HDR 输出", [UI_MENU_HDR_DESC] = "在 HDR 显示器上呈现明亮的高光。需要在 Windows 中开启 HDR(“使用 HDR”),或使用带色彩管理的 Wayland 合成器;否则画面保持 " diff --git a/totk.ini.example b/totk.ini.example index d8be5c2d..74820aef 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -166,12 +166,12 @@ # are raised; shadow maps, data maps and screen-sized buffers keep the game's setting. Read at start. # aniso = game # Distant model detail: 1 keeps the detail models have up close at any distance, 0 (the default) lets the game switch -# to simpler versions as they recede (recomp/patches-v121.txt, set lod). Costs GPU time. Game version 1.2.1 only. -# Read at start. +# to simpler versions as they recede (recomp/patches-v121.txt, set lod). Costs GPU time. Game versions 1.2.1 and +# 1.4.3. Read at start. # lod_detail = 0 # Steady detail under load: 1 skips the game's setup for lowering model and texture detail when the frame rate drops, -# as the emulator mod "Disable LOD Quality Reduction" does (set steady); 0 (the default) leaves it. Game version 1.2.1 -# only. Read at start. +# as the emulator mod "Disable LOD Quality Reduction" does (set steady); 0 (the default) leaves it. Game versions +# 1.2.1 and 1.4.3. Read at start. # lod_steady = 0 # Colour adjustment of the picture, HUD included, before it is scaled to the window: brightness (-30 to 30, added in %), # contrast and saturation (70 to 150 and 50 to 200 %), gamma (0.8 to 1.2, below 1 brightens dark tones). At 0, 100,