From c8eb315c1ebed85ac910ffd2fca29580e27b2ab7 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 9 Nov 2026 08:44:44 +0800 Subject: [PATCH] Describe 1.1.0 field of view support and strengthen patch preservation checks --- runtime/ui_text.c | 8 ++++---- tests/patches_v110_check.py | 29 ++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/runtime/ui_text.c b/runtime/ui_text.c index fd74a07f..00afeec6 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -84,7 +84,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { "bars, or stretch them over the whole picture. Applies from the next movie.", [UI_MENU_MOVIE_ASPECT_KEEP] = "Black bars", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Stretch", [UI_MENU_FOV] = "Field of view", - [UI_MENU_FOV_DESC] = "How much of the world the camera shows, in percent of the game's own. Game version 1.4.3 only.", + [UI_MENU_FOV_DESC] = "How much of the world the camera shows, in percent of the game's own. Game versions 1.1.0 and 1.4.3.", [UI_MENU_SHADOW_RES] = "Shadow map size", [UI_MENU_SHADOW_RES_DESC] = "Size of the sun's shadow map. The game's own size changes with the view, down to about 400 " "near the ground, so leaf shadows look blocky and jump; a fixed size keeps them still and " @@ -561,7 +561,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "растянуть их на всю картинку. Действует со следующего ролика.", [UI_MENU_MOVIE_ASPECT_KEEP] = "Чёрные полосы", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Растянуть", [UI_MENU_FOV] = "Поле зрения", - [UI_MENU_FOV_DESC] = "Сколько мира показывает камера, в процентах от игрового. Только для версии игры 1.4.3.", + [UI_MENU_FOV_DESC] = "Сколько мира показывает камера, в процентах от игрового. Для версий игры 1.1.0 и 1.4.3.", [UI_MENU_SHADOW_RES] = "Размер карты теней", [UI_MENU_SHADOW_RES_DESC] = "Размер карты теней от солнца. Собственный размер игры меняется вместе с видом, у земли до " "примерно 400, поэтому тени листвы выглядят квадратными и дёргаются; постоянный размер делает " @@ -1336,7 +1336,7 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, nitidez %d%%", [UI_MENU_OV_SCALE_NONE] = "nenhuma (1:1)", [UI_MENU_OV_SCALE_BILINEAR] = "bilinear", [UI_MENU_FOV] = "Campo de visão", - [UI_MENU_FOV_DESC] = "Quanto do mundo a câmera mostra, em porcentagem do original do jogo. Só na versão 1.4.3 do " + [UI_MENU_FOV_DESC] = "Quanto do mundo a câmera mostra, em porcentagem do original do jogo. Nas versões 1.1.0 e 1.4.3 do " "jogo.", [UI_MENU_SHADOW_RES] = "Tamanho do mapa de sombras", [UI_MENU_SHADOW_RES_DESC] = "Tamanho do mapa de sombras do sol. O tamanho do jogo muda com a vista, até cerca de " @@ -1606,7 +1606,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_MOVIE_ASPECT_STRETCH] = "拉伸", [UI_MENU_FOV] = "视野", [UI_MENU_FOV_DESC] = "镜头能看到多大范围,以游戏自身视野的百分比表示。" - "仅限游戏版本 1.4.3。", + "支持游戏版本 1.1.0 和 1.4.3。", [UI_MENU_SHARPNESS] = "FSR 锐度", [UI_MENU_SHARPNESS_DESC] = "FSR 缩放后的锐化强度;0 为关闭。", [UI_MENU_COLOR] = "色彩", diff --git a/tests/patches_v110_check.py b/tests/patches_v110_check.py index bb4e8b48..8b8774cf 100644 --- a/tests/patches_v110_check.py +++ b/tests/patches_v110_check.py @@ -8,6 +8,7 @@ import math import struct import sys import tempfile +import zlib from pathlib import Path ROOT = Path(__file__).resolve().parents[1] @@ -45,7 +46,9 @@ def main(): ap.add_argument('--exefs', type=Path) ap.add_argument('--cflags', default='-march=x86-64-v3') args = ap.parse_args() - mods = layout(args.exefs) if args.exefs else [('main', 0x7000000000, 0x472d000)] + mods = layout(args.exefs) if args.exefs else [ + ('main', 0x7000000000, 0x472d000), ('subsdk0', 0x7004800000, 0x400000), + ('sdk', 0x7004c00000, 0x800000)] table = patches.load(ROOT / 'recomp' / 'patches-v110.txt', mods) base = mods[0][1] if args.exefs: @@ -100,10 +103,11 @@ def main(): struct.pack_into('<' + 'I' * len(code), text, pc - lo, *code) emu = Emu([(lo, text), (table.page, page)]) emu.mu.mem_write(BUF, bytes(mem)) - x = [BUF + 0x2000] * 31 - x[8] = BUF + 0x2000 + x = [0x1234567800000000 + i for i in range(31)] + for i in (8, 19, 20, 23, 27): + x[i] = BUF + 0x2000 x[25], x[30] = offset, enabled - v = [int.from_bytes(struct.pack('