From ba711b7f5ae91c9cbf903fbc11c101f1e7602fe0 Mon Sep 17 00:00:00 2001 From: VictorSCosta Date: Fri, 6 Nov 2026 18:35:09 -0300 Subject: [PATCH 01/66] Add AMD FSR 4 upscaling as a second DLAA backend. dlaa_backend = fsr hands the DLAA frame (scene light, depth, motion vectors, jitter and the characters' mask) to AMD's FSR through the FSR SDK 2.4 Vulkan loader, which picks FSR 4 where the GPU has it and FSR 3.1 elsewhere. The device enables cooperative matrix and 8-bit float support for it, the camera's near and far planes and field of view come from the scene camera block, and the setup gains an fsr step that downloads AMD's signed DLLs. DLAA also no longer arms on scenes narrower than a quarter of the output, which small loading renders did at ultrawide sizes. --- README.md | 6 +- THIRD_PARTY_NOTICES.md | 2 + docs/architecture.md | 8 ++ docs/installer.md | 9 +- docs/settings.md | 2 + installer/cli.py | 8 +- installer/gui.py | 9 +- installer/guilogic.py | 5 +- installer/steps.py | 98 +++++++++++++- installer/text/en.json | 6 + installer/text/pt-BR.json | 6 + installer/text/ru.json | 6 + installer/text/zh-Hans.json | 6 + runtime/cfg.c | 8 +- runtime/ffx_api_min.h | 245 ++++++++++++++++++++++++++++++++++ runtime/resolution.c | 20 ++- runtime/ui/menu.cpp | 2 + runtime/ui_text.c | 23 ++++ runtime/ui_text.h | 3 +- runtime/vk_device.c | 15 ++- runtime/vk_dlaa.c | 156 +++++++++++++++++++--- runtime/vk_ffx.c | 256 ++++++++++++++++++++++++++++++++++++ runtime/vk_ffx.h | 35 +++++ tests/installer_test.py | 74 ++++++++++- totk.ini.example | 4 + 25 files changed, 973 insertions(+), 39 deletions(-) create mode 100644 runtime/ffx_api_min.h create mode 100644 runtime/vk_ffx.c create mode 100644 runtime/vk_ffx.h diff --git a/README.md b/README.md index 38780dce..104fd074 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - Custom resolutions (1080p, 2k...), supersampling and AMD FSR 1 upscaling - NVIDIA DLSS / DLAA on RTX GPUs: the setup downloads `nvngx_dlss.dll` from NVIDIA's DLSS SDK repository (github.com/NVIDIA/DLSS, NVIDIA RTX SDK license) when it finds an RTX GPU; untick it in the setup to skip it +- AMD FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on others), in the same modes as DLSS: the setup downloads + AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, AMD FSR SDK license) when it + finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu (Windows; not yet checked in play) - 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 @@ -53,7 +56,8 @@ Requirements: Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA machines 2. Start `TotK-Setup.exe`. If SmartScreen warns about an unsigned app, choose *More info*, then *Run anyway*. 3. Pick your game files, the language and an install folder, and press *Start*. The setup builds the game once. With an NVIDIA RTX GPU it also downloads NVIDIA DLSS, unless you untick *Download NVIDIA DLSS*; turn DLSS on in the - menu (F1). + menu (F1). With an AMD GPU it downloads AMD FSR the same way; in the menu turn on *NVIDIA DLSS / DLAA* and pick + *Upscaler: AMD FSR*. 4. Play `totk.exe` from the install folder. ### Linux diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 289e75a6..c0266a30 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -37,6 +37,8 @@ Code copied or adapted from another project is listed here with its source, the | MacNativeGames host movie decoder (`movie::Decoder` for VP9 over libvpx: entry list, buffer and event semantics, NV12 output format, PTS pacing) | https://github.com/ly05010419/MacNativeGames @ `b75be8cfa704df3701e86130c8ced268e79d6b11` (`games/totk/runtime/movie_host.c`, `movie_host.h`), Copyright (c) 2026 MacNativeGames contributors | MIT | `runtime/ov_movie.c`, `runtime/movie.h` | | libvpx 1.17.0 (MSYS2 `mingw-w64-ucrt-x86_64-libvpx`), static link (`libvpx.a`), no DLL shipped; the release notices must carry its BSD licence text and the WebM Project's `PATENTS` grant | https://chromium.googlesource.com/webm/libvpx, Copyright (c) 2010, The WebM Project authors | BSD-3-Clause | `runtime/ov_movie.c` (VP9 decoding of the `Event/Movie` WebM files) | | MacNativeGames TotK resolution patches: output, swapchain and scene size sites and instruction words for 1.2.1 and 1.4.3, the data-page layout, the HeapDef heap names and sizes | https://github.com/ly05010419/MacNativeGames @ `aaf6ba1f494fabaa209d049e528d6f923dfe822a` (`games/totk/runtime/game_patches.c`, `game_patches_v143.c`, `game_version.h`, `games/totk/scripts/make_output_res_overlay.py`), Copyright (c) 2026 MacNativeGames contributors | MIT | `recomp/patches-v121.txt`, `recomp/patches-v143.txt`, `runtime/resolution.c` | +| AMD FSR SDK ffx-api declarations (`ffx_api.h`, `ffx_api_types.h`, `vk/ffx_api_vk.h`, `upscalers/include/ffx_upscale.h`, trimmed to the declarations used, layouts unchanged) | https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK @ tag `v2.4.0`, Copyright (C) 2026 Advanced Micro Devices, Inc. | MIT | `runtime/ffx_api_min.h` | +| AMD FSR SDK signed binaries `amd_fidelityfx_loader_vk.dll` and `amd_fidelityfx_upscaler_vk.dll` (not in this repository or the release: the setup's `--fsr` step downloads AMD's copies into the install folder) | https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK @ tag `v2.4.0` (`Kits/FidelityFX/signedbin/`), Copyright (C) 2026 Advanced Micro Devices, Inc. | AMD FSR SDK license (`docs/license.md` of that tag): redistribution in binary form with its notice, no reverse engineering | loaded at run time by `runtime/vk_ffx.c` | | AMD FidelityFX Super Resolution 1.0 (`ffx_a.h`, `ffx_fsr1.h`, unmodified; licence text in `runtime/shaders/ffx/LICENSE.txt`) | https://github.com/GPUOpen-Effects/FidelityFX-FSR @ `a21ffb8f6c13233ba336352bdff293894c706575`, Copyright (c) 2021 Advanced Micro Devices, Inc. | MIT | `runtime/shaders/ffx/`, `runtime/shaders/fsr_easu.comp`, `runtime/shaders/fsr_rcas.comp` (compiled into `runtime/fsr_easu_spv.h`, `runtime/fsr_rcas_spv.h`) | | AMD Display Library (ADL) declarations: `AdapterInfo`, `ADLSingleSensorData`, `ADLPMLogDataOutput`, the `ADL_PMLOG_*` sensor numbers and the `ADL2_*` function signatures | https://github.com/GPUOpen-LibrariesAndSDKs/display-library @ `84c881cb2136f04287eb3af12de00a9e2867aa9e` (`include/adl_structures.h`, `include/adl_defines.h`, `include/adl_sdk.h`), Copyright (c) 2016 - 2022 Advanced Micro Devices, Inc. | MIT | `runtime/perfmon.c` | | Zstandard 1.5.7 (MSYS2 `mingw-w64-ucrt-x86_64-zstd`), static link | https://github.com/facebook/zstd, Copyright (c) Meta Platforms, Inc. and affiliates | BSD-3-Clause | `runtime/resolution.c` (the HeapDef table), `runtime/ov_zstd.c` (the game's zstd frames decoded on the host) | diff --git a/docs/architecture.md b/docs/architecture.md index 0c123786..1d7dc3ec 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -129,6 +129,14 @@ Every guest thread is a host thread. TotK assumes Horizon's scheduler: three app that computes last frame's position from last frame's blocks (the game writes them into two copies that take turns; the uniform snapshot keeps both) and writes the difference into the motion image. `TOTK_MV_CHECK` measures the vectors against the picture, `TOTK_DLAA_TIMES` times the passes on the GPU. `fxaa` switches the game's own FXAA pass. +- FSR (`vk_ffx.c`, `dlaa_backend = fsr`, Windows). The same frame, jitter, motion vectors and masks go to AMD's FSR + instead of DLSS: `vk_dlaa.c` `evaluate` calls `vk_ffx_dispatch` where it would call NGX, and everything around it is + shared. `amd_fidelityfx_loader_vk.dll` (FSR SDK 2.4) is loaded at run time from the executable's folder and finds + `amd_fidelityfx_upscaler_vk.dll` next to it; only the descriptor layouts of `ffx_api_min.h` are compiled in. At + start the upscaler's versions for the device are listed and the newest FSR 4 is pinned where the DLL offers it (the + DLL decides which GPUs get it), else its default (FSR 3.1). `vk_device.c` enables `VK_KHR_cooperative_matrix` and + `VK_EXT_shader_float8` with their features when the device has them. FSR also asks for the camera's near and far + distances and field of view, which `cam_params` reads from the projection in the scene camera block. - Occlusion queries never block the CPU; a result that is not ready counts as visible. - ASTC textures are uploaded as they are where the device reports `textureCompressionASTC_LDR`, and decoded by a compute shader everywhere else (`vk_astc.c`, `TOTK_ASTC`). The CPU decoder (`tex_astc*.c`) is the fallback and the test oracle. - Draw state. A draw whose program, bound state and textures repeat reuses the previous draw's shaders and skips rebuilding its descriptor sets; descriptor sets are written through update templates (`vk_exec_draw.c`, `vk_pipeline.c`). diff --git a/docs/installer.md b/docs/installer.md index 46d8c5c9..9e74e7c8 100644 --- a/docs/installer.md +++ b/docs/installer.md @@ -24,6 +24,7 @@ The install folder (`main.c` `portable_paths()` reads this layout; it stays port / totk.exe, SDL3.dll, libopus-0.dll, totk_xlate.exe nvngx_dlss.dll NVIDIA DLSS, downloaded by the setup's DLSS step when the player keeps it ticked + amd_fidelityfx_*_vk.dll AMD FSR (loader and upscaler), downloaded by the setup's FSR step likewise totk.ini language; the other keys as commented defaults (totk.ini.example) exefs/, romfs/ extracted from the player's files shared-fonts/ the Switch system fonts, with Chinese, Korean or Traditional Chinese text @@ -85,7 +86,13 @@ loads the saves 1.4.3 wrote. the library; NGX loads it from the folder of totk.exe for `dlaa` and the DLSS modes. A DLSS library already in the folder (a newer one the player put there) is kept. Without an RTX GPU the step only logs and does nothing; a failed download warns, the game runs without DLSS, and the next run of the setup tries again. -8. **Clean up** the temp folder, except the generated C and the objects (about 1.3 GB), and write +8. **FSR** (the window's tick box, on by default, or `--fsr`; Windows with an AMD GPU): download + `amd_fidelityfx_loader_vk.dll` and `amd_fidelityfx_upscaler_vk.dll` from AMD's FSR SDK repository + (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, tag `v2.4.0`, `Kits/FidelityFX/signedbin/`, AMD FSR SDK + license) into the install folder and check their sizes and SHA-256 (`steps.py`, `Fsr`). Both go in only when both + downloaded and matched. `dlaa_backend = fsr` loads them from the folder of totk.exe. Libraries already in the folder + are kept; without an AMD GPU the step only logs; a failed download warns and the next run tries again. +9. **Clean up** the temp folder, except the generated C and the objects (about 1.3 GB), and write `build-cache/rebuild.txt` in the install folder. A cancelled or failed setup resumes from the last finished step (`totk-install.json`). diff --git a/docs/settings.md b/docs/settings.md index eb7cee24..bcb0a367 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -156,6 +156,8 @@ Many rows below are developer tools that only act together with another setting | `dlaa_survey` (default `0`) | `1` logs what is drawn into the light target that DLSS reads. | Adds log output and per-draw work. | Caution | | `dlaa_times` (default `0`) | `1` times the DLSS passes on the GPU. | Adds GPU timestamps and log lines. | Caution | | `dlss_reactive` (default `0`) | `1` builds a reactive mask for DLSS where it ran. | Changes how DLSS blends moving areas; a test setting. | Caution | +| `fsr_debug` (default `0`) | `1` creates the FSR contexts (`dlaa_backend = fsr`) with AMD's API checks on, whose findings go to the log. | Adds log output and some CPU time per frame; a test setting. | Caution | +| `fsr_jitter_sign` (default `1`) | `-1` hands FSR the camera jitter with the opposite sign (`dlaa_backend = fsr`). | With the wrong sign FSR's picture wobbles and loses detail; a test setting for checking the convention. | Caution | | `mv_check` | Frame interval; every that many DLSS frames copies the light target and motion images to host memory and logs how well the vectors explain the picture. | Costs a GPU-to-host copy and a comparison on the completion thread at each interval. | Caution | | `mv_survey` (default `0`) | `1` notes the uniform blocks of each scene draw and compares them with those of earlier frames. | Adds per-draw work and log output. | Caution | | `mvobj_all` (default `0`) | `1` also lists draws for object motion that read no object blocks (terrain and grass). | More draws are checked and listed, which costs time. | Caution | diff --git a/installer/cli.py b/installer/cli.py index 14fa57ed..f3dfb633 100644 --- a/installer/cli.py +++ b/installer/cli.py @@ -1,5 +1,5 @@ """Command line: python -m installer --base FILE --update FILE --keys FILE --lang CODE --dest DIR [--firmware DIR] - [--root DIR] [--temp DIR] [--verify] [--dlss] + [--root DIR] [--temp DIR] [--verify] [--dlss] [--fsr] A first install needs every option. --firmware names the Switch firmware folder (an unpacked firmware or an emulator's Contents/registered); the setup extracts the system shared fonts from it when the language is Chinese, Korean or @@ -9,7 +9,9 @@ extraction has to run again. Prints JSON events on stdout (events.py). Exit code line, 3 cancelled (Ctrl+C or Ctrl+Break). --dlss downloads NVIDIA's DLSS library (nvngx_dlss.dll) from NVIDIA's DLSS SDK repository into the install folder on -Windows with an NVIDIA RTX GPU (steps.py, Dlss). +Windows with an NVIDIA RTX GPU (steps.py, Dlss). --fsr downloads AMD's FSR loader and upscaler +(amd_fidelityfx_loader_vk.dll, amd_fidelityfx_upscaler_vk.dll) from AMD's FSR SDK repository into the install folder on +Windows with an AMD GPU (steps.py, Fsr). """ import argparse import hashlib @@ -63,6 +65,8 @@ def main(argv=None): ap.add_argument('--verify', action='store_true', help='hash every kept file, also those this release made') ap.add_argument('--dlss', action='store_true', help="download NVIDIA's nvngx_dlss.dll (NVIDIA RTX SDK license) next " 'to the game, for dlaa and the DLSS modes') + ap.add_argument('--fsr', action='store_true', help="download AMD's FSR loader and upscaler DLLs (AMD FSR SDK " + 'license) next to the game, for dlaa_backend = fsr') args = ap.parse_args(argv) # The window cancels with Ctrl+Break to the installer's process group (CREATE_NEW_PROCESS_GROUP), which also reaches diff --git a/installer/gui.py b/installer/gui.py index 9c0dc1fd..b19980ac 100644 --- a/installer/gui.py +++ b/installer/gui.py @@ -273,6 +273,11 @@ class App: self.bind_text(dlss, 'text', 'ui.dlss') dlss.pack(anchor='w', pady=(dpi.px(8), 0)) self.label(f, 'ui.dlss_help', wraplength=WRAP, justify='left').pack(anchor='w', padx=(dpi.px(22), 0)) + self.fsr_var = tk.BooleanVar(value=True) + fsr = ttk.Checkbutton(f, variable=self.fsr_var) + self.bind_text(fsr, 'text', 'ui.fsr') + fsr.pack(anchor='w', pady=(dpi.px(8), 0)) + self.label(f, 'ui.fsr_help', wraplength=WRAP, justify='left').pack(anchor='w', padx=(dpi.px(22), 0)) self.update_hint = ttk.Label(f, wraplength=WRAP, justify='left') self.update_hint.pack(anchor='w', pady=(dpi.px(8), 0)) self.form_error = ttk.Label(f, style='Err.TLabel', wraplength=WRAP, justify='left') @@ -344,7 +349,7 @@ class App: def form(self): return Form(base=self.vars['base'].get(), update=self.vars['update'].get(), keys=self.vars['keys'].get(), firmware=self.vars['firmware'].get(), lang=self.selected_lang(), dest=self.vars['dest'].get(), - dlss=self.dlss_var.get()) + dlss=self.dlss_var.get(), fsr=self.fsr_var.get()) def set_prefill(self, name, value): self.programmatic = True @@ -619,7 +624,7 @@ class App: # ---- self test --------------------------------------------------------------------------------------------------- SAMPLE_START = {'type': 'start', 'release': 'selftest', 'mode': 'install', 'dest': 'Z:/selftest/TotK', 'log': 'D:\\log.txt', - 'steps': ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'cleanup']} + 'steps': ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'fsr', 'cleanup']} SAMPLE_RUN = [ SAMPLE_START, {'type': 'plan', 'run': ['check', 'fonts', 'extract'], 'skip': {}}, diff --git a/installer/guilogic.py b/installer/guilogic.py index f17a2dc4..1b369953 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -27,7 +27,7 @@ TEXT = Path(__file__).resolve().parent / 'text' UI_LANGUAGES = ('en', 'ru', 'pt-BR', 'zh-Hans') # what the language switch in the window's corner shows for each UI_LANGUAGE_LABELS = {'en': 'English', 'ru': 'Русский', 'pt-BR': 'Português (Brasil)', 'zh-Hans': '简体中文'} -STEP_ORDER = ('check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'cleanup') +STEP_ORDER = ('check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'fsr', 'cleanup') # message parameter -> catalog id prefix of the names that replace its raw values PARAM_NAMES = {'lang': 'lang.', 'known': 'lang.', 'step': 'step.', 'input': 'param.input.'} LANG_RU = 0x19 # primary language id of Russian in a Windows LANGID @@ -138,6 +138,7 @@ class Form: lang: str = '' dest: str = '' dlss: bool = False + fsr: bool = False def installed_state(self): """The recorded state of the install folder (totk-install.json), or None. Never raises.""" @@ -190,6 +191,8 @@ class Form: cmd.append('--verify') if self.dlss: cmd.append('--dlss') + if self.fsr: + cmd.append('--fsr') return cmd diff --git a/installer/steps.py b/installer/steps.py index 4db8a2b5..2efe1032 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -1,4 +1,4 @@ -"""The eight setup steps of docs/installer.md: check, fonts, extract, lift, compile, prepare, dlss, cleanup. +"""The nine setup steps of docs/installer.md: check, fonts, extract, lift, compile, prepare, dlss, fsr, cleanup. Extraction runs in this process through tools/extract.py (the package's sibling tools/, which ships with it); fonts runs the vendored extract_shared_fonts.py on the firmware folder; lift, compile and prepare run the bundled Python on @@ -7,7 +7,8 @@ recomp/gen.py, tools/build_game.py, tools/make_romfs_patches.py and tools/prepar with the bundled clang (hostcheck.c). Install folder: exefs/, romfs/ (romfs.bin, index.json), profile/, shared-fonts/ (Chinese and Korean text), totk.exe -and its DLLs, nvngx_dlss.dll (with --dlss), romfs-index.bin, romfs-patches/, romfs-patches-xbox/, +and its DLLs, nvngx_dlss.dll (with --dlss), amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll (with +--fsr), romfs-index.bin, romfs-patches/, romfs-patches-xbox/, romfs-patches-xbox-label/, romfs-patches-pc/, totk_xlate.exe, the shader state of totk.exe --prepare-shaders, totk.ini, totk-install.json. Temp folder (/-): check/ (ExeFS of both inputs, the host check), unpacked/ (the NSP of an NSZ @@ -1221,7 +1222,96 @@ class Dlss(Step): return {'installed': DLSS_VERSION} -# ---- 8. clean up +# ---- 8. AMD FSR + +# AMD's FSR upscaler for dlaa_backend = fsr (runtime/vk_ffx.c): the ffx-api loader and the upscaler effect, which the +# loader finds next to itself. AMD's FSR SDK license lets them be redistributed in binary form with its notice +# (THIRD_PARTY_NOTICES.md); the setup still does not ship them: with --fsr it downloads AMD's signed copies from the SDK +# repository at a pinned tag and checks their hashes. The game runs without them; dlaa_backend = fsr then does nothing. +FSR_VERSION = '2.4.0' # the FSR SDK release; the upscaler DLL is FSR 4.1.2 with FSR 3.1.6 inside +FSR_BASE = (f'https://raw.githubusercontent.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/v{FSR_VERSION}/' + 'Kits/FidelityFX/signedbin/') +FSR_FILES = ( # name, size, SHA-256 + ('amd_fidelityfx_loader_vk.dll', 39184, '38a56a01fb3565c0757d9f5c1e4e69de4b65e5f2e5769b323b200dc1f142bab9'), + ('amd_fidelityfx_upscaler_vk.dll', 36135696, '4a7e895af6e0b615d40a84d59eb8c2b1054ad91cdd0c739567940270d51bdab7'), +) +FSR_LICENSE = f'https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/v{FSR_VERSION}/docs/license.md' + + +def amd_radeon(host): + """An AMD GPU among the host check's Vulkan devices: FSR 4 runs on Radeon RX 6000 and later, FSR 3.1 on older + ones.""" + return any('AMD' in d['name'].upper() or 'RADEON' in d['name'].upper() for d in (host or {}).get('devices', [])) + + +class Fsr(Step): + """With --fsr on Windows and an AMD GPU: AMD's FSR loader and upscaler next to totk.exe. Libraries the player put + there (other versions) are kept. A failed download warns and is tried again on the next run; the game runs + without them.""" + + id = 'fsr' + + def key(self, ctx): + if not getattr(ctx.options, 'fsr', False): + return fingerprint('fsr-1', 'off') + return fingerprint('fsr-1', FSR_VERSION, *(sha for _, _, sha in FSR_FILES)) + + def current(self, ctx, record): + if record.get('failed'): + return False + return not record.get('installed') or all((ctx.dest / name).is_file() for name, _, _ in FSR_FILES) + + def run(self, ctx): + if not getattr(ctx.options, 'fsr', False): + return {} + if os.name != 'nt': + return {'skipped': 'not_windows'} + if not amd_radeon(getattr(ctx, 'host', None)): + # The box is ticked by default, so most players without an AMD GPU never chose it: a log line, no warning + ctx.reporter.log('fsr: no AMD GPU among the Vulkan devices, nothing downloaded') + return {'skipped': 'no_amd'} + rep = ctx.reporter + present = [ctx.dest / name for name, _, _ in FSR_FILES if (ctx.dest / name).is_file()] + if present: + if all((ctx.dest / name).is_file() and file_sha256(ctx.dest / name) == sha for name, _, sha in FSR_FILES): + return {'installed': FSR_VERSION} + # A set the player put there (or half of one): kept as it is, the loader and its effect belong together + rep.warning('warn.fsr_kept', path=str(present[0])) + return {'kept': True} + total, done = sum(size for _, size, _ in FSR_FILES), 0 + rep.progress('fsr', 'download', 0, total, 'bytes', force=True) + rep.log(f'fsr: {FSR_BASE} (license {FSR_LICENSE})') + parts = [] + try: + for name, size, sha in FSR_FILES: + url, part = FSR_BASE + name, ctx.temp / (name + '.part') + parts.append(part) + part.parent.mkdir(parents=True, exist_ok=True) + h, got = hashlib.sha256(), 0 + with urllib.request.urlopen(url, timeout=60) as r, open(part, 'wb') as f: + while block := r.read(1 << 20): + f.write(block) + h.update(block) + got += len(block) + rep.progress('fsr', 'download', min(done + got, total), total, 'bytes') + if got != size or h.hexdigest() != sha: + raise OSError(f'{name}: {got} bytes, SHA-256 {h.hexdigest()[:16]}, not the expected file') + done += size + # both downloaded and checked: only then into the install folder, so it never holds half a set + for (name, _, _), part in zip(FSR_FILES, parts): + replace_file(part, ctx.dest / name) + remove(part) + # urllib's errors, timeouts and a bad file; a connection cut mid-file raises http.client.IncompleteRead, + # which is not an OSError + except (OSError, http.client.HTTPException) as e: + for part in parts: + remove(part) + rep.warning('warn.fsr_download_failed', url=FSR_BASE, detail=str(e)[:300]) + return {'failed': True} + return {'installed': FSR_VERSION} + + +# ---- 9. clean up class Cleanup(Step): id = 'cleanup' @@ -1289,4 +1379,4 @@ def romfs_problem(romfs, expected): def all_steps(): - return [Check(), Fonts(), Extract(), Lift(), Compile(), Prepare(), Dlss(), Cleanup()] + return [Check(), Fonts(), Extract(), Lift(), Compile(), Prepare(), Dlss(), Fsr(), Cleanup()] diff --git a/installer/text/en.json b/installer/text/en.json index 45618690..28c19e30 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -6,6 +6,7 @@ "step.compile": "Compiling {game_exe}", "step.prepare": "Preparing the shaders", "step.dlss": "Downloading NVIDIA DLSS", + "step.fsr": "Downloading AMD FSR", "step.cleanup": "Cleaning up", "phase.check.host": "Checking the processor and the graphics card", @@ -34,6 +35,7 @@ "phase.prepare.libraries": "Building the shaders for the graphics driver", "phase.prepare.pack": "Packing the shader cache into one file", "phase.dlss.download": "Downloading nvngx_dlss.dll from NVIDIA's DLSS SDK", + "phase.fsr.download": "Downloading the FSR upscaler from AMD's FSR SDK", "phase.cleanup.ini": "Writing totk.ini", "phase.cleanup.temp": "Removing temporary files", @@ -108,6 +110,8 @@ "warn.kernel_old": "Linux {version} lacks the write tracking the game relies on (6.7 or later); the game may run very slowly. Updating the system fixes this.", "warn.dlss_kept": "A DLSS library is already in the install folder ({path}); the setup keeps it.", "warn.dlss_download_failed": "NVIDIA DLSS could not be downloaded from {url}: {detail}. The game runs without it; the next setup run tries again.", + "warn.fsr_kept": "An FSR library is already in the install folder ({path}); the setup keeps the libraries there.", + "warn.fsr_download_failed": "AMD FSR could not be downloaded from {url}: {detail}. The game runs without it; the next setup run tries again.", "ui.title": "TotK Setup", "ui.rebuild_title": "Rebuilding the game for your mods", @@ -131,6 +135,8 @@ "ui.firmware_help": "For Chinese, Korean and Traditional Chinese text: the firmware's Contents/registered folder, for example from Ryujinx or Yuzu. The setup copies the Switch system fonts from it into the install folder.", "ui.dlss": "Download NVIDIA DLSS (nvngx_dlss.dll) for NVIDIA RTX graphics cards", "ui.dlss_help": "From NVIDIA's DLSS SDK on GitHub, under NVIDIA's RTX SDK license (github.com/NVIDIA/DLSS). It makes the dlaa and DLSS settings work; without it they do nothing.", + "ui.fsr": "Download AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) for AMD Radeon graphics cards", + "ui.fsr_help": "From AMD's FSR SDK on GitHub, under AMD's FSR SDK license (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). It lets the dlaa setting run FSR (Upscaler: AMD FSR in the menu); without it that choice does nothing.", "ui.compressed_help": "Compressed NSZ and XCZ files work as they are: the setup unpacks them by itself (until the game data is extracted, that needs as much free space as the unpacked files take).", "ui.type_game": "Game files (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Key files (*.keys)", diff --git a/installer/text/pt-BR.json b/installer/text/pt-BR.json index ace24acb..6587c253 100644 --- a/installer/text/pt-BR.json +++ b/installer/text/pt-BR.json @@ -6,6 +6,7 @@ "step.compile": "Compilando o {game_exe}", "step.prepare": "Preparando os shaders", "step.dlss": "Baixando o NVIDIA DLSS", + "step.fsr": "Baixando o AMD FSR", "step.cleanup": "Finalizando", "phase.check.host": "Verificando o processador e a placa de vídeo", @@ -34,6 +35,7 @@ "phase.prepare.libraries": "Montando os shaders para o driver de vídeo", "phase.prepare.pack": "Juntando o cache de shaders num único arquivo", "phase.dlss.download": "Baixando o nvngx_dlss.dll do DLSS SDK da NVIDIA", + "phase.fsr.download": "Baixando o upscaler FSR do FSR SDK da AMD", "phase.cleanup.ini": "Gravando o totk.ini", "phase.cleanup.temp": "Removendo os arquivos temporários", @@ -108,6 +110,8 @@ "warn.kernel_old": "O Linux {version} não tem o rastreamento de escrita de que o jogo depende (6.7 ou mais novo); o jogo pode rodar muito devagar. Atualizar o sistema resolve.", "warn.dlss_kept": "Já existe uma biblioteca DLSS na pasta de instalação ({path}); a instalação a mantém.", "warn.dlss_download_failed": "Não foi possível baixar o NVIDIA DLSS de {url}: {detail}. O jogo funciona sem ele; a próxima execução da instalação tenta de novo.", + "warn.fsr_kept": "Já existe uma biblioteca FSR na pasta de instalação ({path}); a instalação mantém as bibliotecas que estão lá.", + "warn.fsr_download_failed": "Não foi possível baixar o AMD FSR de {url}: {detail}. O jogo funciona sem ele; a próxima execução da instalação tenta de novo.", "ui.title": "Instalação do TotK", "ui.rebuild_title": "Recompilando o jogo para os seus mods", @@ -131,6 +135,8 @@ "ui.firmware_help": "Para textos em chinês, coreano e chinês tradicional: a pasta Contents/registered do firmware, por exemplo do Ryujinx ou do Yuzu. A instalação copia dela as fontes do sistema do Switch para a pasta de instalação.", "ui.dlss": "Baixar o NVIDIA DLSS (nvngx_dlss.dll) para placas de vídeo NVIDIA RTX", "ui.dlss_help": "Do DLSS SDK da NVIDIA no GitHub, sob a licença NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Sem ele as opções dlaa e DLSS não fazem nada.", + "ui.fsr": "Baixar o AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) para placas de vídeo AMD Radeon", + "ui.fsr_help": "Do FSR SDK da AMD no GitHub, sob a licença do AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). Permite que a opção dlaa use o FSR (Upscaler: AMD FSR no menu); sem ele essa escolha não faz nada.", "ui.compressed_help": "Arquivos compactados NSZ e XCZ funcionam do jeito que estão: a instalação os descompacta sozinha (para isso, até os dados do jogo serem extraídos, ela precisa de tanto espaço livre quanto ocupam os arquivos descompactados).", "ui.type_game": "Arquivos de jogo (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Arquivos de chaves (*.keys)", diff --git a/installer/text/ru.json b/installer/text/ru.json index 667b92e8..4fc2a125 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -6,6 +6,7 @@ "step.compile": "Сборка {game_exe}", "step.prepare": "Подготовка шейдеров", "step.dlss": "Загрузка NVIDIA DLSS", + "step.fsr": "Загрузка AMD FSR", "step.cleanup": "Уборка", "phase.check.host": "Проверка процессора и видеокарты", @@ -34,6 +35,7 @@ "phase.prepare.libraries": "Сборка шейдеров для драйвера видеокарты", "phase.prepare.pack": "Упаковка кэша шейдеров в один файл", "phase.dlss.download": "Загрузка nvngx_dlss.dll из DLSS SDK от NVIDIA", + "phase.fsr.download": "Загрузка апскейлера FSR из FSR SDK от AMD", "phase.cleanup.ini": "Запись totk.ini", "phase.cleanup.temp": "Удаление временных файлов", @@ -108,6 +110,8 @@ "warn.kernel_old": "В Linux {version} нет отслеживания записи, на которое опирается игра (нужна версия 6.7 или новее); игра может работать очень медленно. Обновление системы это исправит.", "warn.dlss_kept": "В папке установки уже есть библиотека DLSS ({path}); установка её оставляет.", "warn.dlss_download_failed": "Не удалось загрузить NVIDIA DLSS с {url}: {detail}. Игра работает и без него; при следующем запуске установка попробует снова.", + "warn.fsr_kept": "В папке установки уже есть библиотека FSR ({path}); установка оставляет имеющиеся библиотеки.", + "warn.fsr_download_failed": "Не удалось загрузить AMD FSR с {url}: {detail}. Игра работает и без него; при следующем запуске установка попробует снова.", "ui.title": "Установка TotK", "ui.rebuild_title": "Пересборка игры под ваши моды", @@ -131,6 +135,8 @@ "ui.firmware_help": "Для текста на китайском и корейском: папка Contents/registered прошивки, например из Ryujinx или Yuzu. Установка скопирует из неё системные шрифты Switch в папку установки.", "ui.dlss": "Загрузить NVIDIA DLSS (nvngx_dlss.dll) для видеокарт NVIDIA RTX", "ui.dlss_help": "Из DLSS SDK от NVIDIA на GitHub, по лицензии NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Без него настройки dlaa и DLSS ничего не делают.", + "ui.fsr": "Загрузить AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) для видеокарт AMD Radeon", + "ui.fsr_help": "Из FSR SDK от AMD на GitHub, по лицензии AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). С ним настройка dlaa может работать через FSR («Апскейлер: AMD FSR» в меню); без него этот выбор ничего не делает.", "ui.compressed_help": "Сжатые файлы NSZ и XCZ подходят как есть: установка сама их распакует (для этого, пока извлекаются данные игры, нужно столько свободного места, сколько занимают распакованные файлы).", "ui.type_game": "Файлы игры (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Файлы ключей (*.keys)", diff --git a/installer/text/zh-Hans.json b/installer/text/zh-Hans.json index aa490a93..25a92b06 100644 --- a/installer/text/zh-Hans.json +++ b/installer/text/zh-Hans.json @@ -6,6 +6,7 @@ "step.compile": "编译 {game_exe}", "step.prepare": "准备着色器", "step.dlss": "下载 NVIDIA DLSS", + "step.fsr": "下载 AMD FSR", "step.cleanup": "清理", "phase.check.host": "检查处理器和显卡", @@ -34,6 +35,7 @@ "phase.prepare.libraries": "为显卡驱动构建着色器", "phase.prepare.pack": "将着色器缓存打包成一个文件", "phase.dlss.download": "从 NVIDIA 的 DLSS SDK 下载 nvngx_dlss.dll", + "phase.fsr.download": "从 AMD 的 FSR SDK 下载 FSR 超分辨率组件", "phase.cleanup.ini": "写入 totk.ini", "phase.cleanup.temp": "删除临时文件", @@ -108,6 +110,8 @@ "warn.kernel_old": "Linux {version} 缺少游戏依赖的写入跟踪功能(需要 6.7 或更新版本);游戏可能运行得很慢。更新系统即可解决。", "warn.dlss_kept": "安装文件夹中已有 DLSS 库({path});安装程序将保留它。", "warn.dlss_download_failed": "无法从 {url} 下载 NVIDIA DLSS:{detail}。游戏无需它也能运行;下次运行安装程序时会重试。", + "warn.fsr_kept": "安装文件夹中已有 FSR 库({path});安装程序将保留其中的库。", + "warn.fsr_download_failed": "无法从 {url} 下载 AMD FSR:{detail}。游戏无需它也能运行;下次运行安装程序时会重试。", "ui.title": "TotK 安装程序", "ui.rebuild_title": "正在为你的模组重新构建游戏", @@ -131,6 +135,8 @@ "ui.firmware_help": "用于中文、韩文和繁体中文文本:固件的 Contents/registered 文件夹,例如来自 Ryujinx 或 Yuzu。安装程序会从中把 Switch 系统字体复制到安装文件夹。", "ui.dlss": "为 NVIDIA RTX 显卡下载 NVIDIA DLSS(nvngx_dlss.dll)", "ui.dlss_help": "来自 GitHub 上 NVIDIA 的 DLSS SDK,遵循 NVIDIA RTX SDK 许可(github.com/NVIDIA/DLSS)。没有它,dlaa 和 DLSS 设置不起作用。", + "ui.fsr": "为 AMD Radeon 显卡下载 AMD FSR 4(amd_fidelityfx_upscaler_vk.dll)", + "ui.fsr_help": "来自 GitHub 上 AMD 的 FSR SDK,遵循 AMD FSR SDK 许可(github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK)。有了它,dlaa 设置可以使用 FSR(菜单中的“超分辨率技术:AMD FSR”);没有它,该选项不起作用。", "ui.compressed_help": "压缩的 NSZ 和 XCZ 文件可以直接使用:安装程序会自行解压(在游戏数据提取完成之前,需要与解压后文件大小相同的可用空间)。", "ui.type_game": "游戏文件(NSP、XCI、NSZ、XCZ)", "ui.type_keys": "密钥文件(*.keys)", diff --git a/runtime/cfg.c b/runtime/cfg.c index e2a06afd..63cf2dbc 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -40,10 +40,10 @@ static const char *const known[] = { "BIND_SKIP", "BIND_STATS", "BIND_UP", "BIND_X", "BIND_Y", "BIND_ZL", "BIND_ZR", "BLOCK_VIEWS_3D", "CLOTH_REALTIME", "COLOR_BRIGHTNESS", "COLOR_CONTRAST", "COLOR_GAMMA", "COLOR_PRESET", "COLOR_SATURATION", "CONTACT_DEBUG", "CONTACT_SHADOWS", "CORE_DIAG", "CRIT", "CRIT_OUT", - "DESC_TEMPLATE", "DEVICE_PROFILE", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", + "DESC_TEMPLATE", "DEVICE_PROFILE", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_BACKEND", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", "DUMP_LOG", "EXEFS", "FEEDBACK", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FLUSH_SPAN", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FRAME_QUEUE", - "FREEZE_IDLE", "FREE_CORES", + "FREEZE_IDLE", "FREE_CORES", "FSR_DEBUG", "FSR_JITTER_SIGN", "FULLSCREEN", "FXAA", "GPL", "GPL_DRAW_BUILD", "GPU", "GPU_INDEX", "GPU_NAME", "HDR", "HDR_GAME_NITS", "HDR_HUE", "HDR_PEAK_NITS", "HDR_UI_NITS", "HIGHFPS_FIX", "INPUT", "INPUT_RECORD", "INPUT_SCRIPT", "LANG", "LIB_PREBUILD", "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_GUARD", "LSTICK_DEADZONE", "MEMORY", "MENU_LANG", "MENU_TEST", @@ -76,7 +76,7 @@ static const struct { const char *key, *section; } sections[] = { {"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"}, {"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"}, {"HDR_UI_NITS", "display"}, {"HDR_HUE", "display"}, {"SHADOW_RES", "display"}, - {"DLAA", "display"}, {"DLSS", "display"}, {"DLSS_PRESET", "display"}, {"DLSS_CHAR_MASK", "display"}, {"FXAA", "display"}, + {"DLAA", "display"}, {"DLAA_BACKEND", "display"}, {"DLSS", "display"}, {"DLSS_PRESET", "display"}, {"DLSS_CHAR_MASK", "display"}, {"FXAA", "display"}, {"DEVICE_PROFILE", "display"}, {"ASSUME_FOCUS", "display"}, {"DISCORD_RPC", "discord"}, {"DISCORD_APP_ID", "discord"}, {"DISCORD_IMAGE", "discord"}, {"SHADOW_SCALE", "display"}, {"SHADOW_RANGE", "display"}, {"CONTACT_SHADOWS", "display"}, @@ -120,7 +120,7 @@ static const CfgMeta metas[] = { {"PERF_OVERLAY", "off", "off|fps|full", LIVE}, {"OUTPUT_RES", "1920x1080", NULL, RESTART}, {"RENDER_SCALE", "game", "game|50|67|75|100|125|150|200", RESTART}, {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, - {"DLAA", "0", "0|1", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, + {"DLAA", "0", "0|1", RESTART}, {"DLAA_BACKEND", "dlss", "dlss|fsr", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, {"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"FXAA", "1", "0|1", LIVE}, {"ASPECT", "fit", "fit|stretch", LIVE}, {"MOVIE_ASPECT", "keep", "keep|stretch", LIVE}, {"FOV", "100", "70..140", LIVE}, diff --git a/runtime/ffx_api_min.h b/runtime/ffx_api_min.h new file mode 100644 index 00000000..c29c23f1 --- /dev/null +++ b/runtime/ffx_api_min.h @@ -0,0 +1,245 @@ +// The part of AMD's FSR API (ffx-api) that vk_ffx.c uses: the entry points of amd_fidelityfx_loader_vk.dll, the +// Vulkan backend descriptor and the upscaler's create and dispatch descriptors. Copied from the FidelityFX SDK v2.4.0 +// (GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, Kits/FidelityFX/api/include/ffx_api.h, ffx_api_types.h, vk/ffx_api_vk.h +// and Kits/FidelityFX/upscalers/include/ffx_upscale.h), trimmed to those declarations; the layouts and values are +// unchanged. The SDK's headers use a C++ attribute for deprecations, so they are not included as they are. +// +// This file is part of the FidelityFX SDK. +// +// Copyright (C) 2026 Advanced Micro Devices, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and /or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +#pragma once +#include +#include +#include + +#include + +// ---- ffx_api.h +enum FfxApiReturnCodes { + FFX_API_RETURN_OK = 0, + FFX_API_RETURN_ERROR = 1, + FFX_API_RETURN_ERROR_UNKNOWN_DESCTYPE = 2, + FFX_API_RETURN_ERROR_RUNTIME_ERROR = 3, + FFX_API_RETURN_NO_PROVIDER = 4, + FFX_API_RETURN_ERROR_MEMORY = 5, + FFX_API_RETURN_ERROR_PARAMETER = 6, + FFX_API_RETURN_PROVIDER_NO_SUPPORT_NEW_DESCTYPE = 7, +}; + +typedef void *ffxContext; +typedef uint32_t ffxReturnCode_t; + +#define FFX_API_EFFECT_MASK 0x00ff0000u +#define FFX_API_BACKEND_MASK 0xff000000u + +typedef uint64_t ffxStructType_t; +typedef struct ffxApiHeader { + ffxStructType_t type; + struct ffxApiHeader *pNext; +} ffxApiHeader; + +typedef ffxApiHeader ffxCreateContextDescHeader; +typedef ffxApiHeader ffxConfigureDescHeader; +typedef ffxApiHeader ffxQueryDescHeader; +typedef ffxApiHeader ffxDispatchDescHeader; + +enum FfxApiMsgType { FFX_API_MESSAGE_TYPE_ERROR = 0, FFX_API_MESSAGE_TYPE_WARNING = 1 }; +typedef void (*ffxApiMessage)(uint32_t type, const wchar_t *message); + +#define FFX_API_QUERY_DESC_TYPE_GET_VERSIONS 4u +struct ffxQueryDescGetVersions { + ffxQueryDescHeader header; + uint64_t createDescType; + void *device; // Vulkan: a VkDeviceContext * + uint64_t *outputCount; + uint64_t *versionIds; + const char **versionNames; +}; + +#define FFX_API_DESC_TYPE_OVERRIDE_VERSION 5u +struct ffxOverrideVersion { + ffxApiHeader header; + uint64_t versionId; +}; + +#define FFX_API_QUERY_DESC_TYPE_GET_PROVIDER_VERSION 6u +struct ffxQueryGetProviderVersion { + ffxQueryDescHeader header; + uint64_t versionId; + const char *versionName; +}; + +typedef struct ffxAllocationCallbacks ffxAllocationCallbacks; +typedef ffxReturnCode_t (*PfnFfxCreateContext)(ffxContext *context, ffxCreateContextDescHeader *desc, + const ffxAllocationCallbacks *memCb); +typedef ffxReturnCode_t (*PfnFfxDestroyContext)(ffxContext *context, const ffxAllocationCallbacks *memCb); +typedef ffxReturnCode_t (*PfnFfxQuery)(ffxContext *context, ffxQueryDescHeader *desc); +typedef ffxReturnCode_t (*PfnFfxDispatch)(ffxContext *context, const ffxDispatchDescHeader *desc); + +#define FFX_API_EFFECT_ID_UPSCALE 0x00010000u +#define FFX_API_MAKE_EFFECT_SUB_ID(effectId, subversion) ((effectId & FFX_API_EFFECT_MASK) | (subversion & ~FFX_API_EFFECT_MASK)) +#define FFX_API_BACKEND_ID_VK 0x01000000u +#define FFX_API_MAKE_BACKEND_SUB_ID(backendId, subversion) ((backendId & FFX_API_BACKEND_MASK) | (subversion & ~FFX_API_BACKEND_MASK)) + +// ---- ffx_api_types.h +enum FfxApiSurfaceFormat { + FFX_API_SURFACE_FORMAT_UNKNOWN, + FFX_API_SURFACE_FORMAT_R32G32B32A32_TYPELESS, + FFX_API_SURFACE_FORMAT_R32G32B32A32_UINT, + FFX_API_SURFACE_FORMAT_R32G32B32A32_FLOAT, + FFX_API_SURFACE_FORMAT_R16G16B16A16_FLOAT, + FFX_API_SURFACE_FORMAT_R32G32B32_FLOAT, + FFX_API_SURFACE_FORMAT_R32G32_FLOAT, + FFX_API_SURFACE_FORMAT_R8_UINT, + FFX_API_SURFACE_FORMAT_R32_UINT, + FFX_API_SURFACE_FORMAT_R8G8B8A8_TYPELESS, + FFX_API_SURFACE_FORMAT_R8G8B8A8_UNORM, + FFX_API_SURFACE_FORMAT_R8G8B8A8_SNORM, + FFX_API_SURFACE_FORMAT_R8G8B8A8_SRGB, + FFX_API_SURFACE_FORMAT_B8G8R8A8_TYPELESS, + FFX_API_SURFACE_FORMAT_B8G8R8A8_UNORM, + FFX_API_SURFACE_FORMAT_B8G8R8A8_SRGB, + FFX_API_SURFACE_FORMAT_R11G11B10_FLOAT, + FFX_API_SURFACE_FORMAT_R10G10B10A2_UNORM, + FFX_API_SURFACE_FORMAT_R16G16_FLOAT, + FFX_API_SURFACE_FORMAT_R16G16_UINT, + FFX_API_SURFACE_FORMAT_R16G16_SINT, + FFX_API_SURFACE_FORMAT_R16_FLOAT, + FFX_API_SURFACE_FORMAT_R16_UINT, + FFX_API_SURFACE_FORMAT_R16_UNORM, + FFX_API_SURFACE_FORMAT_R16_SNORM, + FFX_API_SURFACE_FORMAT_R8_UNORM, + FFX_API_SURFACE_FORMAT_R8G8_UNORM, + FFX_API_SURFACE_FORMAT_R8G8_UINT, + FFX_API_SURFACE_FORMAT_R32_FLOAT, +}; + +enum FfxApiResourceUsage { + FFX_API_RESOURCE_USAGE_READ_ONLY = 0, + FFX_API_RESOURCE_USAGE_RENDERTARGET = (1 << 0), + FFX_API_RESOURCE_USAGE_UAV = (1 << 1), + FFX_API_RESOURCE_USAGE_DEPTHTARGET = (1 << 2), +}; + +enum FfxApiResourceState { + FFX_API_RESOURCE_STATE_COMMON = (1 << 0), + FFX_API_RESOURCE_STATE_UNORDERED_ACCESS = (1 << 1), + FFX_API_RESOURCE_STATE_COMPUTE_READ = (1 << 2), + FFX_API_RESOURCE_STATE_PIXEL_READ = (1 << 3), + FFX_API_RESOURCE_STATE_COPY_SRC = (1 << 4), + FFX_API_RESOURCE_STATE_GENERIC_READ = (FFX_API_RESOURCE_STATE_COPY_SRC | FFX_API_RESOURCE_STATE_COMPUTE_READ), +}; + +enum FfxApiResourceType { FFX_API_RESOURCE_TYPE_BUFFER, FFX_API_RESOURCE_TYPE_TEXTURE1D, FFX_API_RESOURCE_TYPE_TEXTURE2D }; + +struct FfxApiDimensions2D { + uint32_t width, height; +}; +struct FfxApiFloatCoords2D { + float x, y; +}; + +struct FfxApiResourceDescription { + uint32_t type; + uint32_t format; + uint32_t width; // union with size (buffers) + uint32_t height; // union with stride + uint32_t depth; // union with alignment + uint32_t mipCount; + uint32_t flags; + uint32_t usage; +}; + +struct FfxApiResource { + void *resource; // Vulkan: the VkImage + struct FfxApiResourceDescription description; + uint32_t state; +}; + +// ---- vk/ffx_api_vk.h +typedef struct VkDeviceContext { + VkDevice vkDevice; + VkPhysicalDevice vkPhysicalDevice; + PFN_vkGetDeviceProcAddr vkDeviceProcAddr; +} VkDeviceContext; + +#define FFX_API_CREATE_CONTEXT_DESC_TYPE_BACKEND_VK FFX_API_MAKE_BACKEND_SUB_ID(FFX_API_BACKEND_ID_VK, 0x03) +struct ffxCreateBackendVKDesc { + ffxCreateContextDescHeader header; + VkDeviceContext deviceContext; +}; + +// ---- upscalers/include/ffx_upscale.h +#define FFX_UPSCALER_MAKE_VERSION(major, minor, patch) (((major) << 22) | ((minor) << 12) | (patch)) +#define FFX_UPSCALER_VERSION FFX_UPSCALER_MAKE_VERSION(4, 1, 2) + +enum FfxApiCreateContextUpscaleFlags { + FFX_UPSCALE_ENABLE_HIGH_DYNAMIC_RANGE = (1 << 0), + FFX_UPSCALE_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS = (1 << 1), + FFX_UPSCALE_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION = (1 << 2), + FFX_UPSCALE_ENABLE_DEPTH_INVERTED = (1 << 3), + FFX_UPSCALE_ENABLE_DEPTH_INFINITE = (1 << 4), + FFX_UPSCALE_ENABLE_AUTO_EXPOSURE = (1 << 5), + FFX_UPSCALE_ENABLE_DYNAMIC_RESOLUTION = (1 << 6), + FFX_UPSCALE_ENABLE_DEBUG_CHECKING = (1 << 7), +}; + +#define FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x00) +struct ffxCreateContextDescUpscale { + ffxCreateContextDescHeader header; + uint32_t flags; + struct FfxApiDimensions2D maxRenderSize; + struct FfxApiDimensions2D maxUpscaleSize; + ffxApiMessage fpMessage; +}; + +#define FFX_API_DISPATCH_DESC_TYPE_UPSCALE FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x01) +struct ffxDispatchDescUpscale { + ffxDispatchDescHeader header; + void *commandList; // Vulkan: the VkCommandBuffer + struct FfxApiResource color; + struct FfxApiResource depth; + struct FfxApiResource motionVectors; + struct FfxApiResource exposure; + struct FfxApiResource reactive; + struct FfxApiResource transparencyAndComposition; + struct FfxApiResource output; + struct FfxApiFloatCoords2D jitterOffset; + struct FfxApiFloatCoords2D motionVectorScale; + struct FfxApiDimensions2D renderSize; + struct FfxApiDimensions2D upscaleSize; + bool enableSharpening; + float sharpness; + float frameTimeDelta; // milliseconds + float preExposure; + bool reset; + float cameraNear; + float cameraFar; + float cameraFovAngleVertical; // radians + float viewSpaceToMetersFactor; + uint32_t flags; +}; + +#define FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE_VERSION FFX_API_MAKE_EFFECT_SUB_ID(FFX_API_EFFECT_ID_UPSCALE, 0x0b) +struct ffxCreateContextDescUpscaleVersion { + ffxCreateContextDescHeader header; + uint32_t version; // FFX_UPSCALER_VERSION +}; diff --git a/runtime/resolution.c b/runtime/resolution.c index 6c36e8ce..2b645e62 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -67,15 +67,25 @@ static struct { // The scene size is decided before the device exists, so NGX cannot be asked yet. NGX loads DLSS from nvngx_dlss.dll // next to totk.exe on Windows, libnvidia-ngx-dlss.so. next to totk on Linux (vk_dlaa.c vk_dlaa_init): // without that file DLSS never runs, and a DLSS mode would leave the game's plain scaling at 50..67 % of the output. +// With dlaa_backend = fsr the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and upscaler +// DLLs next to totk.exe; on Linux FSR does not run. static int dlss_dll(void) { + int fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); #ifdef _WIN32 - char exe[1024], path[1024 + 32]; + char exe[1024], path[1024 + 48]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); if (!last) return 1; + if (fsr) { + snprintf(path, sizeof path, "%.*s/amd_fidelityfx_loader_vk.dll", (int)(last - exe), exe); + if (!plat_file_exists(path)) return 0; + snprintf(path, sizeof path, "%.*s/amd_fidelityfx_upscaler_vk.dll", (int)(last - exe), exe); + return plat_file_exists(path); + } snprintf(path, sizeof path, "%.*s/nvngx_dlss.dll", (int)(last - exe), exe); return plat_file_exists(path); #else + if (fsr) return 0; char exe[1024]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); @@ -110,8 +120,12 @@ static double dlss_share(const char *m) { if (!strcmp(m, dlss[i].name)) { if (dll < 0 && !(dll = dlss_dll())) { #ifdef _WIN32 - rt_log("resolution: DLSS %s needs nvngx_dlss.dll next to totk.exe, which is missing: the scene follows " - "render_scale", m); + if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) + rt_log("resolution: FSR %s needs amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll " + "next to totk.exe, which are missing: the scene follows render_scale", m); + else + rt_log("resolution: DLSS %s needs nvngx_dlss.dll next to totk.exe, which is missing: the scene " + "follows render_scale", m); #else rt_log("resolution: DLSS %s needs libnvidia-ngx-dlss.so. next to totk, which is missing: the " "scene follows render_scale", m); diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index aa845156..fe2bcd2e 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -680,6 +680,8 @@ static void tab_screen(float scale) { opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%"); opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%"); opt_toggle("TOTK_DLAA", UI_MENU_DLAA, UI_MENU_DLAA_DESC); + static const UiTextId backend[] = {UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; + opt_choice("TOTK_DLAA_BACKEND", UI_MENU_DLAA_BACKEND, backend, 2, UI_MENU_DLAA_BACKEND_DESC); static const UiTextId dlss[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; opt_choice("TOTK_DLSS", UI_MENU_DLSS, dlss, 5, UI_MENU_DLSS_DESC); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index f4e033c5..8ef51cba 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -143,6 +143,12 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_DLAA_DESC] = "NVIDIA DLSS for the 3D scene (NVIDIA RTX GPUs; " DLSS_FILE " next to " EXE_FILE "): smoother " "edges and less shimmer. The HUD is not touched. The mode below sets the resolution it works " "from. Takes effect after a restart.", + [UI_MENU_DLAA_BACKEND] = "Upscaler", + [UI_MENU_DLAA_BACKEND_DESC] = "What runs for the option above. NVIDIA DLSS on NVIDIA RTX GPUs; AMD FSR on AMD Radeon " + "GPUs: FSR 4 on the RX 9000, 7000 and 6000 series, FSR 3.1 elsewhere (Windows; " + "amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE + "). The mode below applies to both. Takes effect after a restart.", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS_PRESET] = "DLSS model", [UI_MENU_DLSS_PRESET_DESC] = "Which DLSS model runs. Automatic follows NVIDIA's advice per mode: K for DLAA, Quality " "and Balanced, M for Performance, L for Ultra Performance. J: slightly less ghosting " @@ -618,6 +624,12 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_DLAA_DESC] = "NVIDIA DLSS для 3D-сцены (видеокарты NVIDIA RTX; " DLSS_FILE " рядом с " EXE_FILE "): ровнее " "края и меньше мерцания. Интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он " "работает. Действует после перезапуска.", + [UI_MENU_DLAA_BACKEND] = "Апскейлер", + [UI_MENU_DLAA_BACKEND_DESC] = "Что работает для настройки выше. NVIDIA DLSS на видеокартах NVIDIA RTX; AMD FSR на " + "видеокартах AMD Radeon: FSR 4 на сериях RX 9000, 7000 и 6000, FSR 3.1 на остальных " + "(Windows; amd_fidelityfx_loader_vk.dll и amd_fidelityfx_upscaler_vk.dll рядом с " + EXE_FILE "). Режим ниже действует для обоих. Действует после перезапуска.", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS_PRESET] = "Модель DLSS", [UI_MENU_DLSS_PRESET_DESC] = "Какая модель DLSS работает. «Автоматически» следует совету NVIDIA для каждого режима: K " "для DLAA, «Качества» и «Баланса», M для «Производительности», L для «Макс. " @@ -1433,6 +1445,12 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_DLAA_DESC] = "NVIDIA DLSS para a cena 3D (placas NVIDIA RTX; nvngx_dlss.dll ao lado do totk.exe): bordas " "mais suaves e menos cintilação. O HUD não é afetado. O modo abaixo define a resolução de " "onde ele parte. Vale após reiniciar.", + [UI_MENU_DLAA_BACKEND] = "Upscaler", + [UI_MENU_DLAA_BACKEND_DESC] = "O que roda na opção acima. NVIDIA DLSS em placas NVIDIA RTX; AMD FSR em placas AMD " + "Radeon: FSR 4 nas séries RX 9000, 7000 e 6000, FSR 3.1 nas demais (Windows; " + "amd_fidelityfx_loader_vk.dll e amd_fidelityfx_upscaler_vk.dll ao lado do totk.exe). " + "O modo abaixo vale para os dois. Vale após reiniciar.", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS] = "Modo do DLSS", [UI_MENU_DLSS_DESC] = "DLAA desenha a cena 3D na resolução cheia. Qualidade, Equilibrado, Desempenho e Ultra " "Desempenho a desenham em 67, 58, 50 e 33 % e deixam o DLSS ampliá-la, o que poupa tempo da " @@ -2036,6 +2054,11 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_DLAA] = "NVIDIA DLSS / DLAA", [UI_MENU_DLAA_DESC] = "用于 3D 场景的 NVIDIA DLSS(NVIDIA RTX 显卡;nvngx_dlss.dll 放在 totk.exe 旁):边缘更平滑,闪烁更少。HUD " "不受影响。下方的模式决定它的工作分辨率。重启后生效。", + [UI_MENU_DLAA_BACKEND] = "超分辨率技术", + [UI_MENU_DLAA_BACKEND_DESC] = "上方选项使用的技术。NVIDIA RTX 显卡用 NVIDIA DLSS;AMD Radeon 显卡用 AMD FSR:RX 9000、7000 " + "和 6000 系列为 FSR 4,其他为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " + "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁)。下方的模式对两者都适用。重启后生效。", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS] = "DLSS 模式", [UI_MENU_DLSS_DESC] = "DLAA 以全分辨率绘制 3D 场景。质量、平衡、性能和超级性能分别以 67%、58%、50% 和 33% 绘制,再由 DLSS 放大,以节省 GPU 时间;它们会取代 3D 渲染比例。立即生效。", [UI_MENU_DLSS_DLAA] = "DLAA(原生)", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 59e277b4..dd4fe343 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -54,7 +54,8 @@ typedef enum { UI_MENU_SHADOW_RANGE, UI_MENU_SHADOW_RANGE_DESC, UI_MENU_CONTACT_SHADOWS, UI_MENU_CONTACT_SHADOWS_DESC, UI_MENU_PCSS, UI_MENU_PCSS_DESC, - UI_MENU_DLAA, UI_MENU_DLAA_DESC, UI_MENU_DLSS, UI_MENU_DLSS_DESC, UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, + UI_MENU_DLAA, UI_MENU_DLAA_DESC, UI_MENU_DLAA_BACKEND, UI_MENU_DLAA_BACKEND_DESC, UI_MENU_DLAA_BACKEND_DLSS, + UI_MENU_DLAA_BACKEND_FSR, UI_MENU_DLSS, UI_MENU_DLSS_DESC, UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA, UI_MENU_DLSS_PRESET, UI_MENU_DLSS_PRESET_DESC, UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J, UI_MENU_DLSS_CHARS, UI_MENU_DLSS_CHARS_DESC, UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, UI_MENU_DLSS_CHARS_FULL, UI_MENU_FXAA, UI_MENU_FXAA_DESC, diff --git a/runtime/vk_device.c b/runtime/vk_device.c index a063955e..795d9891 100644 --- a/runtime/vk_device.c +++ b/runtime/vk_device.c @@ -217,6 +217,10 @@ typedef struct { VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT gpl; VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT fbl; VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR lr; + VkPhysicalDeviceCooperativeMatrixFeaturesKHR coop; // FSR 4 (vk_ffx.c) +#ifdef VK_EXT_SHADER_FLOAT8_EXTENSION_NAME + VkPhysicalDeviceShaderFloat8FeaturesEXT f8; // FSR 4 (vk_ffx.c) +#endif } FeatureChain; static int create_device(void) { @@ -261,7 +265,16 @@ static int create_device(void) { CHAIN(fbl, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT); CHAIN(lr, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR); } - vk_dlaa_device_exts(ep, ne, ext, &n_ext, 40); // NGX's; the eight slots after it stay for the seven below + vk_dlaa_device_exts(ep, ne, ext, &n_ext, 40); // NGX's or FSR's; the eight slots after it stay for the seven below + // FSR's shader extensions (vk_ffx_device_exts) are enabled with their features, as far as the driver reports them + for (uint32_t i = 0; i < n_ext; i++) { + if (!strcmp(ext[i], VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME)) + CHAIN(coop, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR); +#ifdef VK_EXT_SHADER_FLOAT8_EXTENSION_NAME + else if (!strcmp(ext[i], VK_EXT_SHADER_FLOAT8_EXTENSION_NAME)) + CHAIN(f8, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT8_FEATURES_EXT); +#endif + } if (has_ext(ep, ne, VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) { g_vk.has_memory_budget = 1; ext[n_ext++] = VK_EXT_MEMORY_BUDGET_EXTENSION_NAME; } // GPU timestamps on the CPU clock (vk_sync.c): the perf line splits GPU idle time into waiting for a submission or not. if (has_ext(ep, ne, VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME)) { g_vk.has_calibrated = 2; ext[n_ext++] = VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME; } diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 7ffff8c8..35005c5b 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -11,6 +11,10 @@ // layout with a set-then-get round trip before anything relies on it. // // Where DLAA runs in the frame, the jitter and the motion vectors: see the sections below. +// +// dlaa_backend = fsr (TOTK_DLAA_BACKEND, read at start) hands the same frame to AMD's FSR instead (vk_ffx.c): the +// arming, the jitter, the motion vectors, the masks and the copy of the result below are shared, and only the call that +// upscales differs (evaluate). NGX is then never loaded. #ifdef _WIN32 #include #endif @@ -26,6 +30,7 @@ #include "vk.h" #include "vk_dlaa.h" #include "vk_exec.h" +#include "vk_ffx.h" #include "vk_rec.h" #include "dlaa_mv_spv.h" @@ -112,6 +117,16 @@ int vk_dlaa_wanted(void) { return wanted; } +// FSR instead of DLSS (TOTK_DLAA_BACKEND=fsr), fixed for the run like dlaa: the backend's extensions are chosen at +// device creation. On Linux FSR is not available, and this choice leaves DLAA off rather than falling back to DLSS. +static int fsr_backend(void) { + static int fsr = -1; + if (fsr < 0) fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + return fsr; +} + +static int ngx_wanted(void) { return vk_dlaa_wanted() && !fsr_backend(); } + static int core_load(void) { if (N.tried) return N.loaded; N.tried = 1; @@ -167,7 +182,7 @@ static int listed(const char *const *list, uint32_t n, const char *s) { void vk_dlaa_instance_exts(const char **ext, uint32_t *n, uint32_t max) { unsigned ni = 0, nd = 0; const char **ie = NULL, **de = NULL; - if (!vk_dlaa_wanted() || !core_load() || !NGX_OK(N.req_ext(&ni, &ie, &nd, &de))) return; + if (!ngx_wanted() || !core_load() || !NGX_OK(N.req_ext(&ni, &ie, &nd, &de))) return; for (unsigned i = 0; i < ni; i++) if (!listed(ext, *n, ie[i]) && *n < max) ext[(*n)++] = ie[i]; } @@ -176,7 +191,11 @@ void vk_dlaa_device_exts(const VkExtensionProperties *have, uint32_t nhave, cons uint32_t max) { unsigned ni = 0, nd = 0; const char **ie = NULL, **de = NULL; - if (!vk_dlaa_wanted() || !core_load() || !NGX_OK(N.req_ext(&ni, &ie, &nd, &de))) return; + if (fsr_backend()) { + vk_ffx_device_exts(have, nhave, ext, n, max); + return; + } + if (!ngx_wanted() || !core_load() || !NGX_OK(N.req_ext(&ni, &ie, &nd, &de))) return; for (unsigned i = 0; i < nd; i++) { int ok = 0; for (uint32_t k = 0; k < nhave && !ok; k++) ok = !strcmp(have[k].extensionName, de[i]); @@ -226,7 +245,11 @@ static int utf8_to_wide(const char *in, wchar_t *out, size_t cap) { #endif void vk_dlaa_init(void) { - if (!vk_dlaa_wanted() || !core_load()) return; + if (vk_dlaa_wanted() && fsr_backend()) { + vk_ffx_init(); + return; + } + if (!ngx_wanted() || !core_load()) return; #ifdef _WIN32 wchar_t wdir[MAX_PATH]; DWORD len = GetModuleFileNameW(NULL, wdir, MAX_PATH); @@ -263,7 +286,10 @@ void vk_dlaa_init(void) { driver ? "; the driver needs an update" : ""); } -int vk_dlaa_available(void) { return vk_dlaa_wanted() && N.available; } +// The backend of this run came up: DLSS through NGX, or FSR (vk_ffx.c). +static int be_available(void) { return fsr_backend() ? vk_ffx_available() : N.available; } + +int vk_dlaa_available(void) { return vk_dlaa_wanted() && be_available(); } // ---------------------------------------------------------------- where DLAA runs in TotK's frame // Measured (TOTK_DUMP, frame 2100 at Lookout Landing, 2560x1440 scene): the G-buffer passes draw into five targets with @@ -300,6 +326,7 @@ static struct { VkImageView mask_view, chars_view[2]; int chars_cur, chars_ok; // chars[chars_cur] is written next; chars_ok: the other holds last frame's NgxHandle *feat; + void *ffx; // the FSR context instead (fsr_backend) uint64_t used; // evals count when it last ran } sizes[5], *last; // last: the one the previous DLAA frame ran with VkImage last_color; // the target DLAA ran on last frame: another one means a new history @@ -341,7 +368,7 @@ static struct { const VkTexImage *vk_dlaa_swap_img; VkImageView vk_dlaa_swap_view; -static int dl_active(void) { return N.available && !D.failed && D.on; } +static int dl_active(void) { return be_available() && !D.failed && D.on; } static void dl_fail(const char *what, NgxResult r) { rt_log("dlaa: %s failed (%08x): DLAA off for this run", what, (unsigned)r); @@ -377,6 +404,7 @@ static void free_size(struct Size *e) { if (e->chars[i]) vmaDestroyImage(c->vma, e->chars[i], e->chars_mem[i]); } if (e->feat) N.release(e->feat); + if (e->ffx) vk_ffx_release(e->ffx); memset(e, 0, sizeof *e); } @@ -966,6 +994,57 @@ static int perf_quality(uint32_t w, uint32_t ow) { return k >= 0.66 ? 2 : k >= 0.57 ? 1 : k >= 0.49 ? 0 : 3; } +// The camera FSR asks for (its depth handling and its disocclusion use them; DLSS does not): the near and far distances, +// the vertical field of view, and whether depth 1 is near and the far plane infinite. From the projection in rows 7-10 +// of this frame's scene camera block (CAM_BYTES), rows of a row-major 4x4 with OpenGL clip depth as dlaa_mv.comp reads +// the view-projection: clip z = A z + B, clip w = s z with s = +-1 (row 10 is (0, 0, s, 0)), so the depth range's ends +// (ndc z = -1 and +1, depth 0 and 1) sit at z = B / (s ndc - A), and the field of view comes from row 8's +// 1 / tan(fov / 2). A frame whose block does not have that shape (or has no camera block) reuses the last camera that +// did: FSR's contexts are created with the depth flags, and the first run (1.4.3 at the title screen, RX 9070 XT) read +// 0.1 m to 1001 m, 45 degrees, depth not inverted, while later contexts of the dynamic resolution's other sizes got the +// defaults and inverted, infinite depth. Before any camera was read the defaults are 0.1 m to 1000 m, 50 degrees, depth +// not inverted. The first read and the first miss are logged, each once. +static void cam_params(float *cn, float *cf, float *fov, int *inv, int *inf) { + static struct { int ok; float cn, cf, fov; int inv, inf; } last = {0, 0.1f, 1000.0f, 0.8727f, 0, 0}; + *cn = last.cn, *cf = last.cf, *fov = last.fov, *inv = last.inv, *inf = last.inf; + static int logged_ok, logged_miss; + const float *p = D.cam_addr ? (const float *)vk_usnap_bytes(D.cam_addr + 7 * 16, 64) : NULL; + const char *why = "no camera block"; + if (p) { + const float *r8 = p + 4, *r9 = p + 8, *r10 = p + 12; + double s = r10[2], A = r9[2], B = r9[3], f = fabs((double)r8[1]); + double z0 = 0, z1 = 0; + why = "not a perspective projection"; + if (fabs(fabs(s) - 1.0) < 1e-3 && fabs(r10[0]) < 1e-4 && fabs(r10[1]) < 1e-4 && fabs(r10[3]) < 1e-4 && + f > 0.05 && f < 20.0 && fabs(B) > 1e-9) { + double d0 = -s - A, d1 = s - A; // denominators at depth 0 (ndc -1) and depth 1 (ndc +1) + z0 = fabs(d0) > 1e-9 ? fabs(B / d0) : INFINITY; + z1 = fabs(d1) > 1e-9 ? fabs(B / d1) : INFINITY; + double nz = fmin(z0, z1), fz = fmax(z0, z1); + if (nz > 1e-4 && nz < 100.0 && fz > nz) { + *inv = z1 < z0; + *inf = !isfinite(fz) || fz > 1e7; + *cn = (float)nz, *cf = *inf ? 1e30f : (float)fz, *fov = (float)(2.0 * atan(1.0 / f)); + last.ok = 1, last.cn = *cn, last.cf = *cf, last.fov = *fov, last.inv = *inv, last.inf = *inf; + why = NULL; + } else { + why = "depth range out of bounds"; + } + } + } + if (!why && !logged_ok) { + logged_ok = 1; + char fartxt[32]; // not "far": windows.h defines that as a macro + if (*inf) snprintf(fartxt, sizeof fartxt, "infinite"); + else snprintf(fartxt, sizeof fartxt, "%.0f m", *cf); + rt_log("fsr: camera from c4: near %.3f m, far %s, vertical fov %.1f degrees, depth %s", *cn, fartxt, + *fov * 57.29578, *inv ? "inverted" : "not inverted"); + } else if (why && !logged_miss) { + logged_miss = 1; + rt_log("fsr: camera block not read (%s): %s", why, last.ok ? "the last camera read is kept" : "defaults"); + } +} + // dst: the target DLSS's picture goes to, NULL for the light target itself (DLAA in place). static void evaluate(VkExec *ex, const VkExecTarget *dst) { const VkExecTarget *t = &D.color, *z = &D.depth; @@ -981,7 +1060,11 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) { struct Size *e = size_for(cb, w, h, ow, oh); if (!e) return dl_fail("work image creation", 0); if (e != D.last) D.reset = 1, D.why[0]++, e->chars_ok = 0; // another size's history is from another moment - if (!D.params && !NGX_OK(N.alloc_params(&D.params))) return dl_fail("parameter allocation", 0); + int fsr = fsr_backend(); + // FSR is handed whole images, not views: the light target and the depth must be their image's first level and layer + if (fsr && (t->level || t->base_layer || z->level || z->base_layer)) + return dl_fail("FSR input (the scene targets are not level 0, layer 0 of their images)", 0); + if (!fsr && !D.params && !NGX_OK(N.alloc_params(&D.params))) return dl_fail("parameter allocation", 0); NgxParam *p = D.params; VkImageView zv = vk_exec_target_view(z->img, z->format, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_DEPTH_BIT, z->level, z->base_layer, 1, 0); @@ -1002,8 +1085,38 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) { int timed = T.on > 0 && T.used[T.slot]; // mv_pass began this frame's slot if (timed) times_mark(cb, T_DL0); uint64_t c0 = timed ? kern_now_ns() : 0; - rec_drain(); // NGX records into the command buffer itself: the recorder thread must have made every call so far + rec_drain(); // NGX and FSR record into the command buffer themselves: the recorder thread must have made every call so far if (timed) T.cpu_drain += kern_now_ns() - c0; + // The time since the previous evaluation, which DLSS and FSR weigh their history by; 60 fps before the first and + // after a gap (a pause, a load), where no history carries over anyway. + uint64_t now = plat_now_ns(); + double dt = D.last_eval_ns ? (now - D.last_eval_ns) / 1e6 : 0; + D.last_eval_ns = now; + float dt_ms = dt > 0 && dt < 100 ? (float)dt : 16.67f; + if (fsr) { + float cn, cf, fov; + int inv, inf; + cam_params(&cn, &cf, &fov, &inv, &inf); + if (!e->ffx) { + e->ffx = vk_ffx_create(w, h, ow, oh, inv, inf); + if (!e->ffx) return dl_fail("FSR context creation", 0); + D.reset = 1; + } + if (D.last_color != t->image) D.reset = 1, D.why[2]++, D.last_color = t->image; + // The same bias mask DLSS would get, as FSR's reactive mask: how much to favour this frame's colour + VkFfxDispatch fd = {.color = {t->image, t->format, w, h}, .depth = {z->image, z->format, w, h}, + .mv = {e->mv, VK_FORMAT_R16G16_SFLOAT, w, h}, + .out = {e->out, VK_FORMAT_R16G16B16A16_SFLOAT, ow, oh}, + .jx = jx, .jy = jy, .dt_ms = dt_ms, .cam_near = cn, .cam_far = cf, .fov_y = fov, + .reset = D.reset}; + if (mk) fd.reactive = (VkFfxImage){mk->mask, VK_FORMAT_R8_UNORM, w, h}; + else if (masked) fd.reactive = (VkFfxImage){e->mask, VK_FORMAT_R8_UNORM, w, h}; + c0 = timed ? kern_now_ns() : 0; + int ok = vk_ffx_dispatch(e->ffx, cb, &fd); + if (timed) T.cpu_ngx += kern_now_ns() - c0; + if (!ok) return dl_fail("FSR dispatch", 0); + goto upscaled; // the copy of the result and what follows are the same as DLSS's + } if (!e->feat) { p_setu(p, "CreationNodeMask", 1); p_setu(p, "VisibilityNodeMask", 1); @@ -1059,17 +1172,13 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) { p_setu(p, "DLSS.Render.Subrect.Dimensions.Height", h); p_setf(p, "DLSS.Pre.Exposure", 1.0f); p_setf(p, "DLSS.Exposure.Scale", 1.0f); - // The time since the previous evaluation, which DLSS weighs its history by; 60 fps before the first and after a - // gap (a pause, a load), where no history carries over anyway. - uint64_t now = plat_now_ns(); - double dt = D.last_eval_ns ? (now - D.last_eval_ns) / 1e6 : 0; - D.last_eval_ns = now; - p_setf(p, "FrameTimeDeltaInMsec", dt > 0 && dt < 100 ? (float)dt : 16.67f); + p_setf(p, "FrameTimeDeltaInMsec", dt_ms); c0 = timed ? kern_now_ns() : 0; NgxResult r = N.evaluate(cb, e->feat, p, NULL); if (timed) T.cpu_ngx += kern_now_ns() - c0; if (!NGX_OK(r)) return dl_fail("DLSS evaluation", r); - if (timed) times_mark(cb, T_DL1); // through the recorder, after NGX's own commands +upscaled: + if (timed) times_mark(cb, T_DL1); // through the recorder, after NGX's or FSR's own commands D.reset = 0; D.last = e, e->used = D.evals + 1; full_barrier(cb); @@ -1109,13 +1218,23 @@ static int scene_color(VkFormat f) { return f == VK_FORMAT_B10G11R11_UFLOAT_PACK32 || f == VK_FORMAT_R16G16B16A16_SFLOAT; } +// A scene DLAA may run on: DLAA_SCENE_MIN_W wide at least, and at least a quarter of the output's width, below which +// no mode scales (Ultra Performance renders a third, the game's dynamic resolution a little less). At a 3440x1440 +// output a 387x288 G-buffer and light target (seen while loading, 1.4.3) armed the frame and FSR scaled it ninefold +// into the output. +static int scene_wide(uint32_t w) { + unsigned o[2], s[2]; + res_sizes(o, s); + return w >= DLAA_SCENE_MIN_W && (uint64_t)w * 4 >= o[0]; +} + void vk_dlaa_pass(VkExec *ex) { const VkExecTarget *c = &ex->color[0], *z = &ex->depth; if (!dl_active() || D.done) return; // The G-buffer: several colour targets with a D32F depth of at least DLAA_SCENE_MIN_W wide. Only the light target drawn after it // arms the frame; at night the game draws into the light target alone with the scene depth before the G-buffer too, // and DLAA then ran at a small pass ahead of the whole scene, which reached the screen jittered. - if (ex->pass_ncolor >= 3 && z->image && z->format == VK_FORMAT_D32_SFLOAT && z->width >= DLAA_SCENE_MIN_W) { + if (ex->pass_ncolor >= 3 && z->image && z->format == VK_FORMAT_D32_SFLOAT && scene_wide(z->width)) { D.gbuf = 1, D.armed = 0; // target 0 is the object-class buffer (RGBA8, the scene size): the characters' bias mask reads its green. A // smaller pass of the same shape (640x360, seen while loading) does not replace the scene's in the same frame. @@ -1129,7 +1248,7 @@ void vk_dlaa_pass(VkExec *ex) { // D32F depth after the lighting (852x480 under a 1704x960 scene), and DLSS ran on that and wrote its picture into // the scene's own light target, which left every object black. if (D.gbuf && ex->pass_ncolor == 1 && c->image && scene_color(c->format) && z->image && z->format == VK_FORMAT_D32_SFLOAT && - c->width == z->width && c->height == z->height && c->width >= DLAA_SCENE_MIN_W && + c->width == z->width && c->height == z->height && scene_wide(c->width) && (!D.armed || (c->width >= D.color.width && c->height >= D.color.height)) && c->samples <= 1 && !c->is3d) { int first = !D.armed; @@ -1174,6 +1293,7 @@ static void dlss_mode(void) { // The preset, read again when a setting changed (the menu); a different one recreates the features at the next DLAA run. static void preset_check(void) { + if (fsr_backend()) return; // DLSS models only: FSR's version is fixed at start (vk_ffx_init) unsigned v = cfg_version(); if (v == D.cfg_seen) return; D.cfg_seen = v; @@ -1190,9 +1310,9 @@ void vk_dlaa_frame(void) { vk_dlaa_swap_img = NULL, vk_dlaa_swap_view = VK_NULL_HANDLE; dlss_mode(); preset_check(); - int on = N.available && cfg_bool("TOTK_DLAA"); + int on = be_available() && cfg_bool("TOTK_DLAA"); if (on != D.on) { - rt_log("dlaa: %s", on ? "on" : "off"); + rt_log("dlaa: %s%s%s", on ? "on" : "off", on && fsr_backend() ? ", with " : "", on && fsr_backend() ? vk_ffx_version() : ""); D.on = on; // either way the next DLAA frame starts a new history from an unjittered frame D.reset = 1, D.cam_prev_ok = 0, D.jit_ok = D.jit_used = D.armed = D.done = D.gbuf = D.ended = D.up = 0; diff --git a/runtime/vk_ffx.c b/runtime/vk_ffx.c new file mode 100644 index 00000000..9300276f --- /dev/null +++ b/runtime/vk_ffx.c @@ -0,0 +1,256 @@ +// AMD FSR upscaling for the DLAA path (vk_ffx.h). The FSR SDK 2.4 ships its Vulkan effects as signed DLLs behind a +// loader: amd_fidelityfx_loader_vk.dll exports the five ffx-api entry points and finds the effect DLL +// (amd_fidelityfx_upscaler_vk.dll) next to itself. Both are loaded from the executable's folder at run time; no SDK +// code is compiled in, only the descriptor layouts of ffx_api_min.h. +// +// The upscaler DLL offers several versions (FSR 4.x, FSR 3.1.x) and decides by itself which ones a device can run: +// vk_ffx_init lists them and pins the newest 4.x when there is one, else leaves the DLL's default (3.1 on GPUs without +// FSR 4). Every context is created with that version (ffxOverrideVersion). +// +// What FSR gets is what DLSS gets (vk_dlaa.c evaluate): the R11G11B10F light target as linear HDR colour with automatic +// exposure, the D32F scene depth, motion vectors at the render size in render pixels pointing from this frame's +// position to last frame's without the jitter (motionVectorScale 1), and the jitter the scene was drawn with. That is +// FSR's own convention as well: its guide derives the projection offset as (2 jx / w, -2 jy / h), which moves the +// picture by (jx, jy) window pixels with y down, the way vk_dlaa_viewport moves the viewport. TOTK_FSR_JITTER_SIGN=-1 +// flips it to test the other convention. +#include "vk_ffx.h" + +#include "cfg.h" +#include "host.h" + +#ifndef _WIN32 +int vk_ffx_wanted(void) { return 0; } +void vk_ffx_device_exts(const VkExtensionProperties *have, uint32_t nhave, const char **ext, uint32_t *n, uint32_t max) { + (void)have, (void)nhave, (void)ext, (void)n, (void)max; +} +void vk_ffx_init(void) {} +int vk_ffx_available(void) { return 0; } +void *vk_ffx_create(uint32_t w, uint32_t h, uint32_t ow, uint32_t oh, int depth_inverted, int depth_infinite) { + (void)w, (void)h, (void)ow, (void)oh, (void)depth_inverted, (void)depth_infinite; + return NULL; +} +int vk_ffx_dispatch(void *ctx, VkCommandBuffer cb, const VkFfxDispatch *d) { return (void)ctx, (void)cb, (void)d, 0; } +void vk_ffx_release(void *ctx) { (void)ctx; } +const char *vk_ffx_version(void) { return ""; } +#else +#include +#include +#include +#include + +#include "ffx_api_min.h" + +#define FFX_LOADER L"amd_fidelityfx_loader_vk.dll" +#define FFX_MAX_VERSIONS 16 + +static struct { + HMODULE dll; + PfnFfxCreateContext create; + PfnFfxDestroyContext destroy; + PfnFfxQuery query; + PfnFfxDispatch dispatch; + int tried, loaded, available; + VkDeviceContext dev; + uint64_t version_id; // 0: the DLL's default + char version[48]; + float jitter_sign; +} F = {.jitter_sign = 1.0f}; + +int vk_ffx_wanted(void) { + static int wanted = -1; + if (wanted < 0) wanted = cfg_bool("TOTK_DLAA") && !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + return wanted; +} + +static int loader_load(void) { + if (F.tried) return F.loaded; + F.tried = 1; + wchar_t path[MAX_PATH + 64]; + DWORD len = GetModuleFileNameW(NULL, path, MAX_PATH); + while (len && path[len - 1] != L'\\') len--; + path[len] = 0; + wcscat(path, FFX_LOADER); + // LOAD_WITH_ALTERED_SEARCH_PATH: the loader's own imports and the effect DLL resolve from the executable's folder + F.dll = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (!F.dll) { + rt_log("fsr: cannot load amd_fidelityfx_loader_vk.dll next to totk.exe (error %lu): FSR off", GetLastError()); + return 0; + } + F.create = (PfnFfxCreateContext)(void *)GetProcAddress(F.dll, "ffxCreateContext"); + F.destroy = (PfnFfxDestroyContext)(void *)GetProcAddress(F.dll, "ffxDestroyContext"); + F.query = (PfnFfxQuery)(void *)GetProcAddress(F.dll, "ffxQuery"); + F.dispatch = (PfnFfxDispatch)(void *)GetProcAddress(F.dll, "ffxDispatch"); + if (!F.create || !F.destroy || !F.query || !F.dispatch) { + rt_log("fsr: amd_fidelityfx_loader_vk.dll lacks the ffx-api entry points: FSR off"); + return 0; + } + return F.loaded = 1; +} + +static int has(const VkExtensionProperties *have, uint32_t nhave, const char *name) { + for (uint32_t i = 0; i < nhave; i++) + if (!strcmp(have[i].extensionName, name)) return 1; + return 0; +} + +static void add(const VkExtensionProperties *have, uint32_t nhave, const char **ext, uint32_t *n, uint32_t max, + const char *name) { + for (uint32_t i = 0; i < *n; i++) + if (!strcmp(ext[i], name)) return; + if (has(have, nhave, name) && *n < max) ext[(*n)++] = name; +} + +// The extensions the FSR SDK's own sample enables for its effects (Cauldron2 device_vk.cpp): cooperative matrix and +// 8-bit floats for FSR 4's network where the device has them. The rest it uses (16-bit floats and storage, integer +// dot products, subgroup size control) is core Vulkan 1.3, which vk_device.c enables as far as the driver reports it. +void vk_ffx_device_exts(const VkExtensionProperties *have, uint32_t nhave, const char **ext, uint32_t *n, uint32_t max) { + if (!vk_ffx_wanted()) return; + add(have, nhave, ext, n, max, VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME); +#ifdef VK_EXT_SHADER_FLOAT8_EXTENSION_NAME + add(have, nhave, ext, n, max, VK_EXT_SHADER_FLOAT8_EXTENSION_NAME); +#endif +} + +void vk_ffx_init(void) { + if (!vk_ffx_wanted() || !loader_load()) return; + const VkCtx *c = vk_ctx(); + F.dev = (VkDeviceContext){c->device, c->phys, vkGetDeviceProcAddr}; + const char *js = cfg_get("TOTK_FSR_JITTER_SIGN"); + if (js && !strcmp(js, "-1")) F.jitter_sign = -1.0f; + uint64_t count = FFX_MAX_VERSIONS, ids[FFX_MAX_VERSIONS] = {0}; + const char *names[FFX_MAX_VERSIONS] = {0}; + struct ffxQueryDescGetVersions q = {.header = {FFX_API_QUERY_DESC_TYPE_GET_VERSIONS, NULL}, + .createDescType = FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE, .device = &F.dev, + .outputCount = &count, .versionIds = ids, .versionNames = names}; + ffxReturnCode_t r = F.query(NULL, &q.header); + if (r != FFX_API_RETURN_OK || !count) { + rt_log("fsr: no upscaler for this device (query %u, %llu versions; is amd_fidelityfx_upscaler_vk.dll next to " + "totk.exe?): FSR off", (unsigned)r, (unsigned long long)count); + return; + } + if (count > FFX_MAX_VERSIONS) count = FFX_MAX_VERSIONS; + char list[256] = ""; + int best = -1, best_major = 0, best_minor = 0, best_patch = 0; + for (uint64_t i = 0; i < count; i++) { + const char *nm = names[i] ? names[i] : "?"; + size_t used = strlen(list); + snprintf(list + used, sizeof list - used, "%s%s", i ? ", " : "", nm); + int ma = 0, mi = 0, pa = 0; + if (sscanf(nm, "%d.%d.%d", &ma, &mi, &pa) < 1 || ma < 4) continue; + if (best < 0 || ma > best_major || (ma == best_major && (mi > best_minor || (mi == best_minor && pa > best_patch)))) + best = (int)i, best_major = ma, best_minor = mi, best_patch = pa; + } + if (best >= 0) { + F.version_id = ids[best]; + snprintf(F.version, sizeof F.version, "FSR %s", names[best]); + } else { + snprintf(F.version, sizeof F.version, "FSR %s", names[0] ? names[0] : "?"); // the DLL's default + } + F.available = 1; + rt_log("fsr: upscaler versions for this device: %s; using %s%s", list, F.version, + best >= 0 ? "" : " (FSR 4 is not offered for this GPU)"); +} + +int vk_ffx_available(void) { return vk_ffx_wanted() && F.available; } + +const char *vk_ffx_version(void) { return F.version; } + +// Messages from the upscaler (errors and warnings), in UTF-16; into the log as UTF-8. +static void on_message(uint32_t type, const wchar_t *msg) { + char s[512]; + if (!msg || !WideCharToMultiByte(CP_UTF8, 0, msg, -1, s, (int)sizeof s, NULL, NULL)) return; + rt_log("fsr: %s: %s", type == FFX_API_MESSAGE_TYPE_ERROR ? "error" : "warning", s); +} + +void *vk_ffx_create(uint32_t w, uint32_t h, uint32_t ow, uint32_t oh, int depth_inverted, int depth_infinite) { + if (!F.available) return NULL; + struct ffxOverrideVersion ov = {.header = {FFX_API_DESC_TYPE_OVERRIDE_VERSION, NULL}, .versionId = F.version_id}; + struct ffxCreateContextDescUpscaleVersion ver = { + .header = {FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE_VERSION, F.version_id ? &ov.header : NULL}, + .version = FFX_UPSCALER_VERSION}; + struct ffxCreateBackendVKDesc be = {.header = {FFX_API_CREATE_CONTEXT_DESC_TYPE_BACKEND_VK, &ver.header}, + .deviceContext = F.dev}; + // Linear HDR scene light with the upscaler's own exposure, as DLSS gets it ("IsHDR | AutoExposure") + uint32_t flags = FFX_UPSCALE_ENABLE_HIGH_DYNAMIC_RANGE | FFX_UPSCALE_ENABLE_AUTO_EXPOSURE; + if (depth_inverted) flags |= FFX_UPSCALE_ENABLE_DEPTH_INVERTED; + if (depth_infinite) flags |= FFX_UPSCALE_ENABLE_DEPTH_INFINITE; + if (rt_knob("FSR_DEBUG", "0")) flags |= FFX_UPSCALE_ENABLE_DEBUG_CHECKING; // TOTK_FSR_DEBUG=1: API checks + struct ffxCreateContextDescUpscale cd = {.header = {FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE, &be.header}, + .flags = flags, .maxRenderSize = {w, h}, .maxUpscaleSize = {ow, oh}, + .fpMessage = on_message}; + ffxContext ctx = NULL; + ffxReturnCode_t r = F.create(&ctx, &cd.header, NULL); + if (r != FFX_API_RETURN_OK || !ctx) { + rt_log("fsr: context creation failed (%u) at %ux%u -> %ux%u", (unsigned)r, w, h, ow, oh); + return NULL; + } + struct ffxQueryGetProviderVersion pv = {.header = {FFX_API_QUERY_DESC_TYPE_GET_PROVIDER_VERSION, NULL}}; + F.query(&ctx, &pv.header); + rt_log("fsr: context created at %ux%u -> %ux%u with %s (flags %#x)", w, h, ow, oh, + pv.versionName ? pv.versionName : F.version, flags); + return ctx; +} + +void vk_ffx_release(void *ctx) { + if (!ctx) return; + ffxContext c = ctx; + F.destroy(&c, NULL); +} + +static uint32_t surface_format(VkFormat f) { + switch (f) { + case VK_FORMAT_B10G11R11_UFLOAT_PACK32: return FFX_API_SURFACE_FORMAT_R11G11B10_FLOAT; + case VK_FORMAT_R16G16B16A16_SFLOAT: return FFX_API_SURFACE_FORMAT_R16G16B16A16_FLOAT; + case VK_FORMAT_R16G16_SFLOAT: return FFX_API_SURFACE_FORMAT_R16G16_FLOAT; + case VK_FORMAT_D32_SFLOAT: return FFX_API_SURFACE_FORMAT_R32_FLOAT; + case VK_FORMAT_R8_UNORM: return FFX_API_SURFACE_FORMAT_R8_UNORM; + default: return FFX_API_SURFACE_FORMAT_UNKNOWN; + } +} + +// Every image of the DLAA path stays in VK_IMAGE_LAYOUT_GENERAL: GENERIC_READ and UNORDERED_ACCESS are the states the +// Vulkan backend maps to that layout (ffx_vk.cpp getVKImageLayoutFromResourceState), and it puts each resource back +// into the state it was given at the end of the dispatch. +static struct FfxApiResource resource(const VkFfxImage *im, uint32_t usage, uint32_t state) { + struct FfxApiResource r; + memset(&r, 0, sizeof r); + if (!im->image) return r; + r.resource = (void *)im->image; + r.description = (struct FfxApiResourceDescription){.type = FFX_API_RESOURCE_TYPE_TEXTURE2D, + .format = surface_format(im->format), .width = im->width, + .height = im->height, .depth = 1, .mipCount = 1, .usage = usage}; + r.state = state; + return r; +} + +int vk_ffx_dispatch(void *ctx, VkCommandBuffer cb, const VkFfxDispatch *d) { + if (!ctx) return 0; + ffxContext c = ctx; + struct ffxDispatchDescUpscale u; + memset(&u, 0, sizeof u); + u.header.type = FFX_API_DISPATCH_DESC_TYPE_UPSCALE; + u.commandList = (void *)cb; + u.color = resource(&d->color, FFX_API_RESOURCE_USAGE_READ_ONLY, FFX_API_RESOURCE_STATE_GENERIC_READ); + u.depth = resource(&d->depth, FFX_API_RESOURCE_USAGE_DEPTHTARGET, FFX_API_RESOURCE_STATE_GENERIC_READ); + u.motionVectors = resource(&d->mv, FFX_API_RESOURCE_USAGE_READ_ONLY, FFX_API_RESOURCE_STATE_GENERIC_READ); + u.reactive = resource(&d->reactive, FFX_API_RESOURCE_USAGE_READ_ONLY, FFX_API_RESOURCE_STATE_GENERIC_READ); + u.output = resource(&d->out, FFX_API_RESOURCE_USAGE_UAV, FFX_API_RESOURCE_STATE_UNORDERED_ACCESS); + u.jitterOffset = (struct FfxApiFloatCoords2D){d->jx * F.jitter_sign, d->jy * F.jitter_sign}; + u.motionVectorScale = (struct FfxApiFloatCoords2D){1.0f, 1.0f}; + u.renderSize = (struct FfxApiDimensions2D){d->color.width, d->color.height}; + u.upscaleSize = (struct FfxApiDimensions2D){d->out.width, d->out.height}; + u.frameTimeDelta = d->dt_ms; + u.preExposure = 1.0f; + u.reset = d->reset != 0; + u.cameraNear = d->cam_near; + u.cameraFar = d->cam_far; + u.cameraFovAngleVertical = d->fov_y; + u.viewSpaceToMetersFactor = 1.0f; // TotK's world units are metres + ffxReturnCode_t r = F.dispatch(&c, &u.header); + if (r != FFX_API_RETURN_OK) { + rt_log("fsr: dispatch failed (%u)", (unsigned)r); + return 0; + } + return 1; +} +#endif diff --git a/runtime/vk_ffx.h b/runtime/vk_ffx.h new file mode 100644 index 00000000..db26e517 --- /dev/null +++ b/runtime/vk_ffx.h @@ -0,0 +1,35 @@ +// AMD FSR upscaling (vk_ffx.c) for the DLAA path (vk_dlaa.c): with totk.ini dlaa = 1 and dlaa_backend = fsr, the +// scene that DLSS would get goes to AMD's FSR (FSR 4 where the GPU has it, FSR 3.1 elsewhere) through +// amd_fidelityfx_loader_vk.dll next to the executable. Windows only; elsewhere every call does nothing. +#pragma once +#include "vk.h" + +int vk_ffx_wanted(void); // dlaa and dlaa_backend = fsr at start (the device may still lack FSR) +// vk_device.c, while it builds the device: the extensions FSR's shaders use (cooperative matrix, 8-bit floats) join +// the list when the device has them; their feature structures are chained there. +void vk_ffx_device_exts(const VkExtensionProperties *have, uint32_t nhave, const char **ext, uint32_t *n, uint32_t max); +void vk_ffx_init(void); // after the device exists: loads the loader and picks the upscaler version +int vk_ffx_available(void); // vk_ffx_init found an upscaler for this device + +typedef struct { // one image FSR reads or writes, in VK_IMAGE_LAYOUT_GENERAL, level 0 and layer 0 + VkImage image; + VkFormat format; + uint32_t width, height; +} VkFfxImage; + +typedef struct { + VkFfxImage color, depth, mv, reactive, out; // reactive.image VK_NULL_HANDLE: none + float jx, jy; // this frame's jitter, render pixels (window x right, y down), as the scene was drawn + float dt_ms; // time since the previous dispatch + float cam_near, cam_far; // view-space distances of the depth range's ends + float fov_y; // vertical field of view, radians + int reset; // a new history +} VkFfxDispatch; + +// A context for one render and output size (vk_dlaa.c keeps one per scene size like DLSS's features). depth_inverted: +// depth 1 is near; depth_infinite: the far plane is at infinity. NULL on failure (logged). +void *vk_ffx_create(uint32_t w, uint32_t h, uint32_t ow, uint32_t oh, int depth_inverted, int depth_infinite); +// Records the upscaling into cb. 0 on failure (logged). FSR binds pipelines and descriptors of its own. +int vk_ffx_dispatch(void *ctx, VkCommandBuffer cb, const VkFfxDispatch *d); +void vk_ffx_release(void *ctx); +const char *vk_ffx_version(void); // the upscaler version in use, for the log ("" before vk_ffx_init) diff --git a/tests/installer_test.py b/tests/installer_test.py index b57ccf41..14270fc1 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -552,7 +552,7 @@ class FontsTest(unittest.TestCase): def test_all_steps_order(self): self.assertEqual([s.id for s in steps.all_steps()], - ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'cleanup']) + ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'fsr', 'cleanup']) def test_extracts_into_the_install_folder(self): self.fake_tool() @@ -720,5 +720,77 @@ class DlssTest(unittest.TestCase): self.assertEqual(self.warnings(), []) +@unittest.skipUnless(steps.os.name == 'nt', 'FSR is Windows-only') +class FsrTest(unittest.TestCase): + """The FSR step: off without --fsr, needs an AMD GPU, keeps a player's libraries, installs both files or none.""" + + NAMES = ('amd_fidelityfx_loader_vk.dll', 'amd_fidelityfx_upscaler_vk.dll') + + def setUp(self): + self.tmp = tempfile.TemporaryDirectory() + base = Path(self.tmp.name) + self.dest, temp, src = base / 'dest', base / 'temp', base / 'src' + for d in (self.dest, temp, src): + d.mkdir() + files = [] + for i, name in enumerate(self.NAMES): + (src / name).write_bytes(bytes([65 + i]) * (1000 + i)) + files.append((name, 1000 + i, steps.file_sha256(src / name))) + self.src = src + self.saved = steps.FSR_BASE, steps.FSR_FILES + steps.FSR_BASE = src.as_uri() + '/' # urllib reads file: URLs as it reads https: ones + steps.FSR_FILES = tuple(files) + amd = {'devices': [{'name': 'AMD Radeon RX 9070 XT', 'api': [1, 4, 0], 'type': 2}]} + self.ctx = SimpleNamespace(dest=self.dest, temp=temp, host=amd, reporter=Reporter(out=io.StringIO()), + options=SimpleNamespace(fsr=True)) + + def tearDown(self): + steps.FSR_BASE, steps.FSR_FILES = self.saved + self.ctx.reporter.close() + self.tmp.cleanup() + + def warnings(self): + return [json.loads(line)['id'] for line in self.ctx.reporter.out.getvalue().splitlines() + if json.loads(line)['type'] == 'warning'] + + def test_off_without_the_option(self): + self.ctx.options.fsr = False + self.assertEqual(steps.Fsr().run(self.ctx), {}) + self.assertFalse(any((self.dest / n).exists() for n in self.NAMES)) + self.assertNotEqual(steps.Fsr().key(self.ctx), steps.Fsr().key(SimpleNamespace(options=SimpleNamespace(fsr=True)))) + + def test_downloads_and_checks_both_libraries(self): + rec = steps.Fsr().run(self.ctx) + self.assertEqual(rec, {'installed': steps.FSR_VERSION}) + for n in self.NAMES: + self.assertEqual((self.dest / n).read_bytes(), (self.src / n).read_bytes()) + self.assertFalse(list(self.ctx.temp.iterdir())) + self.assertTrue(steps.Fsr().current(self.ctx, rec)) + (self.dest / self.NAMES[1]).unlink() + self.assertFalse(steps.Fsr().current(self.ctx, rec)) + + def test_a_wrong_file_installs_neither(self): + name, size, _ = steps.FSR_FILES[1] + steps.FSR_FILES = (steps.FSR_FILES[0], (name, size, '0' * 64)) + rec = steps.Fsr().run(self.ctx) + self.assertEqual(rec, {'failed': True}) + self.assertFalse(any((self.dest / n).exists() for n in self.NAMES)) + self.assertFalse(list(self.ctx.temp.iterdir())) + self.assertEqual(self.warnings(), ['warn.fsr_download_failed']) + self.assertFalse(steps.Fsr().current(self.ctx, rec)) + + def test_keeps_the_players_libraries(self): + (self.dest / self.NAMES[1]).write_bytes(b'newer') + self.assertEqual(steps.Fsr().run(self.ctx), {'kept': True}) + self.assertEqual((self.dest / self.NAMES[1]).read_bytes(), b'newer') + self.assertFalse((self.dest / self.NAMES[0]).exists()) + self.assertEqual(self.warnings(), ['warn.fsr_kept']) + + def test_skipped_without_an_amd_gpu(self): + self.ctx.host = {'devices': [{'name': 'NVIDIA GeForce RTX 4080 SUPER', 'api': [1, 4, 0], 'type': 2}]} + self.assertEqual(steps.Fsr().run(self.ctx), {'skipped': 'no_amd'}) + self.assertEqual(self.warnings(), []) + + if __name__ == '__main__': unittest.main() diff --git a/totk.ini.example b/totk.ini.example index 33e7dc4a..a8bb4a03 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -212,6 +212,10 @@ # NVIDIA driver's libnvidia-ngx.so.1 installed); elsewhere the setting does nothing. The HUD is drawn after it and is not touched. # Read at start. # dlaa = 0 +# What dlaa runs: dlss (NVIDIA DLSS, above) or fsr (AMD FSR: FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs, FSR 3.1 on +# others; Windows, with amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll from AMD's FSR SDK next to +# totk.exe, which the setup downloads). The dlss mode below applies to both; dlss_preset is DLSS's only. Read at start. +# dlaa_backend = dlss # What DLSS works from: dlaa (the 3D scene at full size), quality, balanced, performance or ultra_performance (the # scene at 67, 58, 50 or 33 % of the output, scaled up by DLSS; these replace render_scale and sharpen texture filtering # to match). They apply only with dlaa = 1 and the DLSS model next to the executable; otherwise the scene follows From f18b051040f7381c515c67c6f3d1bd063868b821 Mon Sep 17 00:00:00 2001 From: VictorSCosta Date: Fri, 6 Nov 2026 19:57:02 -0300 Subject: [PATCH 02/66] Show the temporal upscaler in the performance overlay. The overlay's picture lines named the scene size and the present's scaling but not DLSS or FSR. An Upscaler line after the 3D scene now shows the backend that ran (vk_dlaa_name: FSR with its version, or DLSS) and the DLSS mode, or none while DLAA is off. Co-Authored-By: Claude Opus 5.5 --- runtime/ui/menu.cpp | 26 +++++++++++++++++++------- runtime/ui_text.c | 7 ++++--- runtime/ui_text.h | 2 +- runtime/vk_dlaa.c | 11 +++++++++++ runtime/vk_dlaa.h | 1 + 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index fe2bcd2e..b318c3b6 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -52,6 +52,7 @@ void rt_log(const char *fmt, ...) __attribute__((format(printf, 1, 2))); void vk_queue_lock(void); void vk_queue_unlock(void); void res_sizes(unsigned out[2], unsigned scene[2]); +const char *vk_dlaa_name(void); // vk_dlaa.h double frame_step_limit_hz(void); extern const int rt_game_version; extern const char rt_port_version[]; @@ -1360,16 +1361,26 @@ static void perf_label(UiTextId label, const ImVec4 &c) { static float perf_gb(float mb) { return mb < 0 ? -1 : mb / 1024; } -// The picture lines: the window, the game image the present shows and the 3D scene it holds (resolution.c), how the -// present scales the image to the window (gfx_present.c, the last present), the frame limit and the presentation mode -// in use. +// The DLSS mode's name as the menu shows it, for the upscaler line. +static UiTextId dlss_mode_text(const char *m) { + return !strcmp(m, "quality") ? UI_MENU_DLSS_QUALITY : !strcmp(m, "balanced") ? UI_MENU_DLSS_BALANCED + : !strcmp(m, "performance") ? UI_MENU_DLSS_PERFORMANCE : !strcmp(m, "ultra_performance") ? UI_MENU_DLSS_ULTRA + : UI_MENU_DLSS_DLAA; +} + +// The picture lines: the window, the game image the present shows and the 3D scene it holds (resolution.c), the +// temporal upscaler that scales the scene (vk_dlaa.c, DLSS or FSR, with its mode), how the present scales the image to +// the window (gfx_present.c, the last present), the frame limit and the presentation mode in use. static void perf_picture(const MenuTarget *t, const ImVec4 &c) { unsigned out[2], scene[2]; res_sizes(out, scene); - char v[6][64]; + char v[7][64]; snprintf(v[0], sizeof v[0], menu_text(UI_MENU_OV_FMT_SIZE), t->width, t->height); snprintf(v[1], sizeof v[1], menu_text(UI_MENU_OV_FMT_SIZE), (unsigned)t->image_w, (unsigned)t->image_h); snprintf(v[2], sizeof v[2], menu_text(UI_MENU_OV_FMT_SCENE), scene[0], scene[1], scene[0] * 100.0 / out[0]); + const char *up = vk_dlaa_name(); + if (up) snprintf(v[6], sizeof v[6], "%s, %s", up, menu_text(dlss_mode_text(cfg_value("TOTK_DLSS")))); + else snprintf(v[6], sizeof v[6], "%s", menu_text(UI_MENU_OV_NONE)); if (t->scaler == 2) { int s = cfg_int("TOTK_SHARPNESS"); snprintf(v[3], sizeof v[3], menu_text(UI_MENU_OV_FMT_FSR), s < 0 ? 0 : s > 100 ? 100 : s); @@ -1385,17 +1396,18 @@ static void perf_picture(const MenuTarget *t, const ImVec4 &c) { if (hz > 0) snprintf(v[4], sizeof v[4], menu_text(UI_MENU_OV_FPS), hz); const char *pm = present_name(gfx_window_present_mode()); snprintf(v[5], sizeof v[5], "%s", pm ? pm : menu_text(UI_MENU_OV_NONE)); - static const UiTextId labels[6] = {UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, + static const UiTextId labels[7] = {UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, UI_MENU_OV_UPSCALER, UI_MENU_OV_SCALING, UI_MENU_OV_LIMIT, UI_MENU_OV_PRESENT}; + static const int order[7] = {0, 1, 2, 6, 3, 4, 5}; // the upscaler line after the scene it scales if (!ImGui::BeginTable("##perfp", 2, ImGuiTableFlags_SizingFixedFit)) return; float vw = 0; for (auto &s : v) vw = fmaxf(vw, ImGui::CalcTextSize(s).x); ImGui::TableSetupColumn("##p0", ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("##p1", ImGuiTableColumnFlags_WidthFixed, vw); - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 7; i++) { perf_label(labels[i], c); ImGui::TableNextColumn(); - perf_right(v[i], false); + perf_right(v[order[i]], !up && order[i] == 6); } ImGui::EndTable(); } diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 8ef51cba..26c41d76 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -476,7 +476,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", [UI_MENU_OV_FMT_GB] = "%.1f GB", [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", [UI_MENU_OV_GAME_GB] = "game %.1f GB", [UI_MENU_OV_FMT_MS] = "%.2f ms", [UI_MENU_OV_PER_FRAME] = "%.1f per frame", [UI_MENU_OV_WINDOW] = "Window", [UI_MENU_OV_OUTPUT] = "Game image", [UI_MENU_OV_SCENE] = "3D scene", - [UI_MENU_OV_SCALING] = "Scaling", [UI_MENU_OV_LIMIT] = "Frame limit", [UI_MENU_OV_PRESENT] = "Presentation", + [UI_MENU_OV_UPSCALER] = "Upscaler", [UI_MENU_OV_SCALING] = "Scaling", [UI_MENU_OV_LIMIT] = "Frame limit", [UI_MENU_OV_PRESENT] = "Presentation", [UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, sharpness %d%%", [UI_MENU_OV_SCALE_NONE] = "none (1:1)", [UI_MENU_OV_SCALE_BILINEAR] = "bilinear", @@ -960,7 +960,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_OV_FMT_MHZ] = "%.0f МГц", [UI_MENU_OV_FMT_GB] = "%.1f ГБ", [UI_MENU_OV_FMT_GB_OF] = "/ %.1f ГБ", [UI_MENU_OV_GAME_GB] = "игра %.1f ГБ", [UI_MENU_OV_FMT_MS] = "%.2f мс", [UI_MENU_OV_PER_FRAME] = "%.1f за кадр", [UI_MENU_OV_WINDOW] = "Окно", [UI_MENU_OV_OUTPUT] = "Изображение игры", [UI_MENU_OV_SCENE] = "3D-сцена", - [UI_MENU_OV_SCALING] = "Масштабирование", [UI_MENU_OV_LIMIT] = "Лимит кадров", [UI_MENU_OV_PRESENT] = "Вывод кадров", + [UI_MENU_OV_UPSCALER] = "Апскейлер", [UI_MENU_OV_SCALING] = "Масштабирование", [UI_MENU_OV_LIMIT] = "Лимит кадров", [UI_MENU_OV_PRESENT] = "Вывод кадров", [UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, резкость %d%%", [UI_MENU_OV_SCALE_NONE] = "нет (1:1)", [UI_MENU_OV_SCALE_BILINEAR] = "билинейное", @@ -1330,7 +1330,7 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", [UI_MENU_OV_FMT_GB] = "%.1f GB", [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", [UI_MENU_OV_GAME_GB] = "jogo %.1f GB", [UI_MENU_OV_FMT_MS] = "%.2f ms", [UI_MENU_OV_PER_FRAME] = "%.1f por quadro", [UI_MENU_OV_WINDOW] = "Janela", [UI_MENU_OV_OUTPUT] = "Imagem do jogo", [UI_MENU_OV_SCENE] = "Cena 3D", - [UI_MENU_OV_SCALING] = "Escala", [UI_MENU_OV_LIMIT] = "Limite de quadros", [UI_MENU_OV_PRESENT] = "Apresentação", + [UI_MENU_OV_UPSCALER] = "Upscaler", [UI_MENU_OV_SCALING] = "Escala", [UI_MENU_OV_LIMIT] = "Limite de quadros", [UI_MENU_OV_PRESENT] = "Apresentação", [UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, nitidez %d%%", [UI_MENU_OV_SCALE_NONE] = "nenhuma (1:1)", [UI_MENU_OV_SCALE_BILINEAR] = "bilinear", @@ -1983,6 +1983,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_OV_WINDOW] = "窗口", [UI_MENU_OV_OUTPUT] = "游戏画面", [UI_MENU_OV_SCENE] = "3D 场景", + [UI_MENU_OV_UPSCALER] = "超分辨率", [UI_MENU_OV_SCALING] = "缩放", [UI_MENU_OV_LIMIT] = "帧率上限", [UI_MENU_OV_PRESENT] = "呈现模式", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index dd4fe343..69f1dd21 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -225,7 +225,7 @@ typedef enum { UI_MENU_OV_FMT_PCT, UI_MENU_OV_FMT_TEMP, UI_MENU_OV_FMT_POWER, UI_MENU_OV_FMT_MHZ, UI_MENU_OV_FMT_GB, UI_MENU_OV_FMT_GB_OF, UI_MENU_OV_GAME_GB, UI_MENU_OV_FMT_MS, UI_MENU_OV_PER_FRAME, // the picture lines: window, game image and 3D scene sizes, the scaling to the window, frame limit and presentation - UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, UI_MENU_OV_SCALING, UI_MENU_OV_LIMIT, UI_MENU_OV_PRESENT, + UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, UI_MENU_OV_UPSCALER, UI_MENU_OV_SCALING, UI_MENU_OV_LIMIT, UI_MENU_OV_PRESENT, UI_MENU_OV_FMT_SIZE, // "%ux%u" UI_MENU_OV_FMT_SCENE, // "%ux%u, %.0f%%": the scene and its share of the game image's width UI_MENU_OV_FMT_FSR, // "AMD FSR 1, sharpness %d%%" diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 35005c5b..b229e35f 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -291,6 +291,16 @@ static int be_available(void) { return fsr_backend() ? vk_ffx_available() : N.av int vk_dlaa_available(void) { return vk_dlaa_wanted() && be_available(); } +static int dl_active(void); +static uint64_t dl_evals(void); + +// The temporal upscaler at work, for the performance overlay (ui/menu.cpp perf_picture): "FSR 4.1.2" or "DLSS" once +// it has run, NULL while DLAA is off, failed or has not run yet. +const char *vk_dlaa_name(void) { + if (!dl_active() || !dl_evals()) return NULL; + return fsr_backend() ? vk_ffx_version() : "DLSS"; +} + // ---------------------------------------------------------------- where DLAA runs in TotK's frame // Measured (TOTK_DUMP, frame 2100 at Lookout Landing, 2560x1440 scene): the G-buffer passes draw into five targets with // the scene depth (d32f at the scene size), one of them the R11G11B10F light target; lighting and the transparents @@ -369,6 +379,7 @@ const VkTexImage *vk_dlaa_swap_img; VkImageView vk_dlaa_swap_view; static int dl_active(void) { return be_available() && !D.failed && D.on; } +static uint64_t dl_evals(void) { return D.evals; } static void dl_fail(const char *what, NgxResult r) { rt_log("dlaa: %s failed (%08x): DLAA off for this run", what, (unsigned)r); diff --git a/runtime/vk_dlaa.h b/runtime/vk_dlaa.h index 82b98113..fa492330 100644 --- a/runtime/vk_dlaa.h +++ b/runtime/vk_dlaa.h @@ -14,6 +14,7 @@ void vk_dlaa_device_exts(const VkExtensionProperties *have, uint32_t nhave, cons void vk_dlaa_init(void); // 1 when dlaa is on and NGX came up with DLSS (after vk_dlaa_init): a DLSS mode's smaller scene is scaled up by DLSS. int vk_dlaa_available(void); +const char *vk_dlaa_name(void); // "FSR 4.1.2" or "DLSS" once DLAA ran, NULL otherwise (the performance overlay) // vk_exec.c vk_exec_pass_begin, once the pass's targets are resolved and before its barrier: arms the frame on the // scene's light target or, at the first quarter-width pass after it, runs DLAA on that target. Each present ends the // frame (vk_dlaa_frame). From 189e64cbd3d0b0a17192c2fcf4d0a18e8fad4c24 Mon Sep 17 00:00:00 2001 From: VictorSCosta Date: Fri, 6 Nov 2026 22:41:46 -0300 Subject: [PATCH 03/66] Keep FSR to Windows and say so on Linux. AMD's FSR SDK ships its Vulkan libraries for Windows only. On Linux a dlaa_backend = fsr setting left DLAA off without a word; now it is ignored with a log line and DLAA stays with DLSS, the menu has no backend row, and resolution.c checks the DLSS library. The README says FSR is Windows only. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- runtime/resolution.c | 6 ++---- runtime/ui/menu.cpp | 2 ++ runtime/vk_dlaa.c | 12 ++++++++++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 104fd074..84c1fbdb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). (github.com/NVIDIA/DLSS, NVIDIA RTX SDK license) when it finds an RTX GPU; untick it in the setup to skip it - AMD FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on others), in the same modes as DLSS: the setup downloads AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, AMD FSR SDK license) when it - finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu (Windows; not yet checked in play) + finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu. Windows only: AMD's FSR SDK has no Linux libraries yet - 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 diff --git a/runtime/resolution.c b/runtime/resolution.c index 2b645e62..54db28bf 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -68,15 +68,14 @@ static struct { // next to totk.exe on Windows, libnvidia-ngx-dlss.so. next to totk on Linux (vk_dlaa.c vk_dlaa_init): // without that file DLSS never runs, and a DLSS mode would leave the game's plain scaling at 50..67 % of the output. // With dlaa_backend = fsr the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and upscaler -// DLLs next to totk.exe; on Linux FSR does not run. +// DLLs next to totk.exe; on Linux the setting is ignored and DLSS is checked (vk_dlaa.c fsr_backend). static int dlss_dll(void) { - int fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); #ifdef _WIN32 char exe[1024], path[1024 + 48]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); if (!last) return 1; - if (fsr) { + if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) { snprintf(path, sizeof path, "%.*s/amd_fidelityfx_loader_vk.dll", (int)(last - exe), exe); if (!plat_file_exists(path)) return 0; snprintf(path, sizeof path, "%.*s/amd_fidelityfx_upscaler_vk.dll", (int)(last - exe), exe); @@ -85,7 +84,6 @@ static int dlss_dll(void) { snprintf(path, sizeof path, "%.*s/nvngx_dlss.dll", (int)(last - exe), exe); return plat_file_exists(path); #else - if (fsr) return 0; char exe[1024]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index b318c3b6..da5cec0b 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -681,8 +681,10 @@ static void tab_screen(float scale) { opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%"); opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%"); opt_toggle("TOTK_DLAA", UI_MENU_DLAA, UI_MENU_DLAA_DESC); +#ifdef _WIN32 // AMD ships FSR's Vulkan libraries for Windows only: Linux has DLSS alone (vk_dlaa.c fsr_backend) static const UiTextId backend[] = {UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; opt_choice("TOTK_DLAA_BACKEND", UI_MENU_DLAA_BACKEND, backend, 2, UI_MENU_DLAA_BACKEND_DESC); +#endif static const UiTextId dlss[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; opt_choice("TOTK_DLSS", UI_MENU_DLSS, dlss, 5, UI_MENU_DLSS_DESC); diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index b229e35f..787af145 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -118,10 +118,18 @@ int vk_dlaa_wanted(void) { } // FSR instead of DLSS (TOTK_DLAA_BACKEND=fsr), fixed for the run like dlaa: the backend's extensions are chosen at -// device creation. On Linux FSR is not available, and this choice leaves DLAA off rather than falling back to DLSS. +// device creation. AMD ships FSR's Vulkan libraries for Windows only, so on Linux the setting is ignored (the menu has +// no row for it) and DLAA stays with DLSS. static int fsr_backend(void) { static int fsr = -1; - if (fsr < 0) fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + if (fsr < 0) { + fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); +#ifndef _WIN32 + if (fsr && vk_dlaa_wanted()) + rt_log("dlaa: dlaa_backend = fsr runs on Windows only (AMD's FSR SDK has no Linux libraries): using DLSS"); + fsr = 0; +#endif + } return fsr; } From 60346700f4a17cc59a499b41b0e9aa1d3688ce49 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Sun, 15 Nov 2026 21:20:08 -0300 Subject: [PATCH 04/66] Keep FSR's picture equally sharp on every frame: FSR sharpens its own output and skips the game's FXAA With FSR running in place the game ran its FXAA pass, which also sharpens, on 17 frames in every 96 and drew the copy shader from the scene target onto itself on the others, so a still view went soft and sharp in turns. Both draws are now skipped on those frames and FSR's own sharpening pass is on, at the strength of the sharpness setting. Co-Authored-By: Claude Fable 5.2 --- runtime/vk_dlaa.c | 38 ++++++++++++++++++++++++++++++++++++-- runtime/vk_ffx.c | 2 ++ runtime/vk_ffx.h | 1 + totk.ini.example | 9 ++++++--- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index db9901e2..6d3994cf 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -1110,12 +1110,16 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) { D.reset = 1; } if (D.last_color != t->image) D.reset = 1, D.why[2]++, D.last_color = t->image; + // FSR sharpens its own output (sharpness, the setting the FSR 1 present pass reads too): the game's sharpening + // is part of its FXAA pass, which FSR's frames go without (vk_dlaa_skip_draw). + int sharp = cfg_int("TOTK_SHARPNESS"); + sharp = sharp < 0 ? 0 : sharp > 100 ? 100 : sharp; // The same bias mask DLSS would get, as FSR's reactive mask: how much to favour this frame's colour VkFfxDispatch fd = {.color = {t->image, t->format, w, h}, .depth = {z->image, z->format, w, h}, .mv = {e->mv, VK_FORMAT_R16G16_SFLOAT, w, h}, .out = {e->out, VK_FORMAT_R16G16B16A16_SFLOAT, ow, oh}, .jx = jx, .jy = jy, .dt_ms = dt_ms, .cam_near = cn, .cam_far = cf, .fov_y = fov, - .reset = D.reset}; + .sharpness = (float)sharp / 100.0f, .reset = D.reset}; if (mk) fd.reactive = (VkFfxImage){mk->mask, VK_FORMAT_R8_UNORM, w, h}; else if (masked) fd.reactive = (VkFfxImage){e->mask, VK_FORMAT_R8_UNORM, w, h}; c0 = timed ? kern_now_ns() : 0; @@ -1440,6 +1444,9 @@ void vk_dlaa_frame(void) { // the jittered scene: after DLSS ran, passes larger than the light target sample DLSS's output (vk_dlaa_swap_img). static const uint64_t FXAA_FS[] = {0xf450003ebeb3dc52ull, 0x0a12f4bc2a9a4fbeull, 0x5c43ae18948d52cbull, 0xaad42238801d31d8ull}; +// The fragment shader of the FXAA's first pass, the copy of the scene target into the scratch target (this build's +// translator; another hash leaves the draw alone). See vk_dlaa_skip_draw for why FSR's frames skip it. +static const uint64_t FXAA_COPY_FS[] = {0xa0fd34391f2af811ull}; // Chunks of one submission look shaders up side by side: an entry's hash is stored before its shader, and entries are // added under the lock. @@ -1484,7 +1491,19 @@ int vk_dlaa_skip_draw(VkExec *ex, const GfxShader *fs) { "FXAA_FS): the FXAA stays on", (unsigned long long)fx_off_frames); } } - if (fxaa && !D.up) return 0; // nothing to skip: no shader lookup per draw at the defaults + // FSR in place (the scene at least as large as the output, so no scaling pass follows) goes without the game's + // FXAA altogether, because with FSR on the game does not run that pass on every frame. Measured on 1.4.3 at a + // 2560x1440 scene and output, dynamic_res = 0, a still view: for 17 frames in every 96 the game drew the copy + // shader into its scratch target and then the FXAA; for the other 79 it drew the copy shader straight into the + // scene target, from that same target, and no FXAA. Without DLAA it ran the FXAA on every frame. The cause was not + // found; the period suggests the dynamic resolution controller, which keeps stepping through its tiers under the + // fixres patch (that only makes every tier's scale 1.0). + // The FXAA pass sharpens as well (that view measured 27.7 with it and 19.6 without, DLAA off, as the mean absolute + // Laplacian of the picture), so FSR's picture came out sharp for those 17 frames and soft for the other 79 (16.5 + // and 8.8), and the copy of the scene onto itself softened those further (10.2 without that draw). Both draws are + // skipped on every frame instead and FSR sharpens its own output (evaluate): 16.8 on every frame at sharpness 80. + int fsr_in_place = D.done && !D.up && fsr_backend(); + if (fxaa && !D.up && !fsr_in_place) return 0; // nothing to skip: no shader lookup per draw at the defaults if (!fs) return 0; // 1.2.1 scales the light target to the output with an upscaler of its own (12 texelFetch taps around the source // pixel, fragment shader e6f7ae35b8479ef3 with this build's translator), not with the FXAA one, in a pass without @@ -1504,6 +1523,21 @@ int vk_dlaa_skip_draw(VkExec *ex, const GfxShader *fs) { uint64_t h = spirv_hash(fs); int known = 0; for (size_t i = 0; i < sizeof FXAA_FS / sizeof FXAA_FS[0]; i++) known |= h == FXAA_FS[i]; + if (fsr_in_place) { + static int logged_fxaa, logged_copy; + if (known && ex->depth.image) { + if (!logged_fxaa) logged_fxaa = 1, rt_log("dlaa: FSR skips the game's FXAA (fragment shader %016llx) and sharpens its own picture (sharpness)", (unsigned long long)h); + return 1; + } + // the copy shader drawing the scene target onto itself: the frames below the first resolution tier + int copy = 0; + for (size_t i = 0; i < sizeof FXAA_COPY_FS / sizeof FXAA_COPY_FS[0]; i++) copy |= h == FXAA_COPY_FS[i]; + if (copy && ex->color[0].image == D.color.image && vk_exec_draw_samples(ex, fs, D.color.img)) { + if (!logged_copy) logged_copy = 1, rt_log("dlaa: FSR skips the game's copy of the scene target onto itself (fragment shader %016llx)", (unsigned long long)h); + return 1; + } + if (fxaa) return 0; + } if (!known) return 0; if (!ex->depth.image) return D.up; // the scaling pass, which DLSS replaced if (!fxaa && !fx_found) { diff --git a/runtime/vk_ffx.c b/runtime/vk_ffx.c index 9300276f..72528371 100644 --- a/runtime/vk_ffx.c +++ b/runtime/vk_ffx.c @@ -239,6 +239,8 @@ int vk_ffx_dispatch(void *ctx, VkCommandBuffer cb, const VkFfxDispatch *d) { u.motionVectorScale = (struct FfxApiFloatCoords2D){1.0f, 1.0f}; u.renderSize = (struct FfxApiDimensions2D){d->color.width, d->color.height}; u.upscaleSize = (struct FfxApiDimensions2D){d->out.width, d->out.height}; + u.enableSharpening = d->sharpness > 0; + u.sharpness = d->sharpness; u.frameTimeDelta = d->dt_ms; u.preExposure = 1.0f; u.reset = d->reset != 0; diff --git a/runtime/vk_ffx.h b/runtime/vk_ffx.h index db26e517..5f4f88c7 100644 --- a/runtime/vk_ffx.h +++ b/runtime/vk_ffx.h @@ -23,6 +23,7 @@ typedef struct { float dt_ms; // time since the previous dispatch float cam_near, cam_far; // view-space distances of the depth range's ends float fov_y; // vertical field of view, radians + float sharpness; // FSR's own sharpening pass (RCAS) on its output, 0..1; 0: none int reset; // a new history } VkFfxDispatch; diff --git a/totk.ini.example b/totk.ini.example index 12b82ada..35d7a8b9 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -203,7 +203,8 @@ # the menu take effect at once. # dynamic_res = 1 # Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening -# from 0 (off) to 100. Changes while the game runs take effect at once. +# from 0 (off) to 100. With dlaa_backend = fsr the same sharpness also sets how much FSR sharpens the 3D scene it +# anti-aliases. Changes while the game runs take effect at once. # upscaler = fsr # sharpness = 80 # Picture shape when the window's shape differs from the game resolution's (a 16:9 picture in a 21:9 fullscreen @@ -293,8 +294,10 @@ # NVIDIA Reflex Low Latency (NVIDIA GPUs supporting VK_NV_low_latency2): off, on, or boost. # Reduces system input latency; boost keeps GPU clocks high in CPU-bound scenes. Read at start. # reflex = off -# The game's own FXAA after the post effects; with DLAA on it is not needed. Changes while the game runs take effect at -# once. +# The game's own FXAA after the post effects, which also sharpens; with DLAA on it is not needed. With dlaa_backend = +# fsr and the scene as large as the game resolution it is always left out, and FSR sharpens instead (sharpness): the +# game runs it on some frames only, which made the picture go soft and sharp in turns. Changes while the game runs +# take effect at once. # fxaa = 1 # HDR output: hdr = 1 sends the picture as HDR10 (needs HDR on in Windows, "Use HDR", or a Wayland compositor with From b51339338500378e89a407c3c74612ff2a05bdf5 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Sun, 15 Nov 2026 23:44:31 -0300 Subject: [PATCH 05/66] Put DLSS and FSR behind one Upscalers row in the menu, and hold the dynamic resolution at 100 % while FSR is on The row (Off, NVIDIA DLSS, AMD FSR) replaces the DLAA toggle and the backend row and still writes dlaa and dlaa_backend. "DLSS character trails" becomes "Character trails", since FSR takes the same mask, and "FSR sharpness" moves next to the upscaler's rows. Texts in English, Russian, Brazilian Portuguese and Simplified Chinese. Co-Authored-By: Claude Fable 5.2 --- runtime/resolution.c | 14 +++-- runtime/ui/menu.cpp | 31 ++++++++--- runtime/ui/option_rows.cpp | 5 ++ runtime/ui/option_rows.h | 5 ++ runtime/ui_text.c | 108 ++++++++++++++++++------------------- runtime/ui_text.h | 2 +- runtime/vk_dlaa.c | 2 + runtime/vk_dlaa.h | 3 ++ totk.ini.example | 3 +- 9 files changed, 106 insertions(+), 67 deletions(-) diff --git a/runtime/resolution.c b/runtime/resolution.c index 2b19c6a0..5fc13fb3 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -668,19 +668,25 @@ void res_fov_live(void) { // 2867-wide scene stays at 100 %, one wider than about 2970 does not, and a 4267-wide one (5120x1440 at render_scale // 83) fits no tier and falls back to 80 % every frame, whatever the GPU's load. 1 (the default) leaves the game's own // stepping and the set off. Runs on a settings change (gfx_present.c window_settings_live), like res_fov_live. +int vk_dlaa_fsr_on(void); // vk_dlaa.h, which needs vk.h void res_dynres_live(void) { static int set = -2, shown = -1; if (set == -2) set = rt_patch_set("fixres"); - int dyn = cfg_bool("TOTK_DYNAMIC_RES"); - if (dyn == shown) return; - shown = dyn; + // AMD FSR at work (vk_dlaa.h vk_dlaa_fsr_on) holds the scene at 100 % whatever dynamic_res says, as it leaves the + // game's FXAA out: FSR then always gets the scene size it was started for and keeps one history. + int fsr = vk_dlaa_fsr_on(); + int dyn = cfg_bool("TOTK_DYNAMIC_RES") && !fsr; + int state = dyn | fsr << 1; + if (state == shown) return; + shown = state; if (set < 0) { if (!dyn) rt_log("resolution: this game version has no fixed-resolution patch; the game keeps its dynamic resolution"); return; } rt_patch_switch(set, !dyn); rt_log("resolution: dynamic resolution %s", - dyn ? "on: the game's own 100, 90 or 80 %" : "off: the scene stays at 100 %"); + dyn ? "on: the game's own 100, 90 or 80 %" : fsr ? "off while AMD FSR is on: the scene stays at 100 %" + : "off: the scene stays at 100 %"); } void res_wanted(unsigned out[2]) { diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index e17e5c84..14275585 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -54,6 +54,7 @@ void vk_queue_unlock(void); int vk_exec_replay_workers(void); void res_sizes(unsigned out[2], unsigned scene[2]); const char *vk_dlaa_name(void); // vk_dlaa.h +int vk_dlaa_fsr_on(void); // vk_dlaa.h double frame_step_limit_hz(void); extern const int rt_game_version; extern const char rt_port_version[]; @@ -665,6 +666,26 @@ static const char *present_note(void) { return note; } +// The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS or AMD FSR). +// AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend). +static void row_upscalers(void) { + static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; +#ifdef _WIN32 + const int n = 3; +#else + const int n = 2; +#endif + int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 2 && !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr") ? 2 : 1; + int step = opt_choice_step("TOTK_DLAA", UI_MENU_DLAA, menu_text(ids[cur]), cur == 0, UI_MENU_DLAA_DESC); + if (!step) return; + // A / click: the next value, round to the first; left / right stop at the ends (as opt_choice_list) + int nv = step == 2 ? (cur + 1) % n : cur + step < 0 ? 0 : cur + step >= n ? n - 1 : cur + step; + if (nv == cur) return; + cfg_set("TOTK_DLAA", nv ? "1" : "0"); + if (nv) cfg_set("TOTK_DLAA_BACKEND", nv == 2 ? "fsr" : "dlss"); // off keeps the upscaler chosen last + opt_save_soon(); +} + // ---- the tabs // Colour adjustment (vk_color.c): a profile writes the four values (STS78721's presets, issue #136); moving one of them // makes the profile Custom. @@ -711,7 +732,6 @@ static void tab_screen(float scale) { row_shadow_res(); static const UiTextId up[] = {UI_MENU_UPSCALER_FSR, UI_MENU_UPSCALER_BILINEAR}; opt_choice("TOTK_UPSCALER", UI_MENU_UPSCALER, up, 2, UI_MENU_UPSCALER_DESC); - opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%"); static const UiTextId aspect[] = {UI_MENU_ASPECT_FIT, UI_MENU_ASPECT_STRETCH}; opt_choice("TOTK_ASPECT", UI_MENU_ASPECT, aspect, 2, UI_MENU_ASPECT_DESC); static const UiTextId movie_aspect[] = {UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH}; @@ -726,11 +746,7 @@ static void tab_screen(float scale) { opt_toggle("TOTK_LOD_STEADY", UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC); opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%"); opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%"); - opt_toggle("TOTK_DLAA", UI_MENU_DLAA, UI_MENU_DLAA_DESC); -#ifdef _WIN32 // AMD ships FSR's Vulkan libraries for Windows only: Linux has DLSS alone (vk_dlaa.c fsr_backend) - static const UiTextId backend[] = {UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; - opt_choice("TOTK_DLAA_BACKEND", UI_MENU_DLAA_BACKEND, backend, 2, UI_MENU_DLAA_BACKEND_DESC); -#endif + row_upscalers(); static const UiTextId dlss[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; opt_choice("TOTK_DLSS", UI_MENU_DLSS, dlss, 5, UI_MENU_DLSS_DESC); @@ -739,6 +755,9 @@ static void tab_screen(float scale) { static const UiTextId chars[] = {UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, UI_MENU_DLSS_CHARS_FULL}; opt_choice("TOTK_DLSS_CHAR_MASK", UI_MENU_DLSS_CHARS, chars, 4, UI_MENU_DLSS_CHARS_DESC); + // FSR's sharpening, with the upscaler's rows: of the scene FSR anti-aliases (vk_dlaa.c evaluate) and of the picture + // FSR 1 scales to the window (vk_fsr.c) + opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%"); static const UiTextId reflex[] = {UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST}; opt_choice("TOTK_REFLEX", UI_MENU_REFLEX, reflex, 3, UI_MENU_REFLEX_DESC); opt_toggle("TOTK_FXAA", UI_MENU_FXAA, UI_MENU_FXAA_DESC); diff --git a/runtime/ui/option_rows.cpp b/runtime/ui/option_rows.cpp index 6074ca12..d445dee3 100644 --- a/runtime/ui/option_rows.cpp +++ b/runtime/ui/option_rows.cpp @@ -329,6 +329,11 @@ bool opt_choice_list(const char *key, UiTextId label, const char *const *values, return true; } +int opt_choice_step(const char *key, UiTextId label, const char *value, bool is_default, UiTextId desc) { + RowView v = {value, is_default, true, NULL}; + return row(key, label, desc, v); +} + bool opt_choice(const char *key, UiTextId label, const UiTextId *names, int n, UiTextId desc, const char *note) { enum { MAX = 32 }; const CfgMeta *m = cfg_meta(key); diff --git a/runtime/ui/option_rows.h b/runtime/ui/option_rows.h index b15933b3..0aeb9bfd 100644 --- a/runtime/ui/option_rows.h +++ b/runtime/ui/option_rows.h @@ -45,6 +45,11 @@ bool opt_choice(const char *key, UiTextId label, const UiTextId *names, int n, U // unset. cur: the index in effect, -1 to find cfg_value(key) in values (no match: the value shown as it is). bool opt_choice_list(const char *key, UiTextId label, const char *const *values, const char *const *names, int n, UiTextId desc, int cur = -1, const char *note = nullptr); +// A choice the caller maps to settings itself (one row over two keys): value is shown between the < > arrows, with the +// "default" mark when is_default; key gives the row its restart and environment notes. Returns the step as +// opt_text_row does (2: A / click, -1 / +1: left / right, 0: none); the caller writes the settings and calls +// opt_save_soon. +int opt_choice_step(const char *key, UiTextId label, const char *value, bool is_default, UiTextId desc); // A row that runs an action: true on A or a click. id: unique on the page and not a setting ("##copy_info"); value: // shown on the right ("" none). bool opt_button(const char *id, UiTextId label, UiTextId desc, const char *value = ""); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index e4dc2353..44448e5b 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -72,7 +72,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { "that size. Above 100 % smooths jagged edges (supersampling) at a high GPU cost.", [UI_MENU_RENDER_SCALE_GAME] = "Game (83 %)", [UI_MENU_DYNAMIC_RES] = "Dynamic resolution", - [UI_MENU_DYNAMIC_RES_DESC] = "Lets the game lower the 3D scene to 90 or 80 %. It judges by an estimate made for the Switch that ignores your GPU, so wide scenes drop even on a fast PC. Off keeps the render scale.", + [UI_MENU_DYNAMIC_RES_DESC] = "Lets the game lower the 3D scene to 90 or 80 %. It judges by an estimate made for the Switch that ignores your GPU, so wide scenes drop even on a fast PC. Off keeps the render scale. Off while AMD FSR is on.", [UI_MENU_UPSCALER] = "Scaling to the window", [UI_MENU_UPSCALER_DESC] = "How the picture is scaled when the window is larger than the game resolution. FSR keeps " "edges and detail sharper than bilinear.", @@ -99,7 +99,8 @@ static const char *const text_en[UI_TEXT_COUNT] = { [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 versions 1.2.1 and 1.4.3. Leave it off on weak PCs: there this drop keeps the frame rate up.", [UI_MENU_SHARPNESS] = "FSR sharpness", - [UI_MENU_SHARPNESS_DESC] = "Sharpening after FSR scaling; 0 turns it off.", + [UI_MENU_SHARPNESS_DESC] = "How much AMD FSR sharpens: the 3D scene with the AMD FSR upscaler, and the picture FSR 1 scales to " + "the window. 0 turns it off.", [UI_MENU_COLOR] = "Colour", [UI_MENU_COLOR_PRESET] = "Colour profile", [UI_MENU_COLOR_PRESET_DESC] = "Sets the four values below. Vivid: more contrast and saturation, shadows opened a " @@ -147,15 +148,14 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_GRASS_RANGE_DESC] = "How far around the camera grass grows (the game's: 62.5 m). Higher keeps the " "grass in meadows further out instead of growing it in just in front of you; lower " "draws less of it. Takes effect at the next start.", - [UI_MENU_DLAA] = "NVIDIA DLSS / DLAA", - [UI_MENU_DLAA_DESC] = "NVIDIA DLSS for the 3D scene (NVIDIA RTX GPUs; " DLSS_FILE " next to " EXE_FILE "): smoother " - "edges and less shimmer. The HUD is not touched. The mode below sets the resolution it works " - "from. Takes effect after a restart.", - [UI_MENU_DLAA_BACKEND] = "Upscaler", - [UI_MENU_DLAA_BACKEND_DESC] = "What runs for the option above. NVIDIA DLSS on NVIDIA RTX GPUs; AMD FSR on AMD Radeon " - "GPUs: FSR 4 on the RX 9000, 7000 and 6000 series, FSR 3.1 elsewhere (Windows; " - "amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE - "). The mode below applies to both. Takes effect after a restart.", + [UI_MENU_DLAA] = "Upscalers", + [UI_MENU_DLAA_DESC] = "What smooths and scales the 3D scene. NVIDIA DLSS: NVIDIA RTX GPUs, " DLSS_FILE " next to " EXE_FILE + ". AMD FSR: AMD Radeon GPUs, FSR 4 on the RX 9000, 7000 and 6000 series and FSR 3.1 elsewhere " + "(Windows; amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE + "); with it the game's FXAA and its dynamic resolution are off. Smoother edges and less " + "shimmer; the HUD is not touched. The mode below sets the resolution it works from. Takes " + "effect after a restart.", + [UI_MENU_DLAA_OFF] = "Off", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS_PRESET] = "DLSS model", [UI_MENU_DLSS_PRESET_DESC] = "Which DLSS model runs. Automatic follows NVIDIA's advice per mode: K for DLAA, Quality " @@ -164,8 +164,8 @@ static const char *const text_en[UI_TEXT_COUNT] = { "Applies at once.", [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatic", [UI_MENU_DLSS_PRESET_K] = "K (sharpest)", [UI_MENU_DLSS_PRESET_J] = "J (less ghosting)", - [UI_MENU_DLSS_CHARS] = "DLSS character trails", - [UI_MENU_DLSS_CHARS_DESC] = "Reduces the faint trails behind moving characters, animals and what they hold: DLSS takes " + [UI_MENU_DLSS_CHARS] = "Character trails", + [UI_MENU_DLSS_CHARS_DESC] = "Reduces the faint trails behind moving characters, animals and what they hold: the upscaler (DLSS or FSR) takes " "less of the previous frames there. Stronger removes more of the trails and leaves those " "edges a little less smooth. Applies at once.", [UI_MENU_DLSS_CHARS_OFF] = "Off", [UI_MENU_DLSS_CHARS_LIGHT] = "Light", [UI_MENU_DLSS_CHARS_MEDIUM] = "Medium", @@ -177,7 +177,7 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_DLSS_DLAA] = "DLAA (native)", [UI_MENU_DLSS_QUALITY] = "Quality", [UI_MENU_DLSS_BALANCED] = "Balanced", [UI_MENU_DLSS_PERFORMANCE] = "Performance", [UI_MENU_DLSS_ULTRA] = "Ultra Performance", [UI_MENU_FXAA] = "Game anti-aliasing (FXAA)", - [UI_MENU_FXAA_DESC] = "The game's own FXAA edge smoothing. It blurs fine detail a little; with DLAA on it is not needed.", + [UI_MENU_FXAA_DESC] = "The game's own FXAA edge smoothing. It blurs fine detail a little; with DLAA on it is not needed. Off while AMD FSR is on.", [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", [UI_MENU_REFLEX_DESC] = "Reduces system latency on NVIDIA GPUs using VK_NV_low_latency2. On + Boost keeps GPU clocks high in CPU-bound scenes.", [UI_MENU_REFLEX_OFF] = "Off", @@ -629,7 +629,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "Выше 100 % сглаживает лесенки на краях (суперсэмплинг) ценой большой нагрузки на GPU.", [UI_MENU_RENDER_SCALE_GAME] = "Как в игре (83 %)", [UI_MENU_DYNAMIC_RES] = "Динамическое разрешение", - [UI_MENU_DYNAMIC_RES_DESC] = "Игра снижает 3D-сцену до 90 или 80 %. Она судит по оценке для Switch, не учитывающей вашу видеокарту, поэтому широкие сцены снижаются даже на быстром ПК. Выключено: остаётся масштаб отрисовки.", + [UI_MENU_DYNAMIC_RES_DESC] = "Игра снижает 3D-сцену до 90 или 80 %. Она судит по оценке для Switch, не учитывающей вашу видеокарту, поэтому широкие сцены снижаются даже на быстром ПК. Выключено: остаётся масштаб отрисовки. Отключено при включённом AMD FSR.", [UI_MENU_UPSCALER] = "Масштабирование под окно", [UI_MENU_UPSCALER_DESC] = "Как картинка растягивается, когда окно больше разрешения игры. FSR сохраняет края и " "детали чётче билинейного.", @@ -656,7 +656,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_LOD_STEADY] = "Стабильная детализация под нагрузкой", [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_SHARPNESS_DESC] = "Насколько AMD FSR повышает резкость: 3D-сцены при апскейлере AMD FSR и картинки, которую " + "FSR 1 растягивает под окно. 0 выключает.", [UI_MENU_COLOR] = "Цвет", [UI_MENU_COLOR_PRESET] = "Цветовой профиль", [UI_MENU_COLOR_PRESET_DESC] = "Задаёт четыре значения ниже. «Яркий»: больше контраста и насыщенности, тени немного " @@ -705,15 +706,14 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_GRASS_RANGE_DESC] = "Как далеко вокруг камеры растёт трава (в игре 62,5 м). Выше: трава на лугах видна " "дальше и не вырастает прямо перед вами; ниже: травы меньше. Действует после " "перезапуска.", - [UI_MENU_DLAA] = "NVIDIA DLSS / DLAA", - [UI_MENU_DLAA_DESC] = "NVIDIA DLSS для 3D-сцены (видеокарты NVIDIA RTX; " DLSS_FILE " рядом с " EXE_FILE "): ровнее " - "края и меньше мерцания. Интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он " - "работает. Действует после перезапуска.", - [UI_MENU_DLAA_BACKEND] = "Апскейлер", - [UI_MENU_DLAA_BACKEND_DESC] = "Что работает для настройки выше. NVIDIA DLSS на видеокартах NVIDIA RTX; AMD FSR на " - "видеокартах AMD Radeon: FSR 4 на сериях RX 9000, 7000 и 6000, FSR 3.1 на остальных " - "(Windows; amd_fidelityfx_loader_vk.dll и amd_fidelityfx_upscaler_vk.dll рядом с " - EXE_FILE "). Режим ниже действует для обоих. Действует после перезапуска.", + [UI_MENU_DLAA] = "Апскейлеры", + [UI_MENU_DLAA_DESC] = "Что сглаживает и масштабирует 3D-сцену. NVIDIA DLSS: видеокарты NVIDIA RTX, " DLSS_FILE " рядом с " + EXE_FILE ". AMD FSR: видеокарты AMD Radeon, FSR 4 на сериях RX 9000, 7000 и 6000 и FSR 3.1 на " + "остальных (Windows; amd_fidelityfx_loader_vk.dll и amd_fidelityfx_upscaler_vk.dll рядом с " + EXE_FILE "); с ним FXAA игры и её динамическое разрешение выключены. Ровнее края и меньше " + "мерцания; интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он работает. " + "Действует после перезапуска.", + [UI_MENU_DLAA_OFF] = "Выкл.", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS_PRESET] = "Модель DLSS", [UI_MENU_DLSS_PRESET_DESC] = "Какая модель DLSS работает. «Автоматически» следует совету NVIDIA для каждого режима: K " @@ -722,8 +722,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "мерцания. K: самая чёткая модель во всех режимах. Действует сразу.", [UI_MENU_DLSS_PRESET_DEFAULT] = "Автоматически", [UI_MENU_DLSS_PRESET_K] = "K (самая чёткая)", [UI_MENU_DLSS_PRESET_J] = "J (меньше шлейфов)", - [UI_MENU_DLSS_CHARS] = "Шлейфы персонажей в DLSS", - [UI_MENU_DLSS_CHARS_DESC] = "Убирает слабые шлейфы за движущимися персонажами, животными и тем, что они держат: DLSS " + [UI_MENU_DLSS_CHARS] = "Шлейфы персонажей", + [UI_MENU_DLSS_CHARS_DESC] = "Убирает слабые шлейфы за движущимися персонажами, животными и тем, что они держат: апскейлер (DLSS или FSR) " "берёт там меньше от прошлых кадров. Чем сильнее, тем меньше шлейфов и тем чуть менее " "гладкие края. Действует сразу.", [UI_MENU_DLSS_CHARS_OFF] = "Выкл.", [UI_MENU_DLSS_CHARS_LIGHT] = "Слабо", [UI_MENU_DLSS_CHARS_MEDIUM] = "Средне", @@ -735,7 +735,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_DLSS_DLAA] = "DLAA (родное)", [UI_MENU_DLSS_QUALITY] = "Качество", [UI_MENU_DLSS_BALANCED] = "Баланс", [UI_MENU_DLSS_PERFORMANCE] = "Производительность", [UI_MENU_DLSS_ULTRA] = "Макс. производительность", [UI_MENU_FXAA] = "Сглаживание игры (FXAA)", - [UI_MENU_FXAA_DESC] = "Собственное сглаживание FXAA. Слегка размывает мелкие детали; с DLAA оно не нужно.", + [UI_MENU_FXAA_DESC] = "Собственное сглаживание FXAA. Слегка размывает мелкие детали; с DLAA оно не нужно. Выключено, пока работает AMD FSR.", [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", [UI_MENU_REFLEX_DESC] = "Снижает задержку системы на видеокартах NVIDIA с помощью VK_NV_low_latency2. «Вкл + Ускорение» удерживает высокие частоты GPU при упоре в процессор.", [UI_MENU_REFLEX_OFF] = "Выкл", @@ -1226,7 +1226,7 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "GPU.", [UI_MENU_RENDER_SCALE_GAME] = "Jogo (83 %)", [UI_MENU_DYNAMIC_RES] = "Resolução dinâmica", - [UI_MENU_DYNAMIC_RES_DESC] = "Deixa o jogo reduzir a cena 3D para 90 ou 80 %. Ele decide por uma estimativa feita para o Switch que ignora sua GPU, então cenas largas caem mesmo num PC rápido. Desligada, mantém a escala da renderização.", + [UI_MENU_DYNAMIC_RES_DESC] = "Deixa o jogo reduzir a cena 3D para 90 ou 80 %. Ele decide por uma estimativa feita para o Switch que ignora sua GPU, então cenas largas caem mesmo num PC rápido. Desligada, mantém a escala da renderização. Desligado quando o FSR estiver Ligado.", [UI_MENU_UPSCALER] = "Escala para a janela", [UI_MENU_UPSCALER_DESC] = "Como a imagem é ampliada quando a janela é maior que a resolução do jogo. O FSR mantém " "bordas e detalhes mais nítidos que o bilinear.", @@ -1240,7 +1240,8 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "barras pretas ou esticá-los sobre a imagem toda. Vale a partir do próximo vídeo.", [UI_MENU_MOVIE_ASPECT_KEEP] = "Barras pretas", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Esticar", [UI_MENU_SHARPNESS] = "Nitidez do FSR", - [UI_MENU_SHARPNESS_DESC] = "Aumento de nitidez após a ampliação do FSR; 0 desliga.", + [UI_MENU_SHARPNESS_DESC] = "Quanto o AMD FSR realça a nitidez: da cena 3D com o upscaler AMD FSR e da imagem que o FSR 1 " + "amplia para a janela. 0 desliga.", [UI_MENU_FPS_LIMIT] = "Limite de quadros", [UI_MENU_FPS_LIMIT_DESC] = "O máximo de quadros por segundo que o jogo desenha. Acima de 60 é experimental e " @@ -1674,15 +1675,14 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_PCSS] = "Sombras suaves", [UI_MENU_PCSS_DESC] = "Sombras do sol nítidas onde um objeto toca o chão e mais suaves quanto mais longe a sombra " "cai (PCSS). 0 mantém o filtro do jogo. Vale no próximo início.", - [UI_MENU_DLAA] = "NVIDIA DLSS / DLAA", - [UI_MENU_DLAA_DESC] = "NVIDIA DLSS para a cena 3D (placas NVIDIA RTX; nvngx_dlss.dll ao lado do totk.exe): bordas " - "mais suaves e menos cintilação. O HUD não é afetado. O modo abaixo define a resolução de " - "onde ele parte. Vale após reiniciar.", - [UI_MENU_DLAA_BACKEND] = "Upscaler", - [UI_MENU_DLAA_BACKEND_DESC] = "O que roda na opção acima. NVIDIA DLSS em placas NVIDIA RTX; AMD FSR em placas AMD " - "Radeon: FSR 4 nas séries RX 9000, 7000 e 6000, FSR 3.1 nas demais (Windows; " - "amd_fidelityfx_loader_vk.dll e amd_fidelityfx_upscaler_vk.dll ao lado do totk.exe). " - "O modo abaixo vale para os dois. Vale após reiniciar.", + [UI_MENU_DLAA] = "Upscalers", + [UI_MENU_DLAA_DESC] = "O que suaviza e amplia a cena 3D. NVIDIA DLSS: placas NVIDIA RTX, nvngx_dlss.dll ao lado do " + "totk.exe. AMD FSR: placas AMD Radeon, FSR 4 nas séries RX 9000, 7000 e 6000 e FSR 3.1 nas " + "demais (Windows; amd_fidelityfx_loader_vk.dll e amd_fidelityfx_upscaler_vk.dll ao lado do " + "totk.exe); com ele o FXAA do jogo e a resolução dinâmica ficam desligados. Bordas mais suaves " + "e menos cintilação; o HUD não é afetado. O modo abaixo define a resolução de onde ele parte. " + "Vale após reiniciar.", + [UI_MENU_DLAA_OFF] = "Desligado", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS] = "Modo do DLSS", [UI_MENU_DLSS_DESC] = "DLAA desenha a cena 3D na resolução cheia. Qualidade, Equilibrado, Desempenho e Ultra " @@ -1699,15 +1699,14 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "o modelo mais nítido em todos os modos. Vale na hora.", [UI_MENU_DLSS_PRESET_DEFAULT] = "Automático", [UI_MENU_DLSS_PRESET_K] = "K (mais nítido)", [UI_MENU_DLSS_PRESET_J] = "J (menos rastro)", - [UI_MENU_DLSS_CHARS] = "Rastros de personagens no DLSS", + [UI_MENU_DLSS_CHARS] = "Rastros de personagens", [UI_MENU_DLSS_CHARS_DESC] = "Reduz os rastros fracos atrás de personagens, animais e do que eles seguram em movimento: " - "ali o DLSS usa menos dos quadros anteriores. Mais forte remove mais rastros e deixa essas " + "ali o upscaler (DLSS ou FSR) usa menos dos quadros anteriores. Mais forte remove mais rastros e deixa essas " "bordas um pouco menos suaves. Vale na hora.", [UI_MENU_DLSS_CHARS_OFF] = "Desligado", [UI_MENU_DLSS_CHARS_LIGHT] = "Leve", [UI_MENU_DLSS_CHARS_MEDIUM] = "Médio", [UI_MENU_DLSS_CHARS_FULL] = "Total", [UI_MENU_FXAA] = "Antisserrilhado do jogo (FXAA)", - [UI_MENU_FXAA_DESC] = "A suavização de bordas FXAA do próprio jogo. Borra um pouco os detalhes finos; com o DLAA " - "ligado não é necessária.", + [UI_MENU_FXAA_DESC] = "A suavização de bordas FXAA do próprio jogo. Borra um pouco os detalhes finos; com o DLAA ligado não é necessária. Desligado enquanto o AMD FSR está ativo.", [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", [UI_MENU_REFLEX_DESC] = "Reduz a latência do sistema em GPUs NVIDIA usando VK_NV_low_latency2. Ligado + Boost mantém os clocks da GPU altos quando limitado pela CPU.", [UI_MENU_REFLEX_OFF] = "Desligado", @@ -1834,7 +1833,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { "高于 100% 会平滑锯齿边缘(超采样),但 GPU 开销很高。", [UI_MENU_RENDER_SCALE_GAME] = "游戏(83%)", [UI_MENU_DYNAMIC_RES] = "动态分辨率", - [UI_MENU_DYNAMIC_RES_DESC] = "让游戏把 3D 场景降到 90 % 或 80 %。它依据为 Switch 制定的估算,不考虑你的显卡,因此即使在高性能 PC 上宽场景也会降低。关闭时保持渲染比例。", + [UI_MENU_DYNAMIC_RES_DESC] = "让游戏把 3D 场景降到 90 % 或 80 %。它依据为 Switch 制定的估算,不考虑你的显卡,因此即使在高性能 PC 上宽场景也会降低。关闭时保持渲染比例。AMD FSR 启用时关闭。", [UI_MENU_UPSCALER] = "放大到窗口", [UI_MENU_UPSCALER_DESC] = "窗口大于游戏分辨率时画面的放大方式。" "FSR 比双线性更能保留边缘和细节。", @@ -1854,7 +1853,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_FOV_DESC] = "镜头能看到多大范围,以游戏自身视野的百分比表示。" "支持游戏版本 1.1.0 和 1.4.3。", [UI_MENU_SHARPNESS] = "FSR 锐度", - [UI_MENU_SHARPNESS_DESC] = "FSR 缩放后的锐化强度;0 为关闭。", + [UI_MENU_SHARPNESS_DESC] = "AMD FSR 的锐化强度:使用 AMD FSR 超分辨率时作用于 3D 场景,FSR 1 放大到窗口时作用于画面。0 为关闭。", [UI_MENU_COLOR] = "色彩", [UI_MENU_COLOR_PRESET] = "色彩配置", [UI_MENU_COLOR_PRESET_DESC] = "同时设置下面四项。鲜艳:对比度和饱和度更高,暗部略微提亮(为 OLED 屏幕调校)。" @@ -2365,13 +2364,12 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_CONTACT_SHADOWS_DESC] = "阴影贴图遗漏的细小太阳阴影:脚下、石头下、草丛和褶皱中。在光照之后于屏幕空间追踪。下次启动时生效。", [UI_MENU_PCSS] = "柔和阴影", [UI_MENU_PCSS_DESC] = "物体接触地面处的太阳阴影锐利,阴影投得越远越柔和(PCSS)。0 保留游戏自身的过滤。下次启动时生效。", - [UI_MENU_DLAA] = "NVIDIA DLSS / DLAA", - [UI_MENU_DLAA_DESC] = "用于 3D 场景的 NVIDIA DLSS(NVIDIA RTX 显卡;nvngx_dlss.dll 放在 totk.exe 旁):边缘更平滑,闪烁更少。HUD " - "不受影响。下方的模式决定它的工作分辨率。重启后生效。", - [UI_MENU_DLAA_BACKEND] = "超分辨率技术", - [UI_MENU_DLAA_BACKEND_DESC] = "上方选项使用的技术。NVIDIA RTX 显卡用 NVIDIA DLSS;AMD Radeon 显卡用 AMD FSR:RX 9000、7000 " - "和 6000 系列为 FSR 4,其他为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " - "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁)。下方的模式对两者都适用。重启后生效。", + [UI_MENU_DLAA] = "超分辨率技术", + [UI_MENU_DLAA_DESC] = "平滑并放大 3D 场景的技术。NVIDIA DLSS:NVIDIA RTX 显卡,nvngx_dlss.dll 放在 totk.exe 旁。AMD FSR:AMD Radeon " + "显卡,RX 9000、7000 和 6000 系列为 FSR 4,其他为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " + "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁);使用它时游戏的 FXAA 和动态分辨率关闭。边缘更平滑," + "闪烁更少;HUD 不受影响。下方的模式决定它的工作分辨率。重启后生效。", + [UI_MENU_DLAA_OFF] = "关", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", [UI_MENU_DLSS] = "DLSS 模式", [UI_MENU_DLSS_DESC] = "DLAA 以全分辨率绘制 3D 场景。质量、平衡、性能和超级性能分别以 67%、58%、50% 和 33% 绘制,再由 DLSS 放大,以节省 GPU 时间;它们会取代 3D 渲染比例。立即生效。", @@ -2385,13 +2383,13 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { "J:移动角色身后的拖影略少,闪烁略多。K:所有模式都用最清晰的模型。立即生效。", [UI_MENU_DLSS_PRESET_DEFAULT] = "自动", [UI_MENU_DLSS_PRESET_K] = "K(最清晰)", [UI_MENU_DLSS_PRESET_J] = "J(拖影更少)", - [UI_MENU_DLSS_CHARS] = "DLSS 角色拖影", - [UI_MENU_DLSS_CHARS_DESC] = "减少移动中的角色、动物及其手持物品身后的淡淡拖影:DLSS 在这些位置少用之前的帧。越强拖影越少," + [UI_MENU_DLSS_CHARS] = "角色拖影", + [UI_MENU_DLSS_CHARS_DESC] = "减少移动中的角色、动物及其手持物品身后的淡淡拖影:超分辨率技术(DLSS 或 FSR)在这些位置少用之前的帧。越强拖影越少," "这些边缘也略欠平滑。立即生效。", [UI_MENU_DLSS_CHARS_OFF] = "关", [UI_MENU_DLSS_CHARS_LIGHT] = "弱", [UI_MENU_DLSS_CHARS_MEDIUM] = "中", [UI_MENU_DLSS_CHARS_FULL] = "强", [UI_MENU_FXAA] = "游戏抗锯齿(FXAA)", - [UI_MENU_FXAA_DESC] = "游戏自身的 FXAA 边缘平滑。会让细节略微模糊;开启 DLAA 时不需要。", + [UI_MENU_FXAA_DESC] = "游戏自身的 FXAA 边缘平滑。会让细节略微模糊;开启 DLAA 时不需要。AMD FSR 开启时关闭。", [UI_MENU_REFLEX] = "NVIDIA Reflex 低延迟", [UI_MENU_REFLEX_DESC] = "在支持 VK_NV_low_latency2 的 NVIDIA 显卡上降低系统延迟。开 + 增强 (On + Boost) 会在 CPU 瓶颈时保持 GPU 高频率。", [UI_MENU_REFLEX_OFF] = "关", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index d8bad584..6a44856c 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -57,7 +57,7 @@ typedef enum { UI_MENU_GRASS_RANGE, UI_MENU_GRASS_RANGE_DESC, UI_MENU_CONTACT_SHADOWS, UI_MENU_CONTACT_SHADOWS_DESC, UI_MENU_PCSS, UI_MENU_PCSS_DESC, - UI_MENU_DLAA, UI_MENU_DLAA_DESC, UI_MENU_DLAA_BACKEND, UI_MENU_DLAA_BACKEND_DESC, UI_MENU_DLAA_BACKEND_DLSS, + UI_MENU_DLAA, UI_MENU_DLAA_DESC, UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR, UI_MENU_DLSS, UI_MENU_DLSS_DESC, UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA, UI_MENU_DLSS_PRESET, UI_MENU_DLSS_PRESET_DESC, UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J, UI_MENU_DLSS_CHARS, UI_MENU_DLSS_CHARS_DESC, diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 6d3994cf..0ec0cec0 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -252,6 +252,8 @@ static int be_available(void) { return fsr_backend() ? vk_ffx_available() : N.av int vk_dlaa_available(void) { return vk_dlaa_wanted() && be_available(); } +int vk_dlaa_fsr_on(void) { return fsr_backend() && vk_ffx_available() && cfg_bool("TOTK_DLAA"); } + static int dl_active(void); static uint64_t dl_evals(void); diff --git a/runtime/vk_dlaa.h b/runtime/vk_dlaa.h index 1675b50c..6f65e95f 100644 --- a/runtime/vk_dlaa.h +++ b/runtime/vk_dlaa.h @@ -15,6 +15,9 @@ void vk_dlaa_init(void); // 1 when dlaa is on and NGX came up with DLSS (after vk_dlaa_init): a DLSS mode's smaller scene is scaled up by DLSS. int vk_dlaa_available(void); const char *vk_dlaa_name(void); // "FSR 4.1.2" or "DLSS" once DLAA ran, NULL otherwise (the performance overlay) +// 1 while AMD FSR is the upscaler at work: dlaa is on, dlaa_backend = fsr and FSR came up (after vk_dlaa_init). The +// game's dynamic resolution (resolution.c res_dynres_live) and its FXAA (vk_dlaa_skip_draw) are off then. +int vk_dlaa_fsr_on(void); // vk_exec.c vk_exec_pass_begin, once the pass's targets are resolved and before its barrier: arms the frame on the // scene's light target or, at the first quarter-width pass after it, runs DLAA on that target. Each present ends the // frame (vk_dlaa_frame). diff --git a/totk.ini.example b/totk.ini.example index 35d7a8b9..bc5497e6 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -200,7 +200,8 @@ # Dynamic resolution: 1 lets the game lower the scene to 90 or 80 % of that size, 0 keeps it at 100 %. The game decides # by a cost estimate made for the Switch, which grows with the scene's width and ignores how fast your GPU is: a # scene wider than about 3000 pixels can drop to 80 % on any GPU. 1 is the default. 1.2.1 and 1.4.3. Changes in -# the menu take effect at once. +# the menu take effect at once. While AMD FSR is at work (dlaa = 1 with dlaa_backend = fsr) the scene stays at 100 % +# whatever this says. # dynamic_res = 1 # Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening # from 0 (off) to 100. With dlaa_backend = fsr the same sharpness also sets how much FSR sharpens the 3D scene it From e067faaa4890962d639a59adbded65b1b11b62ce Mon Sep 17 00:00:00 2001 From: Vadim Goncharov Date: Tue, 17 Nov 2026 02:13:10 +0200 Subject: [PATCH 06/66] Download FSR libraries without an AMD GPU check --- README.md | 12 ++++++------ docs/installer.md | 4 ++-- installer/cli.py | 2 +- installer/steps.py | 20 +++++--------------- installer/text/en.json | 4 ++-- installer/text/pt-BR.json | 4 ++-- installer/text/ru.json | 4 ++-- installer/text/zh-Hans.json | 4 ++-- tests/installer_test.py | 23 ++++++++++++++++++----- 9 files changed, 40 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 84c1fbdb..aca23a4c 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - Custom resolutions (1080p, 2k...), supersampling and AMD FSR 1 upscaling - NVIDIA DLSS / DLAA on RTX GPUs: the setup downloads `nvngx_dlss.dll` from NVIDIA's DLSS SDK repository (github.com/NVIDIA/DLSS, NVIDIA RTX SDK license) when it finds an RTX GPU; untick it in the setup to skip it -- AMD FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on others), in the same modes as DLSS: the setup downloads - AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, AMD FSR SDK license) when it - finds an AMD GPU; pick *Upscaler: AMD FSR* in the menu. Windows only: AMD's FSR SDK has no Linux libraries yet +- AMD FSR 4 on supported Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on other GPUs supported by the SDK), in the same + modes as DLSS: on Windows, the setup downloads AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, + AMD FSR SDK license); the SDK determines which GPU devices and upscaler versions it supports - 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 @@ -56,9 +56,9 @@ Requirements: Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA machines 2. Start `TotK-Setup.exe`. If SmartScreen warns about an unsigned app, choose *More info*, then *Run anyway*. 3. Pick your game files, the language and an install folder, and press *Start*. The setup builds the game once. With an NVIDIA RTX GPU it also downloads NVIDIA DLSS, unless you untick *Download NVIDIA DLSS*; turn DLSS on in the - menu (F1). With an AMD GPU it downloads AMD FSR the same way; in the menu turn on *NVIDIA DLSS / DLAA* and pick - *Upscaler: AMD FSR*. -4. Play `totk.exe` from the install folder. + menu (F1). If *Download AMD FSR* is selected, it downloads the FSR SDK libraries on Windows; the SDK chooses the + upscaler version supported by the GPU. In the menu, pick *AMD FSR* under *Upscalers*. + 4. Play `totk.exe` from the install folder. ### Linux diff --git a/docs/installer.md b/docs/installer.md index db17852a..4dfcb8f6 100644 --- a/docs/installer.md +++ b/docs/installer.md @@ -100,12 +100,12 @@ loads the saves 1.4.3 wrote. the library; NGX loads it from the folder of totk.exe for `dlaa` and the DLSS modes. A DLSS library already in the folder (a newer one the player put there) is kept. Without an RTX GPU the step only logs and does nothing; a failed download warns, the game runs without DLSS, and the next run of the setup tries again. -9. **FSR** (the window's tick box, on by default, or `--fsr`; Windows with an AMD GPU): download +9. **FSR** (the window's tick box, on by default, or `--fsr`; Windows): download `amd_fidelityfx_loader_vk.dll` and `amd_fidelityfx_upscaler_vk.dll` from AMD's FSR SDK repository (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, tag `v2.4.0`, `Kits/FidelityFX/signedbin/`, AMD FSR SDK license) into the install folder and check their sizes and SHA-256 (`steps.py`, `Fsr`). Both go in only when both downloaded and matched. `dlaa_backend = fsr` loads them from the folder of totk.exe. Libraries already in the folder - are kept; without an AMD GPU the step only logs; a failed download warns and the next run tries again. + are kept; the SDK selects an upscaler version supported by the GPU; a failed download warns and the next run tries again. 10. **Clean up** the temp folder, except the generated C and the objects (about 1.3 GB), and write `build-cache/rebuild.txt` in the install folder. diff --git a/installer/cli.py b/installer/cli.py index f3dfb633..3c73133c 100644 --- a/installer/cli.py +++ b/installer/cli.py @@ -11,7 +11,7 @@ line, 3 cancelled (Ctrl+C or Ctrl+Break). --dlss downloads NVIDIA's DLSS library (nvngx_dlss.dll) from NVIDIA's DLSS SDK repository into the install folder on Windows with an NVIDIA RTX GPU (steps.py, Dlss). --fsr downloads AMD's FSR loader and upscaler (amd_fidelityfx_loader_vk.dll, amd_fidelityfx_upscaler_vk.dll) from AMD's FSR SDK repository into the install folder on -Windows with an AMD GPU (steps.py, Fsr). +Windows; the SDK determines which GPU devices and upscaler versions it supports (steps.py, Fsr). """ import argparse import hashlib diff --git a/installer/steps.py b/installer/steps.py index 2ca999eb..98f820da 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -1356,23 +1356,17 @@ FSR_FILES = ( # name, size, SHA-256 FSR_LICENSE = f'https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/v{FSR_VERSION}/docs/license.md' -def amd_radeon(host): - """An AMD GPU among the host check's Vulkan devices: FSR 4 runs on Radeon RX 6000 and later, FSR 3.1 on older - ones.""" - return any('AMD' in d['name'].upper() or 'RADEON' in d['name'].upper() for d in (host or {}).get('devices', [])) - - class Fsr(Step): - """With --fsr on Windows and an AMD GPU: AMD's FSR loader and upscaler next to totk.exe. Libraries the player put - there (other versions) are kept. A failed download warns and is tried again on the next run; the game runs - without them.""" + """With --fsr on Windows: AMD's FSR loader and upscaler next to totk.exe. The SDK selects the version supported by + the GPU. Libraries the player put there (other versions) are kept. A failed download warns and is tried again on + the next run; the game runs without them.""" id = 'fsr' def key(self, ctx): if not getattr(ctx.options, 'fsr', False): - return fingerprint('fsr-1', 'off') - return fingerprint('fsr-1', FSR_VERSION, *(sha for _, _, sha in FSR_FILES)) + return fingerprint('fsr-2', 'off') + return fingerprint('fsr-2', FSR_VERSION, *(sha for _, _, sha in FSR_FILES)) def current(self, ctx, record): if record.get('failed'): @@ -1384,10 +1378,6 @@ class Fsr(Step): return {} if os.name != 'nt': return {'skipped': 'not_windows'} - if not amd_radeon(getattr(ctx, 'host', None)): - # The box is ticked by default, so most players without an AMD GPU never chose it: a log line, no warning - ctx.reporter.log('fsr: no AMD GPU among the Vulkan devices, nothing downloaded') - return {'skipped': 'no_amd'} rep = ctx.reporter present = [ctx.dest / name for name, _, _ in FSR_FILES if (ctx.dest / name).is_file()] if present: diff --git a/installer/text/en.json b/installer/text/en.json index e83becb9..08f26783 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -140,8 +140,8 @@ "ui.firmware_help": "For Chinese, Korean and Traditional Chinese text: the firmware's Contents/registered folder, for example from Ryujinx or Yuzu. The setup copies the Switch system fonts from it into the install folder.", "ui.dlss": "Download NVIDIA DLSS (nvngx_dlss.dll) for NVIDIA RTX graphics cards", "ui.dlss_help": "From NVIDIA's DLSS SDK on GitHub, under NVIDIA's RTX SDK license (github.com/NVIDIA/DLSS). It makes the dlaa and DLSS settings work; without it they do nothing.", - "ui.fsr": "Download AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) for AMD Radeon graphics cards", - "ui.fsr_help": "From AMD's FSR SDK on GitHub, under AMD's FSR SDK license (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). It lets the dlaa setting run FSR (Upscaler: AMD FSR in the menu); without it that choice does nothing.", + "ui.fsr": "Download AMD FSR SDK libraries (FSR 3.1/4) for compatible Vulkan graphics cards", + "ui.fsr_help": "From AMD's FSR SDK on GitHub, under AMD's FSR SDK license (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). The SDK selects an upscaler version supported by your GPU. Required for AMD FSR in Upscalers; without it that choice does nothing.", "ui.compressed_help": "Compressed NSZ and XCZ files work as they are: the setup unpacks them by itself (until the game data is extracted, that needs as much free space as the unpacked files take).", "ui.type_game": "Game files (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Key files (*.keys)", diff --git a/installer/text/pt-BR.json b/installer/text/pt-BR.json index be7c7c24..78795552 100644 --- a/installer/text/pt-BR.json +++ b/installer/text/pt-BR.json @@ -140,8 +140,8 @@ "ui.firmware_help": "Para textos em chinês, coreano e chinês tradicional: a pasta Contents/registered do firmware, por exemplo do Ryujinx ou do Yuzu. A instalação copia dela as fontes do sistema do Switch para a pasta de instalação.", "ui.dlss": "Baixar o NVIDIA DLSS (nvngx_dlss.dll) para placas de vídeo NVIDIA RTX", "ui.dlss_help": "Do DLSS SDK da NVIDIA no GitHub, sob a licença NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Sem ele as opções dlaa e DLSS não fazem nada.", - "ui.fsr": "Baixar o AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) para placas de vídeo AMD Radeon", - "ui.fsr_help": "Do FSR SDK da AMD no GitHub, sob a licença do AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). Permite que a opção dlaa use o FSR (Upscaler: AMD FSR no menu); sem ele essa escolha não faz nada.", + "ui.fsr": "Baixar as bibliotecas AMD FSR SDK (FSR 3.1/4) para GPUs Vulkan compatíveis", + "ui.fsr_help": "Do FSR SDK da AMD no GitHub, sob a licença do AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). O SDK escolhe a versão do upscaler compatível com sua GPU. As bibliotecas são necessárias para AMD FSR em Upscalers; sem elas essa opção não funciona.", "ui.compressed_help": "Arquivos compactados NSZ e XCZ funcionam do jeito que estão: a instalação os descompacta sozinha (para isso, até os dados do jogo serem extraídos, ela precisa de tanto espaço livre quanto ocupam os arquivos descompactados).", "ui.type_game": "Arquivos de jogo (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Arquivos de chaves (*.keys)", diff --git a/installer/text/ru.json b/installer/text/ru.json index 05001b76..1ce346a1 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -140,8 +140,8 @@ "ui.firmware_help": "Для текста на китайском и корейском: папка Contents/registered прошивки, например из Ryujinx или Yuzu. Установка скопирует из неё системные шрифты Switch в папку установки.", "ui.dlss": "Загрузить NVIDIA DLSS (nvngx_dlss.dll) для видеокарт NVIDIA RTX", "ui.dlss_help": "Из DLSS SDK от NVIDIA на GitHub, по лицензии NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Без него настройки dlaa и DLSS ничего не делают.", - "ui.fsr": "Загрузить AMD FSR 4 (amd_fidelityfx_upscaler_vk.dll) для видеокарт AMD Radeon", - "ui.fsr_help": "Из FSR SDK от AMD на GitHub, по лицензии AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). С ним настройка dlaa может работать через FSR («Апскейлер: AMD FSR» в меню); без него этот выбор ничего не делает.", + "ui.fsr": "Загрузить библиотеки AMD FSR SDK (FSR 3.1/4) для совместимых видеокарт с Vulkan", + "ui.fsr_help": "Из FSR SDK от AMD на GitHub, по лицензии AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). SDK выбирает версию апскейлера, поддерживаемую видеокартой. Библиотеки нужны для AMD FSR в пункте «Апскейлеры»; без них этот выбор ничего не делает.", "ui.compressed_help": "Сжатые файлы NSZ и XCZ подходят как есть: установка сама их распакует (для этого, пока извлекаются данные игры, нужно столько свободного места, сколько занимают распакованные файлы).", "ui.type_game": "Файлы игры (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Файлы ключей (*.keys)", diff --git a/installer/text/zh-Hans.json b/installer/text/zh-Hans.json index 8af520e4..8ae39dc1 100644 --- a/installer/text/zh-Hans.json +++ b/installer/text/zh-Hans.json @@ -140,8 +140,8 @@ "ui.firmware_help": "用于中文、韩文和繁体中文文本:固件的 Contents/registered 文件夹,例如来自 Ryujinx 或 Yuzu。安装程序会从中把 Switch 系统字体复制到安装文件夹。", "ui.dlss": "为 NVIDIA RTX 显卡下载 NVIDIA DLSS(nvngx_dlss.dll)", "ui.dlss_help": "来自 GitHub 上 NVIDIA 的 DLSS SDK,遵循 NVIDIA RTX SDK 许可(github.com/NVIDIA/DLSS)。没有它,dlaa 和 DLSS 设置不起作用。", - "ui.fsr": "为 AMD Radeon 显卡下载 AMD FSR 4(amd_fidelityfx_upscaler_vk.dll)", - "ui.fsr_help": "来自 GitHub 上 AMD 的 FSR SDK,遵循 AMD FSR SDK 许可(github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK)。有了它,dlaa 设置可以使用 FSR(菜单中的“超分辨率技术:AMD FSR”);没有它,该选项不起作用。", + "ui.fsr": "为兼容 Vulkan 的显卡下载 AMD FSR SDK 库(FSR 3.1/4)", + "ui.fsr_help": "来自 GitHub 上 AMD 的 FSR SDK,遵循 AMD FSR SDK 许可(github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK)。SDK 会选择显卡支持的超分辨率版本。要在“超分辨率技术”中使用 AMD FSR,必须安装这些库;否则该选项不起作用。", "ui.compressed_help": "压缩的 NSZ 和 XCZ 文件可以直接使用:安装程序会自行解压(在游戏数据提取完成之前,需要与解压后文件大小相同的可用空间)。", "ui.type_game": "游戏文件(NSP、XCI、NSZ、XCZ)", "ui.type_keys": "密钥文件(*.keys)", diff --git a/tests/installer_test.py b/tests/installer_test.py index 4e6c0f96..b75a28a8 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -897,7 +897,7 @@ class DlssTest(unittest.TestCase): @unittest.skipUnless(steps.os.name == 'nt', 'FSR is Windows-only') class FsrTest(unittest.TestCase): - """The FSR step: off without --fsr, needs an AMD GPU, keeps a player's libraries, installs both files or none.""" + """The FSR step: off without --fsr, Windows-only, keeps a player's libraries, installs both files or none.""" NAMES = ('amd_fidelityfx_loader_vk.dll', 'amd_fidelityfx_upscaler_vk.dll') @@ -961,10 +961,23 @@ class FsrTest(unittest.TestCase): self.assertFalse((self.dest / self.NAMES[0]).exists()) self.assertEqual(self.warnings(), ['warn.fsr_kept']) - def test_skipped_without_an_amd_gpu(self): - self.ctx.host = {'devices': [{'name': 'NVIDIA GeForce RTX 4080 SUPER', 'api': [1, 4, 0], 'type': 2}]} - self.assertEqual(steps.Fsr().run(self.ctx), {'skipped': 'no_amd'}) - self.assertEqual(self.warnings(), []) + def test_downloads_on_an_nvidia_gpu(self): + self.ctx.host = {'devices': [{'name': 'NVIDIA GeForce GTX 1050', 'api': [1, 3, 0], 'type': 2}]} + rec = steps.Fsr().run(self.ctx) + self.assertEqual(rec, {'installed': steps.FSR_VERSION}) + for name in self.NAMES: + self.assertEqual((self.dest / name).read_bytes(), (self.src / name).read_bytes()) + + def test_old_no_amd_skip_record_is_retried(self): + old_key = steps.fingerprint('fsr-1', steps.FSR_VERSION, + *(sha for _, _, sha in steps.FSR_FILES)) + state = {'format': 1, 'release': 'old', 'inputs': {}, + 'steps': {'fsr': {'key': old_key, 'release': 'old', 'skipped': 'no_amd'}}} + ctx = runner.Context(SimpleNamespace(release='new'), self.dest, self.ctx.temp, self.ctx.reporter, + self.ctx.options, state=state) + ctx.steps = [steps.Fsr()] + ctx.plan() + self.assertTrue(ctx.runs['fsr']) if __name__ == '__main__': From 48cb8a198ab49beca9abf5ac5da32f64068d3f30 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Mon, 16 Nov 2026 22:11:09 -0300 Subject: [PATCH 07/66] Tick the setup's AMD FSR box by default only with an AMD display adapter The FSR step downloads on any GPU since #1, but the box was ticked for every player. The window now lists the display adapters Windows reports (screens.windows_adapter_names) and ticks it when one is AMD, or when none could be listed. The README's install list gets its fourth step back, and the menu's Upscalers text no longer says FSR runs on AMD GPUs alone. Co-Authored-By: Claude Opus 5.5 --- README.md | 12 +++++++----- docs/installer.md | 6 ++++-- installer/gui.py | 7 +++++-- installer/guilogic.py | 9 +++++++++ installer/screens.py | 22 ++++++++++++++++++++++ installer/text/en.json | 2 +- installer/text/pt-BR.json | 2 +- installer/text/ru.json | 2 +- installer/text/zh-Hans.json | 2 +- runtime/ui_text.c | 15 +++++++++------ tests/installer_gui_test.py | 18 +++++++++++++++++- 11 files changed, 77 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index aca23a4c..05015dbc 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,9 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - NVIDIA DLSS / DLAA on RTX GPUs: the setup downloads `nvngx_dlss.dll` from NVIDIA's DLSS SDK repository (github.com/NVIDIA/DLSS, NVIDIA RTX SDK license) when it finds an RTX GPU; untick it in the setup to skip it - AMD FSR 4 on supported Radeon RX 9000, 7000 and 6000 GPUs (FSR 3.1 on other GPUs supported by the SDK), in the same - modes as DLSS: on Windows, the setup downloads AMD's signed FSR SDK libraries (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, - AMD FSR SDK license); the SDK determines which GPU devices and upscaler versions it supports + modes as DLSS: on Windows, the setup downloads AMD's signed FSR SDK libraries + (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, AMD FSR SDK license), ticked by default with an AMD GPU; the SDK + determines which GPU devices and upscaler versions it supports - 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 @@ -56,9 +57,10 @@ Requirements: Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA machines 2. Start `TotK-Setup.exe`. If SmartScreen warns about an unsigned app, choose *More info*, then *Run anyway*. 3. Pick your game files, the language and an install folder, and press *Start*. The setup builds the game once. With an NVIDIA RTX GPU it also downloads NVIDIA DLSS, unless you untick *Download NVIDIA DLSS*; turn DLSS on in the - menu (F1). If *Download AMD FSR* is selected, it downloads the FSR SDK libraries on Windows; the SDK chooses the - upscaler version supported by the GPU. In the menu, pick *AMD FSR* under *Upscalers*. - 4. Play `totk.exe` from the install folder. + menu (F1). With *Download AMD FSR* ticked (the default with an AMD GPU; tick it for another GPU) it downloads + AMD's FSR SDK libraries, and the SDK picks the upscaler version the GPU supports. In the menu, pick *AMD FSR* + under *Upscalers*. +4. Play `totk.exe` from the install folder. ### Linux diff --git a/docs/installer.md b/docs/installer.md index 4dfcb8f6..05a21a06 100644 --- a/docs/installer.md +++ b/docs/installer.md @@ -100,12 +100,14 @@ loads the saves 1.4.3 wrote. the library; NGX loads it from the folder of totk.exe for `dlaa` and the DLSS modes. A DLSS library already in the folder (a newer one the player put there) is kept. Without an RTX GPU the step only logs and does nothing; a failed download warns, the game runs without DLSS, and the next run of the setup tries again. -9. **FSR** (the window's tick box, on by default, or `--fsr`; Windows): download +9. **FSR** (the window's tick box, on by default when Windows lists an AMD display adapter, `screens.py` + `windows_adapter_names`; or `--fsr`; Windows): download `amd_fidelityfx_loader_vk.dll` and `amd_fidelityfx_upscaler_vk.dll` from AMD's FSR SDK repository (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, tag `v2.4.0`, `Kits/FidelityFX/signedbin/`, AMD FSR SDK license) into the install folder and check their sizes and SHA-256 (`steps.py`, `Fsr`). Both go in only when both downloaded and matched. `dlaa_backend = fsr` loads them from the folder of totk.exe. Libraries already in the folder - are kept; the SDK selects an upscaler version supported by the GPU; a failed download warns and the next run tries again. + are kept; the SDK selects an upscaler version supported by the GPU; a failed download warns and the next run tries + again. 10. **Clean up** the temp folder, except the generated C and the objects (about 1.3 GB), and write `build-cache/rebuild.txt` in the install folder. diff --git a/installer/gui.py b/installer/gui.py index 40840070..54fb7c92 100644 --- a/installer/gui.py +++ b/installer/gui.py @@ -37,8 +37,10 @@ except ImportError: from . import ini from . import layout as layouts from . import recent +from . import screens from .guilogic import (DONE, FAILED, PENDING, RUNNING, SKIPPED, UI_LANGUAGE_LABELS, UI_LANGUAGES, Catalog, Form, Model, - Process, amount, default_game_language, describe_event, parse_line, windows_ui_language) + Process, amount, default_game_language, describe_event, fsr_default, parse_line, + windows_ui_language) POLL_MS = 100 GLYPH = {PENDING: '\u25cb', RUNNING: '\u25b6', DONE: '\u2714', SKIPPED: '\u2013', FAILED: '\u2716'} @@ -273,7 +275,8 @@ class App: self.bind_text(dlss, 'text', 'ui.dlss') dlss.pack(anchor='w', pady=(dpi.px(8), 0)) self.label(f, 'ui.dlss_help', wraplength=WRAP, justify='left').pack(anchor='w', padx=(dpi.px(22), 0)) - self.fsr_var = tk.BooleanVar(value=True) + # ticked by default with an AMD display adapter only (guilogic.fsr_default); the player can tick it on any GPU + self.fsr_var = tk.BooleanVar(value=fsr_default(screens.windows_adapter_names())) fsr = ttk.Checkbutton(f, variable=self.fsr_var) self.bind_text(fsr, 'text', 'ui.fsr') fsr.pack(anchor='w', pady=(dpi.px(8), 0)) diff --git a/installer/guilogic.py b/installer/guilogic.py index 233d8795..09090865 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -129,6 +129,15 @@ def amount(cat, done, total, unit): # ---- the form ---------------------------------------------------------------------------------------------------- +def fsr_default(adapters): + """Whether the window ticks Download AMD FSR at start: with an AMD display adapter among adapters (their names, + screens.windows_adapter_names), and when none could be listed, as before. The step downloads on any GPU when + ticked (steps.Fsr); unticked by default on other GPUs, their players only download it when they choose to.""" + if not adapters: + return True + return any('AMD' in a.upper() or 'RADEON' in a.upper() for a in adapters) + + @dataclass class Form: base: str = '' diff --git a/installer/screens.py b/installer/screens.py index eb61c800..a4429bde 100644 --- a/installer/screens.py +++ b/installer/screens.py @@ -94,6 +94,28 @@ def windows_displays(): return out +def windows_adapter_names(): + """The names of the display adapters Windows lists (EnumDisplayDevicesW, "AMD Radeon RX 9060 XT"), without + starting Vulkan; [] elsewhere or when the call fails. The setup window decides its defaults by them before the host + check has run.""" + if os.name != 'nt': + return [] + try: + user32 = ctypes.WinDLL('user32') + out, i = [], 0 + while i < 64: + dev = DISPLAY_DEVICEW() + dev.cb = ctypes.sizeof(dev) + if not user32.EnumDisplayDevicesW(None, i, ctypes.byref(dev), 0): + break + i += 1 + if dev.DeviceString and dev.DeviceString not in out: + out.append(dev.DeviceString) + return out + except (OSError, AttributeError, ValueError): + return [] + + XRANDR = re.compile(r'\sconnected\s+(?:primary\s+)?(\d+)x(\d+)\+') diff --git a/installer/text/en.json b/installer/text/en.json index 08f26783..e6022d02 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -141,7 +141,7 @@ "ui.dlss": "Download NVIDIA DLSS (nvngx_dlss.dll) for NVIDIA RTX graphics cards", "ui.dlss_help": "From NVIDIA's DLSS SDK on GitHub, under NVIDIA's RTX SDK license (github.com/NVIDIA/DLSS). It makes the dlaa and DLSS settings work; without it they do nothing.", "ui.fsr": "Download AMD FSR SDK libraries (FSR 3.1/4) for compatible Vulkan graphics cards", - "ui.fsr_help": "From AMD's FSR SDK on GitHub, under AMD's FSR SDK license (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). The SDK selects an upscaler version supported by your GPU. Required for AMD FSR in Upscalers; without it that choice does nothing.", + "ui.fsr_help": "From AMD's FSR SDK on GitHub, under AMD's FSR SDK license (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). The SDK selects an upscaler version supported by your GPU. Required for AMD FSR in Upscalers; without it that choice does nothing. Ticked at start when the computer has an AMD graphics card.", "ui.compressed_help": "Compressed NSZ and XCZ files work as they are: the setup unpacks them by itself (until the game data is extracted, that needs as much free space as the unpacked files take).", "ui.type_game": "Game files (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Key files (*.keys)", diff --git a/installer/text/pt-BR.json b/installer/text/pt-BR.json index 78795552..6d154185 100644 --- a/installer/text/pt-BR.json +++ b/installer/text/pt-BR.json @@ -141,7 +141,7 @@ "ui.dlss": "Baixar o NVIDIA DLSS (nvngx_dlss.dll) para placas de vídeo NVIDIA RTX", "ui.dlss_help": "Do DLSS SDK da NVIDIA no GitHub, sob a licença NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Sem ele as opções dlaa e DLSS não fazem nada.", "ui.fsr": "Baixar as bibliotecas AMD FSR SDK (FSR 3.1/4) para GPUs Vulkan compatíveis", - "ui.fsr_help": "Do FSR SDK da AMD no GitHub, sob a licença do AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). O SDK escolhe a versão do upscaler compatível com sua GPU. As bibliotecas são necessárias para AMD FSR em Upscalers; sem elas essa opção não funciona.", + "ui.fsr_help": "Do FSR SDK da AMD no GitHub, sob a licença do AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). O SDK escolhe a versão do upscaler compatível com sua GPU. As bibliotecas são necessárias para AMD FSR em Upscalers; sem elas essa opção não funciona. Vem marcada quando o computador tem uma placa de vídeo AMD.", "ui.compressed_help": "Arquivos compactados NSZ e XCZ funcionam do jeito que estão: a instalação os descompacta sozinha (para isso, até os dados do jogo serem extraídos, ela precisa de tanto espaço livre quanto ocupam os arquivos descompactados).", "ui.type_game": "Arquivos de jogo (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Arquivos de chaves (*.keys)", diff --git a/installer/text/ru.json b/installer/text/ru.json index 1ce346a1..b677c53a 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -141,7 +141,7 @@ "ui.dlss": "Загрузить NVIDIA DLSS (nvngx_dlss.dll) для видеокарт NVIDIA RTX", "ui.dlss_help": "Из DLSS SDK от NVIDIA на GitHub, по лицензии NVIDIA RTX SDK (github.com/NVIDIA/DLSS). Без него настройки dlaa и DLSS ничего не делают.", "ui.fsr": "Загрузить библиотеки AMD FSR SDK (FSR 3.1/4) для совместимых видеокарт с Vulkan", - "ui.fsr_help": "Из FSR SDK от AMD на GitHub, по лицензии AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). SDK выбирает версию апскейлера, поддерживаемую видеокартой. Библиотеки нужны для AMD FSR в пункте «Апскейлеры»; без них этот выбор ничего не делает.", + "ui.fsr_help": "Из FSR SDK от AMD на GitHub, по лицензии AMD FSR SDK (github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK). SDK выбирает версию апскейлера, поддерживаемую видеокартой. Библиотеки нужны для AMD FSR в пункте «Апскейлеры»; без них этот выбор ничего не делает. Отмечено по умолчанию, если в компьютере есть видеокарта AMD.", "ui.compressed_help": "Сжатые файлы NSZ и XCZ подходят как есть: установка сама их распакует (для этого, пока извлекаются данные игры, нужно столько свободного места, сколько занимают распакованные файлы).", "ui.type_game": "Файлы игры (NSP, XCI, NSZ, XCZ)", "ui.type_keys": "Файлы ключей (*.keys)", diff --git a/installer/text/zh-Hans.json b/installer/text/zh-Hans.json index 8ae39dc1..05df7cad 100644 --- a/installer/text/zh-Hans.json +++ b/installer/text/zh-Hans.json @@ -141,7 +141,7 @@ "ui.dlss": "为 NVIDIA RTX 显卡下载 NVIDIA DLSS(nvngx_dlss.dll)", "ui.dlss_help": "来自 GitHub 上 NVIDIA 的 DLSS SDK,遵循 NVIDIA RTX SDK 许可(github.com/NVIDIA/DLSS)。没有它,dlaa 和 DLSS 设置不起作用。", "ui.fsr": "为兼容 Vulkan 的显卡下载 AMD FSR SDK 库(FSR 3.1/4)", - "ui.fsr_help": "来自 GitHub 上 AMD 的 FSR SDK,遵循 AMD FSR SDK 许可(github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK)。SDK 会选择显卡支持的超分辨率版本。要在“超分辨率技术”中使用 AMD FSR,必须安装这些库;否则该选项不起作用。", + "ui.fsr_help": "来自 GitHub 上 AMD 的 FSR SDK,遵循 AMD FSR SDK 许可(github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK)。SDK 会选择显卡支持的超分辨率版本。要在“超分辨率技术”中使用 AMD FSR,必须安装这些库;否则该选项不起作用。电脑装有 AMD 显卡时默认勾选。", "ui.compressed_help": "压缩的 NSZ 和 XCZ 文件可以直接使用:安装程序会自行解压(在游戏数据提取完成之前,需要与解压后文件大小相同的可用空间)。", "ui.type_game": "游戏文件(NSP、XCI、NSZ、XCZ)", "ui.type_keys": "密钥文件(*.keys)", diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 44448e5b..34c9d835 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -150,7 +150,8 @@ static const char *const text_en[UI_TEXT_COUNT] = { "draws less of it. Takes effect at the next start.", [UI_MENU_DLAA] = "Upscalers", [UI_MENU_DLAA_DESC] = "What smooths and scales the 3D scene. NVIDIA DLSS: NVIDIA RTX GPUs, " DLSS_FILE " next to " EXE_FILE - ". AMD FSR: AMD Radeon GPUs, FSR 4 on the RX 9000, 7000 and 6000 series and FSR 3.1 elsewhere " + ". AMD FSR: FSR 4 on AMD Radeon RX 9000, 7000 and 6000, FSR 3.1 on other GPUs " + "AMD's library supports " "(Windows; amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE "); with it the game's FXAA and its dynamic resolution are off. Smoother edges and less " "shimmer; the HUD is not touched. The mode below sets the resolution it works from. Takes " @@ -708,8 +709,9 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "перезапуска.", [UI_MENU_DLAA] = "Апскейлеры", [UI_MENU_DLAA_DESC] = "Что сглаживает и масштабирует 3D-сцену. NVIDIA DLSS: видеокарты NVIDIA RTX, " DLSS_FILE " рядом с " - EXE_FILE ". AMD FSR: видеокарты AMD Radeon, FSR 4 на сериях RX 9000, 7000 и 6000 и FSR 3.1 на " - "остальных (Windows; amd_fidelityfx_loader_vk.dll и amd_fidelityfx_upscaler_vk.dll рядом с " + EXE_FILE ". AMD FSR: FSR 4 на AMD Radeon RX 9000, 7000 и 6000, FSR 3.1 на других видеокартах, " + "которые поддерживает библиотека AMD (Windows; amd_fidelityfx_loader_vk.dll и " + "amd_fidelityfx_upscaler_vk.dll рядом с " EXE_FILE "); с ним FXAA игры и её динамическое разрешение выключены. Ровнее края и меньше " "мерцания; интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он работает. " "Действует после перезапуска.", @@ -1677,8 +1679,9 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "cai (PCSS). 0 mantém o filtro do jogo. Vale no próximo início.", [UI_MENU_DLAA] = "Upscalers", [UI_MENU_DLAA_DESC] = "O que suaviza e amplia a cena 3D. NVIDIA DLSS: placas NVIDIA RTX, nvngx_dlss.dll ao lado do " - "totk.exe. AMD FSR: placas AMD Radeon, FSR 4 nas séries RX 9000, 7000 e 6000 e FSR 3.1 nas " - "demais (Windows; amd_fidelityfx_loader_vk.dll e amd_fidelityfx_upscaler_vk.dll ao lado do " + "totk.exe. AMD FSR: FSR 4 nas AMD Radeon RX 9000, 7000 e 6000, FSR 3.1 nas outras placas que a " + "biblioteca da AMD suporta (Windows; amd_fidelityfx_loader_vk.dll e " + "amd_fidelityfx_upscaler_vk.dll ao lado do " "totk.exe); com ele o FXAA do jogo e a resolução dinâmica ficam desligados. Bordas mais suaves " "e menos cintilação; o HUD não é afetado. O modo abaixo define a resolução de onde ele parte. " "Vale após reiniciar.", @@ -2366,7 +2369,7 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_PCSS_DESC] = "物体接触地面处的太阳阴影锐利,阴影投得越远越柔和(PCSS)。0 保留游戏自身的过滤。下次启动时生效。", [UI_MENU_DLAA] = "超分辨率技术", [UI_MENU_DLAA_DESC] = "平滑并放大 3D 场景的技术。NVIDIA DLSS:NVIDIA RTX 显卡,nvngx_dlss.dll 放在 totk.exe 旁。AMD FSR:AMD Radeon " - "显卡,RX 9000、7000 和 6000 系列为 FSR 4,其他为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " + "RX 9000、7000 和 6000 系列为 FSR 4,AMD 库支持的其他显卡为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁);使用它时游戏的 FXAA 和动态分辨率关闭。边缘更平滑," "闪烁更少;HUD 不受影响。下方的模式决定它的工作分辨率。重启后生效。", [UI_MENU_DLAA_OFF] = "关", diff --git a/tests/installer_gui_test.py b/tests/installer_gui_test.py index 1b31b13e..4abb0804 100644 --- a/tests/installer_gui_test.py +++ b/tests/installer_gui_test.py @@ -41,7 +41,8 @@ from installer.runner import Context # noqa: E402 from installer.steps import Fonts, all_steps # noqa: E402 from installer.guilogic import (DONE, FAILED, PENDING, RUNNING, SKIPPED, UI_LANGUAGE_LABELS, # noqa: E402 UI_LANGUAGES, Catalog, Form, Model, Process, amount, default_game_language, - describe_event, parse_line, ui_language_for_langid, windows_ui_language) + describe_event, fsr_default, parse_line, ui_language_for_langid, + windows_ui_language) INSTALLED = ROOT / 'build' / 'install-test' FIXTURE = ROOT / 'build' / 'inst-gui' / 'e2e-install' @@ -181,6 +182,21 @@ class RunStatesTest(unittest.TestCase): self.assertEqual(m.result, 'ok') +class FsrDefaultTest(unittest.TestCase): + """Download AMD FSR is ticked at start with an AMD adapter only, and when no adapter could be listed.""" + + def test_amd(self): + self.assertTrue(fsr_default(['AMD Radeon RX 9060 XT'])) + self.assertTrue(fsr_default(['Intel(R) UHD Graphics', 'AMD Radeon(TM) Graphics'])) + + def test_other_gpus(self): + self.assertFalse(fsr_default(['NVIDIA GeForce RTX 4080 SUPER'])) + self.assertFalse(fsr_default(['Intel(R) Arc(TM) A770 Graphics', 'Microsoft Basic Render Driver'])) + + def test_unknown(self): + self.assertTrue(fsr_default([])) + + class FormTest(unittest.TestCase): def setUp(self): self.tmp = tempfile.TemporaryDirectory() From 94e66ebfded85c7ec68c1bfb44650b5d18afae44 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Thu, 19 Nov 2026 21:59:05 -0300 Subject: [PATCH 08/66] Leave the setup's AMD FSR box unticked when no display adapter could be listed A player whose adapter query fails no longer downloads AMD's FSR libraries (about 36 MB) by default; the box starts ticked only where an AMD adapter is listed. Co-Authored-By: Claude Opus 5.5 --- installer/guilogic.py | 9 ++++----- tests/installer_gui_test.py | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/installer/guilogic.py b/installer/guilogic.py index f0691213..1c7df8b2 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -131,11 +131,10 @@ def amount(cat, done, total, unit): # ---- the form ---------------------------------------------------------------------------------------------------- def fsr_default(adapters): - """Whether the window ticks Download AMD FSR at start: with an AMD display adapter among adapters (their names, - screens.windows_adapter_names), and when none could be listed, as before. The step downloads on any GPU when - ticked (steps.Fsr); unticked by default on other GPUs, their players only download it when they choose to.""" - if not adapters: - return True + """Whether the window ticks Download AMD FSR at start: only with an AMD display adapter among adapters (their + names, screens.windows_adapter_names). The step downloads on any GPU when ticked (steps.Fsr); on other GPUs, and + when no adapter could be listed, the box starts unticked, so a player without an AMD GPU never downloads AMD's + libraries (about 36 MB) without choosing to.""" return any('AMD' in a.upper() or 'RADEON' in a.upper() for a in adapters) diff --git a/tests/installer_gui_test.py b/tests/installer_gui_test.py index 4abb0804..7ceae7de 100644 --- a/tests/installer_gui_test.py +++ b/tests/installer_gui_test.py @@ -183,7 +183,8 @@ class RunStatesTest(unittest.TestCase): class FsrDefaultTest(unittest.TestCase): - """Download AMD FSR is ticked at start with an AMD adapter only, and when no adapter could be listed.""" + """Download AMD FSR is ticked at start with an AMD adapter only: not with other GPUs, nor when no adapter could be + listed.""" def test_amd(self): self.assertTrue(fsr_default(['AMD Radeon RX 9060 XT'])) @@ -194,7 +195,7 @@ class FsrDefaultTest(unittest.TestCase): self.assertFalse(fsr_default(['Intel(R) Arc(TM) A770 Graphics', 'Microsoft Basic Render Driver'])) def test_unknown(self): - self.assertTrue(fsr_default([])) + self.assertFalse(fsr_default([])) class FormTest(unittest.TestCase): From 06ab655e04722b956fa4f22696a4607ba625fa44 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Thu, 19 Nov 2026 22:24:22 -0300 Subject: [PATCH 09/66] Offer AMD FSR 4 and AMD FSR 3 as separate choices of the menu's Upscalers row dlaa_backend gains fsr3, which pins the newest FSR 3 the upscaler DLL offers (3.1.6 with the SDK 2.4 libraries) on any GPU it supports; fsr keeps taking the newest FSR 4, so existing totk.ini files keep their upscaler. The row now reads Off, NVIDIA DLSS, AMD FSR 4, AMD FSR 3 on Windows, with the texts in all four menu languages. Co-Authored-By: Claude Opus 5.5 --- docs/architecture.md | 17 +++++++++-------- runtime/cfg.c | 2 +- runtime/resolution.c | 8 ++++---- runtime/ui/menu.cpp | 15 +++++++++------ runtime/ui_text.c | 29 +++++++++++++++++------------ runtime/ui_text.h | 3 ++- runtime/vk_dlaa.c | 14 +++++++------- runtime/vk_dlaa.h | 4 ++-- runtime/vk_ffx.c | 14 +++++++++----- runtime/vk_ffx.h | 2 +- totk.ini.example | 11 ++++++----- 11 files changed, 67 insertions(+), 52 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index a6f5a8c1..2d493ccb 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -137,14 +137,15 @@ Every guest thread is a host thread. TotK assumes Horizon's scheduler: three app that computes last frame's position from last frame's blocks (the game writes them into two copies that take turns; the uniform snapshot keeps both) and writes the difference into the motion image. `TOTK_MV_CHECK` measures the vectors against the picture, `TOTK_DLAA_TIMES` times the passes on the GPU. `fxaa` switches the game's own FXAA pass. -- FSR (`vk_ffx.c`, `dlaa_backend = fsr`, Windows). The same frame, jitter, motion vectors and masks go to AMD's FSR - instead of DLSS: `vk_dlaa.c` `evaluate` calls `vk_ffx_dispatch` where it would call NGX, and everything around it is - shared. `amd_fidelityfx_loader_vk.dll` (FSR SDK 2.4) is loaded at run time from the executable's folder and finds - `amd_fidelityfx_upscaler_vk.dll` next to it; only the descriptor layouts of `ffx_api_min.h` are compiled in. At - start the upscaler's versions for the device are listed and the newest FSR 4 is pinned where the DLL offers it (the - DLL decides which GPUs get it), else its default (FSR 3.1). `vk_device.c` enables `VK_KHR_cooperative_matrix` and - `VK_EXT_shader_float8` with their features when the device has them. FSR also asks for the camera's near and far - distances and field of view, which `cam_params` reads from the projection in the scene camera block. +- FSR (`vk_ffx.c`, `dlaa_backend = fsr` or `fsr3`, Windows). The same frame, jitter, motion vectors and masks go to + AMD's FSR instead of DLSS: `vk_dlaa.c` `evaluate` calls `vk_ffx_dispatch` where it would call NGX, and everything + around it is shared. `amd_fidelityfx_loader_vk.dll` (FSR SDK 2.4) is loaded at run time from the executable's folder + and finds `amd_fidelityfx_upscaler_vk.dll` next to it; only the descriptor layouts of `ffx_api_min.h` are compiled in. + At start the upscaler's versions for the device are listed and the newest FSR 4 is pinned where the DLL offers it (the + DLL decides which GPUs get it), else its default (FSR 3.1); `fsr3` pins the newest FSR 3 instead. `vk_device.c` + enables `VK_KHR_cooperative_matrix` and `VK_EXT_shader_float8` with their features when the device has them. FSR also + asks for the camera's near and far distances and field of view, which `cam_params` reads from the projection in the + scene camera block. - Occlusion queries never block the CPU; a result that is not ready counts as visible. - ASTC textures are uploaded as they are where the device reports `textureCompressionASTC_LDR`, and decoded by a compute shader everywhere else (`vk_astc.c`, `TOTK_ASTC`). The CPU decoder (`tex_astc*.c`) is the fallback and the test oracle. - Draw state. A draw whose program, bound state and textures repeat reuses the previous draw's shaders and skips rebuilding its descriptor sets; descriptor sets are written through update templates (`vk_exec_draw.c`, `vk_pipeline.c`). diff --git a/runtime/cfg.c b/runtime/cfg.c index 81babd85..79643aa2 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -141,7 +141,7 @@ static const CfgMeta metas[] = { {"HUD_WIDTH", "full", "full|21:9|16:9", RESTART}, {"DYNAMIC_RES", "1", "0|1", LIVE}, // resolution.c res_dynres_live {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, - {"DLAA", "0", "0|1", RESTART}, {"DLAA_BACKEND", "dlss", "dlss|fsr", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, + {"DLAA", "0", "0|1", RESTART}, {"DLAA_BACKEND", "dlss", "dlss|fsr|fsr3", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, {"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLSS_FIXED_EXPOSURE", "0", "0|1", LIVE}, {"DLAA_EFFECTS_AFTER", "0", "0|1", LIVE}, {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE}, {"LOD_STEADY", "0", "0|1", RESTART}, // sets steady diff --git a/runtime/resolution.c b/runtime/resolution.c index 91e2d4e9..f2906f8d 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -72,15 +72,15 @@ static struct { // The scene size is decided before the device exists, so NGX cannot be asked yet. NGX loads DLSS from nvngx_dlss.dll // next to totk.exe on Windows, libnvidia-ngx-dlss.so. next to totk on Linux (vk_dlaa.c vk_dlaa_init): // without that file DLSS never runs, and a DLSS mode would leave the game's plain scaling at 50..67 % of the output. -// With dlaa_backend = fsr the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and upscaler -// DLLs next to totk.exe; on Linux the setting is ignored and DLSS is checked (vk_dlaa.c fsr_backend). +// With dlaa_backend = fsr or fsr3 the modes scale through AMD's FSR instead (vk_ffx.c), which needs its loader and +// upscaler DLLs next to totk.exe; on Linux the setting is ignored and DLSS is checked (vk_dlaa.c fsr_backend). static int dlss_dll(void) { #ifdef _WIN32 char exe[1024], path[1024 + 48]; if (!plat_exe_path(exe, sizeof exe)) return 1; char *last = plat_last_sep(exe); if (!last) return 1; - if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) { + if (!strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3)) { snprintf(path, sizeof path, "%.*s/amd_fidelityfx_loader_vk.dll", (int)(last - exe), exe); if (!plat_file_exists(path)) return 0; snprintf(path, sizeof path, "%.*s/amd_fidelityfx_upscaler_vk.dll", (int)(last - exe), exe); @@ -136,7 +136,7 @@ static double dlss_share(const char *m) { if (!strcmp(m, dlss[i].name)) { if (dll < 0 && !(dll = dlss_dll())) { #ifdef _WIN32 - if (!strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr")) + if (!strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3)) rt_log("resolution: FSR %s needs amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll " "next to totk.exe, which are missing: the scene follows render_scale", m); else diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 3d1a32ed..f633b54d 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -731,23 +731,26 @@ static const char *present_note(void) { return note; } -// The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS or AMD FSR). -// AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend). +// The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS, AMD FSR 4 or +// AMD FSR 3). AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend). static void row_upscalers(void) { - static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR}; + static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR, + UI_MENU_DLAA_BACKEND_FSR3}; + static const char *const backends[] = {"", "dlss", "fsr", "fsr3"}; #ifdef _WIN32 - const int n = 3; + const int n = 4; #else const int n = 2; #endif - int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 2 && !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr") ? 2 : 1; + const char *be = cfg_value("TOTK_DLAA_BACKEND"); + int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 3 && !strcmp(be, "fsr3") ? 3 : n > 2 && !strcmp(be, "fsr") ? 2 : 1; int step = opt_choice_step("TOTK_DLAA", UI_MENU_DLAA, menu_text(ids[cur]), cur == 0, UI_MENU_DLAA_DESC); if (!step) return; // A / click: the next value, round to the first; left / right stop at the ends (as opt_choice_list) int nv = step == 2 ? (cur + 1) % n : cur + step < 0 ? 0 : cur + step >= n ? n - 1 : cur + step; if (nv == cur) return; cfg_set("TOTK_DLAA", nv ? "1" : "0"); - if (nv) cfg_set("TOTK_DLAA_BACKEND", nv == 2 ? "fsr" : "dlss"); // off keeps the upscaler chosen last + if (nv) cfg_set("TOTK_DLAA_BACKEND", backends[nv]); // off keeps the upscaler chosen last opt_save_soon(); } diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 8186f0c4..048013c0 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -155,14 +155,15 @@ static const char *const text_en[UI_TEXT_COUNT] = { "draws less of it. Takes effect at the next start.", [UI_MENU_DLAA] = "Upscalers", [UI_MENU_DLAA_DESC] = "What smooths and scales the 3D scene. NVIDIA DLSS: NVIDIA RTX GPUs, " DLSS_FILE " next to " EXE_FILE - ". AMD FSR: FSR 4 on AMD Radeon RX 9000, 7000 and 6000, FSR 3.1 on other GPUs " - "AMD's library supports " + ". AMD FSR 4: AMD Radeon RX 9000, 7000 and 6000 (other GPUs get FSR 3.1); AMD FSR 3: " + "FSR 3.1 on any GPU AMD's library supports " "(Windows; amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE "); with it the game's FXAA and its dynamic resolution are off. Smoother edges and less " "shimmer; the HUD is not touched. The mode below sets the resolution it works from. Takes " "effect after a restart.", [UI_MENU_DLAA_OFF] = "Off", - [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", + [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", [UI_MENU_DLSS_PRESET] = "DLSS model", [UI_MENU_DLSS_PRESET_DESC] = "Which DLSS model runs. Automatic follows NVIDIA's advice per mode: K for DLAA, Quality " "and Balanced, M for Performance, L for Ultra Performance. J: slightly less ghosting " @@ -775,14 +776,15 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "перезапуска.", [UI_MENU_DLAA] = "Апскейлеры", [UI_MENU_DLAA_DESC] = "Что сглаживает и масштабирует 3D-сцену. NVIDIA DLSS: видеокарты NVIDIA RTX, " DLSS_FILE " рядом с " - EXE_FILE ". AMD FSR: FSR 4 на AMD Radeon RX 9000, 7000 и 6000, FSR 3.1 на других видеокартах, " - "которые поддерживает библиотека AMD (Windows; amd_fidelityfx_loader_vk.dll и " + EXE_FILE ". AMD FSR 4: AMD Radeon RX 9000, 7000 и 6000 (остальные получают FSR 3.1); AMD FSR 3: " + "FSR 3.1 на любой видеокарте, которую поддерживает библиотека AMD (Windows; amd_fidelityfx_loader_vk.dll и " "amd_fidelityfx_upscaler_vk.dll рядом с " EXE_FILE "); с ним FXAA игры и её динамическое разрешение выключены. Ровнее края и меньше " "мерцания; интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он работает. " "Действует после перезапуска.", [UI_MENU_DLAA_OFF] = "Выкл.", - [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", + [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", [UI_MENU_DLSS_PRESET] = "Модель DLSS", [UI_MENU_DLSS_PRESET_DESC] = "Какая модель DLSS работает. «Автоматически» следует совету NVIDIA для каждого режима: K " "для DLAA, «Качества» и «Баланса», M для «Производительности», L для «Макс. " @@ -1838,14 +1840,16 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { "cai (PCSS). 0 mantém o filtro do jogo. Vale no próximo início.", [UI_MENU_DLAA] = "Upscalers", [UI_MENU_DLAA_DESC] = "O que suaviza e amplia a cena 3D. NVIDIA DLSS: placas NVIDIA RTX, nvngx_dlss.dll ao lado do " - "totk.exe. AMD FSR: FSR 4 nas AMD Radeon RX 9000, 7000 e 6000, FSR 3.1 nas outras placas que a " - "biblioteca da AMD suporta (Windows; amd_fidelityfx_loader_vk.dll e " + "totk.exe. AMD FSR 4: AMD Radeon RX 9000, 7000 e 6000 (as outras placas recebem o FSR 3.1); " + "AMD FSR 3: FSR 3.1 em qualquer placa que a biblioteca da AMD suporta " + "(Windows; amd_fidelityfx_loader_vk.dll e " "amd_fidelityfx_upscaler_vk.dll ao lado do " "totk.exe); com ele o FXAA do jogo e a resolução dinâmica ficam desligados. Bordas mais suaves " "e menos cintilação; o HUD não é afetado. O modo abaixo define a resolução de onde ele parte. " "Vale após reiniciar.", [UI_MENU_DLAA_OFF] = "Desligado", - [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", + [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", [UI_MENU_DLSS] = "Modo do DLSS", [UI_MENU_DLSS_DESC] = "DLAA desenha a cena 3D na resolução cheia. Qualidade, Equilibrado, Desempenho e Ultra " "Desempenho a desenham em 67, 58, 50 e 33 % e deixam o DLSS ampliá-la, o que poupa tempo da " @@ -2582,12 +2586,13 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_PCSS] = "柔和阴影", [UI_MENU_PCSS_DESC] = "物体接触地面处的太阳阴影锐利,阴影投得越远越柔和(PCSS)。0 保留游戏自身的过滤。下次启动时生效。", [UI_MENU_DLAA] = "超分辨率技术", - [UI_MENU_DLAA_DESC] = "平滑并放大 3D 场景的技术。NVIDIA DLSS:NVIDIA RTX 显卡,nvngx_dlss.dll 放在 totk.exe 旁。AMD FSR:AMD Radeon " - "RX 9000、7000 和 6000 系列为 FSR 4,AMD 库支持的其他显卡为 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " + [UI_MENU_DLAA_DESC] = "平滑并放大 3D 场景的技术。NVIDIA DLSS:NVIDIA RTX 显卡,nvngx_dlss.dll 放在 totk.exe 旁。AMD FSR 4:AMD Radeon " + "RX 9000、7000 和 6000 系列(其他显卡使用 FSR 3.1);AMD FSR 3:AMD 库支持的任何显卡上的 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁);使用它时游戏的 FXAA 和动态分辨率关闭。边缘更平滑," "闪烁更少;HUD 不受影响。下方的模式决定它的工作分辨率。重启后生效。", [UI_MENU_DLAA_OFF] = "关", - [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR", + [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", + [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", [UI_MENU_DLSS] = "DLSS 模式", [UI_MENU_DLSS_DESC] = "DLAA 以全分辨率绘制 3D 场景。质量、平衡、性能和超级性能分别以 67%、58%、50% 和 33% 绘制,再由 DLSS 放大,以节省 GPU 时间;它们会取代 3D 渲染比例。立即生效。", [UI_MENU_DLSS_DLAA] = "DLAA(原生)", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 30918d11..776ba3a5 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -59,7 +59,8 @@ typedef enum { UI_MENU_CONTACT_SHADOWS, UI_MENU_CONTACT_SHADOWS_DESC, UI_MENU_PCSS, UI_MENU_PCSS_DESC, UI_MENU_DLAA, UI_MENU_DLAA_DESC, UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, - UI_MENU_DLAA_BACKEND_FSR, UI_MENU_DLSS, UI_MENU_DLSS_DESC, UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, + UI_MENU_DLAA_BACKEND_FSR, UI_MENU_DLAA_BACKEND_FSR3, UI_MENU_DLSS, UI_MENU_DLSS_DESC, UI_MENU_DLSS_DLAA, + UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA, UI_MENU_DLSS_PRESET, UI_MENU_DLSS_PRESET_DESC, UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J, UI_MENU_DLSS_CHARS, UI_MENU_DLSS_CHARS_DESC, UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, UI_MENU_DLSS_CHARS_FULL, UI_MENU_FXAA, UI_MENU_FXAA_DESC, diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 2bb96d07..3a54e2b8 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -12,9 +12,9 @@ // // Where DLAA runs in the frame, the jitter and the motion vectors: see the sections below. // -// dlaa_backend = fsr (TOTK_DLAA_BACKEND, read at start) hands the same frame to AMD's FSR instead (vk_ffx.c): the -// arming, the jitter, the motion vectors, the masks and the copy of the result below are shared, and only the call that -// upscales differs (evaluate). NGX is then never loaded. +// dlaa_backend = fsr or fsr3 (TOTK_DLAA_BACKEND, read at start) hands the same frame to AMD's FSR instead (vk_ffx.c): +// the arming, the jitter, the motion vectors, the masks and the copy of the result below are shared, and only the call +// that upscales differs (evaluate). NGX is then never loaded. #include #include #include @@ -114,13 +114,13 @@ int vk_dlaa_wanted(void) { return wanted; } -// FSR instead of DLSS (TOTK_DLAA_BACKEND=fsr), fixed for the run like dlaa: the backend's extensions are chosen at -// device creation. AMD ships FSR's Vulkan libraries for Windows only, so on Linux the setting is ignored (the menu has -// no row for it) and DLAA stays with DLSS. +// FSR instead of DLSS (TOTK_DLAA_BACKEND=fsr, FSR 4, or fsr3, FSR 3.1: vk_ffx_init picks the version), fixed for the +// run like dlaa: the backend's extensions are chosen at device creation. AMD ships FSR's Vulkan libraries for Windows +// only, so on Linux the setting is ignored (the menu has no row for it) and DLAA stays with DLSS. static int fsr_backend(void) { static int fsr = -1; if (fsr < 0) { - fsr = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + fsr = !strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3); // fsr or fsr3 #ifndef _WIN32 if (fsr && vk_dlaa_wanted()) rt_log("dlaa: dlaa_backend = fsr runs on Windows only (AMD's FSR SDK has no Linux libraries): using DLSS"); diff --git a/runtime/vk_dlaa.h b/runtime/vk_dlaa.h index 021842c3..622d7a8b 100644 --- a/runtime/vk_dlaa.h +++ b/runtime/vk_dlaa.h @@ -15,8 +15,8 @@ void vk_dlaa_init(void); // 1 when dlaa is on and NGX came up with DLSS (after vk_dlaa_init): a DLSS mode's smaller scene is scaled up by DLSS. int vk_dlaa_available(void); const char *vk_dlaa_name(void); // "FSR 4.1.2" or "DLSS" once DLAA ran, NULL otherwise (the performance overlay) -// 1 while AMD FSR is the upscaler at work: dlaa is on, dlaa_backend = fsr and FSR came up (after vk_dlaa_init). The -// game's dynamic resolution (resolution.c res_dynres_live) and its FXAA (vk_dlaa_skip_draw) are off then. +// 1 while AMD FSR is the upscaler at work: dlaa is on, dlaa_backend = fsr or fsr3 and FSR came up (after vk_dlaa_init). +// The game's dynamic resolution (resolution.c res_dynres_live) and its FXAA (vk_dlaa_skip_draw) are off then. int vk_dlaa_fsr_on(void); // vk_exec.c vk_exec_pass_begin, once the pass's targets are resolved and before its barrier: arms the frame on the // scene's light target or, at the first quarter-width pass after it, runs DLAA on that target. Each present ends the diff --git a/runtime/vk_ffx.c b/runtime/vk_ffx.c index 72528371..0e0662d8 100644 --- a/runtime/vk_ffx.c +++ b/runtime/vk_ffx.c @@ -4,8 +4,9 @@ // code is compiled in, only the descriptor layouts of ffx_api_min.h. // // The upscaler DLL offers several versions (FSR 4.x, FSR 3.1.x) and decides by itself which ones a device can run: -// vk_ffx_init lists them and pins the newest 4.x when there is one, else leaves the DLL's default (3.1 on GPUs without -// FSR 4). Every context is created with that version (ffxOverrideVersion). +// vk_ffx_init lists them and pins the newest 4.x when there is one (dlaa_backend = fsr), or the newest 3.x +// (dlaa_backend = fsr3), else leaves the DLL's default (3.1 on GPUs without FSR 4). Every context is created with that +// version (ffxOverrideVersion). // // What FSR gets is what DLSS gets (vk_dlaa.c evaluate): the R11G11B10F light target as linear HDR colour with automatic // exposure, the D32F scene depth, motion vectors at the render size in render pixels pointing from this frame's @@ -58,7 +59,7 @@ static struct { int vk_ffx_wanted(void) { static int wanted = -1; - if (wanted < 0) wanted = cfg_bool("TOTK_DLAA") && !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr"); + if (wanted < 0) wanted = cfg_bool("TOTK_DLAA") && !strncmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr", 3); return wanted; } @@ -130,13 +131,16 @@ void vk_ffx_init(void) { } if (count > FFX_MAX_VERSIONS) count = FFX_MAX_VERSIONS; char list[256] = ""; + // dlaa_backend = fsr takes the newest FSR 4 the DLL offers for this device, fsr3 the newest FSR 3 (3.1 in the SDK + // 2.4 libraries, on any GPU the DLL supports). Without one the DLL's default stays (FSR 3.1 on GPUs without FSR 4). + int want3 = !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr3"); int best = -1, best_major = 0, best_minor = 0, best_patch = 0; for (uint64_t i = 0; i < count; i++) { const char *nm = names[i] ? names[i] : "?"; size_t used = strlen(list); snprintf(list + used, sizeof list - used, "%s%s", i ? ", " : "", nm); int ma = 0, mi = 0, pa = 0; - if (sscanf(nm, "%d.%d.%d", &ma, &mi, &pa) < 1 || ma < 4) continue; + if (sscanf(nm, "%d.%d.%d", &ma, &mi, &pa) < 1 || (want3 ? ma != 3 : ma < 4)) continue; if (best < 0 || ma > best_major || (ma == best_major && (mi > best_minor || (mi == best_minor && pa > best_patch)))) best = (int)i, best_major = ma, best_minor = mi, best_patch = pa; } @@ -148,7 +152,7 @@ void vk_ffx_init(void) { } F.available = 1; rt_log("fsr: upscaler versions for this device: %s; using %s%s", list, F.version, - best >= 0 ? "" : " (FSR 4 is not offered for this GPU)"); + best >= 0 ? "" : want3 ? " (FSR 3 is not offered for this GPU)" : " (FSR 4 is not offered for this GPU)"); } int vk_ffx_available(void) { return vk_ffx_wanted() && F.available; } diff --git a/runtime/vk_ffx.h b/runtime/vk_ffx.h index 5f4f88c7..022d94e6 100644 --- a/runtime/vk_ffx.h +++ b/runtime/vk_ffx.h @@ -4,7 +4,7 @@ #pragma once #include "vk.h" -int vk_ffx_wanted(void); // dlaa and dlaa_backend = fsr at start (the device may still lack FSR) +int vk_ffx_wanted(void); // dlaa and dlaa_backend = fsr or fsr3 at start (the device may still lack FSR) // vk_device.c, while it builds the device: the extensions FSR's shaders use (cooperative matrix, 8-bit floats) join // the list when the device has them; their feature structures are chained there. void vk_ffx_device_exts(const VkExtensionProperties *have, uint32_t nhave, const char **ext, uint32_t *n, uint32_t max); diff --git a/totk.ini.example b/totk.ini.example index 9ad4f17c..e6dbce9c 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -223,8 +223,8 @@ # Dynamic resolution: 1 lets the game lower the scene to 90 or 80 % of that size, 0 keeps it at 100 %. The game decides # by a cost estimate made for the Switch, which grows with the scene's width and ignores how fast your GPU is: a # scene wider than about 3000 pixels can drop to 80 % on any GPU. 1 is the default. 1.1.0, 1.2.1 and 1.4.3. Changes in -# the menu take effect at once. While AMD FSR is at work (dlaa = 1 with dlaa_backend = fsr) the scene stays at 100 % -# whatever this says. +# the menu take effect at once. While AMD FSR is at work (dlaa = 1 with dlaa_backend = fsr or fsr3) the scene stays +# at 100 % whatever this says. # dynamic_res = 1 # Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening # from 0 (off) to 100. With dlaa_backend = fsr the same sharpness also sets how much FSR sharpens the 3D scene it @@ -292,9 +292,10 @@ # NVIDIA driver's libnvidia-ngx.so.1 installed); elsewhere the setting does nothing. The HUD is drawn after it and is not touched. # Read at start. # dlaa = 0 -# What dlaa runs: dlss (NVIDIA DLSS, above) or fsr (AMD FSR: FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs, FSR 3.1 on -# others; Windows, with amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll from AMD's FSR SDK next to -# totk.exe, which the setup downloads). The dlss mode below applies to both; dlss_preset is DLSS's only. Read at start. +# What dlaa runs: dlss (NVIDIA DLSS, above), fsr (AMD FSR 4 on Radeon RX 9000, 7000 and 6000 GPUs, FSR 3.1 on others) +# or fsr3 (AMD FSR 3.1 on any GPU AMD's library supports). FSR runs on Windows, with amd_fidelityfx_loader_vk.dll and +# amd_fidelityfx_upscaler_vk.dll from AMD's FSR SDK next to totk.exe, which the setup downloads. The dlss mode below +# applies to all three; dlss_preset is DLSS's only. Read at start. # dlaa_backend = dlss # What DLSS works from: dlaa (the 3D scene at full size), quality, balanced, performance or ultra_performance (the # scene at 67, 58, 50 or 33 % of the output, scaled up by DLSS; these replace render_scale and sharpen texture filtering From da9c006039554e27a834fc0aa97996b66cf30be2 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Thu, 19 Nov 2026 23:13:40 -0300 Subject: [PATCH 10/66] Show the upscaler's rows by the upscaler chosen, and give FSR a sharpness of its own The Screen tab shows the upscaler mode, the character trails and the effects-after point for any upscaler, the DLSS model and fixed exposure with DLSS only, and the new fsr_sharpness (default 80) with FSR only; FSR 1's window scaling keeps sharpness, next to its own row. Rows that serve both upscalers lose DLSS from their names (Upscaler mode with Native, Fog and particles after the upscaler), and Reflex moves ahead of the upscaler's rows. Texts in all four menu languages. Co-Authored-By: Claude Opus 5.5 --- runtime/cfg.c | 6 +-- runtime/ui/menu.cpp | 67 ++++++++++++++++++--------- runtime/ui_text.c | 109 ++++++++++++++++++++++++-------------------- runtime/ui_text.h | 2 +- runtime/vk_dlaa.c | 8 ++-- totk.ini.example | 24 ++++++---- 6 files changed, 127 insertions(+), 89 deletions(-) diff --git a/runtime/cfg.c b/runtime/cfg.c index 79643aa2..4a429136 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -44,7 +44,7 @@ static const char *const known[] = { "DESC_TEMPLATE", "DESWIZZLE", "DEVICE_PROFILE", "DIALOGUE_CLICK", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_BACKEND", "DLAA_CAM_JITTER", "DLAA_EFFECTS_AFTER", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_FIXED_EXPOSURE", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", "DUMP_LOG", "DYNAMIC_RES", "DYN_DELTA", "EXEFS", "FEEDBACK", "FIXED_RES_PATCH", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FLUSH_SPAN", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FRAME_QUEUE", - "FREEZE_IDLE", "FREE_CORES", "FSR_DEBUG", "FSR_JITTER_SIGN", + "FREEZE_IDLE", "FREE_CORES", "FSR_DEBUG", "FSR_JITTER_SIGN", "FSR_SHARPNESS", "FULLSCREEN", "FXAA", "GAMEPLAY_DISTANCE_SENSITIVITY", "GAMEPLAY_ITEM_AD", "GAMEPLAY_ITEM_SENSITIVITY", "GAMEPLAY_ITEM_WHEEL", "GAMEPLAY_MAP_ZOOM", "GAMEPLAY_MAP_ZOOM_SENSITIVITY", "GAMEPLAY_ROTATION_SENSITIVITY", "GAMEPLAY_TWEAKS_ENABLED", @@ -80,7 +80,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"}, {"HUD_WIDTH", "display"}, - {"SHARPNESS", "display"}, {"DYNAMIC_RES", "display"}, {"ASPECT", "display"}, {"MOVIE_ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"}, + {"SHARPNESS", "display"}, {"FSR_SHARPNESS", "display"}, {"DYNAMIC_RES", "display"}, {"ASPECT", "display"}, {"MOVIE_ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"}, {"LOD_STEADY", "display"}, {"COLOR_PRESET", "display"}, {"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"}, {"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"}, @@ -140,7 +140,7 @@ static const CfgMeta metas[] = { {"OUTPUT_RES", "1920x1080", NULL, RESTART}, {"RENDER_SCALE", "game", "game|50|67|75|100|125|150|200", RESTART}, {"HUD_WIDTH", "full", "full|21:9|16:9", RESTART}, {"DYNAMIC_RES", "1", "0|1", LIVE}, // resolution.c res_dynres_live - {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, + {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, {"FSR_SHARPNESS", "80", "0..100", LIVE}, {"DLAA", "0", "0|1", RESTART}, {"DLAA_BACKEND", "dlss", "dlss|fsr|fsr3", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, {"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLSS_FIXED_EXPOSURE", "0", "0|1", LIVE}, {"DLAA_EFFECTS_AFTER", "0", "0|1", LIVE}, {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE}, diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index f633b54d..cdd4a465 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -733,17 +733,27 @@ static const char *present_note(void) { // The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS, AMD FSR 4 or // AMD FSR 3). AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend). +#ifdef _WIN32 +enum { UPSCALER_CHOICES = 4 }; +#else +enum { UPSCALER_CHOICES = 2 }; +#endif + +// The row's choice as the settings hold it: 0 off, 1 NVIDIA DLSS, 2 AMD FSR 4, 3 AMD FSR 3. +static int upscaler_choice(void) { + const char *be = cfg_value("TOTK_DLAA_BACKEND"); + if (!cfg_bool("TOTK_DLAA")) return 0; + if (UPSCALER_CHOICES > 3 && !strcmp(be, "fsr3")) return 3; + if (UPSCALER_CHOICES > 2 && !strcmp(be, "fsr")) return 2; + return 1; +} + static void row_upscalers(void) { static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR, UI_MENU_DLAA_BACKEND_FSR3}; static const char *const backends[] = {"", "dlss", "fsr", "fsr3"}; -#ifdef _WIN32 - const int n = 4; -#else - const int n = 2; -#endif - const char *be = cfg_value("TOTK_DLAA_BACKEND"); - int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 3 && !strcmp(be, "fsr3") ? 3 : n > 2 && !strcmp(be, "fsr") ? 2 : 1; + const int n = UPSCALER_CHOICES; + int cur = upscaler_choice(); int step = opt_choice_step("TOTK_DLAA", UI_MENU_DLAA, menu_text(ids[cur]), cur == 0, UI_MENU_DLAA_DESC); if (!step) return; // A / click: the next value, round to the first; left / right stop at the ends (as opt_choice_list) @@ -754,6 +764,33 @@ static void row_upscalers(void) { opt_save_soon(); } +// The upscaler's rows, in the Picture group: the upscaler, then the rows of the one chosen. Every upscaler takes the +// mode (the scene's size), the characters' bias mask and the effects-after point (vk_dlaa.c, shared by both); the DLSS +// model and its fixed exposure are DLSS's alone, the sharpening FSR's. The rows follow the setting, not the upscaler +// running, which changes at the next start: the player sees the rows of what they picked. +static void rows_upscaler(void) { + row_upscalers(); + int up = upscaler_choice(); + if (up) { + static const UiTextId mode[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, + UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; + opt_choice("TOTK_DLSS", UI_MENU_DLSS, mode, 5, UI_MENU_DLSS_DESC); + } + if (up == 1) { + static const UiTextId preset[] = {UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J}; + opt_choice("TOTK_DLSS_PRESET", UI_MENU_DLSS_PRESET, preset, 3, UI_MENU_DLSS_PRESET_DESC); + opt_toggle("TOTK_DLSS_FIXED_EXPOSURE", UI_MENU_DLSS_FIXED_EXPOSURE, UI_MENU_DLSS_FIXED_EXPOSURE_DESC); + } + if (up >= 2) + opt_slider("TOTK_FSR_SHARPNESS", UI_MENU_FSR_SHARPNESS, 0, 100, UI_MENU_FSR_SHARPNESS_DESC, 5, "%.0f %%"); + if (up) { + static const UiTextId chars[] = {UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, + UI_MENU_DLSS_CHARS_FULL}; + opt_choice("TOTK_DLSS_CHAR_MASK", UI_MENU_DLSS_CHARS, chars, 4, UI_MENU_DLSS_CHARS_DESC); + opt_toggle("TOTK_DLAA_EFFECTS_AFTER", UI_MENU_DLAA_EFFECTS_AFTER, UI_MENU_DLAA_EFFECTS_AFTER_DESC); + } +} + // ---- the tabs // Colour adjustment (vk_color.c): a profile writes the four values (STS78721's presets, issue #136); moving one of them // makes the profile Custom. @@ -801,6 +838,7 @@ static void tab_screen(float scale) { row_shadow_res(); static const UiTextId up[] = {UI_MENU_UPSCALER_FSR, UI_MENU_UPSCALER_BILINEAR}; opt_choice("TOTK_UPSCALER", UI_MENU_UPSCALER, up, 2, UI_MENU_UPSCALER_DESC); + opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%"); static const UiTextId aspect[] = {UI_MENU_ASPECT_FIT, UI_MENU_ASPECT_STRETCH}; opt_choice("TOTK_ASPECT", UI_MENU_ASPECT, aspect, 2, UI_MENU_ASPECT_DESC); static const UiTextId movie_aspect[] = {UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH}; @@ -815,22 +853,9 @@ static void tab_screen(float scale) { opt_toggle("TOTK_LOD_STEADY", UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC); opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%"); opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%"); - row_upscalers(); - static const UiTextId dlss[] = {UI_MENU_DLSS_DLAA, UI_MENU_DLSS_QUALITY, UI_MENU_DLSS_BALANCED, - UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA}; - opt_choice("TOTK_DLSS", UI_MENU_DLSS, dlss, 5, UI_MENU_DLSS_DESC); - static const UiTextId preset[] = {UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J}; - opt_choice("TOTK_DLSS_PRESET", UI_MENU_DLSS_PRESET, preset, 3, UI_MENU_DLSS_PRESET_DESC); - static const UiTextId chars[] = {UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, - UI_MENU_DLSS_CHARS_FULL}; - opt_choice("TOTK_DLSS_CHAR_MASK", UI_MENU_DLSS_CHARS, chars, 4, UI_MENU_DLSS_CHARS_DESC); - // FSR's sharpening, with the upscaler's rows: of the scene FSR anti-aliases (vk_dlaa.c evaluate) and of the picture - // FSR 1 scales to the window (vk_fsr.c) - opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%"); - opt_toggle("TOTK_DLSS_FIXED_EXPOSURE", UI_MENU_DLSS_FIXED_EXPOSURE, UI_MENU_DLSS_FIXED_EXPOSURE_DESC); - opt_toggle("TOTK_DLAA_EFFECTS_AFTER", UI_MENU_DLAA_EFFECTS_AFTER, UI_MENU_DLAA_EFFECTS_AFTER_DESC); static const UiTextId reflex[] = {UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST}; opt_choice("TOTK_REFLEX", UI_MENU_REFLEX, reflex, 3, UI_MENU_REFLEX_DESC); + rows_upscaler(); opt_toggle("TOTK_FXAA", UI_MENU_FXAA, UI_MENU_FXAA_DESC); rows_color(); opt_group(UI_MENU_HDR_GROUP); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 048013c0..d44d660c 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -103,9 +103,11 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_ANISO_GAME] = "Game", [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 versions 1.2.1 and 1.4.3. Leave it off on weak PCs: there this drop keeps the frame rate up.", - [UI_MENU_SHARPNESS] = "FSR sharpness", - [UI_MENU_SHARPNESS_DESC] = "How much AMD FSR sharpens: the 3D scene with the AMD FSR upscaler, and the picture FSR 1 scales to " - "the window. 0 turns it off.", + [UI_MENU_SHARPNESS] = "FSR 1 sharpness", + [UI_MENU_SHARPNESS_DESC] = "Sharpening after FSR 1 scales the picture to the window; 0 turns it off.", + [UI_MENU_FSR_SHARPNESS] = "FSR sharpness", + [UI_MENU_FSR_SHARPNESS_DESC] = "How much the AMD FSR upscaler sharpens the 3D scene it smooths; 0 turns it off. " + "Applies at once.", [UI_MENU_COLOR] = "Colour", [UI_MENU_COLOR_PRESET] = "Colour profile", [UI_MENU_COLOR_PRESET_DESC] = "Sets the four values below. Vivid: more contrast and saturation, shadows opened a " @@ -177,11 +179,11 @@ static const char *const text_en[UI_TEXT_COUNT] = { "edges a little less smooth. Applies at once.", [UI_MENU_DLSS_CHARS_OFF] = "Off", [UI_MENU_DLSS_CHARS_LIGHT] = "Light", [UI_MENU_DLSS_CHARS_MEDIUM] = "Medium", [UI_MENU_DLSS_CHARS_FULL] = "Full", - [UI_MENU_DLSS] = "DLSS mode", - [UI_MENU_DLSS_DESC] = "DLAA draws the 3D scene at full resolution. Quality, Balanced, Performance and Ultra " - "Performance draw it at 67, 58, 50 and 33 % and let DLSS scale it up, which saves GPU time; " - "they replace the 3D render scale. Takes effect at once.", - [UI_MENU_DLSS_DLAA] = "DLAA (native)", [UI_MENU_DLSS_QUALITY] = "Quality", [UI_MENU_DLSS_BALANCED] = "Balanced", + [UI_MENU_DLSS] = "Upscaler mode", + [UI_MENU_DLSS_DESC] = "Native draws the 3D scene at full resolution. Quality, Balanced, Performance and Ultra " + "Performance draw it at 67, 58, 50 and 33 % and let the upscaler (DLSS or FSR) scale it up, " + "which saves GPU time; they replace the 3D render scale. Takes effect at once.", + [UI_MENU_DLSS_DLAA] = "Native", [UI_MENU_DLSS_QUALITY] = "Quality", [UI_MENU_DLSS_BALANCED] = "Balanced", [UI_MENU_DLSS_PERFORMANCE] = "Performance", [UI_MENU_DLSS_ULTRA] = "Ultra Performance", [UI_MENU_FXAA] = "Game anti-aliasing (FXAA)", [UI_MENU_FXAA_DESC] = "The game's own FXAA edge smoothing. It blurs fine detail a little; with DLAA on it is not needed. Off while AMD FSR is on.", @@ -528,12 +530,12 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_FIX_C0_DESC] = "Fills the driver-reserved constant bank c0 (storage sizes, dispatch size, point size, base instance) instead of reading zeros.", [UI_MENU_FIX_ZERO] = "Zero new GPU memory", [UI_MENU_FIX_ZERO_DESC] = "New GPU memory pools start zero-filled, as Switch memory does.", - [UI_MENU_DLAA_EFFECTS_AFTER] = "Fog and particles after DLAA", - [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "With DLAA, fog, dust and other particles are drawn over the picture DLSS has" - " already smoothed, as the game draws them without DLSS: small particles in " - "fog (shrines) no longer vanish or leave trails. Off: DLSS also processes " - "these effects, as before. DLAA mode only; the upscaling DLSS modes always " - "process them. Applies at once.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Fog and particles after the upscaler", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "In the Native mode, fog, dust and other particles are drawn over the picture " + "the upscaler (DLSS or FSR) has already smoothed, as the game draws them " + "without it: small particles in fog (shrines) no longer vanish or leave " + "trails. Off: the upscaler also processes these effects, as before. The " + "upscaling modes always process them. Applies at once.", [UI_MENU_DLSS_FIXED_EXPOSURE] = "Fixed DLSS exposure", [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS takes the brightness of the game's picture as it is instead of " "estimating the exposure from each frame: in dark scenes (the Depths) large " @@ -723,9 +725,11 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_ANISO_GAME] = "Игра", [UI_MENU_LOD_STEADY] = "Стабильная детализация под нагрузкой", [UI_MENU_LOD_STEADY_DESC] = "Пропускает настройку игры, снижающую детализацию моделей и текстур при падении частоты кадров, как эмуляторный мод Disable LOD Quality Reduction. Только для версий игры 1.2.1 и 1.4.3. На слабых ПК не включайте: там это снижение и держит частоту кадров.", - [UI_MENU_SHARPNESS] = "Резкость FSR", - [UI_MENU_SHARPNESS_DESC] = "Насколько AMD FSR повышает резкость: 3D-сцены при апскейлере AMD FSR и картинки, которую " - "FSR 1 растягивает под окно. 0 выключает.", + [UI_MENU_SHARPNESS] = "Резкость FSR 1", + [UI_MENU_SHARPNESS_DESC] = "Повышение резкости после масштабирования FSR 1 под окно; 0 выключает его.", + [UI_MENU_FSR_SHARPNESS] = "Резкость FSR", + [UI_MENU_FSR_SHARPNESS_DESC] = "Насколько апскейлер AMD FSR повышает резкость сглаженной им 3D-сцены; 0 выключает. " + "Применяется сразу.", [UI_MENU_COLOR] = "Цвет", [UI_MENU_COLOR_PRESET] = "Цветовой профиль", [UI_MENU_COLOR_PRESET_DESC] = "Задаёт четыре значения ниже. «Яркий»: больше контраста и насыщенности, тени немного " @@ -798,11 +802,12 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "гладкие края. Действует сразу.", [UI_MENU_DLSS_CHARS_OFF] = "Выкл.", [UI_MENU_DLSS_CHARS_LIGHT] = "Слабо", [UI_MENU_DLSS_CHARS_MEDIUM] = "Средне", [UI_MENU_DLSS_CHARS_FULL] = "Полностью", - [UI_MENU_DLSS] = "Режим DLSS", - [UI_MENU_DLSS_DESC] = "DLAA рисует 3D-сцену в полном разрешении. «Качество», «Баланс», «Производительность» и " - "«Макс. производительность» рисуют её в 67, 58, 50 и 33 % и масштабируют через DLSS, что " - "экономит время видеокарты; они заменяют масштаб 3D-отрисовки. Действует сразу.", - [UI_MENU_DLSS_DLAA] = "DLAA (родное)", [UI_MENU_DLSS_QUALITY] = "Качество", [UI_MENU_DLSS_BALANCED] = "Баланс", + [UI_MENU_DLSS] = "Режим апскейлера", + [UI_MENU_DLSS_DESC] = "«Родное» рисует 3D-сцену в полном разрешении. «Качество», «Баланс», «Производительность» и " + "«Макс. производительность» рисуют её в 67, 58, 50 и 33 % и масштабируют через апскейлер " + "(DLSS или FSR), что экономит время видеокарты; они заменяют масштаб 3D-отрисовки. Действует " + "сразу.", + [UI_MENU_DLSS_DLAA] = "Родное", [UI_MENU_DLSS_QUALITY] = "Качество", [UI_MENU_DLSS_BALANCED] = "Баланс", [UI_MENU_DLSS_PERFORMANCE] = "Производительность", [UI_MENU_DLSS_ULTRA] = "Макс. производительность", [UI_MENU_FXAA] = "Сглаживание игры (FXAA)", [UI_MENU_FXAA_DESC] = "Собственное сглаживание FXAA. Слегка размывает мелкие детали; с DLAA оно не нужно. Выключено, пока работает AMD FSR.", @@ -1151,11 +1156,11 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_FIX_C0_DESC] = "Заполняет зарезервированный драйвером банк констант c0 (размеры хранилищ, размер запуска, размер точки, базовый экземпляр) вместо чтения нулей.", [UI_MENU_FIX_ZERO] = "Обнулять новую память GPU", [UI_MENU_FIX_ZERO_DESC] = "Новые пулы памяти GPU заполняются нулями, как память Switch.", - [UI_MENU_DLAA_EFFECTS_AFTER] = "Туман и частицы после DLAA", - [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "С DLAA туман, пыль и другие частицы рисуются поверх картинки, уже сглаженной" - " DLSS, как игра рисует их без DLSS: мелкие частицы в тумане (святилища) " - "больше не пропадают и не оставляют шлейфов. Выкл.: DLSS обрабатывает и эти " - "эффекты, как раньше. Только в режиме DLAA; режимы DLSS с повышением " + [UI_MENU_DLAA_EFFECTS_AFTER] = "Туман и частицы после апскейлера", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "В режиме «Родное» туман, пыль и другие частицы рисуются поверх картинки, уже " + "сглаженной апскейлером (DLSS или FSR), как игра рисует их без него: мелкие " + "частицы в тумане (святилища) больше не пропадают и не оставляют шлейфов. " + "Выкл.: апскейлер обрабатывает и эти эффекты, как раньше. Режимы с повышением " "разрешения обрабатывают их всегда. Применяется сразу.", [UI_MENU_DLSS_FIXED_EXPOSURE] = "Фиксированная экспозиция DLSS", [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS берёт яркость картинки игры как есть, а не оценивает экспозицию по " @@ -1372,9 +1377,11 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_MOVIE_ASPECT_DESC] = "Quando a resolução do jogo não é 16:9: manter o formato dos vídeos das cenas com " "barras pretas ou esticá-los sobre a imagem toda. Vale a partir do próximo vídeo.", [UI_MENU_MOVIE_ASPECT_KEEP] = "Barras pretas", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Esticar", - [UI_MENU_SHARPNESS] = "Nitidez do FSR", - [UI_MENU_SHARPNESS_DESC] = "Quanto o AMD FSR realça a nitidez: da cena 3D com o upscaler AMD FSR e da imagem que o FSR 1 " - "amplia para a janela. 0 desliga.", + [UI_MENU_SHARPNESS] = "Nitidez do FSR 1", + [UI_MENU_SHARPNESS_DESC] = "Aumento de nitidez após o FSR 1 ampliar a imagem para a janela; 0 desliga.", + [UI_MENU_FSR_SHARPNESS] = "Nitidez do FSR", + [UI_MENU_FSR_SHARPNESS_DESC] = "Quanto o upscaler AMD FSR realça a nitidez da cena 3D que ele suaviza; 0 desliga. " + "Vale na hora.", [UI_MENU_FPS_LIMIT] = "Limite de quadros", [UI_MENU_FPS_LIMIT_DESC] = "O máximo de quadros por segundo que o jogo desenha. Acima de 60 é experimental e " @@ -1601,12 +1608,12 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_FIX_C0_DESC] = "Preenche o banco de constantes c0 reservado ao driver (tamanhos de armazenamento, tamanho do dispatch, tamanho do ponto, instância base) em vez de ler zeros.", [UI_MENU_FIX_ZERO] = "Zerar memória nova da GPU", [UI_MENU_FIX_ZERO_DESC] = "Novos pools de memória da GPU começam zerados, como a memória do Switch.", - [UI_MENU_DLAA_EFFECTS_AFTER] = "Névoa e partículas após o DLAA", - [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Com DLAA, a névoa, a poeira e outras partículas são desenhadas sobre a " - "imagem já suavizada pelo DLSS, como o jogo as desenha sem DLSS: partículas " - "pequenas na névoa (santuários) não somem mais nem deixam rastros. Desligado:" - " o DLSS também processa esses efeitos, como antes. Só no modo DLAA; os modos" - " de DLSS que aumentam a resolução sempre os processam. Aplica-se na hora.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Névoa e partículas após o upscaler", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "No modo Nativo, a névoa, a poeira e outras partículas são desenhadas sobre a " + "imagem já suavizada pelo upscaler (DLSS ou FSR), como o jogo as desenha sem " + "ele: partículas pequenas na névoa (santuários) não somem mais nem deixam " + "rastros. Desligado: o upscaler também processa esses efeitos, como antes. Os " + "modos que aumentam a resolução sempre os processam. Aplica-se na hora.", [UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposição fixa do DLSS", [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "O DLSS usa o brilho da imagem do jogo como ele é, em vez de estimar a " "exposição a cada quadro: em cenas escuras (as Profundezas), grandes áreas com " @@ -1850,11 +1857,11 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_DLAA_OFF] = "Desligado", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", - [UI_MENU_DLSS] = "Modo do DLSS", - [UI_MENU_DLSS_DESC] = "DLAA desenha a cena 3D na resolução cheia. Qualidade, Equilibrado, Desempenho e Ultra " - "Desempenho a desenham em 67, 58, 50 e 33 % e deixam o DLSS ampliá-la, o que poupa tempo da " - "GPU; eles substituem a escala 3D. Vale na hora.", - [UI_MENU_DLSS_DLAA] = "DLAA (nativo)", + [UI_MENU_DLSS] = "Modo do upscaler", + [UI_MENU_DLSS_DESC] = "Nativo desenha a cena 3D na resolução cheia. Qualidade, Equilibrado, Desempenho e Ultra " + "Desempenho a desenham em 67, 58, 50 e 33 % e deixam o upscaler (DLSS ou FSR) ampliá-la, o " + "que poupa tempo da GPU; eles substituem a escala 3D. Vale na hora.", + [UI_MENU_DLSS_DLAA] = "Nativo", [UI_MENU_DLSS_QUALITY] = "Qualidade", [UI_MENU_DLSS_BALANCED] = "Equilibrado", [UI_MENU_DLSS_PERFORMANCE] = "Desempenho", [UI_MENU_DLSS_ULTRA] = "Ultra Desempenho", @@ -2049,8 +2056,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_FOV] = "视野", [UI_MENU_FOV_DESC] = "镜头能看到多大范围,以游戏自身视野的百分比表示。" "支持游戏版本 1.1.0、1.2.1 和 1.4.3。", - [UI_MENU_SHARPNESS] = "FSR 锐度", - [UI_MENU_SHARPNESS_DESC] = "AMD FSR 的锐化强度:使用 AMD FSR 超分辨率时作用于 3D 场景,FSR 1 放大到窗口时作用于画面。0 为关闭。", + [UI_MENU_SHARPNESS] = "FSR 1 锐度", + [UI_MENU_SHARPNESS_DESC] = "FSR 1 放大到窗口后的锐化强度;0 为关闭。", + [UI_MENU_FSR_SHARPNESS] = "FSR 锐度", + [UI_MENU_FSR_SHARPNESS_DESC] = "AMD FSR 超分辨率对其平滑的 3D 场景的锐化强度;0 为关闭。立即生效。", [UI_MENU_COLOR] = "色彩", [UI_MENU_COLOR_PRESET] = "色彩配置", [UI_MENU_COLOR_PRESET_DESC] = "同时设置下面四项。鲜艳:对比度和饱和度更高,暗部略微提亮(为 OLED 屏幕调校)。" @@ -2374,10 +2383,9 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { "基础实例),而不是读取零值。", [UI_MENU_FIX_ZERO] = "清零新的 GPU 内存", [UI_MENU_FIX_ZERO_DESC] = "新的 GPU 内存池初始内容为零,与 Switch 内存一致。", - [UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 之后绘制雾和粒子", - [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "开启 DLAA 时,雾、灰尘和其他粒子绘制在 DLSS 已平滑的画面之上,与游戏不用 DLSS 时的" - "绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。关闭:DLSS 也处理这些效果,与以" - "前相同。仅用于 DLAA 模式;提升分辨率的 DLSS 模式始终处理它们。立即生效。", + [UI_MENU_DLAA_EFFECTS_AFTER] = "超分辨率之后绘制雾和粒子", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "在原生模式下,雾、灰尘和其他粒子绘制在超分辨率技术(DLSS 或 " + "FSR)已平滑的画面之上,与游戏不用它时的绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。关闭:超分辨率技术也处理这些效果,与以前相同。提升分辨率的模式始终处理它们。立即生效。", [UI_MENU_DLSS_FIXED_EXPOSURE] = "固定 DLSS 曝光", [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS 直接使用游戏画面的亮度,而不是逐帧自行估算曝光:在暗场景(地底)中," "镜头移动时大片雾中区域不再忽暗忽亮一帧。关闭:DLSS 自行估算曝光,与以前相同。立即生效。", @@ -2593,9 +2601,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_DLAA_OFF] = "关", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", - [UI_MENU_DLSS] = "DLSS 模式", - [UI_MENU_DLSS_DESC] = "DLAA 以全分辨率绘制 3D 场景。质量、平衡、性能和超级性能分别以 67%、58%、50% 和 33% 绘制,再由 DLSS 放大,以节省 GPU 时间;它们会取代 3D 渲染比例。立即生效。", - [UI_MENU_DLSS_DLAA] = "DLAA(原生)", + [UI_MENU_DLSS] = "超分辨率模式", + [UI_MENU_DLSS_DESC] = "原生以全分辨率绘制 3D 场景。质量、平衡、性能和超级性能分别以 67%、58%、50% 和 33% 绘制,再由超分辨率技术(DLSS 或 FSR)放大,以节省 GPU " + "时间;它们会取代 3D 渲染比例。立即生效。", + [UI_MENU_DLSS_DLAA] = "原生", [UI_MENU_DLSS_QUALITY] = "质量", [UI_MENU_DLSS_BALANCED] = "平衡", [UI_MENU_DLSS_PERFORMANCE] = "性能", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 776ba3a5..a5dd6c98 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -44,7 +44,7 @@ typedef enum { UI_MENU_SHADOW_RES, UI_MENU_SHADOW_RES_DESC, UI_MENU_SHADOW_RES_GAME, UI_MENU_ANISO, UI_MENU_ANISO_DESC, UI_MENU_ANISO_GAME, UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC, - UI_MENU_SHARPNESS, UI_MENU_SHARPNESS_DESC, + UI_MENU_SHARPNESS, UI_MENU_SHARPNESS_DESC, UI_MENU_FSR_SHARPNESS, UI_MENU_FSR_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, UI_MENU_COLOR_CUSTOM, diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 3a54e2b8..4f13268b 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -1336,9 +1336,9 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) { D.reset = 1; } if (D.last_color != t->image) D.reset = 1, D.why[2]++, D.last_color = t->image; - // FSR sharpens its own output (sharpness, the setting the FSR 1 present pass reads too): the game's sharpening - // is part of its FXAA pass, which FSR's frames go without (vk_dlaa_skip_draw). - int sharp = cfg_int("TOTK_SHARPNESS"); + // FSR sharpens its own output (fsr_sharpness; the FSR 1 present pass has a sharpness of its own): the game's + // sharpening is part of its FXAA pass, which FSR's frames go without (vk_dlaa_skip_draw). + int sharp = cfg_int("TOTK_FSR_SHARPNESS"); sharp = sharp < 0 ? 0 : sharp > 100 ? 100 : sharp; // The same bias mask DLSS would get, as FSR's reactive mask: how much to favour this frame's colour VkFfxDispatch fd = {.color = {t->image, t->format, w, h}, .depth = {z->image, z->format, w, h}, @@ -1841,7 +1841,7 @@ int vk_dlaa_skip_draw(VkExec *ex, const GfxShader *fs) { if (fsr_in_place) { static int logged_fxaa, logged_copy; if (known && ex->depth.image) { - if (!logged_fxaa) logged_fxaa = 1, rt_log("dlaa: FSR skips the game's FXAA (fragment shader %016llx) and sharpens its own picture (sharpness)", (unsigned long long)h); + if (!logged_fxaa) logged_fxaa = 1, rt_log("dlaa: FSR skips the game's FXAA (fragment shader %016llx) and sharpens its own picture (fsr_sharpness)", (unsigned long long)h); return 1; } // the copy shader drawing the scene target onto itself: the frames below the first resolution tier diff --git a/totk.ini.example b/totk.ini.example index e6dbce9c..b18f39de 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -226,9 +226,9 @@ # the menu take effect at once. While AMD FSR is at work (dlaa = 1 with dlaa_backend = fsr or fsr3) the scene stays # at 100 % whatever this says. # dynamic_res = 1 -# Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening -# from 0 (off) to 100. With dlaa_backend = fsr the same sharpness also sets how much FSR sharpens the 3D scene it -# anti-aliases. Changes while the game runs take effect at once. +# Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR 1's +# sharpening from 0 (off) to 100 (the FSR upscaler of dlaa_backend has fsr_sharpness). Changes while the game runs take +# effect at once. # upscaler = fsr # sharpness = 80 # Picture shape when the window's shape differs from the game resolution's (a 16:9 picture in a 21:9 fullscreen @@ -297,10 +297,14 @@ # amd_fidelityfx_upscaler_vk.dll from AMD's FSR SDK next to totk.exe, which the setup downloads. The dlss mode below # applies to all three; dlss_preset is DLSS's only. Read at start. # dlaa_backend = dlss -# What DLSS works from: dlaa (the 3D scene at full size), quality, balanced, performance or ultra_performance (the -# scene at 67, 58, 50 or 33 % of the output, scaled up by DLSS; these replace render_scale and sharpen texture filtering -# to match). They apply only with dlaa = 1 and the DLSS model next to the executable; otherwise the scene follows -# render_scale. Changes while the game runs take effect at once (1.4.3; 1.2.1 at the next start). +# How much the AMD FSR upscaler (dlaa_backend = fsr or fsr3) sharpens the 3D scene it smooths, from 0 (off) to 100. +# Changes while the game runs take effect at once. +# fsr_sharpness = 80 +# What the upscaler (DLSS or FSR; the menu's Upscaler mode) works from: dlaa (the 3D scene at full size, Native in the +# menu), quality, balanced, performance or ultra_performance (the scene at 67, 58, 50 or 33 % of the output, scaled up; +# these replace render_scale and sharpen texture filtering to match). They apply only with dlaa = 1 and the upscaler's +# library next to the executable; otherwise the scene follows render_scale. Changes while the game runs take effect at +# once (1.4.3; 1.2.1 at the next start). # dlss = dlaa # The DLSS model: default (NVIDIA's advice per mode: K for dlaa, quality and balanced, M for performance, L for # ultra_performance), k (K in every mode) or j (the other transformer model: slightly less ghosting behind moving @@ -330,9 +334,9 @@ # Reduces system input latency; boost keeps GPU clocks high in CPU-bound scenes. Read at start. # reflex = off # The game's own FXAA after the post effects, which also sharpens; with DLAA on it is not needed. With dlaa_backend = -# fsr and the scene as large as the game resolution it is always left out, and FSR sharpens instead (sharpness): the -# game runs it on some frames only, which made the picture go soft and sharp in turns. Changes while the game runs -# take effect at once. +# fsr and the scene as large as the game resolution it is always left out, and FSR sharpens instead (fsr_sharpness): the +# game runs it on some frames only, which made the picture go soft and sharp in turns. Changes while the game runs take +# effect at once. # fxaa = 1 # HDR output: hdr = 1 sends the picture as HDR10 (needs HDR on in Windows, "Use HDR", or a Wayland compositor with From 47871407838c0d90022e93bd781aec63dc61482a Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Thu, 19 Nov 2026 23:24:03 -0300 Subject: [PATCH 11/66] Rewrite the Upscalers description on the pattern of the original DLSS one What it is and what it gives first, then each upscaler's GPUs and files in one short sentence each (the FSR DLLs by name, as the DLSS one), then what FSR turns off, the mode below and the restart. All four menu languages. Co-Authored-By: Claude Opus 5.5 --- runtime/ui_text.c | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/runtime/ui_text.c b/runtime/ui_text.c index d44d660c..40bef8e0 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -156,13 +156,11 @@ static const char *const text_en[UI_TEXT_COUNT] = { "grass in meadows further out instead of growing it in just in front of you; lower " "draws less of it. Takes effect at the next start.", [UI_MENU_DLAA] = "Upscalers", - [UI_MENU_DLAA_DESC] = "What smooths and scales the 3D scene. NVIDIA DLSS: NVIDIA RTX GPUs, " DLSS_FILE " next to " EXE_FILE - ". AMD FSR 4: AMD Radeon RX 9000, 7000 and 6000 (other GPUs get FSR 3.1); AMD FSR 3: " - "FSR 3.1 on any GPU AMD's library supports " - "(Windows; amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE - "); with it the game's FXAA and its dynamic resolution are off. Smoother edges and less " - "shimmer; the HUD is not touched. The mode below sets the resolution it works from. Takes " - "effect after a restart.", + [UI_MENU_DLAA_DESC] = "An upscaler for the 3D scene: smoother edges and less shimmer. The HUD is not touched. NVIDIA DLSS: NVIDIA RTX " + "GPUs (" DLSS_FILE " next to " EXE_FILE "). AMD FSR 4: Radeon RX 9000, 7000 and 6000 GPUs. AMD FSR 3: most " + "other GPUs (amd_fidelityfx_loader_vk.dll and amd_fidelityfx_upscaler_vk.dll next to " EXE_FILE "). With " + "FSR, the game's FXAA and its dynamic " + "resolution are off. The mode below sets the resolution it works from. Takes effect after a restart.", [UI_MENU_DLAA_OFF] = "Off", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", @@ -779,12 +777,11 @@ static const char *const text_ru[UI_TEXT_COUNT] = { "дальше и не вырастает прямо перед вами; ниже: травы меньше. Действует после " "перезапуска.", [UI_MENU_DLAA] = "Апскейлеры", - [UI_MENU_DLAA_DESC] = "Что сглаживает и масштабирует 3D-сцену. NVIDIA DLSS: видеокарты NVIDIA RTX, " DLSS_FILE " рядом с " - EXE_FILE ". AMD FSR 4: AMD Radeon RX 9000, 7000 и 6000 (остальные получают FSR 3.1); AMD FSR 3: " - "FSR 3.1 на любой видеокарте, которую поддерживает библиотека AMD (Windows; amd_fidelityfx_loader_vk.dll и " - "amd_fidelityfx_upscaler_vk.dll рядом с " - EXE_FILE "); с ним FXAA игры и её динамическое разрешение выключены. Ровнее края и меньше " - "мерцания; интерфейс не затрагивается. Режим ниже задаёт разрешение, с которым он работает. " + [UI_MENU_DLAA_DESC] = "Апскейлер для 3D-сцены: ровнее края и меньше мерцания. Интерфейс не затрагивается. NVIDIA DLSS: видеокарты " + "NVIDIA RTX (" DLSS_FILE " рядом с " EXE_FILE "). AMD FSR 4: видеокарты Radeon RX 9000, 7000 и 6000. " + "AMD FSR 3: большинство других видеокарт (amd_fidelityfx_loader_vk.dll и " + "amd_fidelityfx_upscaler_vk.dll рядом с " EXE_FILE "). С FSR " + "FXAA игры и её динамическое разрешение выключены. Режим ниже задаёт разрешение, с которым он работает. " "Действует после перезапуска.", [UI_MENU_DLAA_OFF] = "Выкл.", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", @@ -1846,14 +1843,12 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_PCSS_DESC] = "Sombras do sol nítidas onde um objeto toca o chão e mais suaves quanto mais longe a sombra " "cai (PCSS). 0 mantém o filtro do jogo. Vale no próximo início.", [UI_MENU_DLAA] = "Upscalers", - [UI_MENU_DLAA_DESC] = "O que suaviza e amplia a cena 3D. NVIDIA DLSS: placas NVIDIA RTX, nvngx_dlss.dll ao lado do " - "totk.exe. AMD FSR 4: AMD Radeon RX 9000, 7000 e 6000 (as outras placas recebem o FSR 3.1); " - "AMD FSR 3: FSR 3.1 em qualquer placa que a biblioteca da AMD suporta " - "(Windows; amd_fidelityfx_loader_vk.dll e " - "amd_fidelityfx_upscaler_vk.dll ao lado do " - "totk.exe); com ele o FXAA do jogo e a resolução dinâmica ficam desligados. Bordas mais suaves " - "e menos cintilação; o HUD não é afetado. O modo abaixo define a resolução de onde ele parte. " - "Vale após reiniciar.", + [UI_MENU_DLAA_DESC] = "Upscaler para a cena 3D: bordas mais suaves e menos cintilação. O HUD não é afetado. NVIDIA DLSS: placas " + "NVIDIA RTX (nvngx_dlss.dll ao lado do totk.exe). AMD FSR 4: placas Radeon RX 9000, 7000 e 6000. AMD FSR 3: " + "a maioria das outras placas (amd_fidelityfx_loader_vk.dll e amd_fidelityfx_upscaler_vk.dll ao lado do " + "totk.exe). Com o FSR, o FXAA do " + "jogo e a resolução dinâmica ficam desligados. O modo abaixo define a resolução de onde ele parte. Vale " + "após reiniciar.", [UI_MENU_DLAA_OFF] = "Desligado", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", @@ -2594,10 +2589,10 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_PCSS] = "柔和阴影", [UI_MENU_PCSS_DESC] = "物体接触地面处的太阳阴影锐利,阴影投得越远越柔和(PCSS)。0 保留游戏自身的过滤。下次启动时生效。", [UI_MENU_DLAA] = "超分辨率技术", - [UI_MENU_DLAA_DESC] = "平滑并放大 3D 场景的技术。NVIDIA DLSS:NVIDIA RTX 显卡,nvngx_dlss.dll 放在 totk.exe 旁。AMD FSR 4:AMD Radeon " - "RX 9000、7000 和 6000 系列(其他显卡使用 FSR 3.1);AMD FSR 3:AMD 库支持的任何显卡上的 FSR 3.1(Windows;amd_fidelityfx_loader_vk.dll 和 " - "amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁);使用它时游戏的 FXAA 和动态分辨率关闭。边缘更平滑," - "闪烁更少;HUD 不受影响。下方的模式决定它的工作分辨率。重启后生效。", + [UI_MENU_DLAA_DESC] = "用于 3D 场景的超分辨率技术:边缘更平滑,闪烁更少。HUD 不受影响。NVIDIA DLSS:NVIDIA RTX 显卡(nvngx_dlss.dll " + "放在 totk.exe 旁)。AMD FSR 4:Radeon RX 9000、7000 和 6000 系列显卡。AMD FSR 3:大多数其他显卡" + "(amd_fidelityfx_loader_vk.dll 和 amd_fidelityfx_upscaler_vk.dll 放在 totk.exe 旁)。使用 FSR 时,游戏的 FXAA 和动态分辨率关闭。下方的模式决定它的工作分辨率。" + "重启后生效。", [UI_MENU_DLAA_OFF] = "关", [UI_MENU_DLAA_BACKEND_DLSS] = "NVIDIA DLSS", [UI_MENU_DLAA_BACKEND_FSR] = "AMD FSR 4", [UI_MENU_DLAA_BACKEND_FSR3] = "AMD FSR 3", From fb252ebf6b47368b51812d719811b200aa5dfe89 Mon Sep 17 00:00:00 2001 From: shinodanpen <37155065+shinodanpen@users.noreply.github.com> Date: Fri, 20 Nov 2026 02:04:06 +0000 Subject: [PATCH 12/66] Scale the thunderstorm's lightning chances by the frame so a storm above 30 fps has the lightning it has at 30 fps (#1287) In a thunderstorm the world manager's lightning update (1.4.3 main+0x62aac4, 1.2.1 main+0xab849c) runs once per frame and draws, each update, a random number in [0, 1) for each of three fixed chances: 0.013333 for a distant bolt (the effect Far_Lightning), 0.01 to pick a near strike and 0.01 for the environment's lightning flag. Its timers follow the frame step, the draws do not: above 30 fps a storm has more distant bolts and lightning flags the higher the frame rate. The new set lightning (TOTK_LIGHTNING_FIX, lightning_fix, on by default) multiplies each chance by the time object's frame ratio (+0x38), at most 1, on 1.2.1 and 1.4.3: above 30 fps the rates per second of 30 fps, and at 30 fps and below the game's own chances. Counted on 1.4.3 in the reporter's storm (205 s with the storm on, Link standing still) with a local build that logs each draw that succeeds, which this change does not contain: distant bolts 22, 52 and 94 to 96 a minute at 30, 60 and 120 fps with lightning_fix = 0, and 26, 27 and 20 to 24 with lightning_fix = 1, each one a Far_Lightning effect; the lightning flag 19, 34 and 64 to 80 times a minute of the storm's lightning phase with 0, and 12 to 17 with 1. Near strikes stayed at 14 to 18 per run at every rate with either value: each lightning phase lets its last pick strike in the phase after it, where nothing is drawn, and that phase ends with a strike of its own. On 1.2.1, which the logging build does not cover, the distant bolts were counted in screenshots of a storm in Hyrule Field (one every 0.2 s of game time, a detector of thin bright lines, each counted screenshot checked by eye at 30 fps and at 120 fps with lightning_fix = 1, a sample of 48 with 0): 19 screenshots with a distant bolt a minute at 30 fps, about 61 at 120 fps (105 to 107 fps in the storm) with lightning_fix = 0, and 15 with lightning_fix = 1. The same count on the 1.4.3 runs gives 25 to 26, 65 to 68 and 16 to 20 a minute: at high rates it misses bolts that share a screenshot. Co-Authored-By: Claude --- docs/settings.md | 1 + recomp/patches-v121.txt | 12 ++++++++++++ recomp/patches-v143.txt | 28 ++++++++++++++++++++++++++++ runtime/cfg.c | 5 +++-- totk.ini.example | 3 +++ 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 14f8207b..5258f39c 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -244,6 +244,7 @@ These names are code patch sets built into the generated game code (`recomp/patc | `fixed_res_patch` (default `0`) | Patch set that holds the game's dynamic resolution at 100 percent (the scene tier). | The resolution code switches this set from `dynamic_res` (on at `0`); a manual value is replaced. | Unknown | | `freecam_patch` (default `0`) | Patch set of the hook in the camera component update behind the free camera (`freecam_pad`, `freecam_key`) on game 1.4.3; the *Free camera* row of the Controls tab. Read at start. | `1` puts the hook in the camera update: while the free camera is off it runs the game's own load and one compare. `0` runs the game's code as shipped: the combo and the key do nothing and the game gets the combo's buttons. | Safe | | `fov_patch` (default `0`) | Patch set that scales the camera's vertical view angle by the field-of-view setting. | The resolution code switches this set itself whenever the field of view is not 100 percent; a manual value is replaced. | Unknown | +| `lightning_fix` (default `1`) | Patch set on 1.2.1 and 1.4.3 (set `lightning`; 1.4.3 main+0x62b1fc, main+0x62b3d8, main+0x62b51c; 1.2.1 main+0xab8d50, main+0xab9014, main+0xab8f90): in a thunderstorm the world manager's lightning update runs once per frame and draws, each update, a random number for each of three fixed chances, 0.013333 for a distant bolt and 0.01 for a near strike and for the environment's lightning flag that near strikes also set (#1287). The set multiplies each chance by the frame ratio, at most 1, so above 30 fps a storm has as much lightning per second as at 30 fps; at 30 fps and below the chances are the game's own. Game 1.1.0 has no site and keeps the game's code. | `0` runs the game's code: the higher the frame rate, the more distant bolts and lightning flags. Counted on 1.4.3 in one storm (205 s, the reporter's save) with a local build that logs each draw that succeeds: distant bolts 22, 52 and 94 to 96 a minute at 30, 60 and 120 fps with `0`, and 26, 27 and 20 to 24 with `1`; the lightning flag 19, 34 and 64 to 80 a minute of the storm's lightning phase with `0`, 12 to 17 with `1`. Near strikes stayed at 14 to 18 per run at every rate with either value. On 1.2.1 counted from screenshots only (no logging build; a storm in Hyrule Field, one screenshot every 0.2 s, each counted bolt checked by eye): 19 screenshots with a distant bolt a minute at 30 fps, about 61 at 120 fps with `0`, 15 with `1`; the same count on 1.4.3 gives 25 to 26, 65 to 68 and 16 to 20. | Safe | | `mouse_direct_patch` (default `1`) | Patch set of the hooks in the game's camera code behind `mouse_mode = direct` on game 1.4.3. | `0` stops `mouse_mode = direct` from taking effect; other mouse modes are unaffected. | Safe | | `optref_guard` (default `1`) | Patch set that treats a negative value in the optional reference at object +0x6b0 (1.4.3 main+0x1bd01c0, 1.2.1 main+0x1622bec) as absent instead of loading through it (#1005). | `0` runs the game's code as shipped: the random crash reading `0xffffffffffffffff` after minutes to hours of play can return. | Risky | | `patch_output` (default `0`) | Patch set that makes the game use the configured output size for its swapchain and display configuration. | The resolution code switches this set whenever the output differs from the base size; a manual value is replaced. | Unknown | diff --git a/recomp/patches-v121.txt b/recomp/patches-v121.txt index ef68255e..a28a7592 100644 --- a/recomp/patches-v121.txt +++ b/recomp/patches-v121.txt @@ -1209,3 +1209,15 @@ site ability main 1622bf4 b4000155 aa0903f5 b4000155 # cbz x21 -> mov x21, x9; # the game with the set off in two runs of two, a pause of 1 s in none of one. set audiodrain TOTK_AUDIO_DRAIN_FIX 1 site audiodrain main 883780 17fffee6 17fffeda # b 0x883318 -> b 0x8832e8 + +# Thunderstorm lightning (issue #1287): as in patches-v143.txt, the same update (main+0xab849c, called from +# main+0xab7cf4) with the same chances and timers. The sites are the loads of 0.013333 (distant bolt) and of 0.01 (state +# 1, both draws through s9, which the prologue saves; state 5). The time object is loaded as the game's own trampoline +# check does (main+0xbda4bc): its global through the GOT slot main+0x462e038, then +0xc8. After each site x10, s2 and s3 +# are written, or a call comes, before any read. +set lightning TOTK_LIGHTNING_FIX 1 +site lightning main ab8d50 bd43fd01 bd43fd01 d001dbaa f9401d4a f940014a f940654a bd403942 1e2e1003 1e237842 1e220821 # ldr s1, [x8, #0x3fc] (0.013333) +site lightning main ab9014 bd46f109 bd46f109 b001dbaa f9401d4a f940014a f940654a bd403942 1e2e1003 1e237842 1e220929 # ldr s9, [x8, #0x6f0] (0.01) +site lightning main ab8f90 bd46f101 bd46f101 d001dbaa f9401d4a f940014a f940654a bd403942 1e2e1003 1e237842 1e220821 # ldr s1, [x8, #0x6f0] (0.01) +# each: the game's load; adrp x10, main+0x462e000; ldr x10, [x10, #0x38]; ldr x10, [x10]; ldr x10, [x10, #0xc8]; +# ldr s2, [x10, #0x38] (ratio); fmov s3, #1.0; fminnm s2, s2, s3; fmul (chance * ratio) diff --git a/recomp/patches-v143.txt b/recomp/patches-v143.txt index 9c3603dc..f1a417eb 100644 --- a/recomp/patches-v143.txt +++ b/recomp/patches-v143.txt @@ -1251,3 +1251,31 @@ site shutter main 25e55d0 bc605900 bc605900 f9402ea9 927ef529 39400129 1e230123 # keep their numbers. set freecam TOTK_FREECAM_PATCH 0 site freecam main 6286d4 f9400e68 94d2de1f # ldr x8, [x19, #0x18] + +# Thunderstorm lightning (issue #1287). While the current weather type has IsThunder (main+0x62a40c), the world +# manager's lightning update (main+0x62aac4, called once per frame from main+0x62a310) runs a state machine whose times +# advance by the world's frame step: near strikes for 150 to 450 units (state 1), a phase main+0x21c34d0 ends (2), 30 +# and 240 units without (3, 4), then 1 again; 5 takes over from 1 when main+0x21d2930 returns false and leads back to 0. +# On top of it the update draws, each update, a random number in [0, 1) for each of three fixed chances: 0.013333 in +# every state but 0 for a distant bolt (bit 0 of its +8 flags, which main+0x58b4d8 hands to the environment, where +# main+0x69fb98 starts the effect Far_Lightning 2000 m from the camera along its view, picked by main+0x21c3940), 0.01 +# in state 1 to pick a near strike (a point 90 m ahead of the camera, main+0x21c4c74, struck by main+0x21c3a6c once 90 +# units of frame step pass without another pick) and 0.01 in states 1 and 5 for bit 3, which sets the environment +# input's flag +0x2e4 as a near strike does (main+0x58b4fc). Counted in one storm with a local build that logs each +# draw that succeeds: with the set off 22 distant bolts a minute at 30 fps, 52 at 60 and 94 to 96 at 120, each one a +# Far_Lightning effect, and bit 3 19, 34 and 64 to 80 times a minute of state 1. Near strikes stayed at 14 to 18 in +# 205 s at every rate: state 1 lets its last pick strike in state 2, where nothing is drawn, and state 2 ends with a +# strike of its own, so the picks that start the countdown again at high frame rates change little. Each site +# multiplies the chance it loads by the frame ratio, time object +0x38 ([[main+0x3ad27c8] + 0xc8], as the sets bounce +# and shutter read it), at most 1: above 30 fps the rates per second of 30 fps (counted: 26, 27 and 20 to 24 distant +# bolts a minute at 30, 60 and 120 fps, bit 3 12 to 17 times a minute of state 1), and at 30 fps and below the game's +# own chances. After each site x10 and the two scratch registers (s3 and s4 at the first, +# where s2 is the chance; s2 and s3 at the others) are written, or a call comes, before any read; at the second the +# chance is s9, which the prologue saves and both draws of state 1 compare with. Its own switch, lightning_fix +# (TOTK_LIGHTNING_FIX); 0 runs the game's loads. +set lightning TOTK_LIGHTNING_FIX 1 +site lightning main 62b1fc bd472d02 bd472d02 f001a52a f943e54a f940654a bd403943 1e2e1004 1e247863 1e230842 # ldr s2, [x8, #0x72c] (0.013333) +site lightning main 62b3d8 bd4ccd09 bd4ccd09 f001a52a f943e54a f940654a bd403942 1e2e1003 1e237842 1e220929 # ldr s9, [x8, #0xccc] (0.01) +site lightning main 62b51c bd4ccd01 bd4ccd01 f001a52a f943e54a f940654a bd403942 1e2e1003 1e237842 1e220821 # ldr s1, [x8, #0xccc] (0.01) +# each: the game's load; adrp x10, main+0x3ad2000; ldr x10, [x10, #0x7c8]; ldr x10, [x10, #0xc8]; +# ldr s3 (s2), [x10, #0x38] (ratio); fmov s4 (s3), #1.0; fminnm (ratio, 1.0); fmul (chance * ratio) diff --git a/runtime/cfg.c b/runtime/cfg.c index 4345978a..b3dcbb2b 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -53,7 +53,7 @@ static const char *const known[] = { "GPL", "GPL_DRAW_BUILD", "GPU", "GPU_INDEX", "GPU_NAME", "GRASS_RANGE", "GYRO_AUTO_BIAS", "GYRO_BIAS_PAD", "GYRO_BIAS_X", "GYRO_BIAS_Y", "GYRO_BIAS_Z", "GYRO_CALIBRATION", "HDR", "HDR_GAME_NITS", "HDR_HUE", "HDR_PEAK_NITS", "HDR_UI_NITS", "HIGHFPS_FIX", "HUD_WIDTH", "INPUT", "INPUT_RECORD", "INPUT_SCRIPT", "KSPIN_US", "LANG", "LIB_PREBUILD", - "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_GUARD", "LOD_STEADY", "LSTICK_DEADZONE", "MAP_CLICK", "MEMORY", "MEMX", "MENU_LANG", "MENU_TEST", "MENU_FONT_FONTCONFIG", + "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LIGHTNING_FIX", "LOCALE", "LOD_GUARD", "LOD_STEADY", "LSTICK_DEADZONE", "MAP_CLICK", "MEMORY", "MEMX", "MENU_LANG", "MENU_TEST", "MENU_FONT_FONTCONFIG", "MEM_RESERVE_MIB", "MENU_CURSOR", "MENU_CURSOR_LOG", "MENU_TEST_DIR", "MENU_TEST_SET", "MINIMAL_LAYOUT", "MIRROR_GAP", "MODS_DIR", "MODS_DISABLED", "MODS_NO_CODE", "MODS_ORDER", "MODS_REBUILD", "MODS_WITHOUT_CODE", "MOTION", "MOUSE_AIM_SCALE", "MOUSE_MODE", "MOUSE_DIRECT_PATCH", "MOUSE_SENS", "MOVIE_ASPECT", "MOVIE_HOST", "MOVIE_PACE", "MVOBJ_ALL", "MVOBJ_BANKS", "MVOBJ_EQUAL", "MVOBJ_EXACT", "MVOBJ_EXEC", "MVOBJ_NOC4", "MVOBJ_ONLY", "MVOBJ_TIMES", "MVPREV_CHECK", "MVPREV_GROW", "MVPREV_SKIP", "MVPREV_TRUST", "MV_CHECK", "MV_SURVEY", @@ -77,6 +77,7 @@ static const struct { const char *key, *section; } sections[] = { {"FPS_LIMIT", "frame rate"}, {"FPS60", "frame rate"}, {"FRAME_QUEUE", "frame rate"}, {"FRAME_GEN", "frame rate"}, {"REALTIME", "frame rate"}, {"CLOTH_REALTIME", "frame rate"}, {"HIGHFPS_FIX", "frame rate"}, {"CLIMB_FIX", "frame rate"}, {"AUDIO_DRAIN_FIX", "frame rate"}, {"SHUTTER_FIX", "frame rate"}, + {"LIGHTNING_FIX", "frame rate"}, {"FULLSCREEN", "display"}, {"WINDOW_SIZE", "display"}, {"PERF_OVERLAY", "display"}, {"VK_PRESENT", "display"}, {"GPU_INDEX", "display"}, {"OUTPUT_RES", "display"}, {"RENDER_SCALE", "display"}, {"UPSCALER", "display"}, {"HUD_WIDTH", "display"}, @@ -168,7 +169,7 @@ static const CfgMeta metas[] = { {"MODS_REBUILD", "auto", "auto|off", RESTART}, {"MODS_WITHOUT_CODE", "0", "0|1", RESTART}, // 1: a mod is used without the code module it cannot run (mods.c) {"HIGHFPS_FIX", "1", "0|1", RESTART}, {"CLIMB_FIX", "1", "0|1", RESTART}, {"AUDIO_DRAIN_FIX", "1", "0|1", RESTART}, - {"SHUTTER_FIX", "1", "0|1", RESTART}, + {"SHUTTER_FIX", "1", "0|1", RESTART}, {"LIGHTNING_FIX", "1", "0|1", RESTART}, {"LANG", "", "ja|en-US|fr|de|it|es|zh-CN|ko|nl|pt|ru|zh-TW|en-GB|fr-CA|es-419|zh-Hans|zh-Hant|pt-BR", RESTART}, {"OPERATION_MODE", "docked", "docked|handheld", RESTART}, {"ASSUME_FOCUS", "1", "0|1", LIVE}, // read on every focus change (ov_system.c) diff --git a/totk.ini.example b/totk.ini.example index c367228a..d773f1df 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -41,6 +41,9 @@ # Game 1.4.3: the two launchers in Tenbez Shrine throw the stone ball into the other launcher's seat above 30 fps. # 0 = the game's own speed, tuned for 30 fps. # shutter_fix = 1 +# Games 1.2.1 and 1.4.3: above 30 fps a thunderstorm has the lightning of 30 fps, instead of more distant bolts and +# lightning flashes the higher the frame rate. 0 = the game's own chances per frame, tuned for 30 fps. +# lightning_fix = 1 [performance] # The keys of this section and of [diagnostics] are for testing and troubleshooting, and take effect at the next start. From 6d077a9a1654a2a79f35c45564a517722b3a11af Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Sat, 21 Nov 2026 17:47:56 -0300 Subject: [PATCH 13/66] FSR skips the game's copy of the scene onto itself with the current translator too Translator patch 0017 (#1299) adds two support buffer fields every translated shader declares, so the copy shader's hash changed with it, as FXAA_FS's did. FXAA_COPY_FS now also holds 0x9d065204aac9766b, read from a 1.4.3 run with FSR on. With the old hash only, the copy stayed and the picture was softer: still view on the Great Sky Island, 1920x1080, render_scale 100, mean absolute Laplacian of luma over 101 shots, 8.09 -> 9.61 (14.93 with the upscaler off). Co-Authored-By: Claude Opus 5.5 --- runtime/vk_dlaa.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index fc7ed6ab..669e3620 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -1762,9 +1762,12 @@ void vk_dlaa_frame(void) { // stretched over the whole screen. static const uint64_t FXAA_FS[] = {0xf450003ebeb3dc52ull, 0x0a12f4bc2a9a4fbeull, 0x5c43ae18948d52cbull, 0xaad42238801d31d8ull, 0xde20aef90fea4ce6ull, 0x755964e8dce7f34dull}; -// The fragment shader of the FXAA's first pass, the copy of the scene target into the scratch target (this build's -// translator; another hash leaves the draw alone). See vk_dlaa_skip_draw for why FSR's frames skip it. -static const uint64_t FXAA_COPY_FS[] = {0xa0fd34391f2af811ull}; +// The fragment shader of the FXAA's first pass, the copy of the scene target into the scratch target (another hash +// leaves the draw alone). See vk_dlaa_skip_draw for why FSR's frames skip it. The translator with patches 0010 and +// 0011, then that one with patch 0017, whose two support buffer fields change every fragment shader's hash (as with +// FXAA_FS above); the second was read from a 1.4.3 run with FSR on, from the draw that copies the scene target onto +// itself. +static const uint64_t FXAA_COPY_FS[] = {0xa0fd34391f2af811ull, 0x9d065204aac9766bull}; // Chunks of one submission look shaders up side by side: an entry's hash is stored before its shader, and entries are // added under the lock. From 6e66c8b81d9c23fe6beb236e0d882be169f1adf7 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 07:30:39 +0000 Subject: [PATCH 14/66] Keep verified merges after an NPDM ACID signature warning (#1326) --- tests/installer_test.py | 101 ++++++++++++++++++++++++++++++++++++++++ tools/extract.py | 6 +-- 2 files changed, 104 insertions(+), 3 deletions(-) diff --git a/tests/installer_test.py b/tests/installer_test.py index 92de8b4d..a45843f9 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -573,6 +573,107 @@ class IniTest(unittest.TestCase): self.assertEqual(ini.get_language(text), 'ja') +class ExtractMergeTest(unittest.TestCase): + """The real merge wrapper with synthetic inputs and hactool output; no game files or keys.""" + + LEVELS = '\n'.join(f' Level {i} (GOOD):' for i in range(6)) + LOG = ('NCA:\nFixed-Key Signature (FAIL): omitted\nNPDM Signature (GOOD): omitted\n' + 'NPDM:\n ACID:\n Signature Key (GOOD): 0\n Signature (FAIL): omitted\n' + + LEVELS + '\nDone!\n') + IMAGE = b'synthetic merged image' + + def setUp(self): + tmp = tempfile.TemporaryDirectory() + self.addCleanup(tmp.cleanup) + self.root = Path(tmp.name) + self.output, self.logs = self.root / 'romfs', self.root / 'logs' + self.logs.mkdir() + self.base, self.update, self.keys = (self.root / name for name in ('base.nsp', 'update.nsp', 'prod.keys')) + self.log, self.code, self.base_log = self.LOG, 0, self.LEVELS + self.phases = [] + header = bytearray(0xc00) + header[0x404] = 4 # one BKTR section + inputs = [(source, {'size': 1, 'nca_offset': 0}, bytes(header)) for source in (self.base, self.update)] + self.enterContext(mock.patch.object(steps.extract, 'program_ncas', return_value=({}, inputs))) + self.enterContext(mock.patch.object(steps.extract, 'copy_range')) + self.enterContext(mock.patch.object(steps.extract, 'hactool_prod_keys')) + self.enterContext(mock.patch.object(steps.extract.shutil, 'disk_usage', + return_value=SimpleNamespace(free=100 * steps.GiB))) + self.enterContext(mock.patch.object(steps.extract, 'run_hactool', side_effect=self.hactool)) + self.index = self.enterContext(mock.patch.object(steps.extract, 'index_romfs', return_value=[])) + + def hactool(self, command, environment): + if '-x' not in command: + return 0, self.base_log # the extra verification that identifies a damaged input + image = Path(next(arg.split('=', 1)[1] for arg in command if arg.startswith('--section0='))) + image.write_bytes(self.IMAGE) + return self.code, self.log + + def merge(self): + steps.extract.merge_update_romfs(self.base, self.update, self.keys, self.root / 'hactool', self.output, + self.logs, phase=self.phases.append) + + def test_acid_signature_warning_keeps_a_verified_merge(self): + self.merge() + image = self.output / 'romfs.bin' + self.assertEqual(image.read_bytes(), self.IMAGE) + report = json.loads((self.output / 'index.json').read_text()) + self.assertEqual((report['status'], report['romfs_size'], report['romfs_sha256']), + ('pass', len(self.IMAGE), steps.extract.sha256(image))) + self.assertEqual(self.phases, ['copy', 'merge', 'index']) + self.assertEqual((self.logs / f'merge_romfs-{self.root.name}.log').read_text(), self.LOG) + + def test_existing_npdm_signature_warning_is_still_allowed(self): + self.log = self.LOG.replace('NPDM Signature (GOOD)', 'NPDM Signature (FAIL)') + self.merge() + self.assertTrue((self.output / 'index.json').is_file()) + + def test_data_hash_failures_still_identify_the_damaged_update(self): + for label in [*(f'Level {i}' for i in range(6)), 'Superblock Hash', 'Hash Table']: + with self.subTest(label=label): + self.log = self.LOG + f' {label} (FAIL): omitted\n' + with self.assertRaises(steps.extract.DamagedFile) as error: + self.merge() + self.assertEqual(error.exception.path, self.update) + self.assertIn('diagnose', self.phases) + self.index.assert_not_called() + self.assertFalse(self.output.exists()) + + def test_base_hash_failure_is_still_identified(self): + self.log = self.LOG.replace('Level 5 (GOOD)', 'Level 5 (FAIL)') + self.base_log = self.LEVELS.replace('Level 5 (GOOD)', 'Level 5 (FAIL)') + with self.assertRaises(steps.extract.DamagedFile) as error: + self.merge() + self.assertEqual(error.exception.path, self.base) + self.index.assert_not_called() + + def test_every_ivfc_level_is_still_required(self): + for level in range(6): + with self.subTest(level=level): + self.log = self.LOG.replace(f' Level {level} (GOOD):\n', '') + with self.assertRaisesRegex(ValueError, 'did not verify all six IVFC levels'): + self.merge() + self.index.assert_not_called() + self.assertFalse(self.output.exists()) + + def test_other_hactool_errors_are_still_rejected(self): + for message in ('Signature Key (FAIL): 0', 'Fixed-Key Index (FAIL): 0', 'Other Signature (FAIL): omitted', + 'Section (INVALID)', 'Failed to read section', 'Error: cannot save section'): + with self.subTest(message=message): + self.log = self.LOG + message + '\n' + with self.assertRaisesRegex(ValueError, 'hactool merge failed'): + self.merge() + self.index.assert_not_called() + self.assertFalse(self.output.exists()) + + def test_nonzero_exit_is_still_rejected(self): + self.code = 1 + with self.assertRaisesRegex(ValueError, 'hactool merge failed'): + self.merge() + self.index.assert_not_called() + self.assertFalse(self.output.exists()) + + class CleanupTest(unittest.TestCase): """The real Cleanup step on a finished install whose romfs/ is intact, emptied or gone (#107).""" diff --git a/tools/extract.py b/tools/extract.py index 5c9bf407..cb48eada 100644 --- a/tools/extract.py +++ b/tools/extract.py @@ -37,9 +37,9 @@ from extract_update_romfs import copy_range, hactool_prod_keys # noqa: E402 DATA = ROOT / 'tools' / 'data' EXEFS_CODE = ('main', 'sdk', 'subsdk0', 'rtld') LONG_HEX = re.compile(r'[0-9A-Fa-f]{32,}') -# hactool checks two signatures with Nintendo public keys it does not ship, so these two lines always read (FAIL) and -# say nothing about the data. The IVFC levels and the image hash decide. -UNSIGNED = re.compile(r'\s*(?:Fixed-Key Signature|NPDM Signature) \(FAIL\)') +# Signature warnings can occur on dumps whose data is intact. hactool's npdm.c npdm_print labels the ACID check simply +# "Signature", alongside nca.c nca_print's Fixed-Key and NPDM signatures. The IVFC levels and image hash still decide. +UNSIGNED = re.compile(r'\s*(?:Fixed-Key Signature|NPDM Signature|Signature) \(FAIL\):') HACTOOL_ERROR = re.compile(r'\(FAIL\)|\(INVALID\)|Failed to|Error:') # hactool lines of a hash check that failed: a RomFS level, a section's superblock or its hash table. HACTOOL_HASH_FAIL = re.compile(r'^\s*(?:Level \d|Superblock Hash|Hash Table) \(FAIL\)', re.M) From daddc3e3fb17dd06afd0e8176e85a2229d8236eb Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 07:56:27 +0000 Subject: [PATCH 15/66] Check shader-cache index bounds before allocating --- tests/pack_shader_cache_test.py | 61 +++++++++++++++++++++++++++++++++ tools/pack_shader_cache.py | 10 ++++-- 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/tests/pack_shader_cache_test.py b/tests/pack_shader_cache_test.py index 53356ef7..ebd45717 100644 --- a/tests/pack_shader_cache_test.py +++ b/tests/pack_shader_cache_test.py @@ -10,6 +10,8 @@ import sys import tempfile import unittest from pathlib import Path +from types import SimpleNamespace +from unittest import mock ROOT = Path(__file__).resolve().parent.parent sys.path.insert(0, str(ROOT / 'tools')) @@ -106,6 +108,65 @@ class PackTest(unittest.TestCase): n, _, _, _ = psc.pack(self.cache) self.assertEqual(n, 4) + def bounded_read_pack(self, path): + """Record real file reads; fail before a corrupt count can request a large allocation, even before the fix.""" + requests = [] + with path.open('rb') as f: + read = f.read + + def bounded(n): + requests.append(n) + self.assertLessEqual(n, 1024, 'corrupt index count reached the allocating read') + return read(n) + + with mock.patch.object(psc, 'open', return_value=f, create=True), \ + mock.patch.object(f, 'read', side_effect=bounded): + result = psc.read_pack(path) + return result, requests + + def test_truncated_index_is_rejected_before_reading_it(self): + path = self.cache / psc.PACK + for count in (1, 0xffffffff): + with self.subTest(count=count): + path.write_bytes(psc.MAGIC + struct.pack(' MAX_ENTRIES or index_size > size - 16: + print(f'{path}: invalid index size, rebuilt from the loose files only', flush=True) + return {} + raw = f.read(index_size) + if len(raw) != index_size: print(f'{path}: truncated index, rebuilt from the loose files only', flush=True) return {} out = {} From 83831e8ebdbc5f668b0c246ab433ade4e0589a03 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 08:05:04 +0000 Subject: [PATCH 16/66] Validate installation state before prefill and resume --- installer/state.py | 17 ++++++++++-- tests/installer_gui_test.py | 11 ++++++++ tests/installer_test.py | 52 +++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/installer/state.py b/installer/state.py index be264654..e1722504 100644 --- a/installer/state.py +++ b/installer/state.py @@ -36,10 +36,23 @@ def load(dest): data = json.loads(path.read_text(encoding='utf-8')) except (OSError, ValueError): raise StateError('state.unreadable', path) from None - if not isinstance(data, dict) or not isinstance(data.get('steps'), dict): + if not isinstance(data, dict): raise StateError('state.unreadable', path) - if data.get('format', 0) > FORMAT: + version = data.get('format', 0) + if type(version) is not int or version < 0: + raise StateError('state.unreadable', path) + if version > FORMAT: raise StateError('state.newer_format', path) + # The GUI and resume planner read these fields before running a step. A JSON value of the wrong type must take + # the same error path as unreadable JSON, rather than raising from their comparisons or dict lookups. + for name in ('release', 'lang', 'version'): + if name in data and not isinstance(data[name], str): + raise StateError('state.unreadable', path) + for name in ('steps', 'inputs'): + records = data.get(name, {} if name == 'inputs' else None) + if not isinstance(records, dict) or any(not isinstance(record, dict) for record in records.values()): + raise StateError('state.unreadable', path) + data.setdefault('inputs', {}) # older records may omit it; the extraction step expects a dictionary return data diff --git a/tests/installer_gui_test.py b/tests/installer_gui_test.py index 663b5e6a..d41653d9 100644 --- a/tests/installer_gui_test.py +++ b/tests/installer_gui_test.py @@ -247,6 +247,17 @@ class FormTest(unittest.TestCase): (out / statefile.NAME).write_text('{nope', encoding='utf-8') self.assertFalse(Form(dest=str(out)).update_mode()) + def test_malformed_state_does_not_crash_form_validation(self): + out = self._mkdir(self.dir / 'out') + for fields in ({'format': '1'}, {'format': None}, {'inputs': [1]}, {'steps': {'compile': 'done'}}, + {'lang': {}}): + with self.subTest(fields=fields): + (out / statefile.NAME).write_text(json.dumps(statefile.empty('r0') | fields), encoding='utf-8') + form = Form(dest=str(out)) + self.assertIsNone(form.installed_state()) + self.assertFalse(form.update_mode()) + self.assertEqual(form.problems(), ['ui.need_base', 'ui.need_update', 'ui.need_keys', 'ui.need_lang']) + @staticmethod def _mkdir(path): path.mkdir(parents=True, exist_ok=True) diff --git a/tests/installer_test.py b/tests/installer_test.py index 92de8b4d..67a8a4b4 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -199,6 +199,58 @@ class RunnerTest(unittest.TestCase): state.load(self.bed.dest) self.assertEqual(e.exception.id, 'state.newer_format') + def test_invalid_state_format_is_reported_as_unreadable(self): + self.bed.dest.mkdir() + path = self.bed.dest / state.NAME + for value in ('1', None, [], {}, True, 1.5, -1): + with self.subTest(value=value): + data = state.empty('r0') | {'format': value} + path.write_text(json.dumps(data)) + before = path.read_bytes() + with self.assertRaises(state.StateError) as error: + state.load(self.bed.dest) + self.assertEqual(error.exception.id, 'state.unreadable') + self.assertEqual(path.read_bytes(), before) + + def test_invalid_state_records_are_reported_as_unreadable(self): + self.bed.dest.mkdir() + for field in ('inputs', 'steps'): + for value in (None, [], 'bad', {'entry': None}, {'entry': 'bad'}): + with self.subTest(field=field, value=value): + path = self.bed.dest / state.NAME + path.write_text(json.dumps(state.empty('r0') | {field: value})) + with self.assertRaises(state.StateError) as error: + state.load(self.bed.dest) + self.assertEqual(error.exception.id, 'state.unreadable') + + def test_invalid_state_text_fields_are_reported_as_unreadable(self): + self.bed.dest.mkdir() + for field in ('release', 'lang', 'version'): + for value in (None, [], {}, 1): + with self.subTest(field=field, value=value): + (self.bed.dest / state.NAME).write_text(json.dumps(state.empty('r0') | {field: value})) + with self.assertRaises(state.StateError) as error: + state.load(self.bed.dest) + self.assertEqual(error.exception.id, 'state.unreadable') + + def test_legacy_state_without_inputs_can_be_resumed(self): + self.bed.run() + path = self.bed.dest / state.NAME + data = json.loads(path.read_text()) + del data['format'], data['inputs'] + path.write_text(json.dumps(data)) + self.assertEqual(state.load(self.bed.dest)['inputs'], {}) + result = self.bed.run() + self.assertEqual((result.result, result.ran), ('ok', ['check', 'cleanup'])) + + def test_newer_state_format_is_not_validated_as_the_current_schema(self): + self.bed.dest.mkdir() + data = {'format': state.FORMAT + 1, 'steps': {}, 'inputs': [], 'lang': {}} + (self.bed.dest / state.NAME).write_text(json.dumps(data)) + with self.assertRaises(state.StateError) as error: + state.load(self.bed.dest) + self.assertEqual(error.exception.id, 'state.newer_format') + class ReleaseFilesTest(unittest.TestCase): def test_release_ships_every_tool_the_steps_run(self): From 4ef0e2bd4a1875dcb90a98f2e56de582d59e2a27 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 08:10:07 +0000 Subject: [PATCH 17/66] Skip stored padding in raw NCZBLOCK blocks --- tests/ncz_test.py | 32 ++++++++++++++++++++++++++++++++ tools/ncz.py | 4 +++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/ncz_test.py b/tests/ncz_test.py index 106f1a0d..1c451b2e 100644 --- a/tests/ncz_test.py +++ b/tests/ncz_test.py @@ -88,6 +88,25 @@ class UnpackTest(unittest.TestCase): def expected(self): return pfs0([(self.name + '.nca', self.nca), ('a.tik', self.tik)]) + def padded_nsz(self, indices, truncate=False): + """Store selected blocks raw, followed by padding included in the stored length, not the NCA body.""" + def pad(data): + head = ncz.HEADER + 16 + 0x40 * len(SECTIONS) + exponent = data[head + 11] + count = struct.unpack_from(' Date: Sun, 22 Nov 2026 08:14:57 +0000 Subject: [PATCH 18/66] Honor the last language override in installer settings --- installer/ini.py | 15 ++++++++++----- tests/installer_test.py | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/installer/ini.py b/installer/ini.py index 5cad6f00..785e20df 100644 --- a/installer/ini.py +++ b/installer/ini.py @@ -1,7 +1,7 @@ """totk.ini: set the game language and keep everything else (keys and syntax as runtime/cfg.c reads them). A new file starts from totk.ini.example, whose lines are all commented defaults. The language goes into `lang` -(a Switch language code, runtime/ov_system.c): an active `lang = ...` line is rewritten in place, else the commented +(a Switch language code, runtime/ov_system.c): the last active `lang = ...` line is rewritten in place, else the commented `# lang = ...` line of the example is activated, else the line is added to [language] (created at the end if missing). Other lines, comments and line order stay as they are. """ @@ -32,8 +32,9 @@ def set_language(text, lang): """text with `lang = ` (an alias written as its canonical code); see the module docstring.""" lang = canonical_language(lang) lines = text.splitlines() - for i, line in enumerate(lines): - m = ACTIVE.match(line) + # runtime/cfg.c add gives the last non-empty value priority, regardless of section or the totk_ prefix. + for i in range(len(lines) - 1, -1, -1): + m = ACTIVE.match(lines[i]) if m: lines[i] = f'{m.group(1)}lang{m.group(2)}{lang}' return '\n'.join(lines) + '\n' @@ -53,10 +54,14 @@ def set_language(text, lang): def get_language(text): - for line in text.splitlines(): + for line in reversed(text.splitlines()): m = ACTIVE.match(line) if m: - return m.group(3) + value = m.group(3) + if len(value) >= 2 and value[0] == value[-1] == '"': + value = value[1:-1] + if value: # cfg.c add ignores empty values, including an empty quoted string + return value return None diff --git a/tests/installer_test.py b/tests/installer_test.py index 92de8b4d..c1cd223a 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -544,6 +544,21 @@ class IniTest(unittest.TestCase): self.assertEqual(out, '[display]\nvk_present = fifo\n[language]\n lang = de\nfps60 = 0\n') self.assertEqual(ini.get_language(out), 'de') + def test_the_last_active_language_is_rewritten(self): + text = 'lang = ru\n[language]\n# lang = fr\n TOTK_LANG = ja\nfps_limit = 60\n' + out = ini.set_language(text, 'de') + self.assertEqual(out, 'lang = ru\n[language]\n# lang = fr\n lang = de\nfps_limit = 60\n') + self.assertEqual(screens.ini_value(out, 'lang'), 'de') + self.assertEqual(ini.get_language(out), 'de') + + def test_language_reader_uses_runtime_order_quotes_and_empty_values(self): + for text, expected in [('lang = ru\nTOTK_LANG = "ja"\n', 'ja'), + ('lang = ru\nlang = \nTOTK_LANG = ""\n', 'ru'), + ('lang = \nTOTK_LANG = ""\n', None), + ('lang = " "\n', ' ')]: + with self.subTest(text=text): + self.assertEqual(ini.get_language(text), expected) + def test_missing_section_is_added(self): self.assertEqual(ini.set_language('fps60 = 0\n', 'fr'), 'fps60 = 0\n\n[language]\nlang = fr\n') self.assertEqual(ini.set_language('[language]\nlocale = de-DE\n', 'fr'), @@ -610,6 +625,16 @@ class CleanupTest(unittest.TestCase): def test_intact_romfs_passes(self): self.assertEqual(self.run_cleanup(), 'ok') + def test_selected_language_overrides_the_last_duplicate(self): + path = self.dest / 'totk.ini' + path.write_text('lang = ru\n[language]\nTOTK_LANG = ja\n[display]\nfps_limit = 60\n') + self.assertEqual(self.run_cleanup(), 'ok') + text = path.read_text() + self.assertEqual(screens.ini_value(text, 'lang'), self.ctx.lang) + self.assertEqual(ini.get_language(text), self.ctx.state['lang']) + self.assertIn('lang = ru\n', text) + self.assertIn('fps_limit = 60\n', text) + def test_keeps_build_and_writes_rebuild_command(self): for name in ('gen', 'build', 'check'): (self.ctx.temp / name).mkdir() From 84ca8a96b65700df6f45540fbff4dd1e45ca9222 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 08:33:41 +0000 Subject: [PATCH 19/66] Read installer layout settings with the game's INI rules --- installer/screens.py | 9 +++++++-- tests/installer_test.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/installer/screens.py b/installer/screens.py index 02f3ede6..d4818e2a 100644 --- a/installer/screens.py +++ b/installer/screens.py @@ -132,11 +132,16 @@ def displays(): # ---- totk.ini (runtime/cfg.c reads the same keys, in any section, with or without the totk_ prefix) def ini_value(text, name): + """The last nonempty value, with matching quotes removed, as runtime/cfg.c cfg_load and add read it.""" value = None for line in text.splitlines(): - m = re.match(rf'^\s*(?:totk_)?{name}\s*=\s*([^\s#;]*)', line, re.IGNORECASE) + m = re.match(rf'^\s*(?:totk_)?{re.escape(name)}\s*=(.*)$', line, re.IGNORECASE) if m: - value = m.group(1) + candidate = m.group(1).strip() + if len(candidate) >= 2 and candidate[0] == candidate[-1] == '"': + candidate = candidate[1:-1] + if candidate: + value = candidate return value diff --git a/tests/installer_test.py b/tests/installer_test.py index 92de8b4d..b2fd1203 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -906,6 +906,35 @@ class ShapesTest(unittest.TestCase): (['2560x1080', '3440x1440', '1280x800', '1920x1280'], 'pc')) self.assertEqual(screens.wanted(self.dest / 'none', [(2560, 1440)]), ([], None)) + def test_layout_settings_keep_the_last_nonempty_value(self): + for empty in ('', ' ', '""'): + with self.subTest(empty=empty): + text = f'prompts = xbox\nTOTK_PROMPTS = "pc"\nprompts = {empty}\n' + self.assertEqual(screens.ini_value(text, 'prompts'), 'pc') + self.assertEqual(screens.prompts_style(text), 'pc') + self.assertEqual(screens.ini_value('prompts = pc\n# prompts = xbox\n; prompts = xbox', 'prompts'), 'pc') + # cfg.c trims the whole value and removes matching quotes; it does not strip inline comments. + self.assertEqual(screens.ini_value('prompts = pc # comment', 'prompts'), 'pc # comment') + + def test_quoted_pad_layout_selects_the_matching_prompts(self): + self.assertEqual(screens.prompts_style('TOTK_PAD_LAYOUT = "nintendo"\nprompts = "PS"'), 'playstation') + self.assertEqual(screens.prompts_style('pad_layout = "xbox_prompts"'), 'xbox') + + def test_shapes_generate_the_layouts_selected_by_quoted_or_repeated_settings(self): + screens.displays = lambda: [] + (self.dest / 'romfs-patches-pc').mkdir() + (self.dest / 'romfs-patches-pc' / 'manifest.tsv').write_text('#\n') + for trailing in ('', '\noutput_res =\nTOTK_PROMPTS = ""\nhud_width = \n'): + with self.subTest(trailing=trailing): + (self.dest / 'totk.ini').write_text('[display]\nTOTK_OUTPUT_RES = "3840x1080"\n' + 'hud_width = "16:9"\n[input]\nprompts = "pc"\n' + trailing) + ctx = SimpleNamespace(**vars(self.ctx)) + record = steps.Shapes().run(ctx) + self.assertEqual(record['folders'], ['romfs-patches-3840x1080', 'romfs-patches-pc-3840x1080', + 'romfs-patches-3840x1080-hud16x9', + 'romfs-patches-pc-3840x1080-hud16x9']) + self.assertTrue(steps.Shapes().current(ctx, record)) + def test_run_writes_only_the_wanted_folders(self): screens.displays = lambda: [(2560, 1080)] (self.dest / 'totk.ini').write_text('pad_layout = nintendo\nprompts = xbox\n') From 8bbc6c7ade6a16bfddcc9f7cb27d6a3dbc960bad Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 08:37:42 +0000 Subject: [PATCH 20/66] Bound compressed NCZ blocks by their declared output size --- tests/ncz_test.py | 29 +++++++++++++++++++++++++++++ tools/ncz.py | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/ncz_test.py b/tests/ncz_test.py index 1c451b2e..21a67de6 100644 --- a/tests/ncz_test.py +++ b/tests/ncz_test.py @@ -66,6 +66,35 @@ def ncz_file(nca, body, blocks=False): return out + b''.join(stored) +class BlocksTest(unittest.TestCase): + def read(self, data, plain=1 << 14): + header = b'NCZBLOCK' + bytes([2, 1, 0, 14]) + struct.pack(' Date: Sun, 22 Nov 2026 08:50:14 +0000 Subject: [PATCH 21/66] Preserve plugin image paths in generated patch tables --- recomp/patches.py | 19 +++++++++-- tests/exefs_plugins_test.py | 67 +++++++++++++++++++++++++++++++++++-- tools/exefs_plugins.py | 3 +- 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/recomp/patches.py b/recomp/patches.py index a3746ac5..170e540f 100644 --- a/recomp/patches.py +++ b/recomp/patches.py @@ -1,7 +1,8 @@ """Code patch table for the generator: guest instructions replaced in the lifted C, switchable at run time. Lifted code cannot be byte-patched when the game runs, so a patch is applied when the C is generated. A patch file -(gen.py --patches) has these kinds of lines; `#` starts a comment, fields are separated by whitespace: +(gen.py --patches) has these kinds of lines; `#` starts a comment, fields are separated by whitespace. A plugin image +path may be a JSON double-quoted string to preserve spaces, `#` and escaped characters: set [ordered] a patch set: a run-time switch =0/1, when it is unset site
[ ...] @@ -77,6 +78,7 @@ entry the runtime watches: their lifted C starts with FN_ENTER (runtime/cpu.h), branch to fnprof_hit while the runtime sets it. A table with hook lines puts FN_ENTER into these functions only; a table without any keeps it in every function, as does gen.py --fn-enter-all (a whole-game function-entry profile). """ +import json from pathlib import Path PAGE = 0x1000 @@ -187,10 +189,21 @@ def load(path, mods): sets, index, sites, spins, hooks, ordered, plugins = [], {}, {}, {}, {}, set(), {} bases = {n: (b, s) for n, b, s in mods} for no, raw in enumerate(Path(path).read_text(encoding='utf-8').splitlines(), 1): - f = raw.split('#', 1)[0].split() + where = f'{path}:{no}' + prefix = raw.split(None, 4) + if len(prefix) == 5 and prefix[0] == 'plugin' and prefix[4].startswith('"'): + try: + image, end = json.JSONDecoder().raw_decode(prefix[4]) + except json.JSONDecodeError as e: + raise PatchError(f'{where}: invalid quoted plugin image: {e.msg}') from None + tail = prefix[4][end:].strip() + if tail and not tail.startswith('#'): + raise PatchError(f'{where}: unexpected text after quoted plugin image') + f = prefix[:4] + [image] + else: + f = raw.split('#', 1)[0].split() if not f: continue - where = f'{path}:{no}' if f[0] == 'set' and (len(f) == 4 or len(f) == 5 and f[4] == 'ordered'): if f[1] in index: raise PatchError(f'{where}: set {f[1]} defined twice') diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index 071df40b..2f6d4bd0 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -10,6 +10,7 @@ Run with .venv (lz4 and numpy, as recomp/): python tests/exefs_plugins_test.py import hashlib import json import struct +import subprocess import sys import tempfile import unittest @@ -355,6 +356,47 @@ class Lines(unittest.TestCase): rec['modules'][2]['image'] = 'plugin0.img' return xp.plugin_lines(rec, xp.hooks_of(hooks, 'plugin0'), 'mod_x', d, 'plugin0') + def test_image_path_roundtrips_through_the_patch_table(self): + rec = record() + mods = [(m['name'], m['base'], m['size']) for m in rec['modules']] + with tempfile.TemporaryDirectory() as d: + for folder in ('plain', 'with spaces', 'with#hash', 'caf\u00e9 #1'): + with self.subTest(folder=folder): + dest = Path(d) / folder + dest.mkdir() + image = dest / 'plugin0.img' + image.write_bytes(rec['images']['plugin0']) + rec['modules'][2]['image'] = image.name + lines = xp.plugin_lines(rec, [], 'mod_x', dest, 'plugin0') + patch = dest / 'patches.txt' + patch.write_text('set mod_x TOTK_MODPATCH_X 0 ordered\n' + '\n'.join(lines), encoding='utf-8') + actual = patches.load(patch, mods).plugins['plugin0']['image'] + self.assertEqual(actual, image.resolve().as_posix()) + self.assertEqual(Path(actual).read_bytes(), rec['images']['plugin0']) + + def test_quoted_image_and_legacy_unquoted_paths(self): + mods = [('main', MAIN, 0x200000), ('plugin0', PLUGIN, 0x14000)] + with tempfile.TemporaryDirectory() as d: + patch = Path(d) / 'patches.txt' + for image, field in (('C:/folder #1/plugin.img', '"C:/folder #1/plugin.img" # comment'), + ('C:/plain/plugin.img', 'C:/plain/plugin.img # comment'), + (r'C:\with space\plugin.img', json.dumps(r'C:\with space\plugin.img')), + (r'C:\plain\plugin.img', r'C:\plain\plugin.img')): + with self.subTest(field=field): + patch.write_text(f'set x ENV 0\nplugin x plugin0 {"0" * 64} {field}\n') + self.assertEqual(patches.load(patch, mods).plugins['plugin0']['image'], image) + + def test_malformed_quoted_image_names_the_patch_line(self): + mods = [('main', MAIN, 0x200000), ('plugin0', PLUGIN, 0x14000)] + with tempfile.TemporaryDirectory() as d: + patch = Path(d) / 'patches.txt' + for field in ('"unfinished', '"image.img" extra', '"image.img" "#not a comment"'): + with self.subTest(field=field): + patch.write_text(f'set x ENV 0\nplugin x plugin0 {"0" * 64} {field}\n') + with self.assertRaises(patches.PatchError) as error: + patches.load(patch, mods) + self.assertIn(f'{patch}:2:', str(error.exception)) + def test_inline(self): out = self.lines(record(original=0xAA0003F3)) self.assertIn(f'site mod_x main {SITE_OFF:x} aa0003f3 @call:plugin0+{STUB_OFF:x} aa0003f3', out) @@ -511,13 +553,34 @@ class Generator(unittest.TestCase): n = Nso(str(self.plugin_file)) self.sha = hashlib.sha256(bytes(img[n.text[0]:n.text[0] + n.text[1]])).hexdigest() - def table(self, site_line, extra=()): + def table(self, site_line, extra=(), image=None): + image = image or self.d / 'plugin0.img' text = '\n'.join(['set mod_x TOTK_MODPATCH_X 0 ordered', - f'plugin mod_x plugin0 {self.sha} {(self.d / "plugin0.img").as_posix()}', + f'plugin mod_x plugin0 {self.sha} {json.dumps(image.as_posix())}', f'expect mod_x main {FN:x} aa0003f3 14000000', site_line, *extra]) + '\n' (self.d / 'p.txt').write_text(text) return patches.load(self.d / 'p.txt', self.mods) + def test_generator_cli_reads_image_in_a_folder_with_spaces_and_hash(self): + # The direct-emitter fixture needs a discoverable caller for a full CLI lift. + main = self.d / 'exefs' / 'main' + raw = bytearray(main.read_bytes()) + struct.pack_into(' Date: Sun, 22 Nov 2026 08:59:49 +0000 Subject: [PATCH 22/66] Run standalone regression suites with their prerequisites --- tests/run_all.py | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/tests/run_all.py b/tests/run_all.py index 178eab4a..895e5449 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -35,36 +35,47 @@ GAME_NEEDS = {'exefs', 'exe', 'romfs', 'embed', 'gui'} def interp(venv): - """.venv / .venv-py314, falling back to this interpreter when the venv is absent.""" + """The requested venv, this interpreter if absent, or its standalone base for user-site tests.""" + if venv == 'system': + return Path(getattr(sys, '_base_executable', None) or sys.executable) d = ROOT / venv p = d / ('Scripts/python.exe' if WIN else 'bin/python') return p if p.exists() else Path(sys.executable) # name: (venv, needs, args, why the need is there) +# venv: .venv | .venv-py314 | system (the standalone base interpreter) # needs: None | needs joined by '+' (exefs | exe | romfs | embed | gui | cc) # name: the script below tests/, without .py (diff/simd is tests/diff/simd.py) TESTS = { # ---- no game files, no build ---- - 'flags_check': ('.venv', None, [], ''), - 'excl_mt': ('.venv', None, [], ''), + 'flags_check': ('.venv', 'cc', [], 'compiles the CPU flag helpers with clang'), + 'excl_mt': ('.venv', 'cc', [], 'compiles the threaded exclusive-monitor harness with clang'), 'pack_shader_cache_test': ('.venv', None, [], ''), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), 'installer_test': ('.venv-py314', None, [], ''), 'ncz_test': ('.venv-py314', None, [], ''), 'romfs_prompts_test': ('.venv-py314', None, [], ''), + 'hud_layout_test': ('.venv-py314', None, [], ''), + 'release_linux_apprun_test': ('system', None, [], ''), 'exefs_patches_test': ('.venv', None, [], ''), 'exefs_plugins_test': ('.venv', None, [], ''), + 'lift_cache_test': ('.venv', None, [], ''), 'settings_doc_check': ('.venv', None, [], ''), 'mouse_direct_check': ('.venv', 'cc', ['--cc', ''], 'compiles its checks with clang'), 'cheats_vm_check': ('.venv', 'cc', ['--cc', ''], 'compiles runtime/cheats.c into a harness with clang'), - 'diff/atomic': ('.venv', None, [], ''), - 'diff/simd': ('.venv', None, [], ''), + 'romfs_shapes_check': ('.venv', 'cc', ['--cc', ''], 'compiles the production overlay selection helpers'), + 'frame_world_check': ('.venv', 'cc', ['--cc', ''], 'compiles the production world-clock player walk'), + 'sync_ahead_check': ('.venv', 'cc', ['--cc', ''], 'compiles the production sync-ahead wait selection'), + 'patches_v110_check': ('.venv', 'cc', [], 'compiles synthetic patch contracts for comparison with Unicorn'), + 'patches_v110_highfps_check': ('.venv', 'cc', [], 'compiles synthetic high-fps contracts for comparison with Unicorn'), + 'diff/atomic': ('.venv', 'cc', [], 'compiles generated atomic checks for comparison with Unicorn'), + 'diff/simd': ('.venv', 'cc', [], 'compiles generated SIMD checks for comparison with Unicorn'), # ---- read the game or a build ---- - 'diff/lift': ('.venv', 'exefs', ['--exefs', ''], + 'diff/lift': ('.venv', 'exefs+cc', ['--exefs', ''], 'samples instructions from the game modules; needs an unpacked exefs'), - 'diff/func': ('.venv', 'exefs', ['--exefs', ''], + 'diff/func': ('.venv', 'exefs+cc', ['--exefs', ''], 'lifts whole functions of the game modules; needs an unpacked exefs'), 'jumptables_check': ('.venv', 'exefs', ['--exefs', ''], 'replays the modules through Unicorn; needs an unpacked exefs'), @@ -100,10 +111,11 @@ def find_exefs(): def find_exe(): - """A built totk.exe: the plain v143 tree, else the newest variant (v143-heropath, ...).""" - if (ROOT / 'build' / 'v143' / 'totk.exe').exists(): - return ROOT / 'build' / 'v143' / 'totk.exe' - builds = sorted(ROOT.glob('build/v143-*/totk.exe'), + """A built totk[.exe]: the plain v143 tree, else the newest variant (v143-heropath, ...).""" + name = 'totk.exe' if WIN else 'totk' + if (ROOT / 'build' / 'v143' / name).exists(): + return ROOT / 'build' / 'v143' / name + builds = sorted(ROOT.glob('build/v143-*/' + name), key=lambda p: p.stat().st_mtime, reverse=True) return builds[0] if builds else None @@ -133,7 +145,11 @@ def find_embed(): def find_cc(): - """clang for the tests that compile C: MSYS2 UCRT64's on Windows, else the one on PATH.""" + """The compiler the differential harness uses: CC, MSYS2 UCRT64, or clang on PATH.""" + cc = os.environ.get('CC') + if cc: + found = shutil.which(cc) + return Path(found) if found else None c = MSYS_BIN / 'clang.exe' if WIN and c.exists(): return c @@ -153,7 +169,7 @@ def resolve(needs): else: vals[''] = str(p) elif need == 'exe': p = find_exe() - if p is None: missing.append('no built build/v143/totk.exe') + if p is None: missing.append('no built build/v143/totk' + ('.exe' if WIN else '')) else: vals[''] = str(p) elif need == 'romfs': p = find_romfs() From d24018100571826e4ce67ceb39ffde1d018adf42 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 02:10:51 -0800 Subject: [PATCH 23/66] The installer's host check survives a crashing Vulkan layer and names an App Control block hostcheck flushes what it found before each Vulkan call, so a probe killed inside Vulkan still shows how far it got. Check.probe_host logs the exit code as Windows reports crashes (0xC0000005), runs a probe that died inside Vulkan once more with the implicit layers off (VK_LOADER_LAYERS_DISABLE=~implicit~) and, when that passes, goes on with a warning that lists the installed implicit layers; when it crashes again it stops with check.vulkan_crash. A probe Windows refuses to start (Smart App Control and other App Control policies, group policy, an antivirus) now stops with check.host_blocked instead of an uncaught OSError. Issues #1345 and #875. Co-Authored-By: Claude Opus 5.5 --- installer/hostcheck.c | 4 ++ installer/steps.py | 90 ++++++++++++++++++++++++++++++++++--- installer/text/de.json | 3 ++ installer/text/en.json | 3 ++ installer/text/es.json | 3 ++ installer/text/fr.json | 3 ++ installer/text/it.json | 3 ++ installer/text/ja.json | 3 ++ installer/text/ko.json | 3 ++ installer/text/nl.json | 3 ++ installer/text/pt-BR.json | 3 ++ installer/text/ru.json | 3 ++ installer/text/zh-Hans.json | 3 ++ tests/installer_test.py | 90 +++++++++++++++++++++++++++++++++++++ 14 files changed, 211 insertions(+), 6 deletions(-) diff --git a/installer/hostcheck.c b/installer/hostcheck.c index d3099271..0433a874 100644 --- a/installer/hostcheck.c +++ b/installer/hostcheck.c @@ -57,9 +57,12 @@ static int x86_64_v3(void) { return (c & (1u << 5)) != 0; // LZCNT (ABM) } +// stdout is a pipe, so it is fully buffered: each part is flushed before the next call that can crash, and a probe +// that a Vulkan layer or driver kills still hands the installer what it found (installer/steps.py Check.probe_host). int main(void) { printf("{\"x86_64_v2\": %s, \"x86_64_v3\": %s, ", x86_64_v2() ? "true" : "false", x86_64_v3() ? "true" : "false"); + fflush(stdout); void *lib = open_lib(); PFN_vkGetInstanceProcAddr gipa = lib ? (PFN_vkGetInstanceProcAddr)lib_sym(lib, "vkGetInstanceProcAddr") : NULL; if (!gipa) { @@ -67,6 +70,7 @@ int main(void) { return 0; } printf("\"loader\": true, "); + fflush(stdout); PFN_vkCreateInstance create = (PFN_vkCreateInstance)gipa(NULL, "vkCreateInstance"); VkApplicationInfo app = {.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pApplicationName = "totk-install", .apiVersion = VK_API_VERSION_1_3}; diff --git a/installer/steps.py b/installer/steps.py index 12abed07..c55b509b 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -124,6 +124,48 @@ def kill_tree(proc): proc.kill() +def parse_host(text): + """The host check's JSON object, or None when it did not finish (a crash leaves the parts it flushed).""" + try: + host = json.loads(text) + except ValueError: + return None + return host if isinstance(host, dict) and 'devices' in host else None + + +def exit_code(code): + """A process exit code as Windows reports crashes (0xC0000005 for an access violation), else as a number.""" + if os.name == 'nt' and code is not None and (code < 0 or code >= 0xC0000000): + return f'0x{code & 0xFFFFFFFF:08X}' + return str(code) + + +def implicit_vulkan_layers(): + """Names of the enabled implicit Vulkan layer manifests the Windows registry lists (machine, then user), for the + warning that names the program to update; empty elsewhere or when the registry cannot be read.""" + if os.name != 'nt': + return [] + import winreg + found = [] + for root in (winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER): + try: + key = winreg.OpenKey(root, r'SOFTWARE\Khronos\Vulkan\ImplicitLayers') + except OSError: + continue + with key: + i = 0 + while True: + try: + path, enabled, _ = winreg.EnumValue(key, i) + except OSError: + break + i += 1 + name = Path(path).name + if enabled == 0 and name not in found: # a DWORD 0 enables the manifest, anything else skips it + found.append(name) + return found + + def linux_glibc(): """(major, minor) of the C library this Linux process runs on, None elsewhere or when it is not glibc.""" try: @@ -443,12 +485,7 @@ class Check(Step): if r.returncode: ctx.reporter.log(r.stdout + r.stderr) raise InstallError('check.toolchain_broken', detail=(r.stderr or r.stdout).strip()[-400:]) - r = subprocess.run([str(exe)], capture_output=True, text=True, errors='replace') - try: - host = json.loads(r.stdout) - except ValueError: - raise InstallError('check.host_probe_failed', code=r.returncode) from None - ctx.reporter.log(f'host: {r.stdout.strip()}') + host = self.probe_host(ctx, exe) if not host['x86_64_v2']: raise InstallError('check.cpu_too_old') # v3 is the faster build; v2 runs on CPUs without AVX2/FMA (runtime/fma.c supplies the fused multiply-add). @@ -468,6 +505,47 @@ class Check(Step): ctx.reporter.warning('warn.kernel_old', version='.'.join(map(str, kernel))) ctx.host = host + # Windows refuses to start a program a policy does not trust: Smart App Control and other App Control policies + # (4551 "An Application Control policy has blocked this file", 4556 and 4580 the same for a bad reputation, issue + # #875), group policy (1260) and an antivirus that flags the file (225, 226). hostcheck is the first program the + # setup builds on this PC; totk.exe is built the same way and unsigned too, so the install cannot go on. + BLOCKED_WINERRORS = {225, 226, 1260, 4551, 4556, 4580} + + def probe_host(self, ctx, exe): + """Runs the host check built by host() and returns its JSON. A probe that crashes inside Vulkan is run again + with the implicit Vulkan layers off (VK_LOADER_LAYERS_DISABLE, Vulkan loader 1.3.234 or later): overlays, + recorders and tuning tools install such layers, and a broken one kills every Vulkan program at + vkCreateInstance (issue #1345, exit code 0xC0000005 after "Checking the processor and the graphics card").""" + rep = ctx.reporter + r = self.run_probe(exe) + host = parse_host(r.stdout) + if host is not None: + rep.log(f'host: {r.stdout.strip()}') + return host + code = exit_code(r.returncode) + rep.log(f'host: the check stopped with exit code {code}; it printed {r.stdout.strip()!r}') + if '"loader": true' not in r.stdout: + raise InstallError('check.host_probe_failed', code=code) + env = dict(os.environ, VK_LOADER_LAYERS_DISABLE='~implicit~') + retry = self.run_probe(exe, env) + host = parse_host(retry.stdout) + if host is None: + rep.log(f'host: without implicit Vulkan layers too: exit code {exit_code(retry.returncode)}, ' + f'{retry.stdout.strip()!r}') + raise InstallError('check.vulkan_crash', code=code) + layers = ', '.join(implicit_vulkan_layers()) or '?' + rep.log(f'host: {retry.stdout.strip()} (implicit Vulkan layers off; installed: {layers})') + rep.warning('warn.vulkan_layer_crash', code=code, layers=layers) + return host + + def run_probe(self, exe, env=None): + try: + return subprocess.run([str(exe)], capture_output=True, text=True, errors='replace', env=env) + except OSError as e: + if getattr(e, 'winerror', None) in self.BLOCKED_WINERRORS: + raise InstallError('check.host_blocked', path=str(exe), detail=e.strerror or str(e)) from None + raise InstallError('check.host_probe_failed', code=f'{getattr(e, "winerror", None) or e.errno}: {e.strerror or e}') from None + def inputs(self, ctx): """Open both files with the keys as the extraction will. Returns the bytes of both Program NCAs.""" o = ctx.options diff --git a/installer/text/de.json b/installer/text/de.json index 09f2d3d6..5db3336c 100644 --- a/installer/text/de.json +++ b/installer/text/de.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "Der mitgelieferte Compiler funktioniert nicht: {detail}", "check.glibc_old": "Die C-Bibliothek dieses Systems ist glibc {version}; der Compiler des Setups braucht {need} oder neuer (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 und neuer haben sie). Ein Systemupdate behebt das.", "check.host_probe_failed": "Die Computerprüfung ist nicht gelaufen (Exit-Code {code}).", + "check.host_blocked": "Windows hat ein Programm blockiert, das das Setup auf diesem PC erstellt hat ({path}): {detail}. Smart App Control, eine App-Control-Richtlinie oder ein Virenscanner blockiert unsignierte Programme; das Spiel selbst wird genauso auf diesem PC erstellt und würde ebenfalls blockiert. Erlaube den Setup-Ordner in deinem Virenscanner oder schalte Smart App Control in der Windows-Sicherheit (App- und Browsersteuerung) aus und starte das Setup erneut.", + "check.vulkan_crash": "Der Grafiktreiber ist abgestürzt, als das Setup nach den Grafikkarten gefragt hat (Exit-Code {code}), auch mit ausgeschalteten Vulkan-Layern anderer Programme. Installiere den neuesten Treiber für deine Grafikkarte.", "check.cpu_too_old": "Diesem Prozessor fehlt x86-64-v2 (SSE4.2, POPCNT und CMPXCHG16B), die älteste Stufe, für die das Spiel gebaut wird. Intel Nehalem (2008) oder AMD Bulldozer (2011) und neuer haben sie.", "check.vulkan_missing": "Es ist kein Vulkan-Treiber installiert. Installiere den neuesten Treiber für deine Grafikkarte.", "check.vulkan_no_device": "Vulkan findet keine Grafikkarte. Installiere den neuesten Treiber für deine Grafikkarte.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "Die Xbox-, PlayStation- oder PC-Tastensymbole konnten nicht vorbereitet werden (Exit-Code {code}); das Spiel behält die Switch-Symbole. Details: {log}", "warn.shaders_skipped": "Der Grafiktreiber ist beim Erstellen einiger Shader abgestürzt, daher wurden {count} bei der Vorbereitung ausgelassen. Das Spiel erstellt sie, wenn es sie zum ersten Mal braucht, und der Treiber kann dort ebenfalls abstürzen; ein Treiberupdate kann das beheben. Details: {log}", "warn.kernel_old": "Linux {version} fehlt das Schreib-Tracking, auf das das Spiel angewiesen ist (6.7 oder neuer); das Spiel kann sehr langsam laufen. Ein Systemupdate behebt das.", + "warn.vulkan_layer_crash": "Ein Vulkan-Layer eines anderen Programms hat die Computerprüfung abstürzen lassen (Exit-Code {code}); ohne ihn lief die Prüfung durch. Installierte Layer: {layers}. Das Spiel lädt dieselben Layer und kann beim Start abstürzen: Aktualisiere oder deinstalliere das Overlay-, Aufnahme- oder Tuning-Programm, das den fehlerhaften Layer installiert hat.", "warn.dlss_kept": "Im Installationsordner liegt bereits eine DLSS-Bibliothek ({path}); das Setup behält sie.", "warn.dlss_download_failed": "NVIDIA DLSS konnte nicht von {url} heruntergeladen werden: {detail}. Das Spiel läuft ohne; der nächste Setup-Lauf versucht es erneut.", "ui.title": "TotK-Setup", diff --git a/installer/text/en.json b/installer/text/en.json index b643c5a6..46889ce9 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -57,6 +57,8 @@ "check.toolchain_broken": "The bundled compiler does not work: {detail}", "check.glibc_old": "This system's C library is glibc {version}; the setup's compiler needs {need} or later (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 and newer have it). Updating the system fixes this.", "check.host_probe_failed": "The computer check did not run (exit code {code}).", + "check.host_blocked": "Windows blocked a program the setup built on this PC ({path}): {detail}. Smart App Control, an App Control policy or an antivirus blocks unsigned programs; the game itself is built on this PC the same way, so it would be blocked too. Allow the setup folder in your antivirus, or turn off Smart App Control in Windows Security (App & browser control), then run the setup again.", + "check.vulkan_crash": "The graphics driver crashed while the setup asked it for the graphics cards (exit code {code}), also with the Vulkan layers of other programs turned off. Install the latest driver for your graphics card.", "check.cpu_too_old": "This processor lacks x86-64-v2 (SSE4.2, POPCNT and CMPXCHG16B), the oldest level the game is built for. Intel Nehalem (2008) or AMD Bulldozer (2011) and newer have it.", "check.vulkan_missing": "No Vulkan driver is installed. Install the latest driver for your graphics card.", "check.vulkan_no_device": "Vulkan finds no graphics card. Install the latest driver for your graphics card.", @@ -116,6 +118,7 @@ "warn.xbox_prompts_failed": "The Xbox, PlayStation or PC button prompts could not be prepared (exit code {code}); the game keeps the Switch prompts. Details: {log}", "warn.shaders_skipped": "The graphics driver crashed while building some shaders, so {count} were left out of the preparation. The game builds them when it first needs them, and the driver may crash there too; a driver update may fix it. Details: {log}", "warn.kernel_old": "Linux {version} lacks the write tracking the game relies on (6.7 or later); the game may run very slowly. Updating the system fixes this.", + "warn.vulkan_layer_crash": "A Vulkan layer of another program crashed the computer check (exit code {code}); without it the check passed. Installed layers: {layers}. The game loads the same layers and may crash at start: update or uninstall the overlay, recorder or tuning program that installed the failing one.", "warn.dlss_kept": "A DLSS library is already in the install folder ({path}); the setup keeps it.", "warn.dlss_download_failed": "NVIDIA DLSS could not be downloaded from {url}: {detail}. The game runs without it; the next setup run tries again.", diff --git a/installer/text/es.json b/installer/text/es.json index fb6d29bd..e798c207 100644 --- a/installer/text/es.json +++ b/installer/text/es.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "El compilador incluido no funciona: {detail}", "check.glibc_old": "La biblioteca C de este sistema es glibc {version}; el compilador del instalador necesita {need} o posterior (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 y posteriores la tienen). Actualizar el sistema lo soluciona.", "check.host_probe_failed": "La comprobación del equipo no se ejecutó (código de salida {code}).", + "check.host_blocked": "Windows bloqueó un programa que el instalador creó en este PC ({path}): {detail}. Smart App Control, una directiva de App Control o un antivirus bloquean los programas sin firmar; el propio juego se crea igual en este PC, así que también se bloquearía. Permite la carpeta del instalador en tu antivirus o desactiva Smart App Control en Seguridad de Windows (Control de aplicaciones y navegador) y vuelve a ejecutar el instalador.", + "check.vulkan_crash": "El controlador gráfico falló cuando el instalador le pidió las tarjetas gráficas (código de salida {code}), también con las capas Vulkan de otros programas desactivadas. Instala el controlador más reciente de tu tarjeta gráfica.", "check.cpu_too_old": "Este procesador no tiene x86-64-v2 (SSE4.2, POPCNT y CMPXCHG16B), el nivel más antiguo para el que se compila el juego. Intel Nehalem (2008) o AMD Bulldozer (2011) y posteriores lo tienen.", "check.vulkan_missing": "No hay ningún controlador Vulkan instalado. Instala el controlador más reciente de tu tarjeta gráfica.", "check.vulkan_no_device": "Vulkan no encuentra ninguna tarjeta gráfica. Instala el controlador más reciente de tu tarjeta gráfica.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "No se pudieron preparar los iconos de botones de Xbox, PlayStation o PC (código de salida {code}); el juego mantiene los iconos de Switch. Detalles: {log}", "warn.shaders_skipped": "El controlador gráfico falló al crear algunos shaders, así que {count} quedaron fuera de la preparación. El juego los crea cuando los necesita por primera vez, y el controlador también puede fallar ahí; una actualización del controlador puede solucionarlo. Detalles: {log}", "warn.kernel_old": "Linux {version} no tiene el seguimiento de escrituras del que depende el juego (6.7 o posterior); el juego puede ir muy lento. Actualizar el sistema lo soluciona.", + "warn.vulkan_layer_crash": "Una capa Vulkan de otro programa hizo fallar la comprobación del equipo (código de salida {code}); sin ella la comprobación pasó. Capas instaladas: {layers}. El juego carga las mismas capas y puede fallar al iniciar: actualiza o desinstala el programa de superposición, grabación o ajuste que instaló la capa que falla.", "warn.dlss_kept": "Ya hay una biblioteca DLSS en la carpeta de instalación ({path}); el instalador la conserva.", "warn.dlss_download_failed": "No se pudo descargar NVIDIA DLSS desde {url}: {detail}. El juego funciona sin él; la próxima ejecución del instalador lo intentará de nuevo.", "ui.title": "Instalador de TotK", diff --git a/installer/text/fr.json b/installer/text/fr.json index a0b1b2f1..3f056ee9 100644 --- a/installer/text/fr.json +++ b/installer/text/fr.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "Le compilateur fourni ne fonctionne pas : {detail}", "check.glibc_old": "La bibliothèque C de ce système est glibc {version} ; le compilateur de l'installation demande {need} ou plus récent (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 et plus récents l'ont). Mettre à jour le système corrige cela.", "check.host_probe_failed": "La vérification de l'ordinateur ne s'est pas exécutée (code de sortie {code}).", + "check.host_blocked": "Windows a bloqué un programme que l'installateur a compilé sur ce PC ({path}) : {detail}. Smart App Control, une stratégie App Control ou un antivirus bloque les programmes non signés ; le jeu lui-même est compilé de la même façon sur ce PC et serait bloqué aussi. Autorisez le dossier de l'installateur dans votre antivirus, ou désactivez Smart App Control dans Sécurité Windows (Contrôle des applications et du navigateur), puis relancez l'installateur.", + "check.vulkan_crash": "Le pilote graphique a planté quand l'installateur lui a demandé les cartes graphiques (code de sortie {code}), même avec les couches Vulkan des autres programmes désactivées. Installez le dernier pilote de votre carte graphique.", "check.cpu_too_old": "Ce processeur ne prend pas en charge x86-64-v2 (SSE4.2, POPCNT et CMPXCHG16B), le niveau le plus ancien pour lequel le jeu est compilé. Intel Nehalem (2008) ou AMD Bulldozer (2011) et plus récents l'ont.", "check.vulkan_missing": "Aucun pilote Vulkan n'est installé. Installez le dernier pilote de votre carte graphique.", "check.vulkan_no_device": "Vulkan ne trouve aucune carte graphique. Installez le dernier pilote de votre carte graphique.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "Les icônes de boutons Xbox, PlayStation ou PC n'ont pas pu être préparées (code de sortie {code}) ; le jeu garde les icônes Switch. Détails : {log}", "warn.shaders_skipped": "Le pilote graphique a planté pendant la construction de certains shaders ; {count} ont donc été exclus de la préparation. Le jeu les construit quand il en a besoin pour la première fois, et le pilote peut y planter aussi ; une mise à jour du pilote peut corriger cela. Détails : {log}", "warn.kernel_old": "Linux {version} ne dispose pas du suivi des écritures dont le jeu dépend (6.7 ou plus récent) ; le jeu peut être très lent. Mettre à jour le système corrige cela.", + "warn.vulkan_layer_crash": "Une couche Vulkan d'un autre programme a fait planter la vérification de l'ordinateur (code de sortie {code}) ; sans elle, la vérification a réussi. Couches installées : {layers}. Le jeu charge les mêmes couches et peut planter au démarrage : mettez à jour ou désinstallez le programme d'overlay, d'enregistrement ou de réglage qui a installé la couche fautive.", "warn.dlss_kept": "Une bibliothèque DLSS se trouve déjà dans le dossier d'installation ({path}) ; l'installation la conserve.", "warn.dlss_download_failed": "NVIDIA DLSS n'a pas pu être téléchargé depuis {url} : {detail}. Le jeu fonctionne sans ; la prochaine installation réessaiera.", "ui.title": "Installation de TotK", diff --git a/installer/text/it.json b/installer/text/it.json index b0323936..5f0fa912 100644 --- a/installer/text/it.json +++ b/installer/text/it.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "Il compilatore incluso non funziona: {detail}", "check.glibc_old": "La libreria C di questo sistema è glibc {version}; il compilatore dell'installazione richiede {need} o successiva (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 e successivi la hanno). Aggiornare il sistema risolve il problema.", "check.host_probe_failed": "Il controllo del computer non è stato eseguito (codice di uscita {code}).", + "check.host_blocked": "Windows ha bloccato un programma che il programma di installazione ha compilato su questo PC ({path}): {detail}. Smart App Control, un criterio App Control o un antivirus bloccano i programmi non firmati; anche il gioco viene compilato così su questo PC e verrebbe bloccato. Consenti la cartella di installazione nell'antivirus oppure disattiva Smart App Control in Sicurezza di Windows (Controllo app e browser), poi esegui di nuovo l'installazione.", + "check.vulkan_crash": "Il driver grafico si è bloccato quando l'installazione gli ha chiesto le schede grafiche (codice di uscita {code}), anche con i livelli Vulkan degli altri programmi disattivati. Installa il driver più recente della tua scheda grafica.", "check.cpu_too_old": "Questo processore non supporta x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), il livello più vecchio per cui il gioco viene compilato. Intel Nehalem (2008) o AMD Bulldozer (2011) e successivi lo supportano.", "check.vulkan_missing": "Non è installato alcun driver Vulkan. Installa il driver più recente della tua scheda grafica.", "check.vulkan_no_device": "Vulkan non trova alcuna scheda grafica. Installa il driver più recente della tua scheda grafica.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "Non è stato possibile preparare le icone dei pulsanti Xbox, PlayStation o PC (codice di uscita {code}); il gioco mantiene le icone di Switch. Dettagli: {log}", "warn.shaders_skipped": "Il driver grafico si è bloccato durante la creazione di alcuni shader, quindi {count} sono stati esclusi dalla preparazione. Il gioco li crea quando servono per la prima volta, e anche lì il driver potrebbe bloccarsi; un aggiornamento del driver potrebbe risolvere. Dettagli: {log}", "warn.kernel_old": "Linux {version} non ha il tracciamento delle scritture su cui si basa il gioco (6.7 o successivo); il gioco potrebbe essere molto lento. Aggiornare il sistema risolve il problema.", + "warn.vulkan_layer_crash": "Un livello Vulkan di un altro programma ha fatto bloccare il controllo del computer (codice di uscita {code}); senza di esso il controllo è riuscito. Livelli installati: {layers}. Il gioco carica gli stessi livelli e potrebbe bloccarsi all'avvio: aggiorna o disinstalla il programma di overlay, registrazione o tuning che ha installato quello difettoso.", "warn.dlss_kept": "Nella cartella di installazione c'è già una libreria DLSS ({path}); l'installazione la mantiene.", "warn.dlss_download_failed": "Impossibile scaricare NVIDIA DLSS da {url}: {detail}. Il gioco funziona senza; la prossima esecuzione dell'installazione riproverà.", "ui.title": "Installazione di TotK", diff --git a/installer/text/ja.json b/installer/text/ja.json index 9d47ea4c..27f4999a 100644 --- a/installer/text/ja.json +++ b/installer/text/ja.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "同梱のコンパイラーが動作しません: {detail}", "check.glibc_old": "このシステムの C ライブラリは glibc {version} です。セットアップのコンパイラーには {need} 以降が必要です (Ubuntu 22.04、Debian 12、Fedora 35、SteamOS 3 以降にあります)。システムを更新すると解決します。", "check.host_probe_failed": "コンピューターの確認を実行できませんでした (終了コード {code})。", + "check.host_blocked": "セットアップがこの PC でビルドしたプログラム ({path}) を Windows がブロックしました: {detail}。スマート アプリ コントロール、App Control ポリシー、またはウイルス対策ソフトが署名のないプログラムをブロックしています。ゲーム本体も同じ方法でこの PC でビルドされるため、同じくブロックされます。ウイルス対策ソフトでセットアップのフォルダーを許可するか、Windows セキュリティ (アプリとブラウザー コントロール) でスマート アプリ コントロールをオフにしてから、セットアップをもう一度実行してください。", + "check.vulkan_crash": "セットアップがグラフィックカードを問い合わせたときにグラフィックドライバーがクラッシュしました (終了コード {code})。他のプログラムの Vulkan レイヤーをオフにしても同じでした。グラフィックカードの最新ドライバーをインストールしてください。", "check.cpu_too_old": "このプロセッサーは、ゲームのビルド対象となる最も古いレベルである x86-64-v2 (SSE4.2、POPCNT、CMPXCHG16B) に対応していません。Intel Nehalem (2008 年) または AMD Bulldozer (2011 年) 以降が対応しています。", "check.vulkan_missing": "Vulkan ドライバーがインストールされていません。グラフィックカードの最新ドライバーをインストールしてください。", "check.vulkan_no_device": "Vulkan がグラフィックカードを見つけられません。グラフィックカードの最新ドライバーをインストールしてください。", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "Xbox、PlayStation、PC のボタン表示を準備できませんでした (終了コード {code})。ゲームは Switch のボタン表示のままです。詳細: {log}", "warn.shaders_skipped": "一部のシェーダーのビルド中にグラフィックドライバーがクラッシュしたため、{count} 個を準備から除外しました。ゲームは初めて必要になったときにそれらをビルドしますが、そこでもドライバーがクラッシュする可能性があります。ドライバーを更新すると解決することがあります。詳細: {log}", "warn.kernel_old": "Linux {version} には、ゲームが必要とする書き込み追跡 (6.7 以降) がありません。ゲームが非常に遅くなることがあります。システムを更新すると解決します。", + "warn.vulkan_layer_crash": "他のプログラムの Vulkan レイヤーがコンピューターの確認をクラッシュさせました (終了コード {code})。そのレイヤーなしでは確認は成功しました。インストール済みのレイヤー: {layers}。ゲームも同じレイヤーを読み込むため、起動時にクラッシュすることがあります。問題のレイヤーを入れたオーバーレイ、録画、チューニングのプログラムを更新するかアンインストールしてください。", "warn.dlss_kept": "インストール先フォルダーには既に DLSS ライブラリがあります ({path})。セットアップはそれを残します。", "warn.dlss_download_failed": "NVIDIA DLSS を {url} からダウンロードできませんでした: {detail}。ゲームはなしで動作します。次回のセットアップ実行時に再試行します。", "ui.title": "TotK セットアップ", diff --git a/installer/text/ko.json b/installer/text/ko.json index 84c0034e..b2363756 100644 --- a/installer/text/ko.json +++ b/installer/text/ko.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "포함된 컴파일러가 작동하지 않습니다: {detail}", "check.glibc_old": "이 시스템의 C 라이브러리는 glibc {version}입니다. 설치 프로그램의 컴파일러에는 {need} 이상이 필요합니다(Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 이상에 있음). 시스템을 업데이트하면 해결됩니다.", "check.host_probe_failed": "컴퓨터 확인이 실행되지 않았습니다(종료 코드 {code}).", + "check.host_blocked": "설치 프로그램이 이 PC에서 빌드한 프로그램({path})을 Windows가 차단했습니다: {detail}. 스마트 앱 컨트롤, App Control 정책 또는 백신이 서명되지 않은 프로그램을 차단합니다. 게임 자체도 이 PC에서 같은 방식으로 빌드되므로 마찬가지로 차단됩니다. 백신에서 설치 프로그램 폴더를 허용하거나 Windows 보안(앱 및 브라우저 컨트롤)에서 스마트 앱 컨트롤을 끈 다음 설치 프로그램을 다시 실행하세요.", + "check.vulkan_crash": "설치 프로그램이 그래픽 카드를 조회하는 중에 그래픽 드라이버가 충돌했습니다(종료 코드 {code}). 다른 프로그램의 Vulkan 레이어를 끈 상태에서도 마찬가지였습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", "check.cpu_too_old": "이 프로세서에는 게임이 빌드되는 가장 오래된 수준인 x86-64-v2(SSE4.2, POPCNT, CMPXCHG16B)가 없습니다. Intel Nehalem(2008) 또는 AMD Bulldozer(2011) 이후 프로세서에 있습니다.", "check.vulkan_missing": "Vulkan 드라이버가 설치되어 있지 않습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", "check.vulkan_no_device": "Vulkan이 그래픽 카드를 찾지 못했습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "Xbox, PlayStation 또는 PC 버튼 표시를 준비할 수 없었습니다(종료 코드 {code}). 게임은 Switch 버튼 표시를 유지합니다. 자세히: {log}", "warn.shaders_skipped": "일부 셰이더를 빌드하는 동안 그래픽 드라이버가 충돌하여 {count}개를 준비에서 제외했습니다. 게임은 처음 필요할 때 이를 빌드하며, 그때도 드라이버가 충돌할 수 있습니다. 드라이버를 업데이트하면 해결될 수 있습니다. 자세히: {log}", "warn.kernel_old": "Linux {version}에는 게임이 사용하는 쓰기 추적(6.7 이상)이 없습니다. 게임이 매우 느릴 수 있습니다. 시스템을 업데이트하면 해결됩니다.", + "warn.vulkan_layer_crash": "다른 프로그램의 Vulkan 레이어 때문에 컴퓨터 확인이 충돌했습니다(종료 코드 {code}). 그 레이어 없이는 확인을 통과했습니다. 설치된 레이어: {layers}. 게임도 같은 레이어를 불러오므로 시작할 때 충돌할 수 있습니다. 문제의 레이어를 설치한 오버레이, 녹화 또는 튜닝 프로그램을 업데이트하거나 제거하세요.", "warn.dlss_kept": "설치 폴더에 이미 DLSS 라이브러리가 있습니다({path}). 설치 프로그램은 그대로 둡니다.", "warn.dlss_download_failed": "{url}에서 NVIDIA DLSS를 다운로드할 수 없습니다: {detail}. 게임은 없이도 실행되며, 다음 설치 실행 때 다시 시도합니다.", "ui.title": "TotK 설치", diff --git a/installer/text/nl.json b/installer/text/nl.json index 703fc825..3af60fb2 100644 --- a/installer/text/nl.json +++ b/installer/text/nl.json @@ -54,6 +54,8 @@ "check.toolchain_broken": "De meegeleverde compiler werkt niet: {detail}", "check.glibc_old": "De C-bibliotheek van dit systeem is glibc {version}; de compiler van de installatie heeft {need} of nieuwer nodig (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 en nieuwer hebben die). Het systeem bijwerken lost dit op.", "check.host_probe_failed": "De computercontrole is niet uitgevoerd (afsluitcode {code}).", + "check.host_blocked": "Windows heeft een programma geblokkeerd dat de installatie op deze pc heeft gebouwd ({path}): {detail}. Slim app-beheer, een App Control-beleid of een virusscanner blokkeert niet-ondertekende programma's; het spel zelf wordt op dezelfde manier op deze pc gebouwd en zou ook worden geblokkeerd. Sta de installatiemap toe in je virusscanner, of zet Slim app-beheer uit in Windows-beveiliging (App- en browserbeheer), en start de installatie opnieuw.", + "check.vulkan_crash": "Het grafische stuurprogramma is gecrasht toen de installatie het om de videokaarten vroeg (afsluitcode {code}), ook met de Vulkan-lagen van andere programma's uitgeschakeld. Installeer het nieuwste stuurprogramma voor je videokaart.", "check.cpu_too_old": "Deze processor mist x86-64-v2 (SSE4.2, POPCNT en CMPXCHG16B), het oudste niveau waarvoor het spel wordt gebouwd. Intel Nehalem (2008) of AMD Bulldozer (2011) en nieuwer hebben het.", "check.vulkan_missing": "Er is geen Vulkan-stuurprogramma geïnstalleerd. Installeer het nieuwste stuurprogramma voor je videokaart.", "check.vulkan_no_device": "Vulkan vindt geen videokaart. Installeer het nieuwste stuurprogramma voor je videokaart.", @@ -111,6 +113,7 @@ "warn.xbox_prompts_failed": "De Xbox-, PlayStation- of pc-knoppictogrammen konden niet worden voorbereid (afsluitcode {code}); het spel houdt de Switch-pictogrammen. Details: {log}", "warn.shaders_skipped": "Het grafische stuurprogramma is gecrasht bij het bouwen van enkele shaders, dus {count} zijn uit de voorbereiding weggelaten. Het spel bouwt ze wanneer het ze voor het eerst nodig heeft, en het stuurprogramma kan daar ook crashen; een update van het stuurprogramma kan dit oplossen. Details: {log}", "warn.kernel_old": "Linux {version} mist de schrijftracering waar het spel op rekent (6.7 of nieuwer); het spel kan erg traag zijn. Het systeem bijwerken lost dit op.", + "warn.vulkan_layer_crash": "Een Vulkan-laag van een ander programma liet de computercontrole crashen (afsluitcode {code}); zonder die laag slaagde de controle. Geïnstalleerde lagen: {layers}. Het spel laadt dezelfde lagen en kan bij het starten crashen: werk het overlay-, opname- of tuningprogramma dat de foute laag installeerde bij of verwijder het.", "warn.dlss_kept": "Er staat al een DLSS-bibliotheek in de installatiemap ({path}); de installatie laat die staan.", "warn.dlss_download_failed": "NVIDIA DLSS kon niet worden gedownload van {url}: {detail}. Het spel werkt zonder; de volgende installatieronde probeert het opnieuw.", "ui.title": "TotK-installatie", diff --git a/installer/text/pt-BR.json b/installer/text/pt-BR.json index f94e7c9a..d4b9341a 100644 --- a/installer/text/pt-BR.json +++ b/installer/text/pt-BR.json @@ -57,6 +57,8 @@ "check.toolchain_broken": "O compilador incluído não funciona: {detail}", "check.glibc_old": "A biblioteca C deste sistema é a glibc {version}; o compilador da instalação precisa da {need} ou mais nova (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 e mais novos têm). Atualizar o sistema resolve.", "check.host_probe_failed": "A verificação do computador não rodou (código de saída {code}).", + "check.host_blocked": "O Windows bloqueou um programa que o instalador compilou neste PC ({path}): {detail}. O Controle Inteligente de Aplicativos, uma política de App Control ou um antivírus bloqueia programas sem assinatura; o próprio jogo é compilado do mesmo jeito neste PC e também seria bloqueado. Libere a pasta do instalador no seu antivírus ou desative o Controle Inteligente de Aplicativos na Segurança do Windows (Controle de aplicativos e do navegador) e rode o instalador de novo.", + "check.vulkan_crash": "O driver de vídeo travou quando o instalador pediu a lista de placas de vídeo (código de saída {code}), mesmo com as camadas Vulkan de outros programas desativadas. Instale o driver mais recente da sua placa de vídeo.", "check.cpu_too_old": "Este processador não tem x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), o nível mais antigo para o qual o jogo é compilado. Intel Nehalem (2008) ou AMD Bulldozer (2011) e mais novos têm.", "check.vulkan_missing": "Nenhum driver Vulkan está instalado. Instale o driver mais recente da sua placa de vídeo.", "check.vulkan_no_device": "O Vulkan não encontra nenhuma placa de vídeo. Instale o driver mais recente da sua placa de vídeo.", @@ -116,6 +118,7 @@ "warn.xbox_prompts_failed": "Não foi possível preparar os ícones de botão do Xbox, do PlayStation ou do PC (código de saída {code}); o jogo mantém os ícones do Switch. Detalhes: {log}", "warn.shaders_skipped": "O driver gráfico travou ao compilar alguns shaders, então {count} ficaram fora da preparação. O jogo os compila quando precisar deles pela primeira vez, e o driver pode travar ali também; uma atualização do driver pode resolver. Detalhes: {log}", "warn.kernel_old": "O Linux {version} não tem o rastreamento de escrita de que o jogo depende (6.7 ou mais novo); o jogo pode rodar muito devagar. Atualizar o sistema resolve.", + "warn.vulkan_layer_crash": "Uma camada Vulkan de outro programa travou a verificação do computador (código de saída {code}); sem ela a verificação passou. Camadas instaladas: {layers}. O jogo carrega as mesmas camadas e pode travar ao iniciar: atualize ou desinstale o programa de overlay, gravação ou ajuste que instalou a camada com problema.", "warn.dlss_kept": "Já existe uma biblioteca DLSS na pasta de instalação ({path}); a instalação a mantém.", "warn.dlss_download_failed": "Não foi possível baixar o NVIDIA DLSS de {url}: {detail}. O jogo funciona sem ele; a próxima execução da instalação tenta de novo.", diff --git a/installer/text/ru.json b/installer/text/ru.json index 7d36c372..e43445e9 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -57,6 +57,8 @@ "check.toolchain_broken": "Встроенный компилятор не работает: {detail}", "check.glibc_old": "Библиотека C этой системы — glibc {version}; компилятору установщика нужна {need} или новее (она есть в Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 и новее). Обновление системы это исправит.", "check.host_probe_failed": "Проверка компьютера не выполнилась (код выхода {code}).", + "check.host_blocked": "Windows заблокировала программу, которую установщик собрал на этом компьютере ({path}): {detail}. Интеллектуальное управление приложениями (Smart App Control), политика App Control или антивирус блокируют неподписанные программы; сама игра собирается на этом компьютере так же и тоже будет заблокирована. Разрешите папку установщика в антивирусе или отключите интеллектуальное управление приложениями в «Безопасности Windows» («Управление приложениями/браузером») и запустите установщик снова.", + "check.vulkan_crash": "Видеодрайвер аварийно завершился, когда установщик запросил список видеокарт (код выхода {code}), в том числе с отключёнными слоями Vulkan других программ. Установите свежий драйвер видеокарты.", "check.cpu_too_old": "Этому процессору не хватает x86-64-v2 (SSE4.2, POPCNT и CMPXCHG16B) — минимального уровня, под который собрана игра. Он есть у Intel Nehalem (2008) и AMD Bulldozer (2011) и новее.", "check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.", "check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.", @@ -116,6 +118,7 @@ "warn.xbox_prompts_failed": "Не удалось подготовить подсказки кнопок Xbox, PlayStation или PC (код выхода {code}); игра оставит подсказки Switch. Подробности: {log}", "warn.shaders_skipped": "Графический драйвер аварийно завершился при сборке части шейдеров, поэтому {count} из них пропущены при подготовке. Игра соберёт их, когда они впервые понадобятся, и драйвер может упасть и там; обновление драйвера может это исправить. Подробности: {log}", "warn.kernel_old": "В Linux {version} нет отслеживания записи, на которое опирается игра (нужна версия 6.7 или новее); игра может работать очень медленно. Обновление системы это исправит.", + "warn.vulkan_layer_crash": "Слой Vulkan другой программы обрушил проверку компьютера (код выхода {code}); без него проверка прошла. Установленные слои: {layers}. Игра загружает те же слои и может упасть при запуске: обновите или удалите программу оверлея, записи или настройки, которая установила сбойный слой.", "warn.dlss_kept": "В папке установки уже есть библиотека DLSS ({path}); установка её оставляет.", "warn.dlss_download_failed": "Не удалось загрузить NVIDIA DLSS с {url}: {detail}. Игра работает и без него; при следующем запуске установка попробует снова.", diff --git a/installer/text/zh-Hans.json b/installer/text/zh-Hans.json index 5833c798..29588fe0 100644 --- a/installer/text/zh-Hans.json +++ b/installer/text/zh-Hans.json @@ -57,6 +57,8 @@ "check.toolchain_broken": "自带的编译器无法工作:{detail}", "check.glibc_old": "此系统的 C 库为 glibc {version};安装程序的编译器需要 {need} 或更新版本(Ubuntu 22.04、Debian 12、Fedora 35、SteamOS 3 及更新版本都满足)。更新系统即可解决。", "check.host_probe_failed": "电脑检查未能运行(退出代码 {code})。", + "check.host_blocked": "Windows 阻止了安装程序在这台电脑上编译的程序({path}):{detail}。智能应用控制、App Control 策略或杀毒软件会阻止未签名的程序;游戏本身也以同样方式在这台电脑上编译,同样会被阻止。请在杀毒软件中允许安装程序所在的文件夹,或在 Windows 安全中心(应用和浏览器控制)中关闭智能应用控制,然后重新运行安装程序。", + "check.vulkan_crash": "安装程序向显卡驱动查询显卡时,驱动崩溃了(退出代码 {code}),关闭其他程序的 Vulkan 层后依然如此。请为你的显卡安装最新的驱动程序。", "check.cpu_too_old": "此处理器不支持 x86-64-v2(SSE4.2、POPCNT 和 CMPXCHG16B),这是游戏所需的最低指令集。Intel Nehalem(2008 年)或 AMD Bulldozer(2011 年)及更新的处理器都支持。", "check.vulkan_missing": "未安装 Vulkan 驱动。请为你的显卡安装最新的驱动程序。", "check.vulkan_no_device": "Vulkan 找不到显卡。请为你的显卡安装最新的驱动程序。", @@ -116,6 +118,7 @@ "warn.xbox_prompts_failed": "无法准备 Xbox、PlayStation 或 PC 按键提示(退出代码 {code});游戏将继续使用 Switch 按键提示。详情:{log}", "warn.shaders_skipped": "显卡驱动在编译部分着色器时崩溃,因此有 {count} 个着色器未被预先准备。游戏会在首次需要时编译它们,驱动在那时也可能崩溃;更新驱动可能会解决。详情:{log}", "warn.kernel_old": "Linux {version} 缺少游戏依赖的写入跟踪功能(需要 6.7 或更新版本);游戏可能运行得很慢。更新系统即可解决。", + "warn.vulkan_layer_crash": "另一个程序的 Vulkan 层导致电脑检查崩溃(退出代码 {code});去掉它后检查通过。已安装的层:{layers}。游戏会加载同样的层,启动时可能崩溃:请更新或卸载安装了出错层的叠加层、录制或调校程序。", "warn.dlss_kept": "安装文件夹中已有 DLSS 库({path});安装程序将保留它。", "warn.dlss_download_failed": "无法从 {url} 下载 NVIDIA DLSS:{detail}。游戏无需它也能运行;下次运行安装程序时会重试。", diff --git a/tests/installer_test.py b/tests/installer_test.py index 92de8b4d..e80b320d 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -6,7 +6,9 @@ Run: python tests/installer_test.py import http.client import io import json +import os import re +import subprocess import sys import tempfile import unittest @@ -1256,5 +1258,93 @@ class DlssTest(unittest.TestCase): self.assertEqual(self.warnings(), []) +class HostProbeTest(unittest.TestCase): + """Check.probe_host: the host check's crashes and refusals (issues #875, #1345).""" + GOOD = '{"x86_64_v2": true, "x86_64_v3": true, "loader": true, "instance": 0, "devices": [' \ + '{"name": "Intel(R) UHD Graphics", "api": [1, 3, 215], "type": 1}]}\n' + CRASHED_IN_VULKAN = '{"x86_64_v2": true, "x86_64_v3": true, "loader": true, ' + ACCESS_VIOLATION = 0xC0000005 + + def setUp(self): + self.ctx = SimpleNamespace(reporter=Reporter(out=io.StringIO())) + self.calls = [] + + def tearDown(self): + self.ctx.reporter.close() + + def probe(self, *results): + """Runs probe_host with subprocess.run answering each call with the next of results (an exception is raised).""" + answers = iter(results) + + def run(command, **kwargs): + self.calls.append(kwargs.get('env')) + r = next(answers) + if isinstance(r, BaseException): + raise r + return subprocess.CompletedProcess(command, r[0], r[1], '') + + with mock.patch.object(steps.subprocess, 'run', run), \ + mock.patch.object(steps, 'implicit_vulkan_layers', lambda: ['BadOverlay64.json']): + return steps.Check().probe_host(self.ctx, Path('hostcheck.exe')) + + def events(self, kind): + return [e for e in map(json.loads, self.ctx.reporter.out.getvalue().splitlines()) if e['type'] == kind] + + def test_a_good_probe_runs_once(self): + host = self.probe((0, self.GOOD)) + self.assertEqual(host['devices'][0]['api'], [1, 3, 215]) + self.assertEqual(self.calls, [None]) + self.assertEqual(self.events('warning'), []) + + def test_a_crash_in_a_vulkan_layer_is_run_again_without_the_implicit_layers(self): + host = self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (0, self.GOOD)) + self.assertEqual(host['devices'][0]['name'], 'Intel(R) UHD Graphics') + self.assertIsNone(self.calls[0]) + self.assertEqual(self.calls[1]['VK_LOADER_LAYERS_DISABLE'], '~implicit~') + [w] = self.events('warning') + self.assertEqual(w['id'], 'warn.vulkan_layer_crash') + self.assertEqual(w['params']['layers'], 'BadOverlay64.json') + if os.name == 'nt': + self.assertEqual(w['params']['code'], '0xC0000005') + + def test_a_driver_that_crashes_without_the_layers_too_stops_the_install(self): + with self.assertRaises(steps.InstallError) as e: + self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN)) + self.assertEqual(e.exception.id, 'check.vulkan_crash') + self.assertEqual(len(self.calls), 2) + + def test_a_crash_before_vulkan_is_not_run_again(self): + with self.assertRaises(steps.InstallError) as e: + self.probe((self.ACCESS_VIOLATION, '')) + self.assertEqual(e.exception.id, 'check.host_probe_failed') + self.assertEqual(len(self.calls), 1) + if os.name == 'nt': + self.assertEqual(e.exception.params['code'], '0xC0000005') + + @unittest.skipUnless(os.name == 'nt', 'winerror is set on Windows only') + def test_a_probe_blocked_by_smart_app_control_names_the_policy(self): + blocked = OSError(None, 'An Application Control policy has blocked this file', None, 4551) + with self.assertRaises(steps.InstallError) as e: + self.probe(blocked) + self.assertEqual(e.exception.id, 'check.host_blocked') + self.assertIn('Application Control', e.exception.params['detail']) + self.assertTrue(e.exception.params['path'].endswith('hostcheck.exe')) + + def test_another_start_failure_is_reported_not_raised(self): + with self.assertRaises(steps.InstallError) as e: + self.probe(OSError(2, 'The system cannot find the file specified')) + self.assertEqual(e.exception.id, 'check.host_probe_failed') + self.assertIn('cannot find', e.exception.params['code']) + + def test_messages_in_every_language(self): + for path in sorted((ROOT / 'installer' / 'text').glob('*.json')): + text = json.loads(path.read_text(encoding='utf-8')) + self.assertIn('{path}', text['check.host_blocked'], path.name) + self.assertIn('{detail}', text['check.host_blocked'], path.name) + self.assertIn('{code}', text['check.vulkan_crash'], path.name) + self.assertIn('{code}', text['warn.vulkan_layer_crash'], path.name) + self.assertIn('{layers}', text['warn.vulkan_layer_crash'], path.name) + + if __name__ == '__main__': unittest.main() From e18eb68b6d0d8d88c43104b4ddae0f1648b695a0 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 02:17:23 -0800 Subject: [PATCH 24/66] tools/check_isa.py scans the instructions of linked images too An instruction line of llvm-objdump starts with its address: short and indented in an object, 9+ hex digits at the start of the line in a linked .exe or .dll. The scan kept only lines with leading whitespace, so it skipped every instruction of a linked image and reported it clean, although the usage line names executables. It now keeps lines that start with an address. tests/check_isa_test.py covers both forms. Co-Authored-By: Claude Opus 5.5 --- tests/check_isa_test.py | 72 +++++++++++++++++++++++++++++++++++++++++ tests/run_all.py | 1 + tools/check_isa.py | 6 +++- 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 tests/check_isa_test.py diff --git a/tests/check_isa_test.py b/tests/check_isa_test.py new file mode 100644 index 00000000..21e6d529 --- /dev/null +++ b/tests/check_isa_test.py @@ -0,0 +1,72 @@ +"""tools/check_isa.py finds instructions above x86-64-v2 in objects and in linked images. + + python tests/check_isa_test.py + +The disassembly below is llvm-objdump -d --no-show-raw-insn output for one AVX2 function, once from an object (short +indented addresses) and once from a linked .exe (9+ hex digits at the start of the line). Standard library only. +""" + +import subprocess +import sys +import unittest +from pathlib import Path +from unittest import mock + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tools')) +import check_isa # noqa: E402 + +OBJECT = ''' +avx.o:\tfile format coff-x86-64 + +Disassembly of section .text: + +0000000000000000 : + 0: \tvmovdqu\t(%rcx), %ymm0 + 4: \tvpaddd\t%ymm0, %ymm1, %ymm0 + 8: \tvzeroupper + b: \tretq +''' + +LINKED = ''' +avx.exe:\tfile format coff-x86-64 + +Disassembly of section .text: + +00000001400014b0 : +1400014b0: \tvmovdqu\t(%rcx), %ymm0 +1400014b4: \tvpshufd\t$0x55, %ymm0, %ymm1 # ymm1 = ymm0[1,1,1,1,5,5,5,5] +1400014b9: \tvpaddd\t%ymm0, %ymm1, %ymm0 +1400014bd: \tvzeroupper +1400014c0: \tretq + +00000001400014d0
: +1400014d0: \tsubq\t$0x28, %rsp +1400014d4: \tpopcntl\t%eax, %eax +1400014d8: \taddq\t$0x28, %rsp +1400014dc: \tretq +''' + + +def scan(text): + done = subprocess.CompletedProcess([], 0, text, '') + with mock.patch.object(check_isa.subprocess, 'run', return_value=done): + return check_isa.scan_one(Path('x'), 'llvm-objdump') + + +class ScanTest(unittest.TestCase): + def test_an_object_is_scanned(self): + hits = scan(OBJECT) + self.assertEqual(set(hits), {('avx.o', 'sum8')}) + self.assertEqual(hits[('avx.o', 'sum8')]['vpaddd'], 1) + + def test_a_linked_image_is_scanned(self): + hits = scan(LINKED) + self.assertEqual(set(hits), {('avx.exe', 'sum8')}) # main's popcnt is x86-64-v2 + self.assertEqual(sum(hits[('avx.exe', 'sum8')].values()), 4) + + def test_function_headers_and_blank_lines_are_not_instructions(self): + self.assertEqual(scan('\nDisassembly of section .text:\n\n00000001400014b0 :\n'), {}) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/run_all.py b/tests/run_all.py index 178eab4a..7b4ee957 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -48,6 +48,7 @@ TESTS = { # ---- no game files, no build ---- 'flags_check': ('.venv', None, [], ''), 'excl_mt': ('.venv', None, [], ''), + 'check_isa_test': ('.venv', None, [], ''), 'pack_shader_cache_test': ('.venv', None, [], ''), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), diff --git a/tools/check_isa.py b/tools/check_isa.py index e6306fdd..0f53431d 100644 --- a/tools/check_isa.py +++ b/tools/check_isa.py @@ -33,6 +33,7 @@ NON_V2 = {'andn', 'bextr', 'blsi', 'blsmsk', 'blsr', 'bzhi', 'shlx', 'shrx', 'sa 'pclmulqdq', 'rdrand', 'rdseed'} PREFIXES = {'rep', 'repe', 'repz', 'repne', 'repnz', 'lock', 'notrack', 'data16', 'cs', 'ds', 'es', 'ss', 'fs', 'gs'} WIDE = re.compile(r'%[yz]mm\d|%k[0-7]\b') +INSN = re.compile(r'^\s*[0-9a-f]+:') # Function -> the runtime check that keeps it off CPUs without the instructions. DISPATCHED = { @@ -89,7 +90,10 @@ def scan_one(path, objdump): if m: func = m.group(1) continue - if not line[:1].isspace(): + # An instruction line starts with its address: short and indented in an object, 9+ hex digits at the start of + # the line in a linked .exe or .dll. Testing for leading whitespace alone skipped every instruction of a linked + # image and reported it clean. + if not INSN.match(line): continue mn = mnemonic(line) if mn and func not in DISPATCHED and is_non_v2(line, mn): From 78f8362a9e034d1ab8718d5863962f286ba0d6d2 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 02:19:44 -0800 Subject: [PATCH 25/66] tools/build_game.py sizes the compile jobs by the free memory too The budget was the smaller of 50 GiB and 80% of the RAM, so RAM that other programs held counted as available: on a 16 GiB laptop with 2 GiB free it allowed 16 jobs of JOB_MEM (12 GiB), and the compile paged or a job ran out of memory. compile_budget also takes 80% of hostmem.available_ram (free physical memory, capped by a job memory limit), as recomp/gen.py already does for the lift workers; off Windows, where that is unknown, the budget is as before. The build prints the budget and the free memory it saw. tests/compile_budget_test.py covers it. Co-Authored-By: Claude Opus 5.5 --- tests/compile_budget_test.py | 37 ++++++++++++++++++++++++++++++++++++ tests/run_all.py | 1 + tools/build_game.py | 24 ++++++++++++++++++++--- 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 tests/compile_budget_test.py diff --git a/tests/compile_budget_test.py b/tests/compile_budget_test.py new file mode 100644 index 00000000..932813cd --- /dev/null +++ b/tests/compile_budget_test.py @@ -0,0 +1,37 @@ +"""tools/build_game.py compile_budget: the compile jobs fit the memory that is free, not only the RAM. + + python tests/compile_budget_test.py +""" +import sys +import unittest +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tools')) +from build_game import GiB, JOB_MEM, MEM_BUDGET, compile_budget # noqa: E402 + + +def jobs(budget, cpus=16): + return max(1, min(cpus, budget // JOB_MEM)) # as build_game.main + + +class CompileBudgetTest(unittest.TestCase): + def test_free_memory_limits_a_pc_whose_ram_other_programs_hold(self): + self.assertEqual(jobs(compile_budget(8 * GiB, None)), 8) # the RAM alone: 6.4 GiB, 8 jobs + self.assertEqual(jobs(compile_budget(8 * GiB, 3 * GiB)), 3) # 3 GiB free: 2.4 GiB, 3 jobs + self.assertEqual(compile_budget(8 * GiB, 3 * GiB), int(3 * GiB * 0.8)) + + def test_ram_still_limits_when_more_is_reported_free(self): + self.assertEqual(compile_budget(4 * GiB, 64 * GiB), int(4 * GiB * 0.8)) + + def test_unknown_free_memory_keeps_the_old_budget(self): + self.assertEqual(compile_budget(4 * GiB, None), int(4 * GiB * 0.8)) + self.assertEqual(compile_budget(128 * GiB, None), MEM_BUDGET) + + def test_no_free_memory_still_runs_one_job(self): + self.assertEqual(compile_budget(4 * GiB, 0), 0) + self.assertEqual(compile_budget(4 * GiB, -1), 0) + self.assertEqual(jobs(compile_budget(4 * GiB, 0)), 1) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/run_all.py b/tests/run_all.py index 178eab4a..b1d0b541 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -48,6 +48,7 @@ TESTS = { # ---- no game files, no build ---- 'flags_check': ('.venv', None, [], ''), 'excl_mt': ('.venv', None, [], ''), + 'compile_budget_test': ('.venv', None, [], ''), 'pack_shader_cache_test': ('.venv', None, [], ''), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), diff --git a/tools/build_game.py b/tools/build_game.py index e8d2aaf3..d660f4cd 100644 --- a/tools/build_game.py +++ b/tools/build_game.py @@ -42,8 +42,9 @@ objects Ninja just rebuilt (new mtime). A mismatch deletes the object, Ninja rec summary line. A fork checks the hardlinked generated objects against build//obj/objects.sha256 (read-only; a bad shared object stops the fork and asks for a main build run, which recompiles it and breaks the shared inode). -Compile jobs share a memory budget (MEM_BUDGET, default the smaller of 50 GiB and 80% of RAM) at JOB_MEM per job, so a -big machine does not run out of memory on the largest chunks. Each phase reports its wall time and the peak memory +Compile jobs share a memory budget (compile_budget: the smaller of MEM_BUDGET = 50 GiB, 80% of RAM and, on Windows, +80% of the memory free at the start) at JOB_MEM per job, so a big machine does not run out of memory on the largest +chunks, nor a small one already running a browser and the setup. Each phase reports its wall time and the peak memory of its processes (Windows job object accounting: committed private bytes). --ninja PATH names the Ninja to run; without MSYS2 the bin/ninja.exe of the release folder (tools/make_release.py) is used. @@ -77,6 +78,7 @@ import urllib.request from pathlib import Path import check_isa +import hostmem import romfs_index from build_shaders import stale as stale_shaders from check_content import GENERATED_MARKER @@ -220,6 +222,18 @@ GiB = 1 << 30 # (295k-entry tables). 768 MiB leaves headroom for the largest file. JOB_MEM = 768 << 20 MEM_BUDGET = 50 * GiB # total for all compile jobs +MEM_SHARE = 0.8 # of the RAM, and of the free memory, the compile jobs may take + + +def compile_budget(total, free): + """Bytes the compile jobs may take together: MEM_BUDGET, MEM_SHARE of the RAM (total) and MEM_SHARE of the memory + free now (free: hostmem.available_ram, None when unknown). The total alone counted the RAM other programs hold: on + an 8 GiB PC with 3 GiB free it allowed 8 jobs of JOB_MEM (6 GiB), so the compile paged or a job ran out of memory. + recomp/gen.py sizes the lift workers from the free memory the same way.""" + budget = min(MEM_BUDGET, int(total * MEM_SHARE)) + if free is not None: + budget = min(budget, int(max(0, free) * MEM_SHARE)) + return budget def below_root(p): @@ -1179,8 +1193,12 @@ def main(): mods = {} if args.make_runtime_lib else {m: chunk_files(gen, m) for m in linked} cpus = os.cpu_count() or 1 - budget = min(MEM_BUDGET, int(total_ram() * 0.8)) + free = hostmem.available_ram() + budget = compile_budget(total_ram(), free) jobs = args.jobs or max(1, min(cpus, budget // JOB_MEM)) + if not args.jobs: + print(f'build_game: {cpus} CPUs, {mib(budget)} for compile jobs' + f'{"" if free is None else f" ({mib(free)} free memory)"}', flush=True) plugins = read_plugin_files(gen) missing = [n for n in names if n not in hashes and n not in plugins] if missing: From df953b50623043a2f126e2fab9bd90a14e6cb2b0 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 03:21:11 -0800 Subject: [PATCH 26/66] installer/recent.py: raw docstring, so its Windows path no longer holds an invalid escape The docstring names %LOCALAPPDATA%\TotK Recomp\setup.json; "\T" is an invalid escape sequence, which Python 3.14 (the setup's bundled Python) reports as a SyntaxWarning every time the module is compiled, and which a later Python turns into a SyntaxError that would stop the setup from starting. A raw docstring keeps the text as written. Co-Authored-By: Claude Opus 5.5 --- installer/recent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/recent.py b/installer/recent.py index 5ebe75cd..375ee906 100644 --- a/installer/recent.py +++ b/installer/recent.py @@ -1,4 +1,4 @@ -"""The last install folder and source paths, in a per-user file, so an update, a reinstall or a switch to another game +r"""The last install folder and source paths, in a per-user file, so an update, a reinstall or a switch to another game version starts with the form filled in. {"format": 1, "dest": ..., "base": ..., "update": ..., "keys": ..., "firmware": ...} From 5bbd461d353bfa5302ef748bbd5e52fac165314b Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 12:26:32 +0000 Subject: [PATCH 27/66] Keep installer actions visible on small screens (#744) --- installer/gui.py | 126 +++++++++++++++++++++++++++++++----- tests/installer_gui_test.py | 90 ++++++++++++++++++++++++++ 2 files changed, 199 insertions(+), 17 deletions(-) diff --git a/installer/gui.py b/installer/gui.py index a2e2f5ce..8dffaf2d 100644 --- a/installer/gui.py +++ b/installer/gui.py @@ -114,6 +114,73 @@ def use_sun_valley(root, ui_font): return True +class ScrollArea(ttk.Frame): + """A screen's content scrolls while its action bar stays outside the viewport.""" + + def __init__(self, parent): + super().__init__(parent) + background = ttk.Style(parent).lookup('TFrame', 'background') or parent.winfo_toplevel().cget('background') + self.canvas = tk.Canvas(self, width=1, height=1, borderwidth=0, highlightthickness=0, background=background) + self.scrollbar = ttk.Scrollbar(self, orient='vertical', command=self.canvas.yview) + self.canvas.configure(yscrollcommand=self.scrollbar.set) + self.canvas.pack(side='left', fill='both', expand=True) + self.content = ttk.Frame(self.canvas) + self.window = self.canvas.create_window((0, 0), window=self.content, anchor='nw') + self.content.bind('', lambda _e: self.canvas.configure(scrollregion=self.canvas.bbox('all'))) + self.canvas.bind('', lambda e: self.canvas.itemconfigure(self.window, width=e.width)) + root = self.winfo_toplevel() + root.bind('', self.reveal_focus, add='+') + for sequence in ('',) + (('', '') if sys.platform.startswith('linux') else ()): + root.bind(sequence, self.wheel, add='+') + + def contains(self, widget): + return widget is self.canvas or str(widget).startswith(str(self.content) + '.') or widget is self.content + + def natural(self): + width = self.content.winfo_reqwidth() + if int(self.canvas.cget('width')) == width: + return False + self.canvas.configure(width=width) + return True + + def limit_height(self, height): + height = max(1, height) + scroll = height < self.content.winfo_reqheight() + changed = bool(self.scrollbar.winfo_manager()) != scroll + if changed: + if scroll: + self.scrollbar.pack(side='right', fill='y', before=self.canvas) + else: + self.scrollbar.pack_forget() + if int(self.canvas.cget('height')) != height: + self.canvas.configure(height=height) + changed = True + return changed + + def reveal_focus(self, event): + if not self.contains(event.widget) or event.widget is self.canvas: + return + top = event.widget.winfo_rooty() - self.content.winfo_rooty() + bottom = top + event.widget.winfo_height() + visible = self.canvas.canvasy(0) + height = self.canvas.winfo_height() + if top < visible: + self.canvas.yview_moveto(top / max(1, self.content.winfo_height())) + elif bottom > visible + height: + self.canvas.yview_moveto((bottom - height) / max(1, self.content.winfo_height())) + + def wheel(self, event): + if not self.contains(event.widget) or event.widget.winfo_class() in ('Text', 'Listbox', 'TCombobox'): + return + if self.canvas.yview() == (0.0, 1.0): + return + units = -1 if event.num == 4 else 1 if event.num == 5 else -int(event.delta / 120) + if not units and event.delta: + units = -1 if event.delta > 0 else 1 + self.canvas.yview_scroll(units, 'units') + return 'break' + + class App: def __init__(self, root, ui_lang, layout, run_args=None, rebuild=None): self.root, self.layout = root, layout @@ -180,6 +247,7 @@ class App: self.ui_box.pack(side='left') self.body = ttk.Frame(root, padding=PAD) self.body.pack(fill='both', expand=True) + self.scroll_areas = {} self.frames = {'form': self.build_form(), 'run': self.build_run(), 'finish': self.build_finish()} self.vars['lang'].set(self.lang_label(self.lang_code)) self.vars['dest'].trace_add('write', lambda *_: self.refresh_form()) @@ -267,13 +335,28 @@ class App: for), so a screen or language switch does not move the buttons sideways, and the height of the shown screen, so no screen carries the empty band of a taller one. Every text change that can add lines calls it again, or pack takes the missing height from the button bars. Without `shrink` the window only grows and a size the user - dragged it to stays; a screen or language switch and closing the details or the log shrink it to fit.""" + dragged it to stays; a screen or language switch and closing the details or the log shrink it to fit. A screen + taller than the display scrolls its content while its action bar remains outside the viewport.""" self.root.update_idletasks() + widths_changed = [area.natural() for area in self.scroll_areas.values()] + if any(widths_changed): + self.root.update_idletasks() widths = [f.winfo_reqwidth() for f in self.frames.values()] shown = self.frames[self.screen] if self.screen else max(self.frames.values(), key=lambda f: f.winfo_reqheight()) chrome = self.root.winfo_reqheight() - self.body.winfo_reqheight() # the title row above the body w = max(self.root.winfo_reqwidth(), max(widths) + 2 * PAD) h = chrome + shown.winfo_reqheight() + 2 * PAD + area = self.scroll_areas.get(self.screen) + if area: + h += area.content.winfo_reqheight() - area.canvas.winfo_reqheight() + # Leave room for window decorations and the desktop's panels. Content scrolls; the footer stays visible. + limit = max(1, self.root.winfo_screenheight() - dpi.px(80)) + if area: + changed = area.limit_height(area.content.winfo_reqheight() - max(0, h - limit)) + h = min(h, limit) + if changed: + self.root.update_idletasks() + w = max(w, shown.winfo_reqwidth() + 2 * PAD) # refresh_run calls it on every poll: leave the window alone while nothing grew if (w, h) == self.fitted and (not shrink or self.root.winfo_height() == h): return @@ -281,6 +364,12 @@ class App: self.root.minsize(w, h) self.root.geometry(f'{max(w, self.root.winfo_width())}x{h if shrink else max(h, self.root.winfo_height())}') + def scroll_content(self, parent, name): + area = ScrollArea(parent) + area.pack(fill='both', expand=True) + self.scroll_areas[name] = area + return area.content + def notice(self, parent): w = ttk.Label(parent, style='Notice.TLabel', wraplength=WRAP, justify='left') self.bind_text(w, 'text', 'ui.notice') @@ -310,9 +399,10 @@ class App: self.form_error.pack(side='bottom', anchor='w', pady=(dpi.px(4), 0)) self.update_hint = ttk.Label(f, style='Status.TLabel', wraplength=WRAP, justify='left') self.update_hint.pack(side='bottom', anchor='w', pady=(dpi.px(8), 0)) - self.form_intro = self.label(f, 'ui.intro', wraplength=WRAP, justify='left') + content = self.scroll_content(f, 'form') + self.form_intro = self.label(content, 'ui.intro', wraplength=WRAP, justify='left') self.form_intro.pack(anchor='w', pady=(0, dpi.px(4))) - grid = ttk.Frame(f) + grid = ttk.Frame(content) grid.pack(fill='x') grid.columnconfigure(1, weight=1) self.section(grid, 0, 'ui.section_files', dpi.px(6)) @@ -344,16 +434,16 @@ class App: # On by default and named with its source and licence: the player sees what is downloaded and can untick it. # The source and licence line is the first one under More details. self.dlss_var = tk.BooleanVar(value=True) - dlss = ttk.Checkbutton(f, variable=self.dlss_var) + dlss = ttk.Checkbutton(content, variable=self.dlss_var) self.bind_text(dlss, 'text', 'ui.dlss') dlss.pack(anchor='w', pady=(dpi.px(12), 0)) # The explanations stay out of the way until asked for: a link opens them under it - self.details_toggle = ttk.Label(f, style='Link.TLabel', cursor='hand2', takefocus=True) + self.details_toggle = ttk.Label(content, style='Link.TLabel', cursor='hand2', takefocus=True) self.bind_text(self.details_toggle, 'text', 'ui.more_details') for seq in ('', '', ''): self.details_toggle.bind(seq, lambda _e: self.toggle_details()) self.details_toggle.pack(anchor='w', pady=(dpi.px(8), 0)) - self.details = ttk.Frame(f) # packed after the link when open; no holder frame, as an emptied Tk frame keeps + self.details = ttk.Frame(content) # packed after the link when open; no holder frame, as an emptied Tk frame keeps # the height its last child gave it for id in ('ui.dlss_help', 'ui.formats_help', 'ui.compressed_help', 'ui.firmware_help', 'ui.keys_private'): self.label(self.details, id, style='Muted.TLabel', wraplength=WRAP - dpi.px(16), @@ -379,14 +469,15 @@ class App: self.cancel_button.pack(side='right') self.log_toggle = self.button(bar, 'ui.show_log', self.toggle_log) self.log_toggle.pack(side='left') - self.run_header = ttk.Label(f, font=(self.ui_font, 11, 'bold')) + content = self.scroll_content(f, 'run') + self.run_header = ttk.Label(content, font=(self.ui_font, 11, 'bold')) self.run_header.pack(anchor='w') self.step_rows = {} - self.steps_box = ttk.Frame(f) + self.steps_box = ttk.Frame(content) self.steps_box.pack(fill='x', pady=dpi.px(8)) - self.phase_label = ttk.Label(f, wraplength=WRAP, justify='left') + self.phase_label = ttk.Label(content, wraplength=WRAP, justify='left') self.phase_label.pack(anchor='w') - bar_holder = ttk.Frame(f) + bar_holder = ttk.Frame(content) bar_holder.pack(fill='x', pady=(dpi.px(4), dpi.px(6))) self.bar = ttk.Progressbar(bar_holder, mode='determinate', maximum=1000) self.bar.pack(fill='both', expand=True) @@ -396,11 +487,11 @@ class App: # holder follows it. bar_holder.pack_propagate(False) bar_holder.configure(height=dpi.px(22)) - self.space_label = ttk.Label(f, wraplength=WRAP, justify='left') + self.space_label = ttk.Label(content, wraplength=WRAP, justify='left') self.space_label.pack(anchor='w') - self.warn_label = ttk.Label(f, wraplength=WRAP, justify='left', foreground='#9a6700') + self.warn_label = ttk.Label(content, wraplength=WRAP, justify='left', foreground='#9a6700') self.warn_label.pack(anchor='w') - self.log_frame = ttk.Frame(f) + self.log_frame = ttk.Frame(content) self.log = tk.Text(self.log_frame, height=10, wrap='word', state='disabled', font=(self.mono_font, 9)) scroll = ttk.Scrollbar(self.log_frame, command=self.log.yview) self.log.configure(yscrollcommand=scroll.set) @@ -420,13 +511,14 @@ class App: self.back_button.pack(side='left') if self.rebuild: # a failed or cancelled rebuild: the game starts with the code it has self.button(bar, 'ui.start_game', self.start_game).pack(side='right', padx=(0, dpi.px(8))) - self.finish_title = ttk.Label(f, style='Title.TLabel', wraplength=WRAP, justify='left') + content = self.scroll_content(f, 'finish') + self.finish_title = ttk.Label(content, style='Title.TLabel', wraplength=WRAP, justify='left') self.finish_title.pack(anchor='w') - self.finish_text = ttk.Label(f, wraplength=WRAP, justify='left') + self.finish_text = ttk.Label(content, wraplength=WRAP, justify='left') self.finish_text.pack(anchor='w', pady=dpi.px(8)) - self.finish_steps = ttk.Frame(f) + self.finish_steps = ttk.Frame(content) self.finish_steps.pack(fill='x', pady=(0, dpi.px(8))) - self.finish_notice = self.notice(f) + self.finish_notice = self.notice(content) self.finish_notice.pack(fill='x', pady=(dpi.px(8), 0)) return f diff --git a/tests/installer_gui_test.py b/tests/installer_gui_test.py index 663b5e6a..e6de3518 100644 --- a/tests/installer_gui_test.py +++ b/tests/installer_gui_test.py @@ -539,6 +539,96 @@ class RecentTest(unittest.TestCase): self.assertEqual(gui.load_recent(), {'dest': 'x'}) +@unittest.skipIf(gui is None, 'no tkinter') +class SmallScreenTest(unittest.TestCase): + def setUp(self): + self.tmp = tempfile.TemporaryDirectory() + self.addCleanup(self.tmp.cleanup) + env = unittest.mock.patch.dict(os.environ, {recent.ENV: str(Path(self.tmp.name) / 'recent.json')}) + env.start() + self.addCleanup(env.stop) + gui.fix_tcl_paths() + self.root = gui.tk.Tk() + self.addCleanup(self.root.destroy) + self.root.tk.call('tk', 'scaling', 2.0) + for name, value in (('winfo_screenheight', 700), ('winfo_screenwidth', 1200)): + mock = unittest.mock.patch.object(self.root, name, return_value=value) + mock.start() + self.addCleanup(mock.stop) + self.app = gui.App(self.root, 'en', layouts.dev_layout(ROOT)) + self.root.update() + + def assert_start_visible(self): + self.assertLessEqual(self.root.winfo_height(), 700) + bottom = self.app.start_button.winfo_rooty() + self.app.start_button.winfo_height() + self.assertLessEqual(bottom, self.root.winfo_rooty() + self.root.winfo_height()) + + def test_form_fits_a_small_screen_with_large_fonts(self): + self.assert_start_visible() + self.app.toggle_details() + self.root.update() + self.assert_start_visible() + + def test_expanded_details_are_reachable_without_moving_start(self): + self.app.toggle_details() + self.root.update() + self.assert_start_visible() + start_y = self.app.start_button.winfo_rooty() + canvas = self.app.scroll_areas['form'].canvas + canvas.yview_moveto(1) + self.root.update() + bottom = self.app.details.winfo_rooty() + self.app.details.winfo_height() + self.assertLessEqual(bottom, canvas.winfo_rooty() + canvas.winfo_height() + 1) + self.assertEqual(self.app.start_button.winfo_rooty(), start_y) + view = canvas.yview() + self.app.fit() # progress polling must not reset the user's scroll position + self.root.update() + self.assertEqual(canvas.yview(), view) + self.app.lang_box.focus_force() + self.root.update() + self.assertGreaterEqual(self.app.lang_box.winfo_rooty(), canvas.winfo_rooty()) + self.assertLessEqual(self.app.lang_box.winfo_rooty() + self.app.lang_box.winfo_height(), + canvas.winfo_rooty() + canvas.winfo_height()) + + def test_mouse_wheel_and_linux_buttons_scroll_the_content(self): + self.app.toggle_details() + self.root.update() + canvas = self.app.scroll_areas['form'].canvas + for event, params in (('', {'delta': -120}), ('', {})): + with self.subTest(event=event): + canvas.yview_moveto(0) + if event == '' and not sys.platform.startswith('linux'): + self.app.scroll_areas['form'].wheel(SimpleNamespace(widget=canvas, num=5, delta=0)) + else: + canvas.event_generate(event, **params) + self.root.update() + self.assertGreater(canvas.yview()[0], 0) + self.assert_start_visible() + + def test_content_that_fits_needs_no_scrollbar(self): + with unittest.mock.patch.object(self.root, 'winfo_screenheight', return_value=2000): + self.app.fit(shrink=True) + self.root.update() + area = self.app.scroll_areas['form'] + self.assertFalse(area.scrollbar.winfo_manager()) + self.assertEqual(area.canvas.yview(), (0.0, 1.0)) + + def test_progress_and_finish_actions_stay_visible_with_long_content(self): + self.app.phase_label.configure(text='Long progress detail\n' * 40) + self.app.show('run') + self.root.update() + self.assertLessEqual(self.root.winfo_height(), 700) + self.assertLessEqual(self.app.cancel_button.winfo_rooty() + self.app.cancel_button.winfo_height(), + self.root.winfo_rooty() + self.root.winfo_height()) + self.app.finish_text.configure(text='Long finish detail\n' * 40) + self.app.show('finish') + self.root.update() + close = next(w for w, _, id, _ in self.app.bound if id == 'ui.close') + self.assertLessEqual(self.root.winfo_height(), 700) + self.assertLessEqual(close.winfo_rooty() + close.winfo_height(), + self.root.winfo_rooty() + self.root.winfo_height()) + + class FakeVar: def __init__(self, value=''): self.value = value From 1c2a0e5a33ae763e8eb18b555ec62a258d9987f4 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 22 Nov 2026 15:31:30 +0300 Subject: [PATCH 28/66] The plugin check accepts exlaunch's long trampolines: a hooked tbz, cbz, b.cond, adr, adrp, load literal or far b/bl whose relocation takes several words, and the jump back by ldr x17/br x17. Challenge Mode's plugin was refused at its tbnz site (#578) Co-Authored-By: Claude Opus 5.5 --- tests/exefs_plugins_test.py | 64 +++++++++++++++++++ tools/exefs_plugins.py | 123 +++++++++++++++++++++++++++++++----- 2 files changed, 171 insertions(+), 16 deletions(-) diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index 071df40b..c2c3caa5 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -129,6 +129,11 @@ def b(src, dst, link=False): return (0x94000000 if link else 0x14000000) | ((dst - src) >> 2) & 0x3FFFFFF +def quad(v): + """The two words of a .quad v.""" + return [v & 0xFFFFFFFF, v >> 32] + + def record(original=0x94000010, trampoline_first=None, stub=None, writes=None, **extra): """A record of one inline hook at main+SITE_OFF whose original is `original` (default bl main+SITE_OFF+0x40).""" site, stub_at, tramp = MAIN + SITE_OFF, PLUGIN + STUB_OFF, PLUGIN + TRAMP_OFF @@ -271,6 +276,65 @@ class Check(unittest.TestCase): def test_indirect_original(self): self.refused(record(original=0xD65F03C0), 'is a br, blr or ret') + # exlaunch's long forms (tools/exefs_plugins.py relocation_end, returns_to): the trampoline at plugin0+off + def long_form(self, original, off, words): + rec = record(original=original) + img = bytearray(rec['images']['plugin0']) + struct.pack_into(' + site, t = MAIN + SITE_OFF, PLUGIN + TRAMP_OFF + words = [0x58000048, 0x14000003, *quad(site & ~0xFFF), b(t + 16, site + 4)] + self.assertEqual(self.reasons(self.long_form(0x90000008, TRAMP_OFF, words)), []) + + def test_trampoline_ldr_literal_long(self): # ldr x1, : ldr x1, #8; b over the 8 bytes; the bytes + site, t = MAIN + SITE_OFF, PLUGIN + TRAMP_OFF + words = [0x58000041, 0x14000003, 0x11223344, 0x55667788, b(t + 16, site + 4)] + self.assertEqual(self.reasons(self.long_form(0x58000801, TRAMP_OFF, words)), []) + + def test_trampoline_absolute_return(self): # back to the site + 4 by ldr x17, #8; br x17; .quad, nop-aligned + site = MAIN + SITE_OFF + words = [0xAA0003F3, xp.NOP, xp.LDR_X17_8, xp.BR_X17, *quad(site + 4)] + self.assertEqual(self.reasons(self.long_form(0xAA0003F3, TRAMP_OFF, words)), []) + words[-2:] = quad(site + 8) + self.refused(self.long_form(0xAA0003F3, TRAMP_OFF, words), 'no b to the site + 4') + + def test_replace_hook_adrp_orig(self): # a function starting with adrp: its Orig trampoline is the long form + site, t, adrp = MAIN + SITE_OFF, PLUGIN + TRAMP_OFF, 0x90000008 + w = [{'module': 'main', 'offset': SITE_OFF, 'old': adrp, 'new': b(site, PLUGIN + THUNK_OFF), 'fn_start': True}] + rec = self.long_form(adrp, TRAMP_OFF, [0x58000048, 0x14000003, *quad(site & ~0xFFF), b(t + 16, site + 4)]) + rec['writes'] = w + hooks, reasons = xp.check_record(rec, IMPLS) + self.assertEqual(reasons, []) + self.assertEqual(hooks[0]['trampoline'], f'plugin0+{TRAMP_OFF:#x}') + class Diff(unittest.TestCase): def test_lists_differing_words(self): diff --git a/tools/exefs_plugins.py b/tools/exefs_plugins.py index 8e51bb94..f850ecb2 100644 --- a/tools/exefs_plugins.py +++ b/tools/exefs_plugins.py @@ -39,11 +39,13 @@ The check (check_record) accepts a record only when every rule holds; each broke - an inline hook (MSFix, Full Inventory Expansion): `b ` into a plugin's .text, the stub in exlaunch's shape (stur x30, [sp, #-0x10]; bl exl_inline_hook_impl or the float one; ldur x30, [sp, #-0x10]; b ; .quad ), the trampoline the site's original relocated (the - same word, or the same PC-relative target) and `b `; + same word, the same PC-relative target, or exlaunch's long form of it, relocation_end) and its jump back to + the site + 4 (returns_to); - a call-site rewrite (Quick Weapon Durability): `bl` straight to a function start of the plugin's lift (the record lists them), which the generator can emit as a patch site whose replacement is that branch; - a replace hook (Full Inventory Expansion's Sort Fixer): `b` from a function start of main to a function start of - the plugin's lift; the Orig trampoline (the original relocated, b site+4) is listed when the pool holds one. + the plugin's lift; the Orig trampoline (the original relocated, back to site+4) is listed when the pool holds + one. - the code the hooks reach (the stubs, exlaunch's hook impls, the callbacks, the replace and call targets, and what they reach by direct branches and calls, reach()) has no svc but OutputDebugString and calls only the imports REACH_IMPORTS. An indirect call (blr) is not followed: what it reaches cannot be known before the run. @@ -153,6 +155,86 @@ def relocated(orig, site, word, at): return b is not None and a == b +# exlaunch's trampolines: its relocation of a hooked instruction (exlaunch source/lib/hook/nx64/hook_impl.cpp, +# __fix_instructions and the __fix_* helpers it calls, after And64InlineHook, MIT). A PC-relative original whose target +# the trampoline cannot reach in one word becomes a long form that keeps the target in a .quad; exlaunch puts one nop +# before the form when the .quad would not be 8-byte aligned. The generated code never runs a trampoline (an inline +# hook's site calls the stub and runs main's own original after it, recomp/patches.py @call; a replace hook's Orig +# reaches an unpatched copy of the function, `orig`), so these forms only tell an exlaunch hook from other code. +NOP = 0xD503201F +LDR_X17_8 = 0x58000051 # ldr x17, #8 +LDR_X17_12 = 0x58000071 # ldr x17, #12 +ADR_X30_16 = 0x1000009E # adr x30, #16 +BR_X17 = 0xD61F0220 # br x17 + + +def quad(word, a): + """The .quad at absolute a of word(a) (the plugin word there, None outside its .text), else None.""" + lo, hi = word(a), word(a + 4) + return None if lo is None or hi is None else lo | hi << 32 + + +def literal_end(word, orig, at): + """End of exlaunch's relocation of the load-literal original at `at` (__fix_loadlit), else None. A prfm is dropped + (no words); an ldr or ldrsw becomes the same load from #8 and a b over the literal's bytes, which follow it aligned + to their size by leading nops. The bytes are not compared: the record holds no image of main.""" + simd, opc = orig >> 26 & 1, orig >> 30 + if not simd and opc == 3: + return at + size = (4, 8, 16)[opc] if simd else (4, 8, 4)[opc] + p = at + while word(p) == NOP and p < at + 12: + p += 4 + if (p + 8) % size or word(p + 4 + size) is None: + return None + if word(p) != (orig & 0xFF00001F) | 2 << 5 or word(p + 4) != 0x14000001 + size // 4: + return None + return p + 8 + size + + +def relocation_end(word, orig, site, at): + """End (absolute) of exlaunch's relocation of the original `orig` at `site` when it starts at `at`, else None: + the same word or a PC-relative one re-encoded to the same target (one word), or one of the long forms: + b.cond / cbz / tbz: ; b #20; ldr x17, #8; br x17; .quad + b: ldr x17, #8; br x17; .quad + bl: ldr x17, #12; adr x30, #16; br x17; .quad + adr / adrp: ldr , #8; b #12; .quad + ldr / ldrsw literal: literal_end + word(a) is the plugin word at absolute a, None outside its .text.""" + w0 = word(at) + if w0 is None: + return None + if relocated(orig, site, w0, at): + return at + 4 + rel = pc_relative(orig, site) + if rel is None: + return None + (kind, _), target = rel + if kind == 'ldr': + return literal_end(word, orig, at) + p = at + 4 if w0 == NOP else at + w = [word(p + 4 * i) for i in range(4)] + if kind in ('b.cond', 'cbz', 'tbz'): + form, data = pc_relative(w[0], p) == (rel[0], p + 8) and w[1:] == [0x14000005, LDR_X17_8, BR_X17], p + 16 + elif kind == 'b' and orig >> 31: + form, data = w[:3] == [LDR_X17_12, ADR_X30_16, BR_X17], p + 12 + elif kind == 'b': + form, data = w[:2] == [LDR_X17_8, BR_X17], p + 8 + else: # adr, adrp + form, data = w[:2] == [0x58000040 | orig & 0x1F, 0x14000003], p + 8 + return data + 8 if form and data % 8 == 0 and quad(word, data) == target else None + + +def returns_to(word, at, back): + """The trampoline jumps back to `back` from `at`: b , or out of its range the nop-aligned + ldr x17, #8; br x17; .quad (exlaunch __fix_instructions).""" + w = word(at) + if w is not None and w >> 26 == 0x05 and branch_target(w, at) == back: + return True + p = at + 4 if w == NOP else at + return p % 8 == 0 and word(p) == LDR_X17_8 and word(p + 4) == BR_X17 and quad(word, p + 8) == back + + def inline_stub(img, o, p): """The words at image offset o of plugin p have exlaunch's inline-hook entry shape: stur x30; bl; ldur x30; b; and the .quad after them lies inside the plugin's .text.""" @@ -162,14 +244,19 @@ def inline_stub(img, o, p): return s[0] == STUR_X30 and s[2] == LDUR_X30 and s[1] >> 26 == 0x25 and s[3] >> 26 == 0x05 +def text_words(img, p): + """word(a): the word of plugin p's .text image img at absolute a, None outside that .text.""" + base, end = p['base'], p['text_end'] + return lambda a: struct.unpack_from('> 26 == 0x05 and branch_target(t1, base + o + 4) == site + 4 and \ - relocated(original, site, struct.unpack_from('> 31: - reasons.append(f'{where}: the trampoline\'s second word {t1:#010x} is no b to the site + 4') + elif not returns_to(word, end, site + 4): + back = word(end) + reasons.append(f'{where}: the trampoline\'s word after the relocated original, ' + f'{back if back is not None else 0:#010x} at {tp["name"]}+{end - tp["base"]:#x}, is no b ' + f'to the site + 4') return hooks, reasons @@ -583,7 +674,7 @@ def report(rec, label): for h in hooks: if h['kind'] == 'inline': print(f' inline hook {h["site"]} (was {h["original"]}) -> stub {h["stub"]} -> {h["impl"]}, callback ' - f'{h["callback"]}, trampoline {h["trampoline"]} ({h.get("relocated")}; b site+4)') + f'{h["callback"]}, trampoline {h["trampoline"]} ({h.get("relocated")}; back to site+4)') else: print(f' {h["kind"]} {h["site"]} (was {h["original"]}) -> {"bl" if h["kind"] == "call" else "b"} ' f'{h["target"]}' + (f', Orig trampoline {h["trampoline"]}' if h.get('trampoline') else '')) From ba812048474049fdbc72b586362787caa2e5d0c9 Mon Sep 17 00:00:00 2001 From: gurrgur Date: Sun, 22 Nov 2026 13:37:42 +0100 Subject: [PATCH 29/66] FSR 3.1 and frame generation no longer allocate their images in protected or AMD device-coherent memory, which turned the whole picture into noise on RADV The SDK's findMemoryTypeIndex keeps the last matching memory type, and RADV lists protected (TMZ) and DEVICE_COHERENT_AMD / DEVICE_UNCACHED_AMD device-local types after the plain ones. The runtime enables neither feature, so on a Radeon 780M (Mesa 26.3) every FSR pass read garbage. Those types are now skipped. On unified-memory GPUs (Adreno under Turnip), where every device-local type is host-visible, it falls back to a host-visible device-local type instead of failing every texture allocation. Co-Authored-By: Claude Opus 5.5 --- runtime/third_party/FidelityFX/README.md | 6 +++++ .../FidelityFX/sdk/src/backends/vk/ffx_vk.cpp | 22 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/runtime/third_party/FidelityFX/README.md b/runtime/third_party/FidelityFX/README.md index e784cf55..ce7f67a9 100644 --- a/runtime/third_party/FidelityFX/README.md +++ b/runtime/third_party/FidelityFX/README.md @@ -43,3 +43,9 @@ Changes of our own (marked "TotK Recomp"): - `sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h`: the luma history's storage image is declared `rgba16f`, the format of its images (R16G16B16A16_FLOAT in `ffx_fsr3upscaler.cpp`). It was `rgba8`, which the Vulkan validation layer reports as a format mismatch with undefined loads and stores. +- `sdk/src/backends/vk/ffx_vk.cpp` `findMemoryTypeIndex`: memory types with `PROTECTED`, `DEVICE_COHERENT_AMD` or + `DEVICE_UNCACHED_AMD` are skipped, since the runtime enables neither protected memory nor device-coherent memory. The + function keeps the last matching type, and RADV lists those types after the plain device-local ones, so on a Radeon + 780M (Mesa 26.3) FSR 3.1's images were allocated in them and its whole output was noise. When no device-local type + without `HOST_VISIBLE` exists (unified-memory GPUs: Adreno under Turnip) it takes a host-visible device-local one + instead of failing every texture allocation. diff --git a/runtime/third_party/FidelityFX/sdk/src/backends/vk/ffx_vk.cpp b/runtime/third_party/FidelityFX/sdk/src/backends/vk/ffx_vk.cpp index c3e5032f..892b8c25 100644 --- a/runtime/third_party/FidelityFX/sdk/src/backends/vk/ffx_vk.cpp +++ b/runtime/third_party/FidelityFX/sdk/src/backends/vk/ffx_vk.cpp @@ -402,14 +402,28 @@ uint32_t findMemoryTypeIndex(VkPhysicalDevice physicalDevice, VkMemoryRequiremen vkGetPhysicalDeviceMemoryProperties(physicalDevice, &memProperties); uint32_t bestCandidate = UINT32_MAX; + // TotK Recomp: unified-memory GPUs (Adreno under Turnip) have no device-local type without HOST_VISIBLE: the first + // host-visible one is taken rather than failing when no invisible type exists. + uint32_t visibleCandidate = UINT32_MAX; + VkMemoryPropertyFlags visibleProperties = 0; for (uint32_t i = 0; i < memProperties.memoryTypeCount; i++) { if ((memRequirements.memoryTypeBits & (1 << i)) && (memProperties.memoryTypes[i].propertyFlags & requestedProperties)) { - // if just device-local memory is requested, make sure this is the invisible heap to prevent over-subscribing the local heap - if (requestedProperties == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT && (memProperties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)) + // TotK Recomp: types that need a device feature the application did not enable are skipped. The loop keeps + // the last match, and RADV lists protected (TMZ) and AMD device-coherent/uncached device-local types after + // the plain ones: FSR 3.1's images landed in them and every pass read noise. + if (memProperties.memoryTypes[i].propertyFlags & (VK_MEMORY_PROPERTY_PROTECTED_BIT | VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD)) continue; + // if just device-local memory is requested, make sure this is the invisible heap to prevent over-subscribing the local heap + if (requestedProperties == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT && (memProperties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)) { + if (visibleCandidate == UINT32_MAX) + visibleCandidate = i, visibleProperties = memProperties.memoryTypes[i].propertyFlags; + continue; + } + bestCandidate = i; outProperties = memProperties.memoryTypes[i].propertyFlags; @@ -419,6 +433,10 @@ uint32_t findMemoryTypeIndex(VkPhysicalDevice physicalDevice, VkMemoryRequiremen } } + if (bestCandidate == UINT32_MAX && visibleCandidate != UINT32_MAX) { + bestCandidate = visibleCandidate; + outProperties = visibleProperties; + } return bestCandidate; } From d181714398d53ad7faefe9951c97693ad970fa86 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 22 Nov 2026 15:49:04 +0300 Subject: [PATCH 30/66] The installer stops with the crashing Vulkan layer named instead of going on with a warning (#1345) A layer that crashes hostcheck at vkCreateInstance also breaks totk.exe --prepare-shaders in the prepare step and the game (runtime/vk_device.c create_instance loads the same implicit layers): with the PR's warning the install failed again after lift and compile. Check.probe_host now turns each listed implicit layer off alone, names the one whose absence lets the probe pass with its manifest path in check.vulkan_layer_crash, and says how to turn it off (VK_LOADER_LAYERS_DISABLE= for the user account); when no single layer explains it, check.vulkan_layers_crash lists the installed ones and offers ~implicit~. The list covers the loader's places: VK_(ADD_)IMPLICIT_LAYER_PATH, the registry in the 64-bit view or the Linux implicit_layer.d folders, with names read from the manifests. A failed host check is kept on the context, so key() and run() no longer build and crash it twice, and the App Control reputation codes 4557-4559 and 4581-4583 count as a block too. Co-Authored-By: Claude Opus 5.5 --- installer/steps.py | 140 +++++++++++++++++++++++++----------- installer/text/de.json | 3 +- installer/text/en.json | 3 +- installer/text/es.json | 3 +- installer/text/fr.json | 3 +- installer/text/it.json | 3 +- installer/text/ja.json | 3 +- installer/text/ko.json | 3 +- installer/text/nl.json | 3 +- installer/text/pt-BR.json | 3 +- installer/text/ru.json | 3 +- installer/text/zh-Hans.json | 3 +- tests/installer_test.py | 109 +++++++++++++++++++++------- 13 files changed, 206 insertions(+), 76 deletions(-) diff --git a/installer/steps.py b/installer/steps.py index c55b509b..f231eec5 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -41,6 +41,11 @@ import time import urllib.request from pathlib import Path +if os.name == 'nt': + import winreg +else: + winreg = None + from . import ini, screens from . import layout as layouts from .layout import EXE, SUPPORTED, version_tag @@ -140,32 +145,63 @@ def exit_code(code): return str(code) -def implicit_vulkan_layers(): - """Names of the enabled implicit Vulkan layer manifests the Windows registry lists (machine, then user), for the - warning that names the program to update; empty elsewhere or when the registry cannot be read.""" - if os.name != 'nt': - return [] - import winreg +def layer_manifests(): + """Implicit Vulkan layer manifests where the Khronos loader looks for them (its docs, LoaderLayerInterface.md, + "Layer Discovery"): the folders in VK_IMPLICIT_LAYER_PATH or VK_ADD_IMPLICIT_LAYER_PATH, then on Windows the + manifests HKLM and HKCU\\SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers enable with a DWORD 0, read in the 64-bit view + the 64-bit probe and game use; elsewhere the implicit_layer.d folders. Layers a driver registers under its display + adapter's key are not listed.""" found = [] - for root in (winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER): - try: - key = winreg.OpenKey(root, r'SOFTWARE\Khronos\Vulkan\ImplicitLayers') - except OSError: - continue - with key: - i = 0 - while True: - try: - path, enabled, _ = winreg.EnumValue(key, i) - except OSError: - break - i += 1 - name = Path(path).name - if enabled == 0 and name not in found: # a DWORD 0 enables the manifest, anything else skips it - found.append(name) + for var in ('VK_IMPLICIT_LAYER_PATH', 'VK_ADD_IMPLICIT_LAYER_PATH'): + for part in filter(None, os.environ.get(var, '').split(os.pathsep)): + p = Path(part) + found += sorted(p.glob('*.json')) if p.is_dir() else [p] + if winreg: + for root in (winreg.HKEY_LOCAL_MACHINE, winreg.HKEY_CURRENT_USER): + try: + key = winreg.OpenKey(root, r'SOFTWARE\Khronos\Vulkan\ImplicitLayers', 0, + winreg.KEY_READ | winreg.KEY_WOW64_64KEY) + except OSError: + continue + with key: + i = 0 + while True: + try: + path, enabled, _ = winreg.EnumValue(key, i) + except OSError: + break + i += 1 + if enabled == 0: # a DWORD 0 enables the manifest, anything else skips it + found.append(Path(path)) + else: + home = Path.home() + config = [os.environ.get('XDG_CONFIG_HOME') or home / '.config', + *(os.environ.get('XDG_CONFIG_DIRS') or '/etc/xdg').split(':'), '/usr/local/etc', '/etc'] + data = [os.environ.get('XDG_DATA_HOME') or home / '.local' / 'share', + *(os.environ.get('XDG_DATA_DIRS') or '/usr/local/share:/usr/share').split(':')] + for base in filter(None, config + data): + found += sorted((Path(base) / 'vulkan' / 'implicit_layer.d').glob('*.json')) return found +def implicit_vulkan_layers(): + """(layer name, manifest path) of each readable implicit Vulkan layer manifest of layer_manifests(), for the + search for the layer that crashes the host check. A manifest the loader cannot read loads no layer and is left + out; a manifest listed twice counts once.""" + layers = [] + for path in dict.fromkeys(layer_manifests()): + try: + manifest = json.loads(path.read_text(encoding='utf-8-sig')) + except (OSError, ValueError): + continue + entries = (manifest.get('layers') or [manifest.get('layer')]) if isinstance(manifest, dict) else [] + for entry in entries: + name = entry.get('name') if isinstance(entry, dict) else None + if isinstance(name, str) and (name, path) not in layers: + layers.append((name, path)) + return layers + + def linux_glibc(): """(major, minor) of the C library this Linux process runs on, None elsewhere or when it is not glibc.""" try: @@ -465,8 +501,19 @@ class Check(Step): return {} def host(self, ctx): + """Builds and runs the host check once per run: key() asks first and run() reports, so a failure is kept on + ctx and raised again rather than a crashing probe and its retries running twice.""" if getattr(ctx, 'host', None) is not None: return + if getattr(ctx, 'host_error', None) is not None: + raise ctx.host_error + try: + self.check_host(ctx) + except InstallError as e: + ctx.host_error = e + raise + + def check_host(self, ctx): layout, work = ctx.layout, ctx.temp / 'check' glibc = linux_glibc() if glibc and glibc < GLIBC_NEEDED and not layout.dev: @@ -505,17 +552,23 @@ class Check(Step): ctx.reporter.warning('warn.kernel_old', version='.'.join(map(str, kernel))) ctx.host = host - # Windows refuses to start a program a policy does not trust: Smart App Control and other App Control policies - # (4551 "An Application Control policy has blocked this file", 4556 and 4580 the same for a bad reputation, issue - # #875), group policy (1260) and an antivirus that flags the file (225, 226). hostcheck is the first program the - # setup builds on this PC; totk.exe is built the same way and unsigned too, so the install cannot go on. - BLOCKED_WINERRORS = {225, 226, 1260, 4551, 4556, 4580} + # Windows refuses to start a program a policy does not trust (issue #875): Smart App Control and other App Control + # policies (4551 "An Application Control policy has blocked this file"; 4556-4559 and 4580-4583 the same with the + # reputation verdict, among them 4559 "Unable to contact reputation service for unknown file"), group policy (1260 + # "This program is blocked by group policy") and an antivirus that flags or removes the file (225, 226). hostcheck + # is the first program the setup builds on this PC; totk.exe is built the same way and unsigned too, so the install + # cannot go on. + BLOCKED_WINERRORS = {225, 226, 1260, 4551, 4556, 4557, 4558, 4559, 4580, 4581, 4582, 4583} + LAYER_TRIES = 16 # implicit layers tried one by one in the search for the one that crashes the probe def probe_host(self, ctx, exe): - """Runs the host check built by host() and returns its JSON. A probe that crashes inside Vulkan is run again - with the implicit Vulkan layers off (VK_LOADER_LAYERS_DISABLE, Vulkan loader 1.3.234 or later): overlays, - recorders and tuning tools install such layers, and a broken one kills every Vulkan program at - vkCreateInstance (issue #1345, exit code 0xC0000005 after "Checking the processor and the graphics card").""" + """Runs the host check check_host() built and returns its JSON. A probe that crashes inside Vulkan is run again + with the implicit Vulkan layers off (VK_LOADER_LAYERS_DISABLE=~implicit~, Vulkan loader 1.3.234 or later): + overlays, recorders and tuning tools install such layers, and a broken one kills every Vulkan program at + vkCreateInstance (issue #1345, exit code 0xC0000005 after "Checking the processor and the graphics card"). + When that run passes, each listed layer is turned off alone to name the one that crashes. The install stops + either way: totk.exe --prepare-shaders in the prepare step and the game itself load the same layers + (runtime/vk_device.c create_instance), so going on would fail after lift and compile.""" rep = ctx.reporter r = self.run_probe(exe) host = parse_host(r.stdout) @@ -526,17 +579,23 @@ class Check(Step): rep.log(f'host: the check stopped with exit code {code}; it printed {r.stdout.strip()!r}') if '"loader": true' not in r.stdout: raise InstallError('check.host_probe_failed', code=code) - env = dict(os.environ, VK_LOADER_LAYERS_DISABLE='~implicit~') - retry = self.run_probe(exe, env) - host = parse_host(retry.stdout) - if host is None: + retry = self.run_probe(exe, dict(os.environ, VK_LOADER_LAYERS_DISABLE='~implicit~')) + if parse_host(retry.stdout) is None: rep.log(f'host: without implicit Vulkan layers too: exit code {exit_code(retry.returncode)}, ' f'{retry.stdout.strip()!r}') raise InstallError('check.vulkan_crash', code=code) - layers = ', '.join(implicit_vulkan_layers()) or '?' - rep.log(f'host: {retry.stdout.strip()} (implicit Vulkan layers off; installed: {layers})') - rep.warning('warn.vulkan_layer_crash', code=code, layers=layers) - return host + layers = implicit_vulkan_layers() + rep.log(f'host: passes with the implicit Vulkan layers off; installed: ' + f'{", ".join(f"{n} ({p})" for n, p in layers) or "none listed"}') + culprits = [(name, path) for name, path in layers[:self.LAYER_TRIES] + if parse_host(self.run_probe(exe, dict(os.environ, VK_LOADER_LAYERS_DISABLE=name)).stdout)] + if culprits: + rep.log(f'host: passes without {", ".join(n for n, _ in culprits)}') + raise InstallError('check.vulkan_layer_crash', code=code, + layers=', '.join(f'{n} ({p})' for n, p in culprits), + disable=','.join(n for n, _ in culprits)) + raise InstallError('check.vulkan_layers_crash', code=code, + layers=', '.join(f'{n} ({p})' for n, p in layers) or '?') def run_probe(self, exe, env=None): try: @@ -544,7 +603,8 @@ class Check(Step): except OSError as e: if getattr(e, 'winerror', None) in self.BLOCKED_WINERRORS: raise InstallError('check.host_blocked', path=str(exe), detail=e.strerror or str(e)) from None - raise InstallError('check.host_probe_failed', code=f'{getattr(e, "winerror", None) or e.errno}: {e.strerror or e}') from None + raise InstallError('check.host_probe_failed', + code=f'{getattr(e, "winerror", None) or e.errno}: {e.strerror or e}') from None def inputs(self, ctx): """Open both files with the keys as the extraction will. Returns the bytes of both Program NCAs.""" diff --git a/installer/text/de.json b/installer/text/de.json index 5db3336c..793eea13 100644 --- a/installer/text/de.json +++ b/installer/text/de.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "Die Computerprüfung ist nicht gelaufen (Exit-Code {code}).", "check.host_blocked": "Windows hat ein Programm blockiert, das das Setup auf diesem PC erstellt hat ({path}): {detail}. Smart App Control, eine App-Control-Richtlinie oder ein Virenscanner blockiert unsignierte Programme; das Spiel selbst wird genauso auf diesem PC erstellt und würde ebenfalls blockiert. Erlaube den Setup-Ordner in deinem Virenscanner oder schalte Smart App Control in der Windows-Sicherheit (App- und Browsersteuerung) aus und starte das Setup erneut.", "check.vulkan_crash": "Der Grafiktreiber ist abgestürzt, als das Setup nach den Grafikkarten gefragt hat (Exit-Code {code}), auch mit ausgeschalteten Vulkan-Layern anderer Programme. Installiere den neuesten Treiber für deine Grafikkarte.", + "check.vulkan_layer_crash": "Ein Vulkan-Layer, den ein anderes Programm installiert hat, lässt Vulkan-Programme auf diesem PC abstürzen (Exit-Code {code}), und das Spiel würde beim Start genauso abstürzen. Der Layer: {layers}. Aktualisiere oder deinstalliere das Programm, zu dem er gehört (der Pfad zeigt seinen Ordner), oder schalte den Layer aus: Setze für dein Benutzerkonto die Umgebungsvariable VK_LOADER_LAYERS_DISABLE auf {disable}. Starte danach das Setup erneut.", + "check.vulkan_layers_crash": "Ein Vulkan-Layer, den ein anderes Programm installiert hat, lässt Vulkan-Programme auf diesem PC abstürzen (Exit-Code {code}): Mit allen solchen Layern ausgeschaltet läuft die Prüfung durch, und mit ihnen würde das Spiel beim Start genauso abstürzen. Die installierten Layer einzeln auszuschalten hat ihn nicht eingegrenzt. Installierte Layer: {layers}. Aktualisiere oder deinstalliere die Overlay-, Aufnahme- oder Tuning-Programme darunter, oder schalte alle solchen Layer aus: Setze für dein Benutzerkonto die Umgebungsvariable VK_LOADER_LAYERS_DISABLE auf ~implicit~ (das schaltet auch Overlays wie das von Steam in jedem Vulkan-Spiel aus). Starte danach das Setup erneut.", "check.cpu_too_old": "Diesem Prozessor fehlt x86-64-v2 (SSE4.2, POPCNT und CMPXCHG16B), die älteste Stufe, für die das Spiel gebaut wird. Intel Nehalem (2008) oder AMD Bulldozer (2011) und neuer haben sie.", "check.vulkan_missing": "Es ist kein Vulkan-Treiber installiert. Installiere den neuesten Treiber für deine Grafikkarte.", "check.vulkan_no_device": "Vulkan findet keine Grafikkarte. Installiere den neuesten Treiber für deine Grafikkarte.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "Die Xbox-, PlayStation- oder PC-Tastensymbole konnten nicht vorbereitet werden (Exit-Code {code}); das Spiel behält die Switch-Symbole. Details: {log}", "warn.shaders_skipped": "Der Grafiktreiber ist beim Erstellen einiger Shader abgestürzt, daher wurden {count} bei der Vorbereitung ausgelassen. Das Spiel erstellt sie, wenn es sie zum ersten Mal braucht, und der Treiber kann dort ebenfalls abstürzen; ein Treiberupdate kann das beheben. Details: {log}", "warn.kernel_old": "Linux {version} fehlt das Schreib-Tracking, auf das das Spiel angewiesen ist (6.7 oder neuer); das Spiel kann sehr langsam laufen. Ein Systemupdate behebt das.", - "warn.vulkan_layer_crash": "Ein Vulkan-Layer eines anderen Programms hat die Computerprüfung abstürzen lassen (Exit-Code {code}); ohne ihn lief die Prüfung durch. Installierte Layer: {layers}. Das Spiel lädt dieselben Layer und kann beim Start abstürzen: Aktualisiere oder deinstalliere das Overlay-, Aufnahme- oder Tuning-Programm, das den fehlerhaften Layer installiert hat.", "warn.dlss_kept": "Im Installationsordner liegt bereits eine DLSS-Bibliothek ({path}); das Setup behält sie.", "warn.dlss_download_failed": "NVIDIA DLSS konnte nicht von {url} heruntergeladen werden: {detail}. Das Spiel läuft ohne; der nächste Setup-Lauf versucht es erneut.", "ui.title": "TotK-Setup", diff --git a/installer/text/en.json b/installer/text/en.json index 46889ce9..e2ad5f93 100644 --- a/installer/text/en.json +++ b/installer/text/en.json @@ -59,6 +59,8 @@ "check.host_probe_failed": "The computer check did not run (exit code {code}).", "check.host_blocked": "Windows blocked a program the setup built on this PC ({path}): {detail}. Smart App Control, an App Control policy or an antivirus blocks unsigned programs; the game itself is built on this PC the same way, so it would be blocked too. Allow the setup folder in your antivirus, or turn off Smart App Control in Windows Security (App & browser control), then run the setup again.", "check.vulkan_crash": "The graphics driver crashed while the setup asked it for the graphics cards (exit code {code}), also with the Vulkan layers of other programs turned off. Install the latest driver for your graphics card.", + "check.vulkan_layer_crash": "A Vulkan layer that another program installed crashes Vulkan programs on this PC (exit code {code}), and the game would crash at start the same way. The layer: {layers}. Update or uninstall the program it belongs to (the path shows its folder), or turn the layer off: set the environment variable VK_LOADER_LAYERS_DISABLE to {disable} for your user account. Then run the setup again.", + "check.vulkan_layers_crash": "A Vulkan layer that another program installed crashes Vulkan programs on this PC (exit code {code}): with all such layers off the check passes, and the game would crash at start the same way with them on. Turning the installed layers off one at a time did not single it out. Installed layers: {layers}. Update or uninstall the overlay, recorder or tuning programs among them, or turn all such layers off: set the environment variable VK_LOADER_LAYERS_DISABLE to ~implicit~ for your user account (this also turns off overlays such as Steam's in every Vulkan game). Then run the setup again.", "check.cpu_too_old": "This processor lacks x86-64-v2 (SSE4.2, POPCNT and CMPXCHG16B), the oldest level the game is built for. Intel Nehalem (2008) or AMD Bulldozer (2011) and newer have it.", "check.vulkan_missing": "No Vulkan driver is installed. Install the latest driver for your graphics card.", "check.vulkan_no_device": "Vulkan finds no graphics card. Install the latest driver for your graphics card.", @@ -118,7 +120,6 @@ "warn.xbox_prompts_failed": "The Xbox, PlayStation or PC button prompts could not be prepared (exit code {code}); the game keeps the Switch prompts. Details: {log}", "warn.shaders_skipped": "The graphics driver crashed while building some shaders, so {count} were left out of the preparation. The game builds them when it first needs them, and the driver may crash there too; a driver update may fix it. Details: {log}", "warn.kernel_old": "Linux {version} lacks the write tracking the game relies on (6.7 or later); the game may run very slowly. Updating the system fixes this.", - "warn.vulkan_layer_crash": "A Vulkan layer of another program crashed the computer check (exit code {code}); without it the check passed. Installed layers: {layers}. The game loads the same layers and may crash at start: update or uninstall the overlay, recorder or tuning program that installed the failing one.", "warn.dlss_kept": "A DLSS library is already in the install folder ({path}); the setup keeps it.", "warn.dlss_download_failed": "NVIDIA DLSS could not be downloaded from {url}: {detail}. The game runs without it; the next setup run tries again.", diff --git a/installer/text/es.json b/installer/text/es.json index e798c207..b3270249 100644 --- a/installer/text/es.json +++ b/installer/text/es.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "La comprobación del equipo no se ejecutó (código de salida {code}).", "check.host_blocked": "Windows bloqueó un programa que el instalador creó en este PC ({path}): {detail}. Smart App Control, una directiva de App Control o un antivirus bloquean los programas sin firmar; el propio juego se crea igual en este PC, así que también se bloquearía. Permite la carpeta del instalador en tu antivirus o desactiva Smart App Control en Seguridad de Windows (Control de aplicaciones y navegador) y vuelve a ejecutar el instalador.", "check.vulkan_crash": "El controlador gráfico falló cuando el instalador le pidió las tarjetas gráficas (código de salida {code}), también con las capas Vulkan de otros programas desactivadas. Instala el controlador más reciente de tu tarjeta gráfica.", + "check.vulkan_layer_crash": "Una capa Vulkan que instaló otro programa hace fallar los programas Vulkan en este PC (código de salida {code}), y el juego fallaría igual al iniciar. La capa: {layers}. Actualiza o desinstala el programa al que pertenece (la ruta muestra su carpeta), o desactiva la capa: define para tu cuenta de usuario la variable de entorno VK_LOADER_LAYERS_DISABLE con el valor {disable}. Después vuelve a ejecutar el instalador.", + "check.vulkan_layers_crash": "Una capa Vulkan que instaló otro programa hace fallar los programas Vulkan en este PC (código de salida {code}): con todas esas capas desactivadas la comprobación pasa, y con ellas el juego fallaría igual al iniciar. Desactivar las capas instaladas una por una no permitió identificarla. Capas instaladas: {layers}. Actualiza o desinstala los programas de superposición, grabación o ajuste que haya entre ellas, o desactiva todas esas capas: define para tu cuenta de usuario la variable de entorno VK_LOADER_LAYERS_DISABLE con el valor ~implicit~ (esto también desactiva superposiciones como la de Steam en todos los juegos Vulkan). Después vuelve a ejecutar el instalador.", "check.cpu_too_old": "Este procesador no tiene x86-64-v2 (SSE4.2, POPCNT y CMPXCHG16B), el nivel más antiguo para el que se compila el juego. Intel Nehalem (2008) o AMD Bulldozer (2011) y posteriores lo tienen.", "check.vulkan_missing": "No hay ningún controlador Vulkan instalado. Instala el controlador más reciente de tu tarjeta gráfica.", "check.vulkan_no_device": "Vulkan no encuentra ninguna tarjeta gráfica. Instala el controlador más reciente de tu tarjeta gráfica.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "No se pudieron preparar los iconos de botones de Xbox, PlayStation o PC (código de salida {code}); el juego mantiene los iconos de Switch. Detalles: {log}", "warn.shaders_skipped": "El controlador gráfico falló al crear algunos shaders, así que {count} quedaron fuera de la preparación. El juego los crea cuando los necesita por primera vez, y el controlador también puede fallar ahí; una actualización del controlador puede solucionarlo. Detalles: {log}", "warn.kernel_old": "Linux {version} no tiene el seguimiento de escrituras del que depende el juego (6.7 o posterior); el juego puede ir muy lento. Actualizar el sistema lo soluciona.", - "warn.vulkan_layer_crash": "Una capa Vulkan de otro programa hizo fallar la comprobación del equipo (código de salida {code}); sin ella la comprobación pasó. Capas instaladas: {layers}. El juego carga las mismas capas y puede fallar al iniciar: actualiza o desinstala el programa de superposición, grabación o ajuste que instaló la capa que falla.", "warn.dlss_kept": "Ya hay una biblioteca DLSS en la carpeta de instalación ({path}); el instalador la conserva.", "warn.dlss_download_failed": "No se pudo descargar NVIDIA DLSS desde {url}: {detail}. El juego funciona sin él; la próxima ejecución del instalador lo intentará de nuevo.", "ui.title": "Instalador de TotK", diff --git a/installer/text/fr.json b/installer/text/fr.json index 3f056ee9..4812f769 100644 --- a/installer/text/fr.json +++ b/installer/text/fr.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "La vérification de l'ordinateur ne s'est pas exécutée (code de sortie {code}).", "check.host_blocked": "Windows a bloqué un programme que l'installateur a compilé sur ce PC ({path}) : {detail}. Smart App Control, une stratégie App Control ou un antivirus bloque les programmes non signés ; le jeu lui-même est compilé de la même façon sur ce PC et serait bloqué aussi. Autorisez le dossier de l'installateur dans votre antivirus, ou désactivez Smart App Control dans Sécurité Windows (Contrôle des applications et du navigateur), puis relancez l'installateur.", "check.vulkan_crash": "Le pilote graphique a planté quand l'installateur lui a demandé les cartes graphiques (code de sortie {code}), même avec les couches Vulkan des autres programmes désactivées. Installez le dernier pilote de votre carte graphique.", + "check.vulkan_layer_crash": "Une couche Vulkan installée par un autre programme fait planter les programmes Vulkan sur ce PC (code de sortie {code}), et le jeu planterait de la même façon au démarrage. La couche : {layers}. Mettez à jour ou désinstallez le programme auquel elle appartient (le chemin montre son dossier), ou désactivez la couche : définissez pour votre compte utilisateur la variable d'environnement VK_LOADER_LAYERS_DISABLE avec la valeur {disable}. Relancez ensuite l'installateur.", + "check.vulkan_layers_crash": "Une couche Vulkan installée par un autre programme fait planter les programmes Vulkan sur ce PC (code de sortie {code}) : avec toutes ces couches désactivées, la vérification réussit, et avec elles le jeu planterait de la même façon au démarrage. Désactiver les couches installées une par une n'a pas permis de l'identifier. Couches installées : {layers}. Mettez à jour ou désinstallez les programmes d'overlay, d'enregistrement ou de réglage parmi elles, ou désactivez toutes ces couches : définissez pour votre compte utilisateur la variable d'environnement VK_LOADER_LAYERS_DISABLE avec la valeur ~implicit~ (cela désactive aussi les overlays comme celui de Steam dans tous les jeux Vulkan). Relancez ensuite l'installateur.", "check.cpu_too_old": "Ce processeur ne prend pas en charge x86-64-v2 (SSE4.2, POPCNT et CMPXCHG16B), le niveau le plus ancien pour lequel le jeu est compilé. Intel Nehalem (2008) ou AMD Bulldozer (2011) et plus récents l'ont.", "check.vulkan_missing": "Aucun pilote Vulkan n'est installé. Installez le dernier pilote de votre carte graphique.", "check.vulkan_no_device": "Vulkan ne trouve aucune carte graphique. Installez le dernier pilote de votre carte graphique.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "Les icônes de boutons Xbox, PlayStation ou PC n'ont pas pu être préparées (code de sortie {code}) ; le jeu garde les icônes Switch. Détails : {log}", "warn.shaders_skipped": "Le pilote graphique a planté pendant la construction de certains shaders ; {count} ont donc été exclus de la préparation. Le jeu les construit quand il en a besoin pour la première fois, et le pilote peut y planter aussi ; une mise à jour du pilote peut corriger cela. Détails : {log}", "warn.kernel_old": "Linux {version} ne dispose pas du suivi des écritures dont le jeu dépend (6.7 ou plus récent) ; le jeu peut être très lent. Mettre à jour le système corrige cela.", - "warn.vulkan_layer_crash": "Une couche Vulkan d'un autre programme a fait planter la vérification de l'ordinateur (code de sortie {code}) ; sans elle, la vérification a réussi. Couches installées : {layers}. Le jeu charge les mêmes couches et peut planter au démarrage : mettez à jour ou désinstallez le programme d'overlay, d'enregistrement ou de réglage qui a installé la couche fautive.", "warn.dlss_kept": "Une bibliothèque DLSS se trouve déjà dans le dossier d'installation ({path}) ; l'installation la conserve.", "warn.dlss_download_failed": "NVIDIA DLSS n'a pas pu être téléchargé depuis {url} : {detail}. Le jeu fonctionne sans ; la prochaine installation réessaiera.", "ui.title": "Installation de TotK", diff --git a/installer/text/it.json b/installer/text/it.json index 5f0fa912..63b0dffd 100644 --- a/installer/text/it.json +++ b/installer/text/it.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "Il controllo del computer non è stato eseguito (codice di uscita {code}).", "check.host_blocked": "Windows ha bloccato un programma che il programma di installazione ha compilato su questo PC ({path}): {detail}. Smart App Control, un criterio App Control o un antivirus bloccano i programmi non firmati; anche il gioco viene compilato così su questo PC e verrebbe bloccato. Consenti la cartella di installazione nell'antivirus oppure disattiva Smart App Control in Sicurezza di Windows (Controllo app e browser), poi esegui di nuovo l'installazione.", "check.vulkan_crash": "Il driver grafico si è bloccato quando l'installazione gli ha chiesto le schede grafiche (codice di uscita {code}), anche con i livelli Vulkan degli altri programmi disattivati. Installa il driver più recente della tua scheda grafica.", + "check.vulkan_layer_crash": "Un livello Vulkan installato da un altro programma fa bloccare i programmi Vulkan su questo PC (codice di uscita {code}) e il gioco si bloccherebbe allo stesso modo all'avvio. Il livello: {layers}. Aggiorna o disinstalla il programma a cui appartiene (il percorso mostra la sua cartella), oppure disattiva il livello: imposta per il tuo account utente la variabile d'ambiente VK_LOADER_LAYERS_DISABLE con il valore {disable}. Poi esegui di nuovo l'installazione.", + "check.vulkan_layers_crash": "Un livello Vulkan installato da un altro programma fa bloccare i programmi Vulkan su questo PC (codice di uscita {code}): con tutti questi livelli disattivati il controllo riesce, e con essi il gioco si bloccherebbe allo stesso modo all'avvio. Disattivare i livelli installati uno alla volta non ha permesso di individuarlo. Livelli installati: {layers}. Aggiorna o disinstalla i programmi di overlay, registrazione o tuning tra questi, oppure disattiva tutti questi livelli: imposta per il tuo account utente la variabile d'ambiente VK_LOADER_LAYERS_DISABLE con il valore ~implicit~ (questo disattiva anche overlay come quello di Steam in tutti i giochi Vulkan). Poi esegui di nuovo l'installazione.", "check.cpu_too_old": "Questo processore non supporta x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), il livello più vecchio per cui il gioco viene compilato. Intel Nehalem (2008) o AMD Bulldozer (2011) e successivi lo supportano.", "check.vulkan_missing": "Non è installato alcun driver Vulkan. Installa il driver più recente della tua scheda grafica.", "check.vulkan_no_device": "Vulkan non trova alcuna scheda grafica. Installa il driver più recente della tua scheda grafica.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "Non è stato possibile preparare le icone dei pulsanti Xbox, PlayStation o PC (codice di uscita {code}); il gioco mantiene le icone di Switch. Dettagli: {log}", "warn.shaders_skipped": "Il driver grafico si è bloccato durante la creazione di alcuni shader, quindi {count} sono stati esclusi dalla preparazione. Il gioco li crea quando servono per la prima volta, e anche lì il driver potrebbe bloccarsi; un aggiornamento del driver potrebbe risolvere. Dettagli: {log}", "warn.kernel_old": "Linux {version} non ha il tracciamento delle scritture su cui si basa il gioco (6.7 o successivo); il gioco potrebbe essere molto lento. Aggiornare il sistema risolve il problema.", - "warn.vulkan_layer_crash": "Un livello Vulkan di un altro programma ha fatto bloccare il controllo del computer (codice di uscita {code}); senza di esso il controllo è riuscito. Livelli installati: {layers}. Il gioco carica gli stessi livelli e potrebbe bloccarsi all'avvio: aggiorna o disinstalla il programma di overlay, registrazione o tuning che ha installato quello difettoso.", "warn.dlss_kept": "Nella cartella di installazione c'è già una libreria DLSS ({path}); l'installazione la mantiene.", "warn.dlss_download_failed": "Impossibile scaricare NVIDIA DLSS da {url}: {detail}. Il gioco funziona senza; la prossima esecuzione dell'installazione riproverà.", "ui.title": "Installazione di TotK", diff --git a/installer/text/ja.json b/installer/text/ja.json index 27f4999a..ad110fb8 100644 --- a/installer/text/ja.json +++ b/installer/text/ja.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "コンピューターの確認を実行できませんでした (終了コード {code})。", "check.host_blocked": "セットアップがこの PC でビルドしたプログラム ({path}) を Windows がブロックしました: {detail}。スマート アプリ コントロール、App Control ポリシー、またはウイルス対策ソフトが署名のないプログラムをブロックしています。ゲーム本体も同じ方法でこの PC でビルドされるため、同じくブロックされます。ウイルス対策ソフトでセットアップのフォルダーを許可するか、Windows セキュリティ (アプリとブラウザー コントロール) でスマート アプリ コントロールをオフにしてから、セットアップをもう一度実行してください。", "check.vulkan_crash": "セットアップがグラフィックカードを問い合わせたときにグラフィックドライバーがクラッシュしました (終了コード {code})。他のプログラムの Vulkan レイヤーをオフにしても同じでした。グラフィックカードの最新ドライバーをインストールしてください。", + "check.vulkan_layer_crash": "他のプログラムがインストールした Vulkan レイヤーが、この PC の Vulkan プログラムをクラッシュさせています (終了コード {code})。ゲームも起動時に同じようにクラッシュします。レイヤー: {layers}。そのレイヤーが属するプログラムを更新するかアンインストールするか (パスでフォルダーがわかります)、レイヤーをオフにしてください: ユーザー アカウントの環境変数 VK_LOADER_LAYERS_DISABLE に {disable} を設定します。その後、セットアップをもう一度実行してください。", + "check.vulkan_layers_crash": "他のプログラムがインストールした Vulkan レイヤーが、この PC の Vulkan プログラムをクラッシュさせています (終了コード {code})。そのようなレイヤーをすべてオフにすると確認は成功し、オンのままではゲームも起動時に同じようにクラッシュします。インストール済みのレイヤーを 1 つずつオフにしても特定できませんでした。インストール済みのレイヤー: {layers}。この中のオーバーレイ、録画、チューニングのプログラムを更新するかアンインストールするか、そのようなレイヤーをすべてオフにしてください: ユーザー アカウントの環境変数 VK_LOADER_LAYERS_DISABLE に ~implicit~ を設定します (Steam などのオーバーレイもすべての Vulkan ゲームでオフになります)。その後、セットアップをもう一度実行してください。", "check.cpu_too_old": "このプロセッサーは、ゲームのビルド対象となる最も古いレベルである x86-64-v2 (SSE4.2、POPCNT、CMPXCHG16B) に対応していません。Intel Nehalem (2008 年) または AMD Bulldozer (2011 年) 以降が対応しています。", "check.vulkan_missing": "Vulkan ドライバーがインストールされていません。グラフィックカードの最新ドライバーをインストールしてください。", "check.vulkan_no_device": "Vulkan がグラフィックカードを見つけられません。グラフィックカードの最新ドライバーをインストールしてください。", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "Xbox、PlayStation、PC のボタン表示を準備できませんでした (終了コード {code})。ゲームは Switch のボタン表示のままです。詳細: {log}", "warn.shaders_skipped": "一部のシェーダーのビルド中にグラフィックドライバーがクラッシュしたため、{count} 個を準備から除外しました。ゲームは初めて必要になったときにそれらをビルドしますが、そこでもドライバーがクラッシュする可能性があります。ドライバーを更新すると解決することがあります。詳細: {log}", "warn.kernel_old": "Linux {version} には、ゲームが必要とする書き込み追跡 (6.7 以降) がありません。ゲームが非常に遅くなることがあります。システムを更新すると解決します。", - "warn.vulkan_layer_crash": "他のプログラムの Vulkan レイヤーがコンピューターの確認をクラッシュさせました (終了コード {code})。そのレイヤーなしでは確認は成功しました。インストール済みのレイヤー: {layers}。ゲームも同じレイヤーを読み込むため、起動時にクラッシュすることがあります。問題のレイヤーを入れたオーバーレイ、録画、チューニングのプログラムを更新するかアンインストールしてください。", "warn.dlss_kept": "インストール先フォルダーには既に DLSS ライブラリがあります ({path})。セットアップはそれを残します。", "warn.dlss_download_failed": "NVIDIA DLSS を {url} からダウンロードできませんでした: {detail}。ゲームはなしで動作します。次回のセットアップ実行時に再試行します。", "ui.title": "TotK セットアップ", diff --git a/installer/text/ko.json b/installer/text/ko.json index b2363756..0e6d9557 100644 --- a/installer/text/ko.json +++ b/installer/text/ko.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "컴퓨터 확인이 실행되지 않았습니다(종료 코드 {code}).", "check.host_blocked": "설치 프로그램이 이 PC에서 빌드한 프로그램({path})을 Windows가 차단했습니다: {detail}. 스마트 앱 컨트롤, App Control 정책 또는 백신이 서명되지 않은 프로그램을 차단합니다. 게임 자체도 이 PC에서 같은 방식으로 빌드되므로 마찬가지로 차단됩니다. 백신에서 설치 프로그램 폴더를 허용하거나 Windows 보안(앱 및 브라우저 컨트롤)에서 스마트 앱 컨트롤을 끈 다음 설치 프로그램을 다시 실행하세요.", "check.vulkan_crash": "설치 프로그램이 그래픽 카드를 조회하는 중에 그래픽 드라이버가 충돌했습니다(종료 코드 {code}). 다른 프로그램의 Vulkan 레이어를 끈 상태에서도 마찬가지였습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", + "check.vulkan_layer_crash": "다른 프로그램이 설치한 Vulkan 레이어 때문에 이 PC의 Vulkan 프로그램이 충돌합니다(종료 코드 {code}). 게임도 시작할 때 같은 방식으로 충돌합니다. 레이어: {layers}. 그 레이어가 속한 프로그램을 업데이트하거나 제거하거나(경로에 폴더가 나옵니다), 레이어를 끄세요: 사용자 계정의 환경 변수 VK_LOADER_LAYERS_DISABLE을 {disable}(으)로 설정합니다. 그런 다음 설치 프로그램을 다시 실행하세요.", + "check.vulkan_layers_crash": "다른 프로그램이 설치한 Vulkan 레이어 때문에 이 PC의 Vulkan 프로그램이 충돌합니다(종료 코드 {code}). 그런 레이어를 모두 끄면 확인을 통과하고, 켜 두면 게임도 시작할 때 같은 방식으로 충돌합니다. 설치된 레이어를 하나씩 꺼 봐도 어느 것인지 찾지 못했습니다. 설치된 레이어: {layers}. 이 중 오버레이, 녹화 또는 튜닝 프로그램을 업데이트하거나 제거하거나, 그런 레이어를 모두 끄세요: 사용자 계정의 환경 변수 VK_LOADER_LAYERS_DISABLE을 ~implicit~(으)로 설정합니다(Steam 같은 오버레이도 모든 Vulkan 게임에서 꺼집니다). 그런 다음 설치 프로그램을 다시 실행하세요.", "check.cpu_too_old": "이 프로세서에는 게임이 빌드되는 가장 오래된 수준인 x86-64-v2(SSE4.2, POPCNT, CMPXCHG16B)가 없습니다. Intel Nehalem(2008) 또는 AMD Bulldozer(2011) 이후 프로세서에 있습니다.", "check.vulkan_missing": "Vulkan 드라이버가 설치되어 있지 않습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", "check.vulkan_no_device": "Vulkan이 그래픽 카드를 찾지 못했습니다. 그래픽 카드의 최신 드라이버를 설치하세요.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "Xbox, PlayStation 또는 PC 버튼 표시를 준비할 수 없었습니다(종료 코드 {code}). 게임은 Switch 버튼 표시를 유지합니다. 자세히: {log}", "warn.shaders_skipped": "일부 셰이더를 빌드하는 동안 그래픽 드라이버가 충돌하여 {count}개를 준비에서 제외했습니다. 게임은 처음 필요할 때 이를 빌드하며, 그때도 드라이버가 충돌할 수 있습니다. 드라이버를 업데이트하면 해결될 수 있습니다. 자세히: {log}", "warn.kernel_old": "Linux {version}에는 게임이 사용하는 쓰기 추적(6.7 이상)이 없습니다. 게임이 매우 느릴 수 있습니다. 시스템을 업데이트하면 해결됩니다.", - "warn.vulkan_layer_crash": "다른 프로그램의 Vulkan 레이어 때문에 컴퓨터 확인이 충돌했습니다(종료 코드 {code}). 그 레이어 없이는 확인을 통과했습니다. 설치된 레이어: {layers}. 게임도 같은 레이어를 불러오므로 시작할 때 충돌할 수 있습니다. 문제의 레이어를 설치한 오버레이, 녹화 또는 튜닝 프로그램을 업데이트하거나 제거하세요.", "warn.dlss_kept": "설치 폴더에 이미 DLSS 라이브러리가 있습니다({path}). 설치 프로그램은 그대로 둡니다.", "warn.dlss_download_failed": "{url}에서 NVIDIA DLSS를 다운로드할 수 없습니다: {detail}. 게임은 없이도 실행되며, 다음 설치 실행 때 다시 시도합니다.", "ui.title": "TotK 설치", diff --git a/installer/text/nl.json b/installer/text/nl.json index 3af60fb2..2039a550 100644 --- a/installer/text/nl.json +++ b/installer/text/nl.json @@ -56,6 +56,8 @@ "check.host_probe_failed": "De computercontrole is niet uitgevoerd (afsluitcode {code}).", "check.host_blocked": "Windows heeft een programma geblokkeerd dat de installatie op deze pc heeft gebouwd ({path}): {detail}. Slim app-beheer, een App Control-beleid of een virusscanner blokkeert niet-ondertekende programma's; het spel zelf wordt op dezelfde manier op deze pc gebouwd en zou ook worden geblokkeerd. Sta de installatiemap toe in je virusscanner, of zet Slim app-beheer uit in Windows-beveiliging (App- en browserbeheer), en start de installatie opnieuw.", "check.vulkan_crash": "Het grafische stuurprogramma is gecrasht toen de installatie het om de videokaarten vroeg (afsluitcode {code}), ook met de Vulkan-lagen van andere programma's uitgeschakeld. Installeer het nieuwste stuurprogramma voor je videokaart.", + "check.vulkan_layer_crash": "Een Vulkan-laag die een ander programma heeft geïnstalleerd laat Vulkan-programma's op deze pc crashen (afsluitcode {code}), en het spel zou bij het starten op dezelfde manier crashen. De laag: {layers}. Werk het programma waar hij bij hoort bij of verwijder het (het pad toont de map), of zet de laag uit: stel voor je gebruikersaccount de omgevingsvariabele VK_LOADER_LAYERS_DISABLE in op {disable}. Start daarna de installatie opnieuw.", + "check.vulkan_layers_crash": "Een Vulkan-laag die een ander programma heeft geïnstalleerd laat Vulkan-programma's op deze pc crashen (afsluitcode {code}): met al zulke lagen uit slaagt de controle, en met die lagen aan zou het spel bij het starten op dezelfde manier crashen. De geïnstalleerde lagen één voor één uitzetten wees hem niet aan. Geïnstalleerde lagen: {layers}. Werk de overlay-, opname- of tuningprogramma's daartussen bij of verwijder ze, of zet al zulke lagen uit: stel voor je gebruikersaccount de omgevingsvariabele VK_LOADER_LAYERS_DISABLE in op ~implicit~ (dit zet ook overlays zoals die van Steam uit in elk Vulkan-spel). Start daarna de installatie opnieuw.", "check.cpu_too_old": "Deze processor mist x86-64-v2 (SSE4.2, POPCNT en CMPXCHG16B), het oudste niveau waarvoor het spel wordt gebouwd. Intel Nehalem (2008) of AMD Bulldozer (2011) en nieuwer hebben het.", "check.vulkan_missing": "Er is geen Vulkan-stuurprogramma geïnstalleerd. Installeer het nieuwste stuurprogramma voor je videokaart.", "check.vulkan_no_device": "Vulkan vindt geen videokaart. Installeer het nieuwste stuurprogramma voor je videokaart.", @@ -113,7 +115,6 @@ "warn.xbox_prompts_failed": "De Xbox-, PlayStation- of pc-knoppictogrammen konden niet worden voorbereid (afsluitcode {code}); het spel houdt de Switch-pictogrammen. Details: {log}", "warn.shaders_skipped": "Het grafische stuurprogramma is gecrasht bij het bouwen van enkele shaders, dus {count} zijn uit de voorbereiding weggelaten. Het spel bouwt ze wanneer het ze voor het eerst nodig heeft, en het stuurprogramma kan daar ook crashen; een update van het stuurprogramma kan dit oplossen. Details: {log}", "warn.kernel_old": "Linux {version} mist de schrijftracering waar het spel op rekent (6.7 of nieuwer); het spel kan erg traag zijn. Het systeem bijwerken lost dit op.", - "warn.vulkan_layer_crash": "Een Vulkan-laag van een ander programma liet de computercontrole crashen (afsluitcode {code}); zonder die laag slaagde de controle. Geïnstalleerde lagen: {layers}. Het spel laadt dezelfde lagen en kan bij het starten crashen: werk het overlay-, opname- of tuningprogramma dat de foute laag installeerde bij of verwijder het.", "warn.dlss_kept": "Er staat al een DLSS-bibliotheek in de installatiemap ({path}); de installatie laat die staan.", "warn.dlss_download_failed": "NVIDIA DLSS kon niet worden gedownload van {url}: {detail}. Het spel werkt zonder; de volgende installatieronde probeert het opnieuw.", "ui.title": "TotK-installatie", diff --git a/installer/text/pt-BR.json b/installer/text/pt-BR.json index d4b9341a..5711ca4f 100644 --- a/installer/text/pt-BR.json +++ b/installer/text/pt-BR.json @@ -59,6 +59,8 @@ "check.host_probe_failed": "A verificação do computador não rodou (código de saída {code}).", "check.host_blocked": "O Windows bloqueou um programa que o instalador compilou neste PC ({path}): {detail}. O Controle Inteligente de Aplicativos, uma política de App Control ou um antivírus bloqueia programas sem assinatura; o próprio jogo é compilado do mesmo jeito neste PC e também seria bloqueado. Libere a pasta do instalador no seu antivírus ou desative o Controle Inteligente de Aplicativos na Segurança do Windows (Controle de aplicativos e do navegador) e rode o instalador de novo.", "check.vulkan_crash": "O driver de vídeo travou quando o instalador pediu a lista de placas de vídeo (código de saída {code}), mesmo com as camadas Vulkan de outros programas desativadas. Instale o driver mais recente da sua placa de vídeo.", + "check.vulkan_layer_crash": "Uma camada Vulkan instalada por outro programa faz os programas Vulkan travarem neste PC (código de saída {code}), e o jogo travaria do mesmo jeito ao iniciar. A camada: {layers}. Atualize ou desinstale o programa ao qual ela pertence (o caminho mostra a pasta dele), ou desative a camada: defina para a sua conta de usuário a variável de ambiente VK_LOADER_LAYERS_DISABLE com o valor {disable}. Depois rode o instalador de novo.", + "check.vulkan_layers_crash": "Uma camada Vulkan instalada por outro programa faz os programas Vulkan travarem neste PC (código de saída {code}): com todas essas camadas desativadas a verificação passa, e com elas o jogo travaria do mesmo jeito ao iniciar. Desativar as camadas instaladas uma de cada vez não apontou qual é. Camadas instaladas: {layers}. Atualize ou desinstale os programas de overlay, gravação ou ajuste entre elas, ou desative todas essas camadas: defina para a sua conta de usuário a variável de ambiente VK_LOADER_LAYERS_DISABLE com o valor ~implicit~ (isso também desativa overlays como o da Steam em todos os jogos Vulkan). Depois rode o instalador de novo.", "check.cpu_too_old": "Este processador não tem x86-64-v2 (SSE4.2, POPCNT e CMPXCHG16B), o nível mais antigo para o qual o jogo é compilado. Intel Nehalem (2008) ou AMD Bulldozer (2011) e mais novos têm.", "check.vulkan_missing": "Nenhum driver Vulkan está instalado. Instale o driver mais recente da sua placa de vídeo.", "check.vulkan_no_device": "O Vulkan não encontra nenhuma placa de vídeo. Instale o driver mais recente da sua placa de vídeo.", @@ -118,7 +120,6 @@ "warn.xbox_prompts_failed": "Não foi possível preparar os ícones de botão do Xbox, do PlayStation ou do PC (código de saída {code}); o jogo mantém os ícones do Switch. Detalhes: {log}", "warn.shaders_skipped": "O driver gráfico travou ao compilar alguns shaders, então {count} ficaram fora da preparação. O jogo os compila quando precisar deles pela primeira vez, e o driver pode travar ali também; uma atualização do driver pode resolver. Detalhes: {log}", "warn.kernel_old": "O Linux {version} não tem o rastreamento de escrita de que o jogo depende (6.7 ou mais novo); o jogo pode rodar muito devagar. Atualizar o sistema resolve.", - "warn.vulkan_layer_crash": "Uma camada Vulkan de outro programa travou a verificação do computador (código de saída {code}); sem ela a verificação passou. Camadas instaladas: {layers}. O jogo carrega as mesmas camadas e pode travar ao iniciar: atualize ou desinstale o programa de overlay, gravação ou ajuste que instalou a camada com problema.", "warn.dlss_kept": "Já existe uma biblioteca DLSS na pasta de instalação ({path}); a instalação a mantém.", "warn.dlss_download_failed": "Não foi possível baixar o NVIDIA DLSS de {url}: {detail}. O jogo funciona sem ele; a próxima execução da instalação tenta de novo.", diff --git a/installer/text/ru.json b/installer/text/ru.json index e43445e9..3ee8d8a1 100644 --- a/installer/text/ru.json +++ b/installer/text/ru.json @@ -59,6 +59,8 @@ "check.host_probe_failed": "Проверка компьютера не выполнилась (код выхода {code}).", "check.host_blocked": "Windows заблокировала программу, которую установщик собрал на этом компьютере ({path}): {detail}. Интеллектуальное управление приложениями (Smart App Control), политика App Control или антивирус блокируют неподписанные программы; сама игра собирается на этом компьютере так же и тоже будет заблокирована. Разрешите папку установщика в антивирусе или отключите интеллектуальное управление приложениями в «Безопасности Windows» («Управление приложениями/браузером») и запустите установщик снова.", "check.vulkan_crash": "Видеодрайвер аварийно завершился, когда установщик запросил список видеокарт (код выхода {code}), в том числе с отключёнными слоями Vulkan других программ. Установите свежий драйвер видеокарты.", + "check.vulkan_layer_crash": "Слой Vulkan, установленный другой программой, обрушивает Vulkan-программы на этом компьютере (код выхода {code}), и игра так же упадёт при запуске. Слой: {layers}. Обновите или удалите программу, которой он принадлежит (путь показывает её папку), или отключите слой: задайте для своей учётной записи переменную среды VK_LOADER_LAYERS_DISABLE со значением {disable}. Затем запустите установщик снова.", + "check.vulkan_layers_crash": "Слой Vulkan, установленный другой программой, обрушивает Vulkan-программы на этом компьютере (код выхода {code}): со всеми такими слоями отключёнными проверка проходит, а с ними игра так же упадёт при запуске. Отключение установленных слоёв по одному не выявило виновника. Установленные слои: {layers}. Обновите или удалите программы оверлея, записи или настройки среди них, или отключите все такие слои: задайте для своей учётной записи переменную среды VK_LOADER_LAYERS_DISABLE со значением ~implicit~ (это также отключит оверлеи вроде оверлея Steam во всех играх на Vulkan). Затем запустите установщик снова.", "check.cpu_too_old": "Этому процессору не хватает x86-64-v2 (SSE4.2, POPCNT и CMPXCHG16B) — минимального уровня, под который собрана игра. Он есть у Intel Nehalem (2008) и AMD Bulldozer (2011) и новее.", "check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.", "check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.", @@ -118,7 +120,6 @@ "warn.xbox_prompts_failed": "Не удалось подготовить подсказки кнопок Xbox, PlayStation или PC (код выхода {code}); игра оставит подсказки Switch. Подробности: {log}", "warn.shaders_skipped": "Графический драйвер аварийно завершился при сборке части шейдеров, поэтому {count} из них пропущены при подготовке. Игра соберёт их, когда они впервые понадобятся, и драйвер может упасть и там; обновление драйвера может это исправить. Подробности: {log}", "warn.kernel_old": "В Linux {version} нет отслеживания записи, на которое опирается игра (нужна версия 6.7 или новее); игра может работать очень медленно. Обновление системы это исправит.", - "warn.vulkan_layer_crash": "Слой Vulkan другой программы обрушил проверку компьютера (код выхода {code}); без него проверка прошла. Установленные слои: {layers}. Игра загружает те же слои и может упасть при запуске: обновите или удалите программу оверлея, записи или настройки, которая установила сбойный слой.", "warn.dlss_kept": "В папке установки уже есть библиотека DLSS ({path}); установка её оставляет.", "warn.dlss_download_failed": "Не удалось загрузить NVIDIA DLSS с {url}: {detail}. Игра работает и без него; при следующем запуске установка попробует снова.", diff --git a/installer/text/zh-Hans.json b/installer/text/zh-Hans.json index 29588fe0..dfe6bbab 100644 --- a/installer/text/zh-Hans.json +++ b/installer/text/zh-Hans.json @@ -59,6 +59,8 @@ "check.host_probe_failed": "电脑检查未能运行(退出代码 {code})。", "check.host_blocked": "Windows 阻止了安装程序在这台电脑上编译的程序({path}):{detail}。智能应用控制、App Control 策略或杀毒软件会阻止未签名的程序;游戏本身也以同样方式在这台电脑上编译,同样会被阻止。请在杀毒软件中允许安装程序所在的文件夹,或在 Windows 安全中心(应用和浏览器控制)中关闭智能应用控制,然后重新运行安装程序。", "check.vulkan_crash": "安装程序向显卡驱动查询显卡时,驱动崩溃了(退出代码 {code}),关闭其他程序的 Vulkan 层后依然如此。请为你的显卡安装最新的驱动程序。", + "check.vulkan_layer_crash": "另一个程序安装的 Vulkan 层会让这台电脑上的 Vulkan 程序崩溃(退出代码 {code}),游戏启动时也会同样崩溃。该层:{layers}。请更新或卸载它所属的程序(路径显示了它的文件夹),或者关闭该层:为你的用户帐户设置环境变量 VK_LOADER_LAYERS_DISABLE,值为 {disable}。然后重新运行安装程序。", + "check.vulkan_layers_crash": "另一个程序安装的 Vulkan 层会让这台电脑上的 Vulkan 程序崩溃(退出代码 {code}):关闭所有此类层后检查通过,开着它们时游戏启动也会同样崩溃。逐个关闭已安装的层未能找出是哪一个。已安装的层:{layers}。请更新或卸载其中的叠加层、录制或调校程序,或者关闭所有此类层:为你的用户帐户设置环境变量 VK_LOADER_LAYERS_DISABLE,值为 ~implicit~(这也会在所有 Vulkan 游戏中关闭 Steam 等叠加层)。然后重新运行安装程序。", "check.cpu_too_old": "此处理器不支持 x86-64-v2(SSE4.2、POPCNT 和 CMPXCHG16B),这是游戏所需的最低指令集。Intel Nehalem(2008 年)或 AMD Bulldozer(2011 年)及更新的处理器都支持。", "check.vulkan_missing": "未安装 Vulkan 驱动。请为你的显卡安装最新的驱动程序。", "check.vulkan_no_device": "Vulkan 找不到显卡。请为你的显卡安装最新的驱动程序。", @@ -118,7 +120,6 @@ "warn.xbox_prompts_failed": "无法准备 Xbox、PlayStation 或 PC 按键提示(退出代码 {code});游戏将继续使用 Switch 按键提示。详情:{log}", "warn.shaders_skipped": "显卡驱动在编译部分着色器时崩溃,因此有 {count} 个着色器未被预先准备。游戏会在首次需要时编译它们,驱动在那时也可能崩溃;更新驱动可能会解决。详情:{log}", "warn.kernel_old": "Linux {version} 缺少游戏依赖的写入跟踪功能(需要 6.7 或更新版本);游戏可能运行得很慢。更新系统即可解决。", - "warn.vulkan_layer_crash": "另一个程序的 Vulkan 层导致电脑检查崩溃(退出代码 {code});去掉它后检查通过。已安装的层:{layers}。游戏会加载同样的层,启动时可能崩溃:请更新或卸载安装了出错层的叠加层、录制或调校程序。", "warn.dlss_kept": "安装文件夹中已有 DLSS 库({path});安装程序将保留它。", "warn.dlss_download_failed": "无法从 {url} 下载 NVIDIA DLSS:{detail}。游戏无需它也能运行;下次运行安装程序时会重试。", diff --git a/tests/installer_test.py b/tests/installer_test.py index 2ca0b147..a00a21b2 100644 --- a/tests/installer_test.py +++ b/tests/installer_test.py @@ -1365,6 +1365,8 @@ class HostProbeTest(unittest.TestCase): '{"name": "Intel(R) UHD Graphics", "api": [1, 3, 215], "type": 1}]}\n' CRASHED_IN_VULKAN = '{"x86_64_v2": true, "x86_64_v3": true, "loader": true, ' ACCESS_VIOLATION = 0xC0000005 + LAYERS = [('VK_LAYER_VALVE_steam_overlay_64', Path('C:/Steam/SteamOverlayVulkanLayer64.json')), + ('VK_LAYER_BAD_overlay', Path('C:/Bad/BadOverlay64.json'))] def setUp(self): self.ctx = SimpleNamespace(reporter=Reporter(out=io.StringIO())) @@ -1373,21 +1375,37 @@ class HostProbeTest(unittest.TestCase): def tearDown(self): self.ctx.reporter.close() - def probe(self, *results): - """Runs probe_host with subprocess.run answering each call with the next of results (an exception is raised).""" + def probe(self, *results, layers=()): + """Runs probe_host with subprocess.run answering each call with the next of results (an exception is raised, + a callable gets the run's VK_LOADER_LAYERS_DISABLE).""" answers = iter(results) def run(command, **kwargs): - self.calls.append(kwargs.get('env')) + env = kwargs.get('env') + self.calls.append(env) r = next(answers) + if callable(r): + r = r((env or {}).get('VK_LOADER_LAYERS_DISABLE')) if isinstance(r, BaseException): raise r return subprocess.CompletedProcess(command, r[0], r[1], '') with mock.patch.object(steps.subprocess, 'run', run), \ - mock.patch.object(steps, 'implicit_vulkan_layers', lambda: ['BadOverlay64.json']): + mock.patch.object(steps, 'implicit_vulkan_layers', lambda: list(layers)): return steps.Check().probe_host(self.ctx, Path('hostcheck.exe')) + def bad_layer(self, disabled): + """The probe on a PC whose VK_LAYER_BAD_overlay is broken, with the layers in disabled turned off.""" + if disabled in ('~implicit~', 'VK_LAYER_BAD_overlay'): + return 0, self.GOOD + return self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN + + def only_all_off(self, disabled): + """The probe on a PC whose broken layer is not in the list (a driver's, under its adapter key).""" + if disabled == '~implicit~': + return 0, self.GOOD + return self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN + def events(self, kind): return [e for e in map(json.loads, self.ctx.reporter.out.getvalue().splitlines()) if e['type'] == kind] @@ -1397,20 +1415,33 @@ class HostProbeTest(unittest.TestCase): self.assertEqual(self.calls, [None]) self.assertEqual(self.events('warning'), []) - def test_a_crash_in_a_vulkan_layer_is_run_again_without_the_implicit_layers(self): - host = self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (0, self.GOOD)) - self.assertEqual(host['devices'][0]['name'], 'Intel(R) UHD Graphics') - self.assertIsNone(self.calls[0]) - self.assertEqual(self.calls[1]['VK_LOADER_LAYERS_DISABLE'], '~implicit~') - [w] = self.events('warning') - self.assertEqual(w['id'], 'warn.vulkan_layer_crash') - self.assertEqual(w['params']['layers'], 'BadOverlay64.json') + def test_a_crashing_layer_is_named_and_stops_the_install(self): + # totk.exe --prepare-shaders and the game load the same layer, so going on would fail after lift and compile + with self.assertRaises(steps.InstallError) as e: + self.probe(*[self.bad_layer] * 4, layers=self.LAYERS) + self.assertEqual(e.exception.id, 'check.vulkan_layer_crash') + self.assertEqual(e.exception.params['disable'], 'VK_LAYER_BAD_overlay') + self.assertIn('VK_LAYER_BAD_overlay (', e.exception.params['layers']) + self.assertNotIn('steam', e.exception.params['layers']) + self.assertEqual([c and c['VK_LOADER_LAYERS_DISABLE'] for c in self.calls], + [None, '~implicit~', 'VK_LAYER_VALVE_steam_overlay_64', 'VK_LAYER_BAD_overlay']) if os.name == 'nt': - self.assertEqual(w['params']['code'], '0xC0000005') + self.assertEqual(e.exception.params['code'], '0xC0000005') + + def test_a_crashing_layer_that_cannot_be_singled_out_lists_the_installed_ones(self): + with self.assertRaises(steps.InstallError) as e: + self.probe(*[self.only_all_off] * 4, layers=self.LAYERS) + self.assertEqual(e.exception.id, 'check.vulkan_layers_crash') + self.assertIn('VK_LAYER_VALVE_steam_overlay_64', e.exception.params['layers']) + self.assertIn('VK_LAYER_BAD_overlay', e.exception.params['layers']) + with self.assertRaises(steps.InstallError) as e: + self.probe(self.only_all_off, self.only_all_off) + self.assertEqual((e.exception.id, e.exception.params['layers']), ('check.vulkan_layers_crash', '?')) def test_a_driver_that_crashes_without_the_layers_too_stops_the_install(self): with self.assertRaises(steps.InstallError) as e: - self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN)) + self.probe((self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), (self.ACCESS_VIOLATION, self.CRASHED_IN_VULKAN), + layers=self.LAYERS) self.assertEqual(e.exception.id, 'check.vulkan_crash') self.assertEqual(len(self.calls), 2) @@ -1424,12 +1455,14 @@ class HostProbeTest(unittest.TestCase): @unittest.skipUnless(os.name == 'nt', 'winerror is set on Windows only') def test_a_probe_blocked_by_smart_app_control_names_the_policy(self): - blocked = OSError(None, 'An Application Control policy has blocked this file', None, 4551) - with self.assertRaises(steps.InstallError) as e: - self.probe(blocked) - self.assertEqual(e.exception.id, 'check.host_blocked') - self.assertIn('Application Control', e.exception.params['detail']) - self.assertTrue(e.exception.params['path'].endswith('hostcheck.exe')) + for code in (4551, 4559, 1260, 225): + with self.subTest(code=code): + blocked = OSError(None, 'An Application Control policy has blocked this file', None, code) + with self.assertRaises(steps.InstallError) as e: + self.probe(blocked) + self.assertEqual(e.exception.id, 'check.host_blocked') + self.assertIn('Application Control', e.exception.params['detail']) + self.assertTrue(e.exception.params['path'].endswith('hostcheck.exe')) def test_another_start_failure_is_reported_not_raised(self): with self.assertRaises(steps.InstallError) as e: @@ -1437,14 +1470,40 @@ class HostProbeTest(unittest.TestCase): self.assertEqual(e.exception.id, 'check.host_probe_failed') self.assertIn('cannot find', e.exception.params['code']) + def test_a_failed_host_check_runs_once_per_install(self): + # key() probes first and run() reports: the crashing probe and its retries must not run twice + check, ctx = steps.Check(), SimpleNamespace() + failure = steps.InstallError('check.vulkan_crash', code='1') + with mock.patch.object(steps.Check, 'check_host', side_effect=failure) as probe: + check.key(ctx) + with self.assertRaises(steps.InstallError) as e: + check.host(ctx) + self.assertEqual(e.exception.id, 'check.vulkan_crash') + self.assertEqual(probe.call_count, 1) + + def test_layer_names_come_from_the_manifests_the_loader_reads(self): + with tempfile.TemporaryDirectory() as tmp: + folder = Path(tmp) + (folder / 'one.json').write_text(json.dumps({'file_format_version': '1.1.2', 'layer': { + 'name': 'VK_LAYER_TEST_one', 'library_path': 'one.dll'}}), encoding='utf-8-sig') + (folder / 'two.json').write_text(json.dumps({'file_format_version': '1.0.1', 'layers': [ + {'name': 'VK_LAYER_TEST_a'}, {'name': 'VK_LAYER_TEST_b'}]}), encoding='utf-8') + (folder / 'broken.json').write_text('{', encoding='utf-8') + with mock.patch.dict(os.environ, {'VK_ADD_IMPLICIT_LAYER_PATH': tmp}): + mine = [(n, p.name) for n, p in steps.implicit_vulkan_layers() if p.parent == folder] + self.assertEqual(mine, [('VK_LAYER_TEST_one', 'one.json'), ('VK_LAYER_TEST_a', 'two.json'), + ('VK_LAYER_TEST_b', 'two.json')]) + def test_messages_in_every_language(self): + need = {'check.host_blocked': ('{path}', '{detail}'), 'check.vulkan_crash': ('{code}',), + 'check.vulkan_layer_crash': ('{code}', '{layers}', '{disable}', 'VK_LOADER_LAYERS_DISABLE'), + 'check.vulkan_layers_crash': ('{code}', '{layers}', 'VK_LOADER_LAYERS_DISABLE', '~implicit~')} for path in sorted((ROOT / 'installer' / 'text').glob('*.json')): text = json.loads(path.read_text(encoding='utf-8')) - self.assertIn('{path}', text['check.host_blocked'], path.name) - self.assertIn('{detail}', text['check.host_blocked'], path.name) - self.assertIn('{code}', text['check.vulkan_crash'], path.name) - self.assertIn('{code}', text['warn.vulkan_layer_crash'], path.name) - self.assertIn('{layers}', text['warn.vulkan_layer_crash'], path.name) + self.assertNotIn('warn.vulkan_layer_crash', text, path.name) + for key, parts in need.items(): + for part in parts: + self.assertIn(part, text[key], f'{path.name} {key}') if __name__ == '__main__': From f877aae10eb4ade833c7f7ca9b92142ef4858791 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 05:01:27 -0800 Subject: [PATCH 31/66] A GPU without VK_EXT_external_memory_host runs the game on shadow storage instead of being skipped The extension was in vk_device.c k_required_ext, so pick_device skipped every GPU without it ("gpu 0 skipped: missing extension VK_EXT_external_memory_host") and the game exited: Qualcomm Adreno's Windows driver (issue #161), some older or mobile drivers, and RenderDoc, which hides it. It is now enabled when present (VkCtx.has_external_memory_host); without it vk_memory.c mirror_mode turns shadow storage on, the path Wine already takes, so import_pool gives every CPU-visible pool a host-visible copy instead of an import. vk_mem_class_log runs once the device's extensions are known. TOTK_VK_NO_HOST_IMPORT=1 takes that path on any GPU, for testing it. Docs no longer list the extension as required. Iris Xe with a test layer that hides the extension: dev skips the GPU and exits (70); this change plays the sky-island save (40 s, 39.9 fps, shadow storage logged). With the extension present nothing changes. --- README.md | 2 +- docs/building.md | 5 +++-- docs/controls.md | 2 +- docs/settings.md | 1 + docs/tester-guide.md | 3 ++- runtime/cfg.c | 2 +- runtime/vk.h | 7 +++++-- runtime/vk_device.c | 14 ++++++++++---- runtime/vk_memory.c | 14 +++++++++++--- 9 files changed, 35 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 98dce1ef..8333fbfb 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ native speakers are welcome. ### Windows -Requirements: Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA machines get a faster build), a GPU with Vulkan 1.3 and `VK_EXT_external_memory_host`, about 36 GiB free during setup (20 GiB after). +Requirements: Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA machines get a faster build), a GPU with Vulkan 1.3 (`VK_EXT_external_memory_host` recommended: without it the game copies its memory pools and runs slower), about 36 GiB free during setup (20 GiB after). 1. Download `TotK-Setup--windows.zip` from [Releases](../../releases/latest) and unpack it. 2. Start `TotK-Setup.exe`. If SmartScreen warns about an unsigned app, choose *More info*, then *Run anyway*. diff --git a/docs/building.md b/docs/building.md index 8eb2a540..e8c12c4e 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,6 +1,7 @@ # Building from source -Windows 10 or later, an x86-64 CPU with SSE4.2, and a GPU with Vulkan 1.3 and `VK_EXT_external_memory_host`. The +Windows 10 or later, an x86-64 CPU with SSE4.2, and a GPU with Vulkan 1.3; `VK_EXT_external_memory_host` is recommended (without it CPU-visible pools get shadow storage, +slower and larger, see `vk_no_host_import` in [settings.md](settings.md)). The default build targets x86-64-v3 (AVX2/FMA); a CPU without them builds with `--cpu v2` instead and runs slower (see "Build"). Allow about 60 GB for the work folder. Extraction wants about 55 GB free while it runs and keeps about 35 GB afterwards. @@ -193,7 +194,7 @@ Vega 7 of a Ryzen 5 4600G at about 34 fps). Long play sessions and the Steam Dec Requirements: - Linux 6.7 or later: the write watch uses userfaultfd write protection with `PAGEMAP_SCAN`. SteamOS 3.8 qualifies. -- A Vulkan 1.3 driver with `VK_EXT_external_memory_host` (RADV, NVIDIA). +- A Vulkan 1.3 driver (RADV, NVIDIA). Linux uses shadow storage by default, so `VK_EXT_external_memory_host` is not needed. - Packages on Arch: ```sh diff --git a/docs/controls.md b/docs/controls.md index fc05cef4..4985e642 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -356,4 +356,4 @@ each line (`mouse_camera` in `runtime/input.c`); spread a turn over lines a fram ## RenderDoc capture (blocked) -`TOTK_RDOC=[,...]` (`runtime/rdoc_win.c`; `TOTK_RDOC_DIR`, `TOTK_RDOC_DLL`) loads RenderDoc before `vkCreateInstance`. RenderDoc hides `VK_EXT_external_memory_host`, which the back end requires for guest pool imports (`runtime/vk_memory.c`), so device creation fails under it. A capture needs a copy-based pool fallback first. +`TOTK_RDOC=[,...]` (`runtime/rdoc_win.c`; `TOTK_RDOC_DIR`, `TOTK_RDOC_DLL`) loads RenderDoc before `vkCreateInstance`. RenderDoc hides `VK_EXT_external_memory_host`, which guest pool imports need (`runtime/vk_memory.c`); without it the back end gives CPU-visible pools shadow storage, as on any GPU without the extension (`vk_no_host_import`). Captures on that path are untested. diff --git a/docs/settings.md b/docs/settings.md index 14f8207b..112e0040 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -171,6 +171,7 @@ Many rows below are developer tools that only act together with another setting | `ub_overlay_out` (default `1`) | `0` copies each uniform update between passes into its buffer at once, behind a full barrier of its own; `ab` alternates with the `ab` blocks. Needs `ub_overlay`. | With `0` a run of updates before a pass costs a full GPU barrier each; `TOTK_TRACE=perf` prints how many updates between passes were overlaid. | Caution | | `ubo_snapshot` (default `1`) | `0` binds live memory for uniform blocks; `ab` alternates with the `ab` blocks. | Without snapshots late draws read another object's matrix, so objects can be drawn in the wrong place. | Risky | | `vk_no_float64` (default `0`) | `1` clears the 64-bit float feature, so the translator lowers FP64 to FP32. | Shaders change, so the shader cache entries for it are made again; precision of FP64 shaders drops. | Caution | +| `vk_no_host_import` (default `0`) | `1` leaves `VK_EXT_external_memory_host` off even when the GPU has it, so the game takes the path of a GPU without it: every CPU-visible pool gets shadow storage, as under Wine. For testing that path. | Shadow storage costs CPU copies before each submission and more memory than imports. | Caution | | `vk_ssbo_align` (default unset) | Power of two that storage buffer offsets are treated as needing, to test the unaligned path. | The translator and the draw code round storage offsets down to it; shaders are translated again. | Caution | | `vk_subgroup` (default `32`) | Subgroup size to pin where the driver allows it. | A value other than 32 changes what the translator is told about the GPU, and shaders are translated again. | Caution | | `volume_mask_bias` (default `1`) | `0` leaves the game's water volume mask draws (a volume's front faces tested LEQUAL without depth writes, blended ONE/ONE with reverse subtract) without the depth bias toward the viewer that `vk_pipeline.c` gives them; `ab` alternates with `TOTK_AB`. | Puddles and still water then flicker again where the volume's top face lies on the water surface; a test setting. | Caution | diff --git a/docs/tester-guide.md b/docs/tester-guide.md index 81198acd..514814ea 100644 --- a/docs/tester-guide.md +++ b/docs/tester-guide.md @@ -8,7 +8,8 @@ from it may be shared. - Windows 10 or later, an x86-64 CPU with SSE4.2 (AVX2/FMA recommended: they build the default, faster version), about 60 GB free. -- A GPU with Vulkan 1.3 and `VK_EXT_external_memory_host`, with a current driver. +- A GPU with Vulkan 1.3, with a current driver. `VK_EXT_external_memory_host` is recommended: without it the game + runs on shadow storage, which costs memory and frame rate. - *Tears of the Kingdom* base game (1.0.0) and the 1.1.0, 1.2.1 or 1.4.3 update, dumped from your own Switch as NSP or XCI. - `prod.keys` dumped from your own Switch. Never send it to anyone, and never paste it into a log or an issue. diff --git a/runtime/cfg.c b/runtime/cfg.c index 4345978a..25998467 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -66,7 +66,7 @@ static const char *const known[] = { "SHADER_MEMO", "SHADOW", "SHADOW_DEFER", "SHADOW_RANGE", "SHADOW_RES", "SHADOW_SCALE", "SHADOW_SNAP", "SHARED_FONTS", "SHARPNESS", "SHOTS", "SHOTS_DIR", "SHUTTER_FIX", "SHOTS_FULL", "SPEED_PROBE", "SPIN", "SPIN_HANDOFF_US", "SPLIT_DRAWS", "SPLIT_US", "STICK_DEADZONE", "STICK_SENS", "SWKBD_ANSWER", "SYNC_AHEAD", - "SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", + "SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", "VK_NO_HOST_IMPORT", "VK_PRESENT", "VK_RECORDER", "VK_SSBO_ALIGN", "VK_SUBGROUP", "VK_SUBGROUP_PIN", "VK_VALIDATION", "VMA_BLOCK_MIB", "VOLUME", "VOLUME_MASK_BIAS", "VOLUME_MUSIC", "VOLUME_SFX", "VOLUME_VOICE", "VRAM_HEADROOM", "VRAM_LIMIT_MIB", "VS_OUTS", "WALK_KEY", "WALK_SCALE", "WB_EAGER", "WB_EXACT", "WB_FENCE_LIMIT", "WB_MERGE", "WINDOW_SIZE", "XLATE", "XLATE_ID", "XLATE_KEEP", "XLATE_PROCS", "ZSTD_CHECK", "ZSTD_NATIVE", diff --git a/runtime/vk.h b/runtime/vk.h index 9833a213..91c89f0e 100644 --- a/runtime/vk.h +++ b/runtime/vk.h @@ -11,7 +11,7 @@ #include "vk_ahead.h" // TOTK_SYNC_AHEAD=check hooks (vk_ahead_on) // Required (device choice fails without them): Vulkan 1.3; VK_KHR_swapchain, VK_KHR_push_descriptor, -// VK_EXT_depth_clip_control, VK_EXT_external_memory_host; features timelineSemaphore, dynamicRendering, +// VK_EXT_depth_clip_control; features timelineSemaphore, dynamicRendering, // synchronization2, shaderStorageImageWriteWithoutFormat, depthClipControl, shaderInt64, samplerAnisotropy, // independentBlend, geometryShader, textureCompressionBC. // Optional (flag set in VkCtx when enabled): the has_* members. @@ -45,6 +45,8 @@ typedef struct VkCtx { // (attachable images get feedback usage, a by-region barrier inside the pass); else (or TOTK_FEEDBACK=restart) // VK_FEEDBACK_RESTART (the pass ends and restarts behind the full barrier). int feedback; // VK_FEEDBACK_* + int has_external_memory_host; // VK_EXT_external_memory_host; without it CPU-visible pools get shadow + // storage (vk_memory.c mirror_mode), as under Wine uint32_t min_imported_host_alignment; // VK_EXT_external_memory_host VkDeviceSize vma_block; // VMA's block size for heaps over 1 GiB (TOTK_VMA_BLOCK_MIB, vk_device.c) int device_index; // index in vkEnumeratePhysicalDevices @@ -343,7 +345,8 @@ int vk_mem_flush_add_probe(void); // --probe-vkexec: the flush range list uint64_t vk_mem_mirror_uploaded(void); // --probe-vkexec: bytes copied into mirrors since the last summary line int vk_mem_mirror_probe(uint64_t addr); // --probe-vkexec: the pool at addr gets its mirror as on a first buffer use; // 1 when it has one -void vk_mem_class_log(const VkPhysicalDeviceProperties *p, const VkPhysicalDeviceMemoryProperties *m); // once +void vk_mem_class_log(const VkPhysicalDeviceProperties *p, const VkPhysicalDeviceMemoryProperties *m, + int host_import); // once; host_import: VK_EXT_external_memory_host is enabled int vk_mem_class_of(uint64_t addr); // VK_MCLS_* of the pool at addr (NONE when unbacked) void vk_mem_census(uint64_t frame); // at each present: pool census and traffic, logged at frame 1800 and, // with TOTK_TRACE=perf, every 1800 frames diff --git a/runtime/vk_device.c b/runtime/vk_device.c index 07f128f7..a9b6a23c 100644 --- a/runtime/vk_device.c +++ b/runtime/vk_device.c @@ -174,8 +174,7 @@ static int create_instance(void) { } static const char *const k_required_ext[] = { - VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME, - VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME}; + VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME}; // Name of the first missing required extension, or NULL. static const char *missing_required(VkPhysicalDevice pd) { @@ -263,7 +262,6 @@ static int pick_device(void) { } free(qp); rt_log("vk: using gpu %d: %s", best, g_vk.props.deviceName); - vk_mem_class_log(&g_vk.props, &g_vk.mem_props); return 1; } @@ -299,6 +297,13 @@ static int create_device(void) { const char *ext[52]; uint32_t n_ext = 0; for (size_t i = 0; i < sizeof k_required_ext / sizeof *k_required_ext; i++) ext[n_ext++] = k_required_ext[i]; + // VK_EXT_external_memory_host is optional: without it (or with TOTK_VK_NO_HOST_IMPORT=1, which tests that path on + // any GPU) CPU-visible pools get shadow storage (vk_memory.c mirror_mode). + const char *no_import = cfg_get("TOTK_VK_NO_HOST_IMPORT"); + g_vk.has_external_memory_host = has_ext(ep, ne, VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME) && + !(no_import && *no_import && strcmp(no_import, "0")); + if (g_vk.has_external_memory_host) ext[n_ext++] = VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME; + vk_mem_class_log(&g_vk.props, &g_vk.mem_props, g_vk.has_external_memory_host); FeatureChain *c = calloc(1, sizeof *c); void **tail = &c->f2.pNext; @@ -450,7 +455,8 @@ static int create_device(void) { else { g_vk.xfer_queue = g_vk.gfx_queue; g_vk.xfer_shared = 1; } VkPhysicalDeviceExternalMemoryHostPropertiesEXT emh = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT}; - VkPhysicalDeviceProperties2 p2 = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &emh}; + VkPhysicalDeviceProperties2 p2 = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, + .pNext = g_vk.has_external_memory_host ? &emh : NULL}; vkGetPhysicalDeviceProperties2(g_vk.phys, &p2); g_vk.min_imported_host_alignment = (uint32_t)emh.minImportedHostPointerAlignment; vk_caps_init(&g_vk); diff --git a/runtime/vk_memory.c b/runtime/vk_memory.c index ec9a85e0..33a46315 100644 --- a/runtime/vk_memory.c +++ b/runtime/vk_memory.c @@ -1867,7 +1867,7 @@ static PlatMutex mirror_stat_lock = PLAT_MUTEX_INIT; static volatile int64_t m_live_n, m_live_bytes, m_refused_n[MR_N], m_refused_bytes[MR_N]; static volatile int64_t m_flush_calls, m_flush_bytes, v_pages, v_skipped, v_mismatch; -static void mirror_mode(int discrete) { +static void mirror_mode(int discrete, int host_import) { const char *e = cfg_value("TOTK_MEMORY"); int mode = discrete ? 1 : 0; // 0 import, 1 mirror, 2 verify const char *why = discrete ? "auto, discrete gpu" : "auto, uma"; @@ -1902,6 +1902,14 @@ static void mirror_mode(int discrete) { #else shadow_on = !sh || !*sh || strcmp(sh, "0"); #endif + // Without VK_EXT_external_memory_host (Qualcomm Adreno's Windows driver, some mobile and older drivers, or + // TOTK_VK_NO_HOST_IMPORT=1) guest memory cannot be imported: every CPU-visible pool gets shadow storage, the path + // Wine already takes (import_pool -> shadow_pool), whatever TOTK_SHADOW says. + if (!host_import) { + if (!shadow_on) rt_log("mem: no host import (VK_EXT_external_memory_host): shadow storage%s", + sh && *sh ? ", TOTK_SHADOW=0 overridden" : ""); + shadow_on = 1; + } defer_on = shadow_on && cfg_bool("TOTK_SYNC_AHEAD") && strcmp(cfg_value("TOTK_SYNC_AHEAD"), "check") && cfg_bool("TOTK_SHADOW_DEFER"); // check: the wait stays exact, nothing is deferred if (defer_on) rt_log("mem: TOTK_SHADOW_DEFER: shadow updates that wait for a reader are queued for the GPU instead"); @@ -2931,7 +2939,7 @@ static void vram_log(uint64_t frame) { // Device class: INTEGRATED -> uma; a discrete GPU with a DEVICE_LOCAL heap of 1 GiB or more beside a // heap that is not device-local (host memory) -> discrete; otherwise uma (import everywhere). Sets the mirror mode. -void vk_mem_class_log(const VkPhysicalDeviceProperties *p, const VkPhysicalDeviceMemoryProperties *m) { +void vk_mem_class_log(const VkPhysicalDeviceProperties *p, const VkPhysicalDeviceMemoryProperties *m, int host_import) { int big_local = -1, host_heap = -1; for (uint32_t h = 0; h < m->memoryHeapCount; h++) { if (m->memoryHeaps[h].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) { @@ -2973,7 +2981,7 @@ void vk_mem_class_log(const VkPhysicalDeviceProperties *p, const VkPhysicalDevic if (host_backed == HB_UMA) rt_log("mem: device memory against system memory: commit and physical memory (uma), reserve %llu MiB " "(TOTK_MEM_RESERVE_MIB)", (unsigned long long)(room_reserve >> 20)); - mirror_mode(discrete); + mirror_mode(discrete, host_import); } // ---------------------------------------------------------------- upload batches and deferred destruction From 4c4d1310a5668599c8b39b49765a9595644931c1 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 22 Nov 2026 16:02:34 +0300 Subject: [PATCH 32/66] A quoted plugin image path that is empty is a patch table error with its line, not a read of the folder Co-Authored-By: Claude Opus 5.5 --- recomp/patches.py | 2 ++ tests/exefs_plugins_test.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recomp/patches.py b/recomp/patches.py index 170e540f..58bf3c1f 100644 --- a/recomp/patches.py +++ b/recomp/patches.py @@ -196,6 +196,8 @@ def load(path, mods): image, end = json.JSONDecoder().raw_decode(prefix[4]) except json.JSONDecodeError as e: raise PatchError(f'{where}: invalid quoted plugin image: {e.msg}') from None + if not image: + raise PatchError(f'{where}: empty quoted plugin image') tail = prefix[4][end:].strip() if tail and not tail.startswith('#'): raise PatchError(f'{where}: unexpected text after quoted plugin image') diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index 2f6d4bd0..b35f4549 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -390,7 +390,7 @@ class Lines(unittest.TestCase): mods = [('main', MAIN, 0x200000), ('plugin0', PLUGIN, 0x14000)] with tempfile.TemporaryDirectory() as d: patch = Path(d) / 'patches.txt' - for field in ('"unfinished', '"image.img" extra', '"image.img" "#not a comment"'): + for field in ('"unfinished', '""', '"image.img" extra', '"image.img" "#not a comment"'): with self.subTest(field=field): patch.write_text(f'set x ENV 0\nplugin x plugin0 {"0" * 64} {field}\n') with self.assertRaises(patches.PatchError) as error: From b61b2b0922e7b57d9114499b5c64106d17808181 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 22 Nov 2026 16:03:48 +0300 Subject: [PATCH 33/66] The plugin check accepts the .quad exlaunch writes for a backward b.cond, cbz or tbz: its relocation drops the offset's sign. Challenge Mode's two backward b.eq hooks were refused for it (#578) Co-Authored-By: Claude Opus 5.5 --- tests/exefs_plugins_test.py | 9 +++++++++ tools/exefs_plugins.py | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index c2c3caa5..e0a72d51 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -292,6 +292,15 @@ class Check(unittest.TestCase): self.assertEqual(reasons, []) self.assertEqual(hooks[0]['relocated'], '0x37000040 +5 words') + def test_trampoline_backward_unsigned(self): # Challenge: b.eq back 0x2ec; exlaunch's .quad lacks the sign + site, t = MAIN + SITE_OFF, PLUGIN + TRAMP_OFF + form = [0x54000040, 0x14000005, xp.LDR_X17_8, xp.BR_X17] + for target in (site + 0x1FFD14, site - 0x2EC): + words = [*form, *quad(target), b(t + 24, site + 4)] + self.assertEqual(self.reasons(self.long_form(0x54FFE8A0, TRAMP_OFF, words)), [], hex(target)) + self.refused(self.long_form(0x54FFE8A0, TRAMP_OFF, [*form, *quad(site + 0x1FFD18), b(t + 24, site + 4)]), + 'not the original') + def test_trampoline_long_nop(self): # the .quad 8-byte aligned by one nop before the form site, t = MAIN + SITE_OFF, PLUGIN + TRAMP_OFF + 4 form = [0x37000040, 0x14000005, xp.LDR_X17_8, xp.BR_X17, *quad(site + 0x14)] diff --git a/tools/exefs_plugins.py b/tools/exefs_plugins.py index f850ecb2..fefdc05e 100644 --- a/tools/exefs_plugins.py +++ b/tools/exefs_plugins.py @@ -214,7 +214,12 @@ def relocation_end(word, orig, site, at): return literal_end(word, orig, at) p = at + 4 if w0 == NOP else at w = [word(p + 4 * i) for i in range(4)] + targets = {target} if kind in ('b.cond', 'cbz', 'tbz'): + # exlaunch's __fix_cond_comp_test_branch takes the offset field without its sign: a backward target lands + # 2^21 (b.cond, cbz) or 2^16 (tbz) bytes too far. Challenge Mode's trampolines hold such .quads; the generated + # code runs main's own branch instead, to its real target. + targets.add(site + ((orig >> 5 & (0x3FFF if kind == 'tbz' else 0x7FFFF)) << 2)) form, data = pc_relative(w[0], p) == (rel[0], p + 8) and w[1:] == [0x14000005, LDR_X17_8, BR_X17], p + 16 elif kind == 'b' and orig >> 31: form, data = w[:3] == [LDR_X17_12, ADR_X30_16, BR_X17], p + 12 @@ -222,7 +227,7 @@ def relocation_end(word, orig, site, at): form, data = w[:2] == [LDR_X17_8, BR_X17], p + 8 else: # adr, adrp form, data = w[:2] == [0x58000040 | orig & 0x1F, 0x14000003], p + 8 - return data + 8 if form and data % 8 == 0 and quad(word, data) == target else None + return data + 8 if form and data % 8 == 0 and quad(word, data) in targets else None def returns_to(word, at, back): From b4dcc3431fdc8f1c57170fc967330e42eb2017a7 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 05:10:48 -0800 Subject: [PATCH 34/66] tools/pack_shader_cache.py reads the loose files with 8 bounded readers pack() read every loose file one after the other. On Windows each open costs milliseconds (the antivirus scans it), so folding a fresh cache was dominated by waiting: 12000 loose files took 79-90 s. The files are now read ahead by a pool of 8 threads (--read-workers, 1..16; 1 reads serially), at most twice that many in flight, and written in the same sorted order, so the pack is byte-identical. 12000 files: 18-20 s. The CLI prints read and cleanup progress every 5 s. tests/pack_shader_cache_test.py checks parallel against serial packs, fresh and incremental, and the bounded read-ahead. --- tests/pack_shader_cache_test.py | 25 ++++++++++++++ tools/pack_shader_cache.py | 59 ++++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 9 deletions(-) diff --git a/tests/pack_shader_cache_test.py b/tests/pack_shader_cache_test.py index 53356ef7..8a991b46 100644 --- a/tests/pack_shader_cache_test.py +++ b/tests/pack_shader_cache_test.py @@ -9,6 +9,7 @@ import struct import sys import tempfile import unittest +import shutil from pathlib import Path ROOT = Path(__file__).resolve().parent.parent @@ -100,6 +101,30 @@ class PackTest(unittest.TestCase): self.assertTrue((self.cache / f'{k}.spv').exists()) self.assertEqual(len(read_pack(self.cache / psc.PACK)), 4) + def test_parallel_pack_is_byte_identical_for_fresh_and_incremental_inputs(self): + for i in range(80): + self.shader(str(i)) + serial = self.cache.parent / 'serial' + shutil.copytree(self.cache, serial) + self.assertEqual(psc.pack(self.cache, read_workers=8), psc.pack(serial, read_workers=1)) + self.assertEqual((self.cache / psc.PACK).read_bytes(), (serial / psc.PACK).read_bytes()) + self.shader('new') + (self.cache / f'{name("0")}.res.json').write_bytes(b'{"changed":true}') + (self.cache / f'{name("use1")}.use').write_bytes(b'invalid loose copy') + shutil.copytree(self.cache, serial, dirs_exist_ok=True) + self.assertEqual(psc.pack(self.cache, read_workers=8), psc.pack(serial, read_workers=1)) + self.assertEqual((self.cache / psc.PACK).read_bytes(), (serial / psc.PACK).read_bytes()) + + def test_prefetch_preserves_order_and_bounds_inflight_reads(self): + keys = [(1, bytes([i])) for i in range(100)] + # The first yielded result must not require reading every file; only the bounded prefetch can start. + from unittest.mock import patch + with patch.object(psc, 'read_loose', return_value=b'data') as read: + iterator = psc.prefetched_files(keys, dict.fromkeys(keys, Path('fixture')), 3) + self.assertEqual(next(iterator), (keys[0], b'data')) + self.assertLessEqual(read.call_count, 6) + self.assertEqual([key for key, _ in iterator], keys[1:]) + def test_a_broken_pack_is_rebuilt_from_the_loose_files(self): self.shader('a') (self.cache / psc.PACK).write_bytes(b'garbage') diff --git a/tools/pack_shader_cache.py b/tools/pack_shader_cache.py index f41e2c3f..b0d6b764 100644 --- a/tools/pack_shader_cache.py +++ b/tools/pack_shader_cache.py @@ -15,10 +15,14 @@ bytes sorted by (kind, name): name (the 32 bytes the file name's 64 hex digits s --keep leaves the loose files in place. Close the game first: a running totk.exe has read the old pack's index. """ import argparse +from collections import deque +from concurrent.futures import ThreadPoolExecutor +from itertools import islice import os import re import struct import sys +import time from pathlib import Path MAGIC = b'TKSPACK1' @@ -74,7 +78,37 @@ def valid(kind, data): return len(data) == USE_SIZE if kind == 3 else len(data) > 0 -def pack(cache, keep=False): +def read_loose(path): + if path is not None: + try: + return path.read_bytes() + except OSError: + pass + return None + + +def prefetched_files(keys, loose, workers): + """Read ahead a bounded number of files, yielding in index order for a byte-identical pack.""" + if workers == 1: + for key in keys: + yield key, read_loose(loose.get(key)) + return + iterator = iter(keys) + with ThreadPoolExecutor(max_workers=workers) as pool: + def submit(key): + return pool.submit(read_loose, loose[key]) if key in loose else None + pending = deque((key, submit(key)) for key in islice(iterator, workers * 2)) + while pending: + key, future = pending.popleft() + yield key, future.result() if future else None + following = next(iterator, None) + if following is not None: + pending.append((following, submit(following))) + + +def pack(cache, keep=False, read_workers=8, progress=None): + if not 1 <= read_workers <= 16: + raise ValueError('read_workers must be 1..16') cache = Path(cache) out = cache / PACK packed = read_pack(out) @@ -91,13 +125,10 @@ def pack(cache, keep=False): try: with open(tmp, 'wb') as f: f.write(bytes(offset)) # header and index, written once the offsets are known - for key in keys: - data = None + for done, (key, data) in enumerate(prefetched_files(keys, loose, read_workers), 1): + if progress and (done == len(keys) or done % 128 == 0): + progress('read', done, len(keys)) if key in loose: # a valid loose file, else the packed copy, else nothing - try: - data = loose[key].read_bytes() - except OSError: - pass if data is not None and valid(key[0], data): written.append(loose[key]) else: @@ -120,8 +151,10 @@ def pack(cache, keep=False): old.close() os.replace(tmp, out) if not keep: - for p in written: + for done, p in enumerate(written, 1): p.unlink(missing_ok=True) + if progress and (done == len(written) or done % 128 == 0): + progress('cleanup', done, len(written)) try: (cache / 'in').rmdir() # only when empty except OSError: @@ -133,10 +166,18 @@ def main(): ap = argparse.ArgumentParser(description='Fold a shader cache into shader-cache.pack.') ap.add_argument('cache', type=Path, help='the shader-cache folder next to totk.exe') ap.add_argument('--keep', action='store_true', help='keep the loose files') + ap.add_argument('--read-workers', type=int, choices=range(1, 17), default=8, + help='bounded concurrent file reads (default 8; 1 reads serially)') a = ap.parse_args() if not a.cache.is_dir(): sys.exit(f'{a.cache} is not a folder') - n, new, skipped, size = pack(a.cache, a.keep) + last_progress = [0.0] + def progress(phase, done, total): + now = time.monotonic() + if done == total or now - last_progress[0] >= 5: + print(f'pack-cache: {phase}: {done} of {total} files', flush=True) + last_progress[0] = now + n, new, skipped, size = pack(a.cache, a.keep, a.read_workers, progress) print(f'{a.cache / PACK}: {n} files, {size / 2**20:.0f} MiB ({new} loose files folded in' f'{", " + str(skipped) + " unreadable or empty skipped" if skipped else ""})', flush=True) From 589bd9e08fa9e05312ca4efa7fd2be25e30beff0 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 22 Nov 2026 16:11:48 +0300 Subject: [PATCH 35/66] A block that decompresses to the wrong size is a damaged file again, so the installer asks for a fresh copy The size check added in this pull request raised a plain ValueError, which the installer maps to check.unpack_failed. Before it, such a block ended in a hash or length mismatch and the player saw check.input_damaged. ncz.unpack_ncz now turns the new BlockSizeError into DamagedFile, like ZstdError and EOFError. Co-Authored-By: Claude Opus 5.5 --- tests/ncz_test.py | 17 +++++++++++++++++ tools/ncz.py | 11 +++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/tests/ncz_test.py b/tests/ncz_test.py index 21a67de6..14554cc6 100644 --- a/tests/ncz_test.py +++ b/tests/ncz_test.py @@ -163,6 +163,23 @@ class UnpackTest(unittest.TestCase): ncz.unpack(self.padded_nsz((-1,), truncate=True), self.dir / 'out.nsp') self.assertFalse((self.dir / 'out.nsp').exists()) + def test_block_of_the_wrong_size_is_a_damaged_file(self): + """The installer turns DamagedFile into check.input_damaged, which asks for a fresh copy of the file.""" + def short(data): + head = ncz.HEADER + 16 + 0x40 * len(SECTIONS) + count = struct.unpack_from(' Date: Sun, 22 Nov 2026 16:42:31 +0300 Subject: [PATCH 36/66] Flags pass between a mod plugin's code and the game as on the Switch: exlaunch's inline hook saves no NZCV, so a hooked site goes on with the flags its callback left. Challenge Mode's hooked b.eq sites follow its version check (#578, #1360) Co-Authored-By: Claude Opus 5.5 --- recomp/flags.py | 58 ++++++++++++++++++++++++++++++++----- recomp/gen.py | 32 +++++++++++++------- recomp/patches.py | 5 ++-- tests/exefs_plugins_test.py | 49 +++++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 20 deletions(-) diff --git a/recomp/flags.py b/recomp/flags.py index 61188f9d..b3c26c0b 100644 --- a/recomp/flags.py +++ b/recomp/flags.py @@ -15,6 +15,11 @@ definitions then also write it. A read that can see flags a callee left reads the caller's flags from before the call instead. AAPCS64 code never reads a callee's flags, so such a read only sits on a path that does not run: in TotK it follows calls to noreturn functions (asserts) that the compiler placed before another branch's target. Plan.after_call counts them. + +A mod plugin's inline hook breaks that rule. exlaunch's exl_inline_hook_impl saves and restores x0..x29 around the +callback but not NZCV, so the hooked game code goes on with the flags the callback left (Challenge Mode's callbacks end +in a cmp, and the b.eq at their sites follows it). So in a plugin module flags pass through calls and returns (plan's +`through`), and a hook site takes the flags the stub's call left (plan's `hooks`). """ import re @@ -26,7 +31,7 @@ NZ_DEF = 'c->nzcv = ' NZ_USE = '(c->nzcv)' KIND_NAME = {'subs': 'sub', 'adds': 'add', 'logic': 'logic'} -ENTRY, CALL = 'entry', 'call' +ENTRY, CALL, HOOK = 'entry', 'call', 'hook' # HOOK: (HOOK, i), the callback's flags at hook site i class FlagError(Exception): @@ -55,6 +60,8 @@ class Plan: self.reader = [None] * n self.pack = [False] * n self.exit = [None] * n # kind of the flags to publish in c->nzcv at a tail exit, or None + self.pre = [None] * n # kind of the flags to publish before a call whose callee sees them, or None + self.takes = [False] * n # the call leaves its callee's flags (F.nz from c->nzcv after it) self.entry = False # F.nz starts as c->nzcv: flags from the entry reach a read or an exit self.entry_read = False # they reach a read, not only an exit self.after_call = 0 # reads that can see flags a callee left (see the module docstring) @@ -69,6 +76,16 @@ class Plan: k = self.exit[i] return f'c->nzcv = fnz_{k}(&F); ' if k else '' + def give(self, i): + """Statement writing the flags to c->nzcv before instruction i's call, whose callee sees them (plan's through + and hooks; '' when it need not).""" + k = self.pre[i] + return f'c->nzcv = fnz_{k}(&F); ' if k else '' + + def take(self, i): + """Statement taking the flags the callee of instruction i's call left (plan's through and hooks).""" + return ' F.nz = c->nzcv;' if self.used and self.takes[i] else '' + def rewrite(self, i, code): """code of instruction i with its flag reads and writes on F.""" rk = self.reader[i] @@ -91,7 +108,7 @@ class Plan: return code -def plan(effects, succ, calls, exits): +def plan(effects, succ, calls, exits, through=(), hooks=()): """effects[i]: (reads, kind or None); succ[i]: successor indices inside the function; calls: indices of calls, whose callee may leave any flags; exits: indices that can leave for another function other than by a call or a return (a tail branch, falling into the next function, a br through rt_dispatch). @@ -99,25 +116,41 @@ def plan(effects, succ, calls, exits): Discovery can start a function inside another one (a branch target, a materialised address), and the code before it then falls or branches into it with live flags. So a tail exit publishes the flags in c->nzcv, and a function whose reads can see its entry flags starts F.nz from c->nzcv. Calls and returns publish nothing: AAPCS64 - code neither passes flags to a callee nor reads a callee's, so a call's flags count as no definition.""" + code neither passes flags to a callee nor reads a callee's, so a call's flags count as no definition. + + through: calls whose flags pass both ways (a plugin module, see the module docstring; its returns are in exits): + each publishes the flags before the call (Plan.give) and defines F.nz from c->nzcv after it (Plan.take). + hooks: patched sites with a plugin inline hook before the site's own word, when the hook's set is on: the hook + publishes the flags before its call and leaves the callback's after it, which the site's own word reads unless it + writes flags itself. With the set off the flags are the ones before the site, so what follows can see both.""" n = len(effects) p = Plan(n) if not any(r or k for r, k in effects): return p p.used = True + hooks = set(hooks) - set(calls) # a hook before a bl: the bl's callee leaves the flags reach = [set() for _ in range(n)] reach[0].add(ENTRY) work = [0] while work: i = work.pop() - out = {i} if effects[i][1] else ({CALL} if i in calls else reach[i]) + if effects[i][1] or i in through: + out = {i} + elif i in calls: + out = {CALL} + elif i in hooks: + out = reach[i] | {(HOOK, i)} + else: + out = reach[i] for s in succ[i]: if not out <= reach[s]: reach[s] |= out work.append(s) def kind(d): - return 'nz' if d == ENTRY else effects[d][1] + if d == ENTRY or isinstance(d, tuple): + return 'nz' + return effects[d][1] or 'nz' # a through call leaves its callee's flags packed def use(r): """Kind a use of the definitions r reads; several kinds read the packed form, which they then all write.""" @@ -127,18 +160,27 @@ def plan(effects, succ, calls, exits): if len(kinds) == 1: return kinds.pop() for d in r: - if d != ENTRY: + if isinstance(d, int) and effects[d][1]: p.pack[d] = True return 'nz' # several kinds, or none (unreachable) + def seen(i): + """What a read or an exit at instruction i sees: at a hook site also the callback's flags.""" + return reach[i] | {(HOOK, i)} if i in hooks else reach[i] + for i, (reads, _) in enumerate(effects): if reads: p.after_call += CALL in reach[i] - p.reader[i] = use(reach[i] - {CALL}) + p.reader[i] = use(seen(i) - {CALL}) p.entry_read |= ENTRY in reach[i] for i in exits: # Entry flags alone are still in c->nzcv. - r = reach[i] - {CALL} + r = seen(i) - {CALL} if r and r != {ENTRY}: p.exit[i] = use(r) + for i in set(through) | hooks: + p.takes[i] = True + r = reach[i] - {CALL} + if r and r != {ENTRY}: + p.pre[i] = use(r) return p diff --git a/recomp/gen.py b/recomp/gen.py index f41b55e1..8bf0e24b 100644 --- a/recomp/gen.py +++ b/recomp/gen.py @@ -363,7 +363,7 @@ class Emitter: def flag_plan(self, insns, entry, end, tables, succ): """recomp/flags.py plan for the function: each instruction's flag use over the flow succ (flow()).""" n = len(insns) - calls, effects, exits = set(), [], {n} + calls, effects, exits, hooks = set(), [], {n}, set() for i, ins in enumerate(insns): k, a = ins.kind, entry + 4 * i if k in ('bl', 'blr'): @@ -372,6 +372,8 @@ class Emitter: exits.add(i) elif k == 'br': exits.add(i) # through rt_dispatch, also a table's default + elif k == 'ret' and self.mod.plugin: + exits.add(i) # a plugin's caller sees the flags it leaves (recomp/flags.py) if a in self.patched: effects.append(self.patched_effect(ins, a)) for words in self.replacements(a): @@ -380,10 +382,12 @@ class Emitter: calls.add(i) elif r.kind in ('b', 'bcond') and not entry <= r.target < end: exits.add(i) + if any(w.kind == 'hook' for w in words): + hooks.add(i) else: effects.append(flags.effect(ins.cond if k == 'bcond' else ins.code or '')) effects.append((False, None)) - return flags.plan(effects, succ, calls, exits) + return flags.plan(effects, succ, calls, exits, through=calls if self.mod.plugin else (), hooks=hooks) def patched_effect(self, ins, a): """Flag effect of a patched site: every alternative (the original and each replacement) must write the same @@ -450,6 +454,12 @@ class Emitter: def publish(i): return fp.publish(i) if fp and fp.used else '' + def give(i): # flags a plugin's callee or a hook's callback sees (recomp/flags.py plan's through, hooks) + return fp.give(i) if fp and fp.used else '' + + def take(i): # flags that callee or callback left + return fp.take(i) if fp and fp.used else '' + def jump(t, i): if entry <= t < end: return f'goto L_{t:x};' @@ -478,12 +488,12 @@ class Emitter: if fp.used: out.append(' ' + fp.decl()) - def call(t, a): + def call(t, a, i): if t in starts: refs.add(t) - return f'c->x[30] = {hx(a + 4)}; {spill}{fname(t)}(c);{reload_call}' + return f'{give(i)}c->x[30] = {hx(a + 4)}; {spill}{fname(t)}(c);{reload_call}{take(i)}' self.stats['external_calls'] += 1 - return f'c->x[30] = {hx(a + 4)}; {spill}c->pc = {hx(t)}; rt_dispatch(c);{reload_call}' + return f'{give(i)}c->x[30] = {hx(a + 4)}; {spill}c->pc = {hx(t)}; rt_dispatch(c);{reload_call}{take(i)}' def op(i, code): code = fx(i, code) @@ -494,7 +504,7 @@ class Emitter: if r.kind == 'op': return op(i, r.code) if r.kind == 'bl': - return call(r.target, a) + return call(r.target, a, i) if r.kind == 'b': return jump(r.target, i) if r.kind == 'bcond': @@ -504,9 +514,10 @@ class Emitter: if r.kind == 'hook': # a call that writes no x30, the whole Cpu current before it and read back after it: the stub saves and # restores x30 itself, and the callback may change any register through exlaunch's hook context + # exlaunch's hook impl saves no NZCV: the callback sees the flags and the site goes on with its own refs.add(r.target) self.stats['plugin_hook_calls'] += 1 - return f'{spill}{fname(r.target)}(c);{reload}' + return f'{give(i)}{spill}{fname(r.target)}(c);{reload}{take(i)}' raise patches.PatchError(f'{a:#x}: patched instruction is a {r.kind}') def patch(i, ins, a): @@ -548,9 +559,10 @@ class Emitter: self.stats['spin_gates'] += 1 emit(i, ' ' + j if k == 'b' else f' if ({fx(i, ins.cond)}) {{ {j} }}') elif k == 'bl': - emit(i, ' ' + call(ins.target, a)) + emit(i, ' ' + call(ins.target, a, i)) elif k == 'blr': - emit(i, f' c->pc = {ins.target}; c->x[30] = {hx(a + 4)}; {spill}rt_dispatch(c);{reload_call}') + emit(i, f' {give(i)}c->pc = {ins.target}; c->x[30] = {hx(a + 4)}; {spill}rt_dispatch(c);{reload_call}' + f'{take(i)}') elif k == 'br': jt = tables.get(a) if jt == 'all': @@ -562,7 +574,7 @@ class Emitter: else: emit(i, f' {publish(i)}{spill}c->pc = {ins.target}; {MUSTTAIL} rt_dispatch(c);') elif k == 'ret': - emit(i, f' {spill}return;') + emit(i, f' {publish(i)}{spill}return;') else: raise ValueError(f'{a:#x}: unknown instruction kind {k!r}') n = len(insns) diff --git a/recomp/patches.py b/recomp/patches.py index a3746ac5..d58353bd 100644 --- a/recomp/patches.py +++ b/recomp/patches.py @@ -69,8 +69,9 @@ run's record; the design follows #845 by itaskaev2): the original code and not the hook again. A replacement word `@call:+` is a call of the function there that writes no x30: every register in the Cpu at the call and all read back after it (the callback may change any of them, as exlaunch's hook context -allows); the flags stay as they were. It may stand before the site's last word, which is then the original -instruction. +allows); the flags are published before it and taken back after it, since exlaunch's hook impl saves no NZCV and the +game code goes on with the flags the callback left (recomp/flags.py plan's hooks). It may stand before the site's last +word, which is then the original instruction. A `hook` line names guest functions (module offsets of function starts; gen.py stops on any other address) whose entry the runtime watches: their lifted C starts with FN_ENTER (runtime/cpu.h), a load of g_fnprof and a predicted diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index e0a72d51..4de41eff 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -613,6 +613,55 @@ class Generator(unittest.TestCase): self.assertIn(f'X(0, "main", {FN:#x}, 0xaa0003f3u, 0x14000000u)', h) self.assertIn('X("plugin0", 0x4100) X("plugin0", 0x4200)', h) + # exlaunch's hook impl saves no NZCV: flags pass from the site to the callback and back (recomp/flags.py) + def code(self, main_words, plugin_words=None): + """Main's hooked function and the plugin image's words replaced; the plugin hash follows.""" + (self.d / 'exefs' / 'main').write_bytes(code_nso(main_words)) + img = bytearray((self.d / 'plugin0.img').read_bytes()) + for off, w in (plugin_words or {}).items(): + struct.pack_into('nzcv = fnz_', on[:call]) # the callback sees the cmp's flags + self.assertIn('F.nz = c->nzcv;', on[call:]) # the b.eq reads what the callback left + self.assertIn('fc_nz(&F, CC_EQ)', on[call:]) + self.assertIn('fc_nz(&F, CC_EQ)', off[:off.index('}', 8)]) # off: the cmp's flags, packed into F.nz + self.assertIn('F.nz = fnz_sub64(&F);', c) + + def test_plugin_return_leaves_its_flags(self): + pb = self.bases['plugin0'] + # the callback: cmp w1, #5; ret + self.code({FN: 0xAA0003F3, FN + 4: 0xAA1303E0, FN + 8: RET_W}, {0x4200: 0x7100143F, 0x4204: RET_W}) + t = self.table(f'site mod_x main {FN:x} aa0003f3 @call:plugin0+4000 aa0003f3', + ['stub plugin0 4000', 'seed plugin0 4100 4200']) + c = self.emit(t, 'plugin0', pb + 0x4200, pb + 0x4208) + self.assertIn('c->nzcv = fnz_sub32(&F); return;', c) + + def test_plugin_call_takes_the_callee_flags(self): + pb = self.bases['plugin0'] + # bl 0x4200; b.eq +8; ret; ret + self.code({FN: 0xAA0003F3, FN + 4: 0xAA1303E0, FN + 8: RET_W}, + {0x4100: b(pb + 0x4100, pb + 0x4200, True), 0x4104: 0x54000040, 0x4108: RET_W, 0x410c: RET_W}) + t = self.table(f'site mod_x main {FN:x} aa0003f3 @call:plugin0+4000 aa0003f3', + ['stub plugin0 4000', 'seed plugin0 4100 4200']) + c = self.emit(t, 'plugin0', pb + 0x4100, pb + 0x4110) + body = c[c.index(f'void f_{pb + 0x4100:x}(Cpu *c) {{'):] + self.assertLess(body.index(f'c->pc = {pb + 0x4200:#x}ull; rt_dispatch(c);'), body.index('F.nz = c->nzcv;')) + self.assertIn('fc_nz(&F, CC_EQ)', body) + self.assertEqual(body.count('c->nzcv = fnz_nz(&F); return;'), 2) # both returns leave the flags + def test_stub_returns_instead_of_branching_to_its_trampoline(self): t = self.table(f'site mod_x main {FN:x} aa0003f3 @call:plugin0+4000 aa0003f3', ['stub plugin0 4000']) stub = self.bases['plugin0'] + 0x4000 From f11987e9a7a4c0013fb3c82718c61f81d4678fda Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Sun, 22 Nov 2026 17:02:47 +0100 Subject: [PATCH 37/66] Serve the mods' merged resource size table from the last start when the mod files are the same Building the table opens every mod file and unpacks the mods' packs: about 7 s with an HD texture pack and The Second Quest. restbl_cache = 0 builds it at every start. Split from #1331. Co-Authored-By: Claude Opus 5.5 --- docs/settings.md | 1 + runtime/cfg.c | 2 +- runtime/romfs.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 111 insertions(+), 2 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 5258f39c..387b22a0 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -120,6 +120,7 @@ Many rows below are developer tools that only act together with another setting | `romfs_mmap` | `1` maps the RomFS image into memory instead of reading it with positional reads. | Changes how the image is read; the log reports when the mapped path is on. | Caution | | `romfs_mods` | Folder of an overlay with a `manifest.tsv` of sizes and SHA-256 hashes; its files are served in place of the originals. | A missing file, size or hash mismatch, or a changed original stops the start; player mods win over this overlay. | Save risk | | `romfs_patches` | Folder of an overlay with a `manifest.tsv`, served in place of the original files; the default is `romfs-patches` beside the index. | Same checks as `romfs_mods`; while it is set the Xbox and PC button prompts are off, and the menu says so. | Save risk | +| `restbl_cache` (default `1`) | With player mods, the resource size table merged from their files at the last start is served again when every mod file, shipped table and the port version are the same (`/mods/` keeps the table and its `.key`). `0` builds it at every start. | Saves the pass over every mod file at start (about 7 s with an HD texture pack and The Second Quest). A changed, added or removed mod file builds the table again. | Safe | | `romfs_proof_dir` | Folder for the `.romfs-verified-v1` proof file of a full verification; the default is beside the index. | Only moves one small file. | Safe | | `romfs_verify` | `full` hashes the whole RomFS image at start; `force` hashes it again even when a proof file exists. | Start takes many minutes for a 17 GB image; a proof file is written so later starts skip the hash. | Caution | | `shader_cache` | Folder of the translated shader cache (default `shader-cache` beside `totk.exe`). | A new folder starts empty, so shaders are translated again during play. | Caution | diff --git a/runtime/cfg.c b/runtime/cfg.c index b3dcbb2b..7fe3604b 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -61,7 +61,7 @@ static const char *const known[] = { "PREWARM_XLATE", "PROBE_MOVIE", "PROBE_MOVIE_BENCH", "PROBE_MOVIE_SHOT", "PROFILE", "PROFILE_CHAINS", "PROFILE_DIR", "PROFILE_FRAMES", "PROFILE_MAIN", "PROFILE_RENDER", "PROMPTS", "PUSH_SKIP", "PUSH_STAGE", "QUICKLOAD_KEY", "QUICKSAVE", "QUICKSAVE_KEY", "RDOC", "RDOC_DIR", "RDOC_DLL", "REALTIME", "REC_ASYNC", "REC_END", "REC_SPIN_US", "REEXEC", "REFLEX", "RENDER_SCALE", "REPLAY_ASYNC", "REPLAY_CHUNKS", "REPLAY_CHUNK_DRAWS", "REPLAY_SKEW_US", "REPLAY_STATE_CHECK", "REPLAY_WORKERS", - "REPLAY_CHECK", "REPORT_GUARD", "RESOLVE_CHECK", "RESTART_WAIT", "ROMFS", "ROMFS_INDEX", "ROMFS_MMAP", "ROMFS_MODS", "ROMFS_PATCHES", + "REPLAY_CHECK", "REPORT_GUARD", "RESOLVE_CHECK", "RESTART_WAIT", "RESTBL_CACHE", "ROMFS", "ROMFS_INDEX", "ROMFS_MMAP", "ROMFS_MODS", "ROMFS_PATCHES", "ROMFS_PROOF_DIR", "ROMFS_VERIFY", "RSTICK_DEADZONE", "RUMBLE", "RUMBLE_CURVE", "RUMBLE_STRENGTH", "RUMBLE_TRIGGERS", "SCENE_UPSCALER", "SHADER_CACHE", "SHADER_MEMO", "SHADOW", "SHADOW_DEFER", "SHADOW_RANGE", "SHADOW_RES", "SHADOW_SCALE", "SHADOW_SNAP", "SHARED_FONTS", "SHARPNESS", "SHOTS", "SHOTS_DIR", "SHUTTER_FIX", "SHOTS_FULL", "SPEED_PROBE", "SPIN", "SPIN_HANDOFF_US", "SPLIT_DRAWS", "SPLIT_US", "STICK_DEADZONE", "STICK_SENS", diff --git a/runtime/romfs.c b/runtime/romfs.c index 648fce82..d9199020 100644 --- a/runtime/romfs.c +++ b/runtime/romfs.c @@ -761,6 +761,102 @@ static int restbl_packs(Restbl *out, const Restbl *base, int *packs, int *lines) return raised; } +// ---- the merged table across starts. Building it opens every mod file and unpacks the mods' packs: about 7 s with an +// HD texture pack and The Second Quest (13,725 files). A start whose inputs are the same as the last one's serves the +// table that start wrote. The key is a SHA-256 over this code's version, the port version, the game's table entry, and +// for every shipped table and every mod or manifest overlay its path, place in the order and file identity (volume, +// file id, size, write time). /mods/.key holds the key, what the build gave (a table or none) and the +// SHA-256 of the written table, so a copied profile keeps it; anything else there is a miss and the table is built +// again. TOTK_RESTBL_CACHE=0 builds it at every start. +#define RESTBL_CACHE_VERSION 2 +typedef struct { char magic[8]; uint32_t version, outcome; uint8_t key[32], table[32]; } RestblCache; +enum { RESTBL_NONE = 1, RESTBL_TABLE = 2 }; + +static void restbl_cache_paths(char *key, size_t key_cap, char *table, size_t table_cap) { + const char *leaf = strrchr(restbl_rel, '/') ? strrchr(restbl_rel, '/') + 1 : restbl_rel; + need(snprintf(table, table_cap, "%s/mods/%s", rt_config()->profile, leaf) < (int)table_cap, "table path"); + need(snprintf(key, key_cap, "%s.key", table) < (int)key_cap, "table key path"); +} + +static void hash_file_id(Sha256 *h, const char *path) { + PlatFile *f = open_read(path); + Identity id = {0}; + if (f) id = identity_of(f), plat_file_close(f); + sha256_update(h, path, strlen(path) + 1); + sha256_update(h, &id, sizeof id); +} + +static void restbl_cache_key(uint64_t gi, uint8_t out[32]) { + Sha256 h; + sha256_init(&h); + static const char tag[] = "totk restbl cache"; + uint32_t v = RESTBL_CACHE_VERSION; + sha256_update(&h, tag, sizeof tag); + sha256_update(&h, &v, sizeof v); + sha256_update(&h, rt_port_version, strlen(rt_port_version) + 1); + Entry ge = entry(gi); + sha256_update(&h, &ge, sizeof ge); + for (size_t s = 0; s < nshipped; s++) { + int32_t m[2] = {shipped[s].mod, shipped[s].other}; + sha256_update(&h, m, sizeof m); + hash_file_id(&h, shipped[s].file); + } + uint64_t n = noverlay; + sha256_update(&h, &n, sizeof n); + for (size_t k = 0; k < noverlay; k++) { + const Overlay *o = &overlays[k]; + if (!o->mod && o->prio != 1 && o->index != gi) continue; + int64_t place[3] = {o->index == ADDED ? -1 : (int64_t)o->index, o->prio, o->mod}; + sha256_update(&h, o->name, strlen(o->name) + 1); + sha256_update(&h, o->path, strlen(o->path) + 1); + sha256_update(&h, place, sizeof place); + sha256_update(&h, &o->id, sizeof o->id); + } + sha256_final(&h, out); +} + +static void restbl_cache_store(const uint8_t key[32], int outcome) { + char kp[2300], tp[2300]; + restbl_cache_paths(kp, sizeof kp, tp, sizeof tp); + RestblCache c = {.magic = "TOTKRSZ", .version = RESTBL_CACHE_VERSION, .outcome = (uint32_t)outcome}; + c.magic[7] = 'C'; + memcpy(c.key, key, 32); + if (outcome == RESTBL_TABLE) { + uint64_t n = 0; + uint8_t *z = plat_file_read(tp, &n); + if (!z) return; + sha256(z, (size_t)n, c.table); + free(z); + } + if (!plat_file_write_atomic(kp, &c, sizeof c)) + rt_log("RomFS: cannot write %s; the table is built at every start", kp); +} + +// 1 when the last start's result fits: its table is served again (or none, as then). +static int restbl_cache_use(const uint8_t key[32], Overlay *served, const char *keeps, double t0) { + char kp[2300], tp[2300]; + restbl_cache_paths(kp, sizeof kp, tp, sizeof tp); + uint64_t n = 0; + RestblCache *c = (RestblCache *)plat_file_read(kp, &n); + int hit = c && n == sizeof *c && !memcmp(c->magic, "TOTKRSZC", 8) && c->version == RESTBL_CACHE_VERSION && + !memcmp(c->key, key, 32) && (c->outcome == RESTBL_NONE || c->outcome == RESTBL_TABLE); + if (hit && c->outcome == RESTBL_TABLE) { + uint64_t zn = 0; + uint8_t *z = plat_file_read(tp, &zn), sum[32]; + if (z) sha256(z, (size_t)zn, sum); + hit = z && !memcmp(sum, c->table, 32); + if (!hit) free(z); + hit = hit && serve_generated(restbl_rel, served, z, (size_t)zn, "mods", "merged resource sizes, kept from the " + "last start", keeps); + } + if (hit) + rt_log("RomFS: resource size table: the mods' files are the ones of the last start: %s (%.0f ms)", + c->outcome == RESTBL_TABLE ? "its merged table is used" : "they fit the game's entries", + (now_s() - t0) * 1000); + free(c); + return hit; +} + // With a player mod (or the TOTK_ROMFS_MODS manifest) serving files: the game's table with every shipped table of this // version merged in (an entry larger than the game's wins), the entries a mod's table for another version gives for // that mod's files, and each served mod file's entry raised to what its size needs (restbl_grow for a file the game @@ -773,6 +869,15 @@ static void restbl_overlay(void) { static const char keeps[] = "mod files that grew may fail to load"; double t0 = now_s(); uint64_t gi = lower(restbl_rel); + uint8_t cache_key[32]; + Overlay *served_now = NULL; + for (size_t k = 0; k < noverlay; k++) + if (overlays[k].index == gi) served_now = &overlays[k]; + int cached = rt_knob("RESTBL_CACHE", "1"); + if (cached) { + restbl_cache_key(gi, cache_key); + if (restbl_cache_use(cache_key, served_now, keeps, t0)) return; + } Entry ge = entry(gi); void *gz = ge.size < (64u << 20) ? malloc((size_t)ge.size) : NULL; Restbl *base = NULL, *out = NULL; @@ -838,6 +943,7 @@ static void restbl_overlay(void) { if (!merged && !raised && !members && !served) { restbl_free(out); rt_log("RomFS: resource size table: the mods' files fit the game's entries (%.0f ms)", (now_s() - t0) * 1000); + if (cached) restbl_cache_store(cache_key, RESTBL_NONE); return; } size_t rn = 0, zn = 0; @@ -852,10 +958,12 @@ static void restbl_overlay(void) { rt_log("RomFS: cannot pack the merged resource size table; %s", keeps); return; } - if (serve_generated(restbl_rel, served, z, zn, "mods", "merged resource sizes", keeps)) + if (serve_generated(restbl_rel, served, z, zn, "mods", "merged resource sizes", keeps)) { rt_log("RomFS: resource size table: %d tables merged (%d entries), %d entries raised for mod files (%d " "added files estimated), %d for members of %d mod packs, %.0f ms", tables, merged, raised, estimated, members, packs, (now_s() - t0) * 1000); + if (cached) restbl_cache_store(cache_key, RESTBL_TABLE); + } } // The HeapDef table a bigger game resolution or TOTK_TEX_HEAP_EXTRA_MB needs (resolution.c): its texture heaps and From 37d49d80d2629704817aa1c45d15dfe067fd77d5 Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Sun, 22 Nov 2026 17:11:26 +0100 Subject: [PATCH 38/66] The in-game menu and the overlay speak German, French, Spanish, Italian, Dutch, Japanese and Korean, every one of the 670 menu texts, picked from the Windows display language or the Menu tab, with every Chinese Windows on the Simplified Chinese menu (the menu part of pull request #497, completed for today's menu) Co-Authored-By: Claude Opus 5.5 --- README.md | 19 +- docs/architecture.md | 4 +- runtime/cfg.c | 2 +- runtime/ov_probe.c | 33 +- runtime/ui/menu.cpp | 17 +- runtime/ui_text.c | 6026 +++++++++++++++++++++++++++++++++++++++++- runtime/ui_text.h | 10 +- totk.ini.example | 4 +- 8 files changed, 6073 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 98dce1ef..b28043e6 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - In-game settings menu (F1) and performance overlay (F10) - Play time across runs on the Game tab of the settings menu, kept in `playtime.txt` next to the saves - Discord Rich Presence ("Playing TotK Recomp" with the play time), off by default, own application id supported -- Setup in 11 languages, in-game menu in 4 ([Languages](#languages)) +- Setup in 12 languages, in-game menu in 11 ([Languages](#languages)) - Keyboard, mouse and gamepad with remapping, rumble and gyro - Stereo or 5.1 surround sound output - Xbox and PlayStation button prompts: Xbox's LB, RB, LT, RT, Menu, View and A, B, X, Y, or PlayStation's ○ × △ □, L1, R1, L2, R2, Options and Share, as labelled on the button to press, with either button layout @@ -43,7 +43,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). The game keeps the text and voices of every language it shipped with. The port's own setup and in-game menu (F1) come in these; both follow the Windows display language, and the menu has its own choice on its Menu tab. A Traditional -Chinese Windows gets the Simplified Chinese setup. +Chinese Windows gets the Simplified Chinese setup and menu. | Language | Setup | In-game menu | |---|:---:|:---:| @@ -51,13 +51,14 @@ Chinese Windows gets the Simplified Chinese setup. | Русский | ✅ | ✅ | | Português (Brasil) | ✅ | ✅ | | 简体中文 | ✅ | ✅ | -| Deutsch | ✅ | English | -| Français | ✅ | English | -| Español | ✅ | English | -| Italiano | ✅ | English | -| Nederlands | ✅ | English | -| 日本語 | ✅ | English | -| 한국어 | ✅ | English | +| Deutsch | ✅ | ✅ | +| Français | ✅ | ✅ | +| Español | ✅ | ✅ | +| Italiano | ✅ | ✅ | +| Nederlands | ✅ | ✅ | +| 日本語 | ✅ | ✅ | +| 한국어 | ✅ | ✅ | +| Tiếng Việt | ✅ | English | Spotted a clumsy phrase, or want your language added? The setup texts are in `installer/text/.json`, the menu texts in `runtime/ui_text.c`; open an issue or a pull request ([CONTRIBUTING.md](CONTRIBUTING.md)). Fixes from diff --git a/docs/architecture.md b/docs/architecture.md index b9c545db..b401e25a 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -59,8 +59,8 @@ MacNativeGames cannot run on x86-64 as is: its CPU path executes ARM64 code nati - Settings and menu: every key with its default is in one table (`cfg.c`), read from `totk.ini` and `TOTK_*` variables and written back when the in-game menu changes it. The menu and the performance overlay are Dear ImGui, drawn into the swapchain image (`runtime/ui/`); their text is in `ui_text.c` (English, Russian, Brazilian Portuguese, - Simplified Chinese). The Chinese glyphs come from a system font (Microsoft YaHei, `plat_font_path`) merged into the - font atlas. + Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese, Korean). The Chinese, Japanese and Korean glyphs + come from a system font (`plat_font_path`) merged into the font atlas. - OS calls the host makes go through `runtime/platform/` (`platform.h`, `win32.c`), so a Linux or macOS host adds one file instead of touching the rest. The split is not finished: `tools/check_platform.py` lists the Win32 uses left in the other files. #### Threads and cores diff --git a/runtime/cfg.c b/runtime/cfg.c index b3dcbb2b..71c41051 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -204,7 +204,7 @@ static const CfgMeta metas[] = { {"GAMEPLAY_MAP_ZOOM_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_ROTATION_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_DISTANCE_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_ITEM_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_WEAPON_WHEEL", "1", "0|1", LIVE}, {"GAMEPLAY_WEAPON_SENSITIVITY", "1", "0.25..4", LIVE}, - {"MENU_LANG", "", "en|ru|pt-BR|zh-Hans", LIVE}, + {"MENU_LANG", "", "en|ru|pt-BR|zh-Hans|de|fr|es|it|nl|ja|ko", LIVE}, // plat_font_path on Linux: 1 asks fontconfig which file draws the language, 0 keeps the fixed distribution // paths. A rebuild of the atlas reads it, so a change shows on the next window size or language switch. {"MENU_FONT_FONTCONFIG", "1", "0|1", LIVE}, diff --git a/runtime/ov_probe.c b/runtime/ov_probe.c index 709fc871..bbf8eb21 100644 --- a/runtime/ov_probe.c +++ b/runtime/ov_probe.c @@ -1013,10 +1013,12 @@ static void probe_fonts(void) { } // The host catalog (ui_text.c): every menu id has its own English, Russian, Brazilian Portuguese and Simplified -// Chinese text, the software keyboard keeps its game-language rows, and menu_text follows TOTK_MENU_LANG. +// Chinese text, every menu language's text fits the description pane and keeps the English conversions of the overlay +// formats, the software keyboard keeps its game-language rows, and menu_text follows TOTK_MENU_LANG. static void probe_menu_text(void) { static const char *const langs[] = {"en", "ja", "fr", "de", "it", "es", "nl", "pt", "ru", "zh-Hans", "zh-Hant", "ko", "pt-BR"}; + static const char *const menu_langs[] = {"de", "fr", "es", "it", "nl", "ja", "ko"}; for (int id = UI_MENU_FIRST; id <= UI_MENU_LAST_ID; id++) { CHECK(ui_text_defined("en", (UiTextId)id) && ui_text_defined("ru", (UiTextId)id) && ui_text_defined("pt-BR", (UiTextId)id), "menu text id %d lacks en, ru or pt-BR", id); @@ -1028,11 +1030,21 @@ static void probe_menu_text(void) { strlen(ui_text_in("pt-BR", (UiTextId)id)) + 256 < UI_DESC_BYTES && strlen(ui_text_in("zh-Hans", (UiTextId)id)) + 256 < UI_DESC_BYTES, "menu text id %d is too long for the description pane", id); + for (size_t i = 0; i < sizeof menu_langs / sizeof *menu_langs; i++) + CHECK(strlen(ui_text_in(menu_langs[i], (UiTextId)id)) + 256 < UI_DESC_BYTES, + "menu text id %d is too long for the description pane in %s", id, menu_langs[i]); CHECK(ui_text_defined("zh-Hans", (UiTextId)id), "menu text id %d lacks Simplified Chinese", id); } CHECK(!ui_text_defined("en", UI_TEXT_COUNT) && !*ui_text_in("ru", UI_TEXT_COUNT), "an id past the catalog gives text"); - // other languages fall back to English for the menu, and keep their own keyboard texts - CHECK(!strcmp(ui_text_in("ja", UI_MENU_CONTINUE), ui_text_in("en", UI_MENU_CONTINUE)), "ja menu text is not English"); + // the other game languages have their own menu text; Traditional Chinese falls back to English in the catalog + for (size_t i = 0; i < sizeof menu_langs / sizeof *menu_langs; i++) { + CHECK(ui_text_defined(menu_langs[i], UI_MENU_TITLE) && ui_text_defined(menu_langs[i], UI_MENU_CONTINUE), + "%s has no menu text", menu_langs[i]); + CHECK(strstr(ui_text_in(menu_langs[i], UI_MENU_OV_GAME_PCT), "%.0f%%"), "%s overlay format lost its conversion", + menu_langs[i]); + } + CHECK(!strcmp(ui_text_in("zh-Hant", UI_MENU_CONTINUE), ui_text_in("en", UI_MENU_CONTINUE)), + "zh-Hant menu text is not English"); CHECK(!strcmp(ui_text_in("ru", UI_SWKBD_OK), "ОК") && !strcmp(ui_text_in("de", UI_SWKBD_CANCEL), "Abbrechen") && !strcmp(ui_text_in("en", UI_SWKBD_OK), "OK"), "keyboard texts changed"); // language names: the same string in every row @@ -1075,15 +1087,24 @@ static void probe_menu_text(void) { CHECK(menu_text(UI_MENU_CONTINUE) == ui_text_in("en", UI_MENU_CONTINUE), "menu_text did not follow MENU_LANG=en"); cfg_set("TOTK_MENU_LANG", "zh-Hans"); CHECK(menu_text(UI_MENU_TITLE) == ui_text_in("zh-Hans", UI_MENU_TITLE), "menu_text ignores MENU_LANG=zh-Hans"); + cfg_set("TOTK_MENU_LANG", "ja"); + CHECK(menu_text(UI_MENU_TITLE) == ui_text_in("ja", UI_MENU_TITLE), "menu_text ignores MENU_LANG=ja"); + cfg_set("TOTK_MENU_LANG", "de-DE"); + CHECK(menu_text(UI_MENU_TITLE) == ui_text_in("de", UI_MENU_TITLE), "menu_text ignores MENU_LANG=de-DE"); + // Traditional Chinese (zh-TW, zh-HK) reads the Simplified Chinese menu + cfg_set("TOTK_MENU_LANG", "zh-TW"); + CHECK(menu_text(UI_MENU_TITLE) == ui_text_in("zh-Hans", UI_MENU_TITLE), "zh-TW does not get the zh-Hans menu"); cfg_set("TOTK_MENU_LANG", ""); - // the system language as ui_text.c resolve_menu_lang takes it: the tag, else its base language (ru-RU: ru), else en + // the system language as ui_text.c resolve_menu_lang takes it: the tag, else its base language (ru-RU: ru), else + // Simplified Chinese for any Chinese, else en const char *sys_lang = ui_text_lang(plat_ui_language()); char sys_base[16] = ""; size_t base_n = strcspn(sys_lang, "-"); if (sys_lang[base_n] && base_n < sizeof sys_base) memcpy(sys_base, sys_lang, base_n); - const char *auto_lang = ui_text_defined(sys_lang, UI_MENU_TITLE) ? sys_lang + const char *auto_lang = ui_text_defined(sys_lang, UI_MENU_TITLE) ? sys_lang : *sys_base && ui_text_defined(sys_base, UI_MENU_TITLE) ? sys_base - : "en"; + : !strncmp(sys_lang, "zh", 2) ? "zh-Hans" + : "en"; CHECK(menu_text(UI_MENU_CONTINUE) == ui_text_in(auto_lang, UI_MENU_CONTINUE), "menu_text auto ignores the system language"); } diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 60684572..4a7e01a4 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -276,12 +276,13 @@ static int vk_up(const MenuTarget *t) { return 1; } -// Roboto Medium (Latin, Cyrillic, dashes and quotes) at 26 px per 1080 lines, with the glyphs of the Japanese, Korean -// and Chinese language names merged in from a system font when there is one (each language is named in its own script). -// A catalog row also holds menu text (Simplified Chinese), so every string of the row goes into the builder: the merged -// font must cover the whole menu of that language, not only its name. Made again when the window height changes; the old -// texture goes after the queue is idle (CreateFontsTexture). -static const ImWchar kRanges[] = {0x0020, 0x00FF, 0x0400, 0x052F, 0x2010, 0x2027, 0}; +// Roboto Medium (Latin with Latin Extended-A for the French oe, Cyrillic, dashes and quotes) at 26 px per 1080 lines, +// with the glyphs of the Japanese, Korean and Chinese language names merged in from a system font when there is one +// (each language is named in its own script). A catalog row also holds menu text (Japanese, Korean, Simplified +// Chinese), so every string of the row goes into the builder: the merged font must cover the whole menu of that +// language, not only its name. Made again when the window height changes; the old texture goes after the queue is idle +// (CreateFontsTexture). +static const ImWchar kRanges[] = {0x0020, 0x017F, 0x0400, 0x052F, 0x2010, 0x2027, 0}; static const struct { const char *lang; UiTextId name; } kCjk[] = { {"ja", UI_MENU_LANGNAME_JA}, {"ko", UI_MENU_LANGNAME_KO}, {"zh-Hans", UI_MENU_LANGNAME_ZH_HANS}, {"zh-Hant", UI_MENU_LANGNAME_ZH_HANT}, @@ -1179,7 +1180,9 @@ static void tab_controls(float scale) { static void tab_menu(float scale) { opt_begin("##menu", scale); static const UiTextId langs[] = {UI_MENU_MENU_LANG_AUTO, UI_MENU_LANGNAME_EN, UI_MENU_LANGNAME_RU, - UI_MENU_LANGNAME_PT_BR, UI_MENU_LANGNAME_ZH_HANS}; + UI_MENU_LANGNAME_PT_BR, UI_MENU_LANGNAME_ZH_HANS, UI_MENU_LANGNAME_DE, + UI_MENU_LANGNAME_FR, UI_MENU_LANGNAME_ES, UI_MENU_LANGNAME_IT, + UI_MENU_LANGNAME_NL, UI_MENU_LANGNAME_JA, UI_MENU_LANGNAME_KO}; opt_choice("TOTK_MENU_LANG", UI_MENU_MENU_LANG, langs, sizeof langs / sizeof *langs, UI_MENU_MENU_LANG_DESC); opt_toggle("TOTK_DISCORD_RPC", UI_MENU_DISCORD_RPC, UI_MENU_DISCORD_RPC_DESC); opt_end(); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 5d2a1a8f..ee35cd49 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -1,7 +1,8 @@ // Catalog of the text the host shows the player (ui_text.h). One array per catalog language, indexed by UiTextId: a new // string gets an id in ui_text.h and an entry in every language that has one (a missing entry falls back to English). -// The software keyboard has every language; the menu has English, Russian, Brazilian Portuguese and Simplified -// Chinese. +// The software keyboard has every language; the menu has every game language except Portugal's Portuguese and +// Traditional Chinese (English, Russian, Brazilian Portuguese, Simplified Chinese, German, French, Spanish, Italian, +// Dutch, Japanese, Korean). #include #include @@ -2743,17 +2744,6020 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_MODS_OVERRIDES_CODE] = "它覆盖了 %u 处代码补丁位置,这些位置原属于列表中更靠下的 %s。", }; +// German +static const char *const text_de[UI_TEXT_COUNT] = { + SWKBD("Texteingabe", "Gib einen Namen ein", "Pferd", "OK", "Abbrechen", "Controller: A = OK, B = Abbrechen"), + + [UI_MENU_TITLE] = "Einstellungen", + [UI_MENU_TAB_SCREEN] = "Bild", + [UI_MENU_TAB_GAME] = "Spiel", + [UI_MENU_TAB_MODS] = "Mods", + [UI_MENU_TAB_SOUND] = "Ton", + [UI_MENU_TAB_CONTROLS] = "Steuerung", + [UI_MENU_TAB_AMIIBO] = "Amiibo", + [UI_MENU_TAB_MENU] = "Menü", + [UI_MENU_TAB_ADVANCED] = "Erweitert", + [UI_MENU_CONTINUE] = "Weiter", + [UI_MENU_QUIT] = "Spiel beenden", + [UI_MENU_ON] = "Ein", + [UI_MENU_OFF] = "Aus", + [UI_MENU_AUTO] = "Automatisch", + [UI_MENU_DEFAULT_MARK] = "Standard", + [UI_MENU_AFTER_RESTART] = "nach Neustart", + [UI_MENU_SET_BY_ENV] = "durch Umgebungsvariable gesetzt", + [UI_MENU_SAVE_FAILED] = "Einstellungen konnten nicht gespeichert werden", + [UI_MENU_VERSION] = "TotK Recomp %s, Spiel %s", + [UI_MENU_FULLSCREEN] = "Vollbild", + [UI_MENU_FULLSCREEN_DESC] = "Das Spiel füllt den Bildschirm; F11 schaltet um.", + [UI_MENU_WINDOW_SIZE] = "Fenstergröße", + [UI_MENU_WINDOW_SIZE_DESC] = "Größe des Spielfensters außerhalb des Vollbilds.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Eigene", + [UI_MENU_PRESENT] = "Bildausgabe", + [UI_MENU_PRESENT_DESC] = "Wie fertige Bilder auf den Bildschirm gelangen.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", + [UI_MENU_PRESENT_VSYNC] = "VSync", + [UI_MENU_PRESENT_IMMEDIATE] = "Sofort", + [UI_MENU_PRESENT_IN_USE] = "aktiv: %s", + [UI_MENU_GPU] = "Grafikkarte", + [UI_MENU_GPU_DESC] = "Das Vulkan-Gerät, das das Spiel zeichnet.", + [UI_MENU_GPU_AUTO] = "Automatisch", + [UI_MENU_PERF_OVERLAY] = "Leistungsanzeige", + [UI_MENU_PERF_OVERLAY_DESC] = "Bildrate oben rechts. Voll zeigt zusätzlich Bildzeiten mit Grafik, CPU-, GPU- und " + "Speicherlast, Temperaturen und die Wartezeiten des Render-Threads. F10 wechselt " + "die Modi.", + [UI_MENU_PERF_OFF] = "Aus", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "Voll", + [UI_PERF_LINE_FPS] = "%.0f FPS", + [UI_PERF_LINE_FPS_GEN] = "%.0f FPS gezeichnet, %.0f angezeigt", + [UI_MENU_GRAPHICS] = "Bild", + [UI_MENU_OUTPUT_RES] = "Spielauflösung", + [UI_MENU_OUTPUT_RES_DESC] = "Die Größe, in der das Spiel Bild und Oberfläche zeichnet. Über 1920 x 1080 braucht " + "das Spiel mehr Videospeicher und GPU-Zeit. Ein breiteres Format (21:9) erweitert das " + "Sichtfeld der Kamera und rückt das HUD in die Bildschirmecken; ein höheres (16:10, " + "Steam Deck) rückt es an den oberen und unteren Rand.", + [UI_MENU_HUD_WIDTH] = "HUD-Breite", + [UI_MENU_HUD_WIDTH_DESC] = "Auf einem Bildschirm breiter als 16:9: wie weit linke und rechte Seite des HUD " + "auseinanderliegen. Volle Breite rückt sie an die Bildschirmränder; 21:9 oder 16:9 " + "hält das HUD in der Mitte des Bildschirms in diesem Format. Ein fehlendes Layout wird " + "im Hintergrund erstellt und nach einem Neustart verwendet.", + [UI_MENU_HUD_WIDTH_FULL] = "Volle Breite", + [UI_MENU_RENDER_SCALE] = "3D-Renderskalierung", + [UI_MENU_RENDER_SCALE_DESC] = "Größe der 3D-Szene im Verhältnis zur Spielauflösung; das FSR des Spiels skaliert " + "sie auf diese Größe. Über 100 % glättet Kanten (Supersampling), kostet aber viel " + "GPU-Leistung.", + [UI_MENU_RENDER_SCALE_GAME] = "Spiel (83 %)", + [UI_MENU_DYNAMIC_RES] = "Dynamische Auflösung", + [UI_MENU_DYNAMIC_RES_DESC] = "Lässt das Spiel die 3D-Szene verkleinern (auf 90 oder 80 %). Es entscheidet nach " + "einer für die Switch gemachten Schätzung, die deine GPU nicht berücksichtigt, daher " + "sinkt sie bei weiten Szenen selbst auf einem schnellen PC. Aus behält die " + "Renderskalierung.", + [UI_MENU_UPSCALER] = "Skalierung auf das Fenster", + [UI_MENU_UPSCALER_DESC] = "Wie das Bild skaliert wird, wenn das Fenster größer als die Spielauflösung ist. FSR " + "hält Kanten und Details schärfer als bilinear.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "Bilinear", + [UI_MENU_ASPECT] = "Bildformat", + [UI_MENU_ASPECT_DESC] = "Wenn das Fensterformat vom Format der Spielauflösung abweicht (ein 16:9-Bild auf einem " + "21:9-Bildschirm): Format mit schwarzen Balken beibehalten oder über das Fenster strecken.", + [UI_MENU_ASPECT_FIT] = "Schwarze Balken", + [UI_MENU_ASPECT_STRETCH] = "Strecken", + [UI_MENU_MOVIE_ASPECT] = "Videoformat", + [UI_MENU_MOVIE_ASPECT_DESC] = "Wenn die Spielauflösung nicht 16:9 ist: das eigene Format der " + "Zwischensequenz-Videos mit schwarzen Balken beibehalten oder sie über das ganze " + "Bild strecken. Wirkt ab dem nächsten Video.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Schwarze Balken", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "Strecken", + [UI_MENU_FOV] = "Sichtfeld", + [UI_MENU_FOV_DESC] = "Wie viel von der Welt die Kamera zeigt, in Prozent des Spielwerts. Nur Spielversion 1.4.3.", + [UI_MENU_SHADOW_RES] = "Größe der Schattenkarte", + [UI_MENU_SHADOW_RES_DESC] = "Größe der Schattenkarte der Sonne. Die Größe des Spiels ändert sich mit der Ansicht, " + "bis etwa 400 nahe am Boden, daher wirken Blätterschatten klotzig und springen; eine " + "feste Größe hält sie ruhig und schärfer. Über 1024 kosten die Schatten mehr GPU-Zeit " + "und Videospeicher.", + [UI_MENU_SHADOW_RES_GAME] = "Spiel (wechselnd)", + [UI_MENU_ANISO] = "Texturfilterung", + [UI_MENU_ANISO_DESC] = "Anisotrope Filterung der Oberflächentexturen: Boden, Wege und Wände bleiben im flachen " + "Winkel bis in die Ferne scharf statt zu verschwimmen. Spiel: die Stufe, die das Spiel " + "anfordert, wie auf der Switch.", + [UI_MENU_ANISO_GAME] = "Spiel", + [UI_MENU_LOD_STEADY] = "Konstante Details unter Last", + [UI_MENU_LOD_STEADY_DESC] = "Überspringt die Vorkehrung des Spiels, Modell- und Texturdetails zu senken, wenn die " + "Bildrate fällt, wie es der Emulator-Mod Disable LOD Quality Reduction tut. " + "Spielversionen 1.2.1 und 1.4.3. Auf schwachen PCs ausgeschaltet lassen: Dort hält " + "diese Absenkung die Bildrate oben.", + [UI_MENU_SHARPNESS] = "FSR-Schärfe", + [UI_MENU_SHARPNESS_DESC] = "Nachschärfen nach der FSR-Skalierung; 0 schaltet es aus.", + [UI_MENU_COLOR] = "Farbe", + [UI_MENU_COLOR_PRESET] = "Farbprofil", + [UI_MENU_COLOR_PRESET_DESC] = "Setzt die vier Werte darunter. Lebendig: mehr Kontrast und Sättigung, Schatten " + "etwas aufgehellt (für OLED-Bildschirme). Klarheit: etwas mehr Kontrast, Sättigung " + "und Helligkeit. Wird ein Wert verändert, wird das Profil zu Eigenes. Das HUD " + "ändert sich mit dem Bild, dieses Menü nicht.", + [UI_MENU_COLOR_DEFAULT] = "Original", + [UI_MENU_COLOR_VIVID] = "Lebendig (OLED)", + [UI_MENU_COLOR_CLARITY] = "Klarheit", + [UI_MENU_COLOR_CUSTOM] = "Eigenes", + [UI_MENU_COLOR_BRIGHTNESS] = "Helligkeit", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Wird zu jeder Farbe addiert; 0 lässt sie unverändert.", + [UI_MENU_COLOR_CONTRAST] = "Kontrast", + [UI_MENU_COLOR_CONTRAST_DESC] = "Rückt Farben vom mittleren Grau weg (über 100 %) oder zu ihm hin; 100 % lässt " + "sie unverändert.", + [UI_MENU_COLOR_SATURATION] = "Sättigung", + [UI_MENU_COLOR_SATURATION_DESC] = "Farbstärke gegenüber Grau; 100 % lässt sie unverändert.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "Unter 1 hellt dunkle und mittlere Töne auf, über 1 dunkelt sie ab; 1 lässt sie " + "unverändert.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "HDR-Ausgabe", + [UI_MENU_HDR_DESC] = "Helle Lichter auf einem HDR-Bildschirm. Erfordert eingeschaltetes HDR in Windows („HDR " + "verwenden“) oder einen Wayland-Compositor mit Farbverwaltung; ohne bleibt das Bild SDR. " + "Wirkt nach einem Neustart. Das Farbprofil oben gilt für SDR und wird bei HDR nicht " + "verwendet.", + [UI_MENU_HDR_PEAK] = "Spitzenhelligkeit", + [UI_MENU_HDR_PEAK_DESC] = "Die Spitzenhelligkeit deines Bildschirms in Nits; die hellsten Lichter enden dort.", + [UI_MENU_HDR_GAME] = "Spielhelligkeit", + [UI_MENU_HDR_GAME_DESC] = "Nits des Bildweiß (Papierweiß). 203 ist der HDR-Referenzwert; in einem hellen Raum " + "höher stellen.", + [UI_MENU_HDR_UI] = "Helligkeit von HUD und Menü", + [UI_MENU_HDR_UI_DESC] = "Nits des Weiß von HUD und diesem Menü.", + [UI_MENU_HDR_HUE] = "Farbtonkorrektur für Spitzlichter", + [UI_MENU_HDR_HUE_DESC] = "Helle Farben wie Feuer und Funken gehen wie im eigenen SDR-Bild des Spiels ins Weiße " + "über, passend zum Licht, das sie werfen; 0 lässt sie voll gesättigt.", + [UI_MENU_SHADOW_SCALE] = "Schattenauflösung", + [UI_MENU_SHADOW_SCALE_DESC] = "Zeichnet die Schattenkarten der Sonne je Seite so viel größer als die 960x960 des " + "Spiels: schärfere Schattenkanten und Blätterschatten. Wirkt beim nächsten Start.", + [UI_MENU_PCSS] = "Weiche Schatten", + [UI_MENU_PCSS_DESC] = "Sonnenschatten scharf, wo ein Objekt den Boden berührt, und weicher, je weiter der " + "Schatten fällt (PCSS). 0 behält den Filter des Spiels. Wirkt beim nächsten Start.", + [UI_MENU_CONTACT_SHADOWS] = "Kontaktschatten", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Kleine Sonnenschatten, die den Schattenkarten entgehen: an Füßen, unter " + "Steinen, im Gras und in Falten. Nach der Beleuchtung im Bildraum berechnet. " + "Wirkt beim nächsten Start.", + [UI_MENU_SHADOW_RANGE] = "Reichweite der Schattenkaskaden", + [UI_MENU_SHADOW_RANGE_DESC] = "Verschiebt die Stufen, ab denen Schatten weicher werden (im Spiel 20, 40, 80 und " + "160 m), weiter weg. Verteilt die Schattenkarte auf mehr Boden: Schattenauflösung " + "mit erhöhen. Wirkt beim nächsten Start.", + [UI_MENU_GRASS_RANGE] = "Grasreichweite", + [UI_MENU_GRASS_RANGE_DESC] = "Wie weit um die Kamera herum Gras wächst (im Spiel 62,5 m). Höher hält das Gras auf " + "Wiesen weiter draußen, statt es erst direkt vor dir wachsen zu lassen; niedriger " + "zeichnet weniger davon. Wirkt beim nächsten Start.", + [UI_MENU_DLSS_PRESET] = "DLSS-Modell", + [UI_MENU_DLSS_PRESET_DESC] = "Welches DLSS-Modell läuft. Automatisch folgt der Empfehlung von NVIDIA je Modus: K " + "für DLAA, Qualität und Ausgewogen, M für Leistung, L für Ultra-Leistung. J: etwas " + "weniger Ghosting hinter bewegten Figuren, etwas mehr Flimmern. K: das schärfste " + "Modell in jedem Modus. Wirkt sofort.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatisch", + [UI_MENU_DLSS_PRESET_K] = "K (schärfstes)", + [UI_MENU_DLSS_PRESET_J] = "J (weniger Ghosting)", + [UI_MENU_DLSS_CHARS] = "DLSS-Spuren an Figuren", + [UI_MENU_DLSS_CHARS_DESC] = "Verringert die schwachen Spuren hinter bewegten Figuren, Tieren und dem, was sie " + "halten: DLSS nimmt dort weniger aus den vorigen Bildern. Eine stärkere Stufe " + "entfernt mehr von den Spuren und lässt diese Kanten etwas weniger glatt. Wirkt " + "sofort.", + [UI_MENU_DLSS_CHARS_OFF] = "Aus", + [UI_MENU_DLSS_CHARS_LIGHT] = "Leicht", + [UI_MENU_DLSS_CHARS_MEDIUM] = "Mittel", + [UI_MENU_DLSS_CHARS_FULL] = "Voll", + [UI_MENU_DLSS] = "Skalierungsmodus", + [UI_MENU_DLSS_DESC] = "Nativ glättet die Kanten der 3D-Szene in voller Auflösung. Qualität, Ausgewogen, Leistung " + "und Ultra-Leistung zeichnen sie mit 67, 58, 50 bzw. 33 %, und der Upscaler (DLSS oder FSR " + "3.1) skaliert sie hoch, was GPU-Zeit spart; sie ersetzen die 3D-Renderskalierung. Wirkt " + "sofort.", + [UI_MENU_DLSS_DLAA] = "Nativ", + [UI_MENU_DLSS_QUALITY] = "Qualität", + [UI_MENU_DLSS_BALANCED] = "Ausgewogen", + [UI_MENU_DLSS_PERFORMANCE] = "Leistung", + [UI_MENU_DLSS_ULTRA] = "Ultra-Leistung", + [UI_MENU_FXAA] = "Kantenglättung des Spiels (FXAA)", + [UI_MENU_FXAA_DESC] = "Die FXAA-Kantenglättung des Spiels. Sie verwischt feine Details etwas; mit DLAA wird sie " + "nicht gebraucht.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "Senkt die Systemlatenz auf NVIDIA-GPUs über VK_NV_low_latency2. Ein + Boost hält die " + "GPU-Takte in CPU-begrenzten Szenen hoch.", + [UI_MENU_REFLEX_OFF] = "Aus", + [UI_MENU_REFLEX_ON] = "Ein", + [UI_MENU_REFLEX_BOOST] = "Ein + Boost", + [UI_MENU_SCENE_UPSCALER] = "3D-Szenen-Upscaler", + [UI_MENU_SCENE_UPSCALER_DESC] = "Ein temporaler Upscaler für die 3D-Szene: glattere Kanten und weniger Flimmern, " + "und in einem Modus unter Nativ zeichnet er die Szene kleiner und skaliert sie " + "hoch, was GPU-Zeit spart. NVIDIA DLSS braucht eine NVIDIA-RTX-GPU und " DLSS_FILE + " neben " EXE_FILE "; AMD FSR 3.1 läuft auf jeder GPU. Aus behält die eigene " + "Skalierung des Spiels und FXAA. Das HUD bleibt unberührt; die Skalierung auf das " + "Fenster und die Schärfe oben passen das Spielbild weiterhin an das Fenster an. " + "Wirkt nach einem Neustart.", + [UI_MENU_SCENE_UPSCALER_OFF] = "Aus", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: braucht eine NVIDIA-RTX-GPU", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: " DLSS_FILE " fehlt", + [UI_MENU_FSR3_SHARPNESS] = "FSR-3.1-Schärfe", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Nachschärfen der 3D-Szene nach FSR 3.1; 0 schaltet es aus.", + [UI_MENU_FPS_LIMIT] = "Bildratenbegrenzung", + [UI_MENU_FPS_LIMIT_DESC] = "Die höchste Bildrate, die das Spiel zeichnet. Über 60 ist experimentell und erfordert " + "„Spieltempo folgt der Uhr“.", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "Monitorfrequenz", + [UI_MENU_FPS_DISPLAY_HZ] = "Monitorfrequenz (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "Bildwarteschlange", + [UI_MENU_FRAME_QUEUE_DESC] = "Das Spiel beginnt ein Bild, während das vorige noch darauf wartet, angezeigt zu " + "werden: viel weniger ausgelassene Bilder an der Bildratenbegrenzung, bis zu ein " + "Bild mehr Eingabeverzögerung. Wirkt sofort.", + [UI_MENU_FRAME_GEN] = "Bildgenerierung", + [UI_MENU_FRAME_GEN_OFF] = "Aus", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Ein erzeugtes Bild zwischen je zwei, die das Spiel zeichnet: doppelt so viele Bilder " + "auf dem Bildschirm, das Spiel bei der halben Bildratenbegrenzung und die Steuerung " + "etwa ein halbes Bild später. Für Bildschirme mit 120 Hz und mehr. Nicht mit DLSS oder " + "HDR. Wirkt sofort.", + [UI_MENU_REALTIME] = "Spieltempo folgt der Uhr", + [UI_MENU_REALTIME_DESC] = "Lässt das Spiel nach Echtzeit laufen, sodass ein langsames Bild das Spiel nicht " + "verlangsamt.", + [UI_MENU_CLOTH_REALTIME] = "Stoff nach der Uhr", + [UI_MENU_CLOTH_REALTIME_DESC] = "Lässt auch Stoff und Haare nach Echtzeit laufen.", + [UI_MENU_HIGHFPS_FIX] = "Korrekturen für hohe Bildraten", + [UI_MENU_HIGHFPS_FIX_DESC] = "Korrigiert Physik, die über 30 Bildern pro Sekunde falsch läuft, und Objekte, die " + "über 60 durchsichtig oder unsichtbar bleiben.", + [UI_MENU_CLIMB_FIX] = "Klettertempo-Korrektur", + [UI_MENU_CLIMB_FIX_DESC] = "Hält das Klettern an Wänden und Leitern über 60 Bildern pro Sekunde auf voller " + "Geschwindigkeit, sodass Link oben ankommt.", + [UI_MENU_GAME_LANG] = "Spielsprache", + [UI_MENU_GAME_LANG_DESC] = "Sprache der Texte und Stimmen des Spiels.", + [UI_MENU_GAME_LANG_AUTO] = "Automatisch", + [UI_MENU_OPERATION_MODE] = "Konsolenmodus", + [UI_MENU_OPERATION_MODE_DESC] = "Ob das Spiel glaubt, im TV- oder Handheld-Modus zu laufen.", + [UI_MENU_MODE_DOCKED] = "TV-Modus", + [UI_MENU_MODE_HANDHELD] = "Handheld", + [UI_MENU_ASSUME_FOCUS] = "Im Hintergrund weiterlaufen", + [UI_MENU_ASSUME_FOCUS_DESC] = "Ein (Standard): Das Spiel läuft weiter, während du in einem anderen Fenster bist, " + "und die Tastatur bleibt still, bis das Fenster wieder vorne ist. Aus: Es pausiert, " + "wenn sein Fenster den Fokus verliert, wie auf der Switch beim Drücken von Home; " + "ein so unterbrochener Ladevorgang kann dauerhaft hängen bleiben.", + [UI_MENU_PLAY_TIME] = "Spielzeit", + [UI_MENU_PLAY_TIME_DESC] = "Zeit im Spiel über alle Sitzungen, gezählt, solange das Spielfenster den Fokus hat " + "und das Spiel Bilder zeichnet. Gespeichert in playtime.txt im Profilordner, neben den " + "Spielständen.", + [UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", + [UI_MENU_PLAY_TIME_SESSION] = "diesmal: %s", + [UI_MENU_MODS_BUILTIN] = "Im Port enthalten", + [UI_MENU_MODS_INSTALLED] = "Installierte Mods", + [UI_MENU_MODS_NONE] = "Noch keine Mods. Entpacke einen Mod in den Ordner mods, ein Ordner pro Mod mit seinem " + "romfs-Ordner darin, und starte das Spiel neu. TKMM kann seine zusammengeführten Mods " + "ebenfalls in einen Ordner dort exportieren.", + [UI_MENU_MODS_OPEN] = "Mods-Ordner öffnen", + [UI_MENU_MODS_OPEN_DESC] = "Zeigt den Ordner, aus dem das Spiel Mods lädt. Er wird angelegt, falls er fehlt.", + [UI_MENU_MODS_ROW_DESC] = "Ersetzte Spieldateien: %u. Neu hinzugefügte Dateien: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u seiner Dateien kommen aus %s, das weiter oben in der Liste steht.", + [UI_MENU_MODS_MOVE_HINT] = "Die obere Aktionstaste oder Strg+Hoch schiebt ihn nach oben, die linke Aktionstaste " + "oder Strg+Runter nach unten. Ändern zwei Mods dieselbe Datei, gewinnt der obere. " + "Änderungen wirken nach einem Neustart.", + [UI_MENU_MODS_EMPTY] = "Dieser Ordner enthält keine romfs-, exefs- oder cheats-Dateien.", + [UI_MENU_MODS_SUBSDK] = "Dieser Mod bringt eigenen Spielcode mit (ein subsdk-Plugin oder ein ersetztes main). Der " + "Port kann keine Codemodule laden, daher bleibt der ganze Mod aus.", + [UI_MENU_MODS_EXEFS_LATER] = "Dieser Mod patcht den Spielcode (exefs). Das Spiel baut die Patches beim nächsten " + "Start ein (ein Neubau von einigen Minuten); bis dahin bleibt der ganze Mod aus.", + [UI_MENU_MODS_CHEATS] = "Cheats: %d. Schalte sie im Tab Cheats.", + [UI_MENU_MODS_CHEATS_FILE] = "Cheats für diese Spielversion werden beim Start aus cheats\\%s in diesem Mod " + "gelesen.", + [UI_MENU_MODS_BAD_NAME] = "Der Ordnername enthält |, das die Mod-Liste als Trennzeichen verwendet. Benenne den " + "Ordner um.", + [UI_MENU_MODS_OTHER_VERSION] = "%u seiner Dateien sind für eine andere Spielversion gemacht und werden " + "ausgelassen. Suche eine Version dieses Mods für deine Spielversion.", + [UI_MENU_MODS_UNUSED] = "nicht verwendet", + [UI_MENU_MODS_FPS60] = "60-FPS-Patch", + [UI_MENU_MODS_FPS60_DESC] = "Der eigene Patch des Ports für 60 Bilder pro Sekunde. Einstellbar über die " + "Bildratenbegrenzung im Tab Spiel.", + [UI_MENU_MODS_RES] = "Auflösungspatch", + [UI_MENU_MODS_RES_DESC] = "Der eigene Patch des Ports für Auflösungen über 1080p. Einstellbar über die " + "Spielauflösung im Tab Bild.", + [UI_MENU_MODS_QUICKMENU] = "Schnellmenü-Korrektur", + [UI_MENU_MODS_QUICKMENU_DESC] = "Die Korrektur des Ports für den schwarzen Hintergrund der Waffen-, Schild- und " + "Materialmenüs bei 60 FPS.", + [UI_MENU_VOLUME] = "Lautstärke", + [UI_MENU_VOLUME_DESC] = "Gesamtlautstärke des Spiels.", + [UI_MENU_VOLUME_MUSIC] = "Musiklautstärke", + [UI_MENU_VOLUME_MUSIC_DESC] = "Lautstärke der Hintergrundmusik.", + [UI_MENU_VOLUME_SFX] = "Effektlautstärke", + [UI_MENU_VOLUME_SFX_DESC] = "Lautstärke der Soundeffekte.", + [UI_MENU_VOLUME_VOICE] = "Sprachlautstärke", + [UI_MENU_VOLUME_VOICE_DESC] = "Lautstärke der Stimmen der Figuren.", + [UI_MENU_AUDIO_CHANNELS] = "Lautsprecher", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Stereo- oder 5.1-Surround-Ausgabe. Automatisch wählt 5.1, wenn die " + "Lautsprecherkonfiguration von Windows sechs oder mehr Kanäle hat. Wirkt nach " + "einem Neustart.", + [UI_MENU_CHANNELS_AUTO] = "Automatisch", + [UI_MENU_CHANNELS_STEREO] = "Stereo", + [UI_MENU_CHANNELS_51] = "5.1-Surround", + [UI_MENU_AUDIO_DEVICE] = "Ausgabegerät", + [UI_MENU_AUDIO_DEVICE_DESC] = "Wo der Ton abgespielt wird. Systemstandard folgt dem Standardgerät von Windows. " + "Ein gewähltes Gerät, das getrennt wird, fällt auf den Systemstandard zurück, bis " + "es wieder da ist. Wirkt sofort.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Systemstandard", + [UI_MENU_MOTION] = "Bewegungssteuerung", + [UI_MENU_MOTION_DESC] = "Zielen mit dem Gyroskop des Controllers.", + [UI_MENU_GYRO_CALIBRATION] = "Gyro-Nullpunktkorrektur", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Zieht die Ruhedrift des Controllers ab, gemessen mit der Kalibrieren-Zeile " + "darunter. Die Messwerte bleiben gespeichert, wenn dies aus ist.", + [UI_MENU_GYRO_CALIBRATE] = "Gyro kalibrieren", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Misst die Ruhedrift des Gyroskops und entfernt sie. Lege den Controller ab oder " + "halte ihn zwei Sekunden lang still.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Kalibrierung...", + [UI_MENU_GYRO_CALIBRATED] = "%s, kalibriert", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Kalibrierung misslungen", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "Controller bewegt: halte ihn still und versuche es erneut", + [UI_MENU_GYRO_AUTO_BIAS] = "Gyro-Drift in Ruhe lernen", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Lernt die im Gyroskop verbleibende Drift, wann immer der Controller still auf " + "einem Tisch liegt, und zieht sie ab. Für Bogenzielen, das auch nach der " + "Kalibrierung langsam wegdriftet. Von einem Controller in der Hand wird nicht " + "gelernt. Experimentell.", + [UI_MENU_RUMBLE_STRENGTH] = "Vibrationsstärke", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "Wie stark der Controller vibriert.", + [UI_MENU_RUMBLE_CURVE] = "Vibrationskurve", + [UI_MENU_RUMBLE_CURVE_DESC] = "Niedrigere Werte verstärken schwache Vibration.", + [UI_MENU_RUMBLE_TRIGGERS] = "Trigger-Vibration (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Lässt auch die Trigger eines Xbox-Controllers vibrieren.", + [UI_MENU_PAD_LAYOUT] = "Tastenbelegung", + [UI_MENU_PAD_LAYOUT_DESC] = "Welche Taste A ist. Nintendo: die rechte, wie auf der Switch. Xbox: die untere, wie " + "auf einem Xbox-Controller beschriftet (Kreuz auf einem PlayStation-Controller). " + "Automatisch wählt Nintendo für Controller mit Nintendo-Beschriftung und Xbox für die " + "übrigen. Welche Controller-Tasten das Spiel anzeigt, wird unter Tastensymbole " + "eingestellt.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Automatisch", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A rechts)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A unten)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "aktiv: %s", + [UI_MENU_PROMPTS] = "Tastensymbole", + [UI_MENU_PROMPTS_DESC] = "Welche Controller-Tasten die Tastensymbole des Spiels zeigen. Nintendo: die eigenen des " + "Spiels. Xbox: LB, RB, LT, RT, Menü, Ansicht und ein Steuerkreuz, dazu A, B, X und Y so, " + "wie die Taste beschriftet ist, die die Tastenbelegung oben drückt (mit Nintendo (A " + "rechts) ist die rechte Taste mit B beschriftet, daher zeigen die Symbole für A ein B). " + "PlayStation: die Formen auf einem PlayStation-Controller (○ × △ □, L1, R1, L2, R2, " + "Options und Share) auf der Taste, die die Tastenbelegung oben drückt. PC: die Tasten " + "und Maustasten der Standardbelegung der Tastatur (E, Umschalt, Leertaste, " + "Linksklick...) und die Maus für die Kamera. Das Spiel liest seine Symbole beim Start, " + "daher ändern sie sich nach einem Neustart. Sie sind Teil der Spieldateien, daher behält " + "eine Taste, die du unter Steuerung umbelegst, ihr altes Symbol auf dem Bildschirm.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "Symboldateien fehlen: Setup erneut ausführen", + [UI_MENU_PROMPTS_FAILED] = "Symboldateien beschädigt: Setup erneut ausführen", + [UI_MENU_PROMPTS_RESTART] = "Symbole ändern sich nach Neustart", + [UI_MENU_PROMPTS_OFF_SHAPE] = "aus bei einer Spielauflösung, die nicht 16:9 ist", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "kein Layout für dieses Format erstellt: Setup erneut ausführen", + [UI_MENU_OUTPUT_RES_PREPARING] = "Layout wird im Hintergrund erstellt; ab dem nächsten Start verwendet", + [UI_MENU_PROMPTS_PREPARING] = "Symboldateien werden im Hintergrund erstellt; ab dem nächsten Start verwendet", + [UI_MENU_PREPARE_RETRY] = "Erneut versuchen", + [UI_MENU_PREPARE_RETRY_DESC] = "Startet die Werkzeuge des Setups erneut, um das fehlende Oberflächen-Layout oder " + "die Symboldateien der Tastensymbole im Hintergrund zu erstellen. Das Spiel läuft " + "weiter; es verwendet sie ab seinem nächsten Start.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "die Werkzeuge des Setups starteten nicht: Setup erneut ausführen", + [UI_MENU_PROMPTS_OFF_MODS] = "aus: ein RomFS-Mod ersetzt ihre Dateien", + [UI_MENU_PROMPTS_OFF_PATCHES] = "aus, solange TOTK_ROMFS_PATCHES gesetzt ist", + [UI_MENU_RESTART] = "Jetzt neu starten", + [UI_MENU_RESTART_DESC] = "Schließt das Spiel und startet es mit den neuen Symbolen erneut. Fortschritt seit dem " + "letzten Speichern geht verloren.", + [UI_MENU_RESTART_CONFIRM] = "Spiel jetzt neu starten? Fortschritt seit dem letzten Speichern geht verloren.", + [UI_MENU_RESTART_YES] = "Neu starten", + [UI_MENU_RESTART_SAVING] = "Das Spiel speichert: Neustart ist gleich möglich.", + [UI_MENU_GROUP_STICKS] = "Analogsticks", + [UI_MENU_LSTICK_DEADZONE] = "Totzone linker Stick", + [UI_MENU_RSTICK_DEADZONE] = "Totzone rechter Stick", + [UI_MENU_STICK_DEADZONE_DESC] = "Wie weit sich ein Stick bewegen muss, bevor das Spiel es bemerkt. Erhöhe sie, " + "wenn sich Figur oder Kamera von selbst bewegen: Stick loslassen, „Stick jetzt“ " + "ablesen und die Totzone einige Prozent darüber setzen.", + [UI_MENU_STICK_DEADZONE_NOW] = "Stick jetzt: %.0f %%", + [UI_MENU_MOUSE_MODE] = "Mauskamera", + [UI_MENU_MOUSE_MODE_DESC] = "Direkt: Die Kamera dreht sich so weit, wie sich die Maus bewegt, wie in einem " + "PC-Spiel, ohne Totzone oder Kurve des Sticks (Spiel 1.4.3 und 1.2.1; 1.1.0 nutzt die " + "Stick-Emulation). Stick-Emulation: Die Maus wirkt wie der rechte Stick.", + [UI_MENU_MOUSE_STICK] = "Stick-Emulation", + [UI_MENU_MOUSE_DIRECT] = "Direkt", + [UI_MENU_MENU_CURSOR] = "Maus in den Spielmenüs", + [UI_MENU_MENU_CURSOR_DESC] = "In den eigenen Menüs des Spiels (Titel, Inventar, Läden, Antwortauswahl in " + "Dialogen) erscheint der Zeiger: Das Element darunter wird ausgewählt, Linksklick " + "bestätigt, Rechtsklick geht zurück. Nur wenn zuletzt die Maus oder eine Taste " + "benutzt wurde, sodass die Menüs für einen Controller unverändert bleiben (Spiel " + "1.4.3).", + [UI_MENU_MAP_CLICK] = "Linksklick auf der Karte", + [UI_MENU_MAP_CLICK_DESC] = "Auf der Karte des Purah-Pads drückt die linke Maustaste A am Kartencursor statt der " + "Taste, auf die sie gelegt ist (standardmäßig Y). Erfordert „Maus in den Spielmenüs“ " + "(Spiel 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Klicks im Dialog", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Solange ein Dialogfenster offen ist, drückt Linksklick B (setzt den Text fort " + "und überspringt sein schrittweises Einblenden) und Rechtsklick A, statt der " + "Tasten, auf die sie gelegt sind (standardmäßig Y, das das Dialogprotokoll " + "öffnet, und ZL). Bei der Antwortauswahl bleibt der Zeiger: Linksklick wählt " + "(Spiel 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "Spiel-Mauszeiger", + [UI_MENU_POINTER_IMAGE_DESC] = "Solange der Cursor nicht gefangen ist (Spielmenüs, dieses Menü, nach Esc), zeigt " + "das Fenster statt des Systempfeils eine eigene goldene Pfeilspitze, passend zur " + "Skalierung des Bildschirms.", + [UI_MENU_QUICKSAVE] = "Schnellspeichern/-laden", + [UI_MENU_QUICKSAVE_DESC] = "Eine Taste speichert das Spiel sofort, eine andere lädt diesen Spielstand (die zwei " + "Zeilen darunter: standardmäßig F6 und F7, wie in Half-Life), ohne Menü auf dem " + "Bildschirm. Nur Tastatur- und Maustasten, nur Spiel 1.4.3. Schnellspeichern fordert " + "vom Spiel eine seiner eigenen automatischen Speicherungen an, ersetzt also die " + "älteste automatische Speicherung (der manuelle Spielstand bleibt), behält eine Kopie " + "davon als Schnellspeicherstand (der Ordner quicksave im Profil) und zeigt \"Spiel " + "gespeichert\" oben im Bild. Schnellladen hält das Bild auf \"Schnellspeicherstand " + "wird geladen\", während es unsichtbar die Ladeliste des Spiels durchgeht, und das " + "Spiel lädt den Schnellspeicherstand (etwa 5 s). Wo das Spiel selbst keine " + "automatische Speicherung anlegen würde (Zwischensequenz, Dialog), wird nichts " + "gespeichert und die Zeile sagt das.", + [UI_MENU_QUICKSAVE_KEY] = "Schnellspeichertaste", + [UI_MENU_QUICKLOAD_KEY] = "Schnellladetaste", + [UI_MENU_QUICKSAVE_KEY_DESC] = "Die Taste, die Schnellspeichern oder Schnellladen auslöst; standardmäßig F6 und " + "F7, wie in Half-Life. Wähle die Zelle und drücke eine beliebige Taste oder " + "Maustaste; Entf lässt sie ohne Taste. Solange Schnellspeichern an ist, tun die " + "beiden Tasten nichts anderes (ein Hinweis erscheint, wenn eine Belegung die Taste " + "ebenfalls verwendet). totk.ini nimmt jeden Tastennamen der Belegungen " + "(quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Spiel gespeichert", + [UI_QS_LOADING] = "Schnellspeicherstand wird geladen", + [UI_QS_NOT_NOW] = "Schnellspeichern ist gerade nicht möglich", + [UI_QS_NONE] = "Noch kein Schnellspeicherstand vorhanden (die Schnellspeichertaste legt einen an)", + [UI_QS_FAILED] = "Schnellspeichern fehlgeschlagen: siehe totk.log", + [UI_QS_LOAD_FAILED] = "Schnellladen fehlgeschlagen: siehe totk.log", + [UI_MENU_MOUSE_SENS] = "Mausempfindlichkeit der Kamera", + [UI_MENU_MOUSE_SENS_DESC] = "Wie schnell die Maus die Kamera dreht.", + [UI_MENU_WALK_KEY] = "Gehen-Taste", + [UI_MENU_WALK_KEY_DESC] = "Gedrückt halten, um die Tastatur-Sticks nur teilweise zu neigen, sodass die Tastatur " + "geht statt rennt. Der Geh-Anteil legt fest, wie weit. Controller und Maus sind nicht " + "betroffen.", + [UI_MENU_WALK_KEY_TAKEN] = "auch %s", + [UI_MENU_WALK_SCALE] = "Geh-Anteil", + [UI_MENU_WALK_SCALE_DESC] = "Die Neigung der Tastatur-Sticks, solange die Gehen-Taste gehalten wird. Die Hälfte " + "ist Gehen, volle Neigung Rennen.", + [UI_MENU_FREECAM] = "Freie Kamera", + [UI_MENU_FREECAM_DESC] = "Lässt eine Tastenkombination oder eine Taste darunter die Ansicht von Link lösen und " + "frei fliegen. Standardmäßig aus: Ist sie aus, läuft der Kameracode des Spiels " + "unverändert. Wirkt nach einem Neustart. Spielversion 1.4.3.", + [UI_MENU_FREECAM_OFF_NOTE] = "Schalte oben Freie Kamera ein und starte dann neu", + [UI_MENU_FREECAM_PAD] = "Freie-Kamera-Kombi", + [UI_MENU_FREECAM_PAD_DESC] = "Gleichzeitig gedrückte Controller-Tasten, die die Ansicht durch drei Stufen " + "schalten: Sie verlässt Link und fliegt, sie bleibt, wo sie gelassen wurde, während " + "Link weiterspielt, und sie kehrt zurück. Während sie fliegt, erhält das Spiel keine " + "Eingaben: Der linke Stick fliegt entlang der Blickrichtung und seitwärts, die " + "Trigger nach oben und unten, der rechte Stick dreht, und jeder Druck auf L oder R " + "halbiert oder verdoppelt das Tempo. Bei festgestellter Ansicht geht Link dorthin, " + "wohin der linke Stick auf dem Bildschirm zeigt. Spielversion 1.4.3.", + [UI_MENU_FREECAM_PAD_V143] = "Nur Spielversion 1.4.3", + [UI_MENU_FREECAM_KEY] = "Freie-Kamera-Taste", + [UI_MENU_FREECAM_KEY_DESC] = "Eine Taste, die die Ansicht durch dieselben Stufen schaltet: Sie verlässt Link und " + "fliegt, sie bleibt, während Link weiterspielt, und sie kehrt zurück. Während sie " + "fliegt: W A S D fliegen entlang der Blickrichtung und seitwärts, die auf ZR und ZL " + "gelegten Tasten (standardmäßig X und Z) nach oben und unten, Maus und Pfeiltasten " + "drehen, und die auf L und R gelegten Tasten (Q und R) halbieren oder verdoppeln das " + "Tempo. Spielversion 1.4.3.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Gameplay-Anpassungen", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Gameplay-Anpassungen", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Mausrad-Steuerung für Drehung und Abstand der Ultrahand, Wechsel von " + "Gegenständen und Waffen und sanften Karten-Zoom.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Ultrahand-Drehung per Mausrad", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Mit der Ultrahand gehaltene Objekte direkt mit dem Mausrad drehen.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Ultrahand-Drehachse mit C", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "C beim Scrollen halten, um gehaltene Objekte um die andere Achse zu " + "drehen.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Ultrahand-Drehempfindlichkeit", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Wie schnell das Mausrad gehaltene Objekte dreht.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Ultrahand-Abstand per Mausrad", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Rechtsklick + Mausrad schiebt gehaltene Objekte weg oder zieht sie " + "heran.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Ultrahand-Abstandsempfindlichkeit", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Wie schnell das Mausrad den Objektabstand ändert.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Waffenwahl per Mausrad", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Beim freien Erkunden das Mausrad drehen, um Waffen zu wechseln. Mit E " + "bestätigen.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Empfindlichkeit der Waffenwahl", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Nötige Mausrad-Schritte bis zur nächsten Waffe.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Schnellmenü-Auswahl per Mausrad", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Das Mausrad drehen, um bei offenem Schnellauswahlmenü durch die Gegenstände " + "zu blättern.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Mausrad-Empfindlichkeit im Schnellmenü", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Nötige Mausrad-Schritte, um in Schnellauswahlmenüs zum nächsten " + "Gegenstand zu gelangen.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "Schnellmenü-Navigation mit A / D", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "A / D drücken, um in Schnellauswahlmenüs nach links und rechts zu wechseln.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Sanfter Karten-Zoom", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Sanfter Zoom mit Nachlauf auf der Karte des Purah-Pads per Mausrad.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Karten-Zoomempfindlichkeit", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Wie schnell das Mausrad die Karte zoomt.", + [UI_MENU_STICK_SENS] = "Kameratempo des Sticks", + [UI_MENU_STICK_SENS_DESC] = "Vervielfacht das Kameratempo des rechten Sticks im Spiel, Höchsttempo " + "eingeschlossen, bei jeder der fünf Kameraempfindlichkeiten des Spiels. Die Maus " + "behält ihre eigene Einstellung.", + [UI_BINDS_HELP] = "Wähle eine Zelle und drücke A oder Enter, dann die Taste, Maustaste oder Controller-Taste. " + "Entf oder X leert eine Zelle. Eine schon belegte Taste wandert hierher; eine Controller-Taste " + "tauscht mit der, die sie ersetzt.", + [UI_BINDS_COL_KEY1] = "Taste 1", + [UI_BINDS_COL_KEY2] = "Taste 2", + [UI_BINDS_COL_PAD] = "Controller", + [UI_BINDS_GROUP_BUTTONS] = "Tasten", + [UI_BINDS_GROUP_MOVE] = "Bewegung", + [UI_BINDS_GROUP_CAMERA] = "Kamera", + [UI_BINDS_PRESS_KEY] = "Drücke eine Taste oder Maustaste für %s", + [UI_BINDS_PRESS_PAD] = "Drücke eine Controller-Taste für %s", + [UI_BINDS_CANCEL_HINT] = "Esc bricht ab, oder %d s warten", + [UI_BINDS_TAKEN] = "%s wurde von %s entfernt", + [UI_BINDS_SWAPPED] = "%s mit %s getauscht", + [UI_BINDS_RESET] = "Alle Tasten zurücksetzen", + [UI_BINDS_RESET_DESC] = "Zurück zu den Standardtasten und Controller-Tasten. Die Tastenbelegung oben gilt wieder: " + "umbelegte Controller-Tasten bleiben bis zu diesem Zurücksetzen, wo du sie hingelegt hast.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Linker Stick drücken", + [UI_BIND_RCLICK] = "Rechter Stick drücken", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "Plus", + [UI_BIND_MINUS] = "Minus", + [UI_BIND_LEFT] = "Steuerkreuz links", + [UI_BIND_UP] = "Steuerkreuz oben", + [UI_BIND_RIGHT] = "Steuerkreuz rechts", + [UI_BIND_DOWN] = "Steuerkreuz unten", + [UI_BIND_LSTICK_LEFT] = "Nach links", + [UI_BIND_LSTICK_UP] = "Vorwärts", + [UI_BIND_LSTICK_RIGHT] = "Nach rechts", + [UI_BIND_LSTICK_DOWN] = "Rückwärts", + [UI_BIND_RSTICK_LEFT] = "Kamera links", + [UI_BIND_RSTICK_UP] = "Kamera hoch", + [UI_BIND_RSTICK_RIGHT] = "Kamera rechts", + [UI_BIND_RSTICK_DOWN] = "Kamera runter", + [UI_BIND_DESC_A] = "Interagieren, aufheben, sprechen.", + [UI_BIND_DESC_B] = "Rennen, abbrechen, zurück.", + [UI_BIND_DESC_X] = "Springen.", + [UI_BIND_DESC_Y] = "Angreifen.", + [UI_BIND_DESC_LCLICK] = "Schleichen.", + [UI_BIND_DESC_RCLICK] = "Ego-Ansicht.", + [UI_BIND_DESC_L] = "Fähigkeiten.", + [UI_BIND_DESC_R] = "Waffe werfen.", + [UI_BIND_DESC_ZL] = "Schild, Anvisieren.", + [UI_BIND_DESC_ZR] = "Bogen.", + [UI_BIND_DESC_PLUS] = "Menü, Inventar.", + [UI_BIND_DESC_MINUS] = "Karte.", + [UI_BIND_DESC_DPAD] = "Schnellauswahl.", + [UI_BIND_DESC_MOVE] = "Bewegt Link wie der linke Stick. Der linke Stick des Controllers funktioniert immer auch.", + [UI_BIND_DESC_CAMERA] = "Dreht die Kamera wie der rechte Stick. Maus und rechter Stick des Controllers " + "funktionieren immer auch.", + [UI_BIND_SHAKE] = "Kamerastick schütteln", + [UI_BIND_DESC_SHAKE] = "Bewegt den rechten Stick für das Spiel hin und her: löst ein verbundenes Teil von dem, " + "was die Ultrahand hält. Gedrückt halten schüttelt weiter.", + [UI_KEY_SPACE] = "Leertaste", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "Umschalt links", + [UI_KEY_LCTRL] = "Strg links", + [UI_KEY_UP] = "Pfeil hoch", + [UI_KEY_DOWN] = "Pfeil runter", + [UI_KEY_LEFT] = "Pfeil links", + [UI_KEY_RIGHT] = "Pfeil rechts", + [UI_KEY_MOUSE_L] = "Linke Maustaste", + [UI_KEY_MOUSE_R] = "Rechte Maustaste", + [UI_KEY_MOUSE_M] = "Mittlere Maustaste", + [UI_KEY_MOUSE_X1] = "Maustaste 4", + [UI_KEY_MOUSE_X2] = "Maustaste 5", + [UI_KEY_ENTER] = "Enter", + [UI_KEY_BACKSPACE] = "Rücktaste", + [UI_KEY_RSHIFT] = "Umschalt rechts", + [UI_KEY_RCTRL] = "Strg rechts", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Feststell", + [UI_KEY_INSERT] = "Einfg", + [UI_KEY_DELETE] = "Entf", + [UI_KEY_HOME] = "Pos1", + [UI_KEY_END] = "Ende", + [UI_KEY_PAGEUP] = "Bild hoch", + [UI_KEY_PAGEDOWN] = "Bild runter", + [UI_KEY_NUM_FMT] = "Num %s", + [UI_PAD_SOUTH] = "Untere Taste", + [UI_PAD_EAST] = "Rechte Taste", + [UI_PAD_WEST] = "Linke Taste", + [UI_PAD_NORTH] = "Obere Taste", + [UI_PAD_LSTICK] = "Linker Stick", + [UI_PAD_RSTICK] = "Rechter Stick", + [UI_PAD_L] = "Linke Schultertaste", + [UI_PAD_R] = "Rechte Schultertaste", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Zurück", + [UI_PAD_DPAD_LEFT] = "Steuerkreuz links", + [UI_PAD_DPAD_UP] = "Steuerkreuz oben", + [UI_PAD_DPAD_RIGHT] = "Steuerkreuz rechts", + [UI_PAD_DPAD_DOWN] = "Steuerkreuz unten", + [UI_PAD_ZL] = "Linker Trigger", + [UI_PAD_ZR] = "Rechter Trigger", + [UI_PAD_LPADDLE1] = "Linke Rücktaste", + [UI_PAD_RPADDLE1] = "Rechte Rücktaste", + [UI_PAD_LPADDLE2] = "Linke Rücktaste 2", + [UI_PAD_RPADDLE2] = "Rechte Rücktaste 2", + [UI_PAD_TOUCHPAD] = "Touchpad-Klick", + [UI_PAD_CROSS] = "Kreuz", + [UI_PAD_CIRCLE] = "Kreis", + [UI_PAD_SQUARE] = "Quadrat", + [UI_PAD_TRIANGLE] = "Dreieck", + [UI_MENU_AMIIBO_DIR] = "Amiibo-Ordner", + [UI_MENU_AMIIBO_OPEN] = "Öffnen", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Standardordner", + [UI_MENU_AMIIBO_REFRESH] = "Aktualisieren", + [UI_MENU_AMIIBO_PICK] = "Amiibo-Dumps (.bin- oder .nfc-Dateien mit 540 Byte):", + [UI_MENU_AMIIBO_NO_DIR] = "Der Ordner %s kann nicht geöffnet werden", + [UI_MENU_AMIIBO_READER] = "NFC-Leser", + [UI_MENU_AMIIBO_STATE] = "Leser:", + [UI_MENU_AMIIBO_STATE_IDLE] = "bereit", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "das Spiel wartet auf ein Amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "Amiibo auf dem Leser", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "das Spiel liest das Amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "aus", + [UI_MENU_AMIIBO_FILE] = "Gewählte Datei:", + [UI_MENU_AMIIBO_NO_FILE] = "(keine Datei gewählt)", + [UI_MENU_AMIIBO_TAP] = "Amiibo auflegen", + [UI_MENU_AMIIBO_REMOVE] = "Amiibo abnehmen", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Amiibo nach dem Auflegen von selbst abnehmen", + [UI_MENU_AMIIBO_HOLD] = "Zeit auf dem Leser", + [UI_MENU_AMIIBO_SECONDS] = "%.1f s", + [UI_MENU_AMIIBO_TAG] = "Amiibo auf dem Leser:", + [UI_MENU_AMIIBO_NO_TAG] = "Kein Amiibo auf dem Leser.", + [UI_MENU_AMIIBO_TAG_FILE] = "Datei: %s", + [UI_MENU_AMIIBO_TAG_ID] = "Figur %s, Serie %02x, Nummer %04x, Typ %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "Bereit", + [UI_MENU_AMIIBO_TAPPED] = "Aufgelegt: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "Kein Amiibo-Dump (540-Byte-NTAG215): %s", + [UI_MENU_AMIIBO_REMOVED] = "Amiibo abgenommen", + [UI_MENU_AMIIBO_STATUS] = "Status: %s", + [UI_MENU_MENU_LANG] = "Menüsprache", + [UI_MENU_MENU_LANG_DESC] = "Sprache dieses Menüs und der Leistungsanzeige.", + [UI_MENU_MENU_LANG_AUTO] = "Automatisch (aus Windows)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "Zeigt \"Spielt TotK Recomp\" mit der Spielzeit in deinem Discord-Status, solange " + "das Spiel läuft. discord_app_id und discord_image in totk.ini wählen die Anwendung.", + [UI_MENU_ADV_WARNING] = "Diese Einstellungen dienen Tests und der Fehlersuche. Ändere sie nur, wenn du weißt, " + "warum.", + [UI_MENU_GROUP_SCHED] = "Zeitplanung", + [UI_MENU_GROUP_SHADERS] = "Shader und Pipelines", + [UI_MENU_GROUP_TEXMEM] = "Texturen und Speicher", + [UI_MENU_GROUP_FIXES] = "Render-Korrekturen", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "Diagnose", + [UI_MENU_ASYNC_PREEMPT] = "Unterbrechung auf virtuellen Kernen", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Erlaubt einem Spiel-Thread, einen anderen auf demselben virtuellen Kern zu " + "unterbrechen.", + [UI_MENU_PREEMPT_OFF] = "Aus", + [UI_MENU_PREEMPT_ON] = "Ein", + [UI_MENU_PREEMPT_INHERIT] = "Nur Vererbung", + [UI_MENU_REPLAY_ASYNC] = "GPU-Bildvorbereitung im eigenen Thread", + [UI_MENU_REPLAY_ASYNC_DESC] = "Bereitet Bilder für die GPU in einem eigenen Thread statt im Spiel-Thread vor. " + "Fügt bis zu ein Bild Latenz hinzu.", + [UI_MENU_REPLAY_WORKERS] = "GPU-Vorbereitungsthreads", + [UI_MENU_REPLAY_WORKERS_DESC] = "Bereitet große Bilder auf mehreren Threads gleichzeitig für die GPU vor. Hilft, " + "wenn die CPU die Bildrate begrenzt; braucht 8 oder mehr logische Prozessoren. " + "Aus bereitet auf einem Thread vor.", + [UI_MENU_REPLAY_WORKERS_NOW] = "jetzt: %s", + [UI_MENU_TIMER_1MS] = "Windows-Timer mit 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Erhöht die Auflösung des Systemtimers auf 1 ms für gleichmäßigere Bildzeiten.", + [UI_MENU_PIPE_WAIT] = "Umgang mit wartenden Draws", + [UI_MENU_PIPE_WAIT_DESC] = "Standard behält die aktuelle Zeitplanung mit einem reservierten Worker für wartende " + "Draws; Alt (Draw) verwendet die vorherige Zeitplanung.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Standard", + [UI_MENU_PIPE_WAIT_DRAW] = "Alt (Draw)", + [UI_MENU_PIPE_SKIP] = "Übersprungene Draws beim Pipeline-Bau", + [UI_MENU_PIPE_SKIP_DESC] = "Welche Draws verworfen werden, statt auf ihre Pipeline zu warten.", + [UI_MENU_PIPE_SKIP_STRICT] = "Streng", + [UI_MENU_PIPE_SKIP_ANY] = "Alle", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Vollbild-Durchgänge", + [UI_MENU_LIB_PREBUILD] = "Vorbau der Stufenbibliotheken", + [UI_MENU_LIB_PREBUILD_DESC] = "Baut Shader-Stufenbibliotheken vorab im Hintergrund.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Threads für den Vorbau der Stufenbibliotheken", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Threads für den Vorbau; Automatisch wählt eine Zahl passend zur CPU.", + [UI_MENU_PIPE_PREBUILD] = "Pipeline-Vorbau", + [UI_MENU_PIPE_PREBUILD_DESC] = "Baut bekannte Pipelines vorab.", + [UI_MENU_PREWARM_XLATE] = "Übersetzer vorwärmen", + [UI_MENU_PREWARM_XLATE_DESC] = "Threads, die bekannte Shader beim Start übersetzen; Automatisch nimmt die Hälfte " + "der CPU-Threads, höchstens 16.", + [UI_MENU_GPL] = "Grafik-Pipeline-Bibliothek", + [UI_MENU_GPL_DESC] = "Verwendet die Vulkan-Erweiterung für Pipeline-Bibliotheken; ausschalten, wenn dein Treiber " + "damit Probleme macht.", + [UI_MENU_ASTC] = "ASTC-Texturdekodierung", + [UI_MENU_ASTC_DESC] = "Wo komprimierte ASTC-Texturen dekodiert werden.", + [UI_MENU_ASTC_AUTO] = "Automatisch", + [UI_MENU_ASTC_GPU] = "GPU-Shader", + [UI_MENU_ASTC_NATIVE] = "Nativ", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "GPU-Speichermodus", + [UI_MENU_MEMORY_DESC] = "Wie der Spielspeicher mit der GPU geteilt wird.", + [UI_MENU_MEMORY_AUTO] = "Automatisch", + [UI_MENU_MEMORY_IMPORT] = "Import", + [UI_MENU_MEMORY_MIRROR] = "Spiegel", + [UI_MENU_MEMORY_VERIFY] = "Prüfen", + [UI_MENU_TEX_ALIAS] = "Textur-Aliasing", + [UI_MENU_TEX_ALIAS_DESC] = "Eine neue Textur im Speicher einer lebenden Textur beginnt mit deren Inhalt statt " + "leer.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Texturspeicher-Grenze", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Prozent des Videospeichers, ab dem vom Spiel freigegebene Texturen verworfen " + "werden (sie kommen bei Bedarf aus dem Speicher zurück). 0 behält sie.", + [UI_MENU_ASTC_BC] = "ASTC zu BC3 komprimieren", + [UI_MENU_ASTC_BC_DESC] = "Mit dem GPU-Dekoder: kodiert dekodierte ASTC-Texturen zu BC3 um, ein Viertel des " + "Videospeichers. Für GPUs mit 4 GB oder weniger; Texturen wirken etwas klotziger.", + [UI_MENU_LOD_GUARD] = "LOD-Schutz", + [UI_MENU_LOD_GUARD_DESC] = "Verhindert, dass Objekte für ein Bild an der falschen Stelle aufblitzen oder die " + "Ferne flach wirkt, indem gewartet wird, bis das Spiel die Detailstufen-Daten fertig " + "geschrieben hat, bevor die GPU sie liest.", + [UI_MENU_FIX_C0] = "Konstantpuffer-Korrektur", + [UI_MENU_FIX_C0_DESC] = "Füllt die vom Treiber reservierte Konstantbank c0 (Speichergrößen, Dispatch-Größe, " + "Punktgröße, Basisinstanz), statt Nullen zu lesen.", + [UI_MENU_FIX_ZERO] = "Neuen GPU-Speicher nullen", + [UI_MENU_FIX_ZERO_DESC] = "Neue GPU-Speicherpools beginnen mit Nullen gefüllt, wie Switch-Speicher.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Nebel und Partikel nach DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Mit DLAA werden Nebel, Staub und andere Partikel über das bereits von DLSS " + "geglättete Bild gezeichnet, so wie das Spiel sie ohne DLSS zeichnet: Kleine " + "Partikel im Nebel (Schreine) verschwinden nicht mehr und ziehen keine Spuren " + "mehr. Aus: DLSS verarbeitet auch diese Effekte, wie bisher. Nur im " + "DLAA-Modus; die hochskalierenden DLSS-Modi verarbeiten sie immer. Wirkt " + "sofort.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Feste DLSS-Belichtung", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS nimmt die Helligkeit des Spielbilds, wie sie ist, statt die Belichtung " + "aus jedem Bild zu schätzen: In dunklen Szenen (Untergrund) werden große " + "neblige Flächen nicht mehr für ein Bild dunkler oder heller, während sich " + "die Kamera bewegt. Aus: DLSS schätzt die Belichtung selbst, wie bisher. " + "Wirkt sofort.", + [UI_MENU_BIND_SKIP] = "Wiederholte Bindungen überspringen", + [UI_MENU_BIND_SKIP_DESC] = "Optimierung: überspringt unveränderte Bindungen.", + [UI_MENU_SHADER_MEMO] = "Shader-Merker", + [UI_MENU_SHADER_MEMO_DESC] = "Optimierung: merkt sich Shader-Abfragen.", + [UI_MENU_PIPE_MEMO] = "Pipeline-Merker", + [UI_MENU_PIPE_MEMO_DESC] = "Optimierung: verwendet die Pipeline des vorigen Draws erneut, wenn sich sein Zustand " + "wiederholt.", + [UI_MENU_TEX_MEMO] = "Texturbindungs-Merker", + [UI_MENU_TEX_MEMO_DESC] = "Optimierung: merkt sich Texturdeskriptoren zwischen Draws.", + [UI_MENU_DESC_TEMPLATE] = "Deskriptor-Vorlagen", + [UI_MENU_DESC_TEMPLATE_DESC] = "Optimierung: aktualisiert Deskriptoren gebündelt.", + [UI_MENU_PUSH_SKIP] = "Wiederholte Push-Konstanten überspringen", + [UI_MENU_PUSH_SKIP_DESC] = "Optimierung: überspringt unveränderte Push-Konstanten.", + [UI_MENU_SPLIT_DRAWS] = "Frühe GPU-Übergabe", + [UI_MENU_SPLIT_DRAWS_DESC] = "Übergibt GPU-Arbeit zwischen Durchgängen alle N Draws in Teilen, damit die GPU " + "früher beginnt; 0 schaltet es aus.", + [UI_MENU_VK_VALIDATION] = "Validierungsschicht", + [UI_MENU_VK_VALIDATION_DESC] = "Prüft jeden Vulkan-Aufruf und verlangsamt das Spiel stark.", + [UI_MENU_VK_VALIDATION_MISSING] = "Die Validierungsschicht ist nicht installiert.", + [UI_MENU_VK_DYN_VERTEX] = "Dynamischer Vertex-Zustand", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Erzwingt dynamische Vertex-Eingabe an oder aus; der Standard hängt von der GPU ab.", + [UI_MENU_VK_DYN_A2C] = "Dynamisches Alpha-to-Coverage", + [UI_MENU_VK_DYN_A2C_DESC] = "Erzwingt dynamisches Alpha-to-Coverage an oder aus. Standard: aus beim AMD-Treiber " + "für RDNA 2 und älter, der Figuren damit schwarz zeichnet, sonst an.", + [UI_MENU_VK_SUBGROUP_PIN] = "Subgroup-Größe festlegen", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Legt die Subgroup-Größe der Shader fest.", + [UI_MENU_TRACE] = "Leistungsprotokoll", + [UI_MENU_TRACE_DESC] = "Schreibt Bildzeiten in eine Datei.", + [UI_MENU_FLIGHT] = "Flugschreiber", + [UI_MENU_FLIGHT_DESC] = "Hält einen kurzen Verlauf und speichert ihn, wenn ein Bild hängt.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Hänger-Schwelle (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Bildzeit, die als Hänger zählt.", + [UI_MENU_PASS_CRUMBS] = "GPU-Durchgangsmarken", + [UI_MENU_PASS_CRUMBS_DESC] = "Nach einem GPU-Absturz nennt das Protokoll den Render-Durchgang, der gerade lief. " + "Automatisch: nur AMD. Ein: auch NVIDIA, mit geringen Leistungskosten.", + [UI_MENU_INPUT_RECORD] = "Eingabeaufzeichnung", + [UI_MENU_INPUT_RECORD_DESC] = "Schreibt deine Eingaben für Fehlerberichte in eine Datei.", + [UI_MENU_OPEN_LOG] = "Protokollordner öffnen", + [UI_MENU_OPEN_LOG_DESC] = "Zeigt den Ordner mit den Protokolldateien.", + [UI_MENU_COPY_INFO] = "Systeminfo kopieren", + [UI_MENU_COPY_INFO_DESC] = "Kopiert GPU, Treiber, CPU, RAM und geänderte Einstellungen in die Zwischenablage.", + [UI_MENU_COPY_INFO_DONE] = "Kopiert", + [UI_MENU_ACTION_FAILED] = "hat nicht funktioniert", + [UI_MENU_RESET] = "Alle Einstellungen zurücksetzen", + [UI_MENU_RESET_DESC] = "Gilt für alle Tabs.", + [UI_MENU_RESET_CONFIRM] = "Alle Einstellungen auf Standard zurücksetzen?", + [UI_MENU_RESET_YES] = "Zurücksetzen", + [UI_MENU_RESET_NO] = "Abbrechen", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "Spiel %.0f%%", + [UI_MENU_OV_MAX_MS] = "max. %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "Bild", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% Low %.0f", + [UI_MENU_OV_LOW01] = "0,1%% Low %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Temperatur", + [UI_MENU_OV_POWER] = "Leistung", + [UI_MENU_OV_CLOCK] = "Takt", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "GPU-Bildvorbereitung", + [UI_MENU_OV_GPU_TIME] = "GPU-Last pro Bild", + [UI_MENU_OV_PIPE_WAIT] = "Pipeline-Wartezeiten", + [UI_MENU_OV_SHADER_WAIT] = "Shader-Wartezeiten", + [UI_MENU_OV_TEX_UPLOADS] = "Textur-Uploads", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "Spiel %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "%.1f pro Bild", + [UI_MENU_OV_WINDOW] = "Fenster", + [UI_MENU_OV_OUTPUT] = "Spielbild", + [UI_MENU_OV_SCENE] = "3D-Szene", + [UI_MENU_OV_UPSCALER] = "3D-Upscaler", + [UI_MENU_OV_SCALING] = "Skalierung", + [UI_MENU_OV_LIMIT] = "Bildgrenze", + [UI_MENU_OV_PRESENT] = "Bildausgabe", + [UI_MENU_OV_SHOWN] = "Gezeigt", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, Schärfe %d%%", + [UI_MENU_OV_SCALE_NONE] = "keine (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilinear", + [UI_MENU_OV_SCALE_DOWN] = "bilinear (FSR vergrößert nur)", + [UI_MENU_TAB_CHEATS] = "Cheats", + [UI_MENU_CHEATS_NONE] = "Keine Cheats für diese Spielversion. Die Cheats eines Mods sind eine " + "Atmosphère-Cheatdatei in seinem cheats-Ordner, benannt nach dem Build des Spiels: " + "mods\\\\cheats\\%s. Starte das Spiel neu, um sie zu lesen. Für Cheats, die den " + "Spielcode ändern, baut sich das Spiel beim Start neu (einige Minuten).", + [UI_MENU_CHEATS_MOD] = "%s: %d Cheats", + [UI_MENU_CHEAT_CODE_DESC] = "Ändert den Spielcode. Schaltet sofort.", + [UI_MENU_CHEAT_KEY_DESC] = "Ändert den Spielcode, solange du %s hältst. Schaltet sofort.", + [UI_MENU_CHEAT_DATA_DESC] = "Schreibt jedes Bild in den Spielspeicher, solange er an ist.", + [UI_MENU_CHEAT_MASTER] = "immer an", + [UI_MENU_CHEAT_MASTER_DESC] = "Der Master-Code der Datei: er ist immer an.", + [UI_MENU_CHEAT_RESTORE] = "nicht nötig", + [UI_MENU_CHEAT_RESTORE_DESC] = "Er schreibt nur den Originalcode des Spiels zurück. Das Ausschalten eines Cheats " + "tut das bereits.", + [UI_MENU_CHEAT_REBUILD] = "nach dem Neubau", + [UI_MENU_CHEAT_REBUILD_DESC] = "Dieser Cheat ändert den Spielcode und ist neu oder geändert, seit das Spiel " + "gebaut wurde. Das Spiel baut ihn beim nächsten Start ein (einige Minuten), oder " + "verwende Spiel jetzt neu bauen.", + [UI_MENU_CHEAT_UNSUPPORTED] = "nicht unterstützt", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Dieser Cheat kann mit dieser Spielversion nicht verwendet werden:", + [UI_MENU_CHEATS_REBUILD] = "Spiel jetzt neu bauen", + [UI_MENU_CHEATS_REBUILD_DESC] = "Einige Cheats ändern den Spielcode und sind nicht eingebaut: Sie sind neu oder " + "geändert, oder ihr letzter Neubau ist fehlgeschlagen oder wurde abgebrochen. " + "Schließt das Spiel; das Setup baut sie ein (einige Minuten) und startet das " + "Spiel erneut. Fortschritt seit dem letzten Speichern geht verloren.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Dieser Mod patcht den Spielcode (exefs) auf eine Weise, die der Port nicht " + "anwenden kann, daher bleibt der ganze Mod aus. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Seine Codepatches (exefs) sind für eine andere Spielversion gemacht.", + [UI_MENU_MODS_EXEFS_ON] = "Aktive Codepatches: %d Dateien.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Aktive Codepatches: %d Dateien. Sie ersetzen den eigenen Patch %s des Ports, " + "der aus bleibt, solange dieser Mod an ist.", + [UI_MENU_MODS_CODE_SKIPPED] = "Sein eigener Spielcode (%s) wird nicht geladen: Der Rest des Mods wird verwendet. " + "Schalte den Mod aus, wenn sich das Spiel damit fehlerhaft verhält.", + [UI_MENU_MODS_PLUGIN_ON] = "Sein Plugin läuft: %d Hooks in den Spielcode.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Sein Plugin %s kann im Port nicht laufen: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "Der ganze Mod bleibt aus. Sein Schalter \"... ohne seinen Code verwenden\" " + "darunter verwendet den Rest davon.", + [UI_MENU_MODS_PLUGIN_OFF] = "Sein Plugin bleibt diesmal aus: Es startete anders als beim Bau (%s). Das Spiel baut " + "es beim nächsten Start neu.", + [UI_MENU_MODS_WITHOUT_CODE] = "%s ohne seinen Code verwenden", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "Der Mod darüber bringt Code mit, den der Port nicht ausführen kann: eigenen " + "Spielcode (ein subsdk-Plugin oder ein ersetztes main) oder Codepatches " + "(exefs), die der Port nicht anwenden kann. Aus: Der ganze Mod bleibt aus. " + "Ein: Dieser Code wird ausgelassen und der Rest des Mods verwendet: seine " + "RomFS-Dateien, Cheats und die funktionierenden Codepatches. Seine Dateien " + "erwarten womöglich den fehlenden Code; schalte ihn wieder aus, wenn sich das " + "Spiel fehlerhaft verhält. Wirkt beim nächsten Start.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Für jeden Mod an: mods_without_code = 1 in totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u seiner Codepatch-Dateien (exefs) können nicht angewendet werden und werden " + "ausgelassen: Der Rest des Mods wird verwendet. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u seiner Dateien ersetzen die von %s, das weiter unten in der Liste steht.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u Byte seiner Spieldatenänderungen kommen aus %s, das weiter oben in der Liste " + "steht.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u Byte seiner Spieldatenänderungen ersetzen die von %s, das weiter unten in der " + "Liste steht.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u seiner Codepatch-Stellen werden von %s überschrieben, das weiter oben in der " + "Liste steht.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Er überschreibt %u Codepatch-Stellen von %s, das weiter unten in der Liste steht.", +}; + +// French +static const char *const text_fr[UI_TEXT_COUNT] = { + SWKBD("Saisie de texte", "Entrez un nom", "Cheval", "OK", "Annuler", "Manette : A = OK, B = Annuler"), + + [UI_MENU_TITLE] = "Paramètres", + [UI_MENU_TAB_SCREEN] = "Écran", + [UI_MENU_TAB_GAME] = "Jeu", + [UI_MENU_TAB_MODS] = "Mods", + [UI_MENU_TAB_SOUND] = "Son", + [UI_MENU_TAB_CONTROLS] = "Commandes", + [UI_MENU_TAB_AMIIBO] = "Amiibo", + [UI_MENU_TAB_MENU] = "Menu", + [UI_MENU_TAB_ADVANCED] = "Avancé", + [UI_MENU_CONTINUE] = "Continuer", + [UI_MENU_QUIT] = "Quitter le jeu", + [UI_MENU_ON] = "Activé", + [UI_MENU_OFF] = "Désactivé", + [UI_MENU_AUTO] = "Automatique", + [UI_MENU_DEFAULT_MARK] = "par défaut", + [UI_MENU_AFTER_RESTART] = "après redémarrage", + [UI_MENU_SET_BY_ENV] = "fixé par une variable d'environnement", + [UI_MENU_SAVE_FAILED] = "impossible d'enregistrer les paramètres", + [UI_MENU_VERSION] = "TotK Recomp %s, jeu %s", + [UI_MENU_FULLSCREEN] = "Plein écran", + [UI_MENU_FULLSCREEN_DESC] = "Le jeu remplit l'écran ; F11 bascule.", + [UI_MENU_WINDOW_SIZE] = "Taille de la fenêtre", + [UI_MENU_WINDOW_SIZE_DESC] = "Taille de la fenêtre du jeu hors plein écran.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Personnalisée", + [UI_MENU_PRESENT] = "Présentation", + [UI_MENU_PRESENT_DESC] = "Comment les images terminées arrivent à l'écran.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", + [UI_MENU_PRESENT_VSYNC] = "VSync", + [UI_MENU_PRESENT_IMMEDIATE] = "Immédiat", + [UI_MENU_PRESENT_IN_USE] = "utilisé : %s", + [UI_MENU_GPU] = "Carte graphique", + [UI_MENU_GPU_DESC] = "Le périphérique Vulkan qui dessine le jeu.", + [UI_MENU_GPU_AUTO] = "Automatique", + [UI_MENU_PERF_OVERLAY] = "Affichage des performances", + [UI_MENU_PERF_OVERLAY_DESC] = "Images par seconde en haut à droite. Complet ajoute les temps d'image avec un " + "graphique, la charge du CPU, du GPU et de la mémoire, les températures et les " + "attentes du thread de rendu. F10 fait défiler les modes.", + [UI_MENU_PERF_OFF] = "Désactivé", + [UI_MENU_PERF_FPS] = "IPS", + [UI_MENU_PERF_FULL] = "Complet", + [UI_PERF_LINE_FPS] = "%.0f IPS", + [UI_PERF_LINE_FPS_GEN] = "%.0f IPS dessinées, %.0f affichées", + [UI_MENU_GRAPHICS] = "Image", + [UI_MENU_OUTPUT_RES] = "Résolution du jeu", + [UI_MENU_OUTPUT_RES_DESC] = "La taille dans laquelle le jeu dessine son image et son interface. Au-delà de 1920 x " + "1080, le jeu demande plus de mémoire vidéo et de temps GPU. Un format plus large " + "(21:9) élargit le champ de la caméra et place le HUD dans les coins de l'écran ; un " + "format plus haut (16:10, Steam Deck) le place sur les bords haut et bas.", + [UI_MENU_HUD_WIDTH] = "Largeur du HUD", + [UI_MENU_HUD_WIDTH_DESC] = "Sur un écran plus large que 16:9, l'écart entre les côtés gauche et droit du HUD. " + "Plein écran les place aux bords de l'écran ; 21:9 ou 16:9 garde le HUD au milieu de " + "l'écran, dans une zone de cette forme. Une disposition manquante est créée en " + "arrière-plan et utilisée après un redémarrage.", + [UI_MENU_HUD_WIDTH_FULL] = "Plein écran", + [UI_MENU_RENDER_SCALE] = "Échelle du rendu 3D", + [UI_MENU_RENDER_SCALE_DESC] = "Taille de la scène 3D par rapport à la résolution du jeu ; le FSR du jeu la met à " + "cette taille. Au-delà de 100 %, les bords crénelés sont lissés " + "(suréchantillonnage) au prix d'un coût GPU élevé.", + [UI_MENU_RENDER_SCALE_GAME] = "Jeu (83 %)", + [UI_MENU_DYNAMIC_RES] = "Résolution dynamique", + [UI_MENU_DYNAMIC_RES_DESC] = "Permet au jeu de réduire la scène 3D à 90 ou 80 %. Il en juge d'après une " + "estimation faite pour la Switch qui ignore votre GPU, si bien que les scènes " + "étendues baissent même sur un PC rapide. Désactivé garde l'échelle du rendu 3D.", + [UI_MENU_UPSCALER] = "Mise à l'échelle vers la fenêtre", + [UI_MENU_UPSCALER_DESC] = "Comment l'image est agrandie quand la fenêtre est plus grande que la résolution du " + "jeu. FSR garde les bords et les détails plus nets que le bilinéaire.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "Bilinéaire", + [UI_MENU_ASPECT] = "Forme de l'image", + [UI_MENU_ASPECT_DESC] = "Quand la forme de la fenêtre diffère de celle de la résolution du jeu (une image 16:9 " + "sur un écran 21:9) : garder la forme de l'image avec des bandes noires, ou l'étirer sur " + "la fenêtre.", + [UI_MENU_ASPECT_FIT] = "Bandes noires", + [UI_MENU_ASPECT_STRETCH] = "Étirer", + [UI_MENU_MOVIE_ASPECT] = "Forme des vidéos", + [UI_MENU_MOVIE_ASPECT_DESC] = "Quand la résolution du jeu n'est pas en 16:9 : garder la forme propre des vidéos " + "des cinématiques avec des bandes noires, ou les étirer sur toute l'image. " + "S'applique à partir de la vidéo suivante.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Bandes noires", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "Étirer", + [UI_MENU_FOV] = "Champ de vision", + [UI_MENU_FOV_DESC] = "La part du monde que montre la caméra, en pourcentage de celle du jeu. Version 1.4.3 du jeu " + "uniquement.", + [UI_MENU_SHADOW_RES] = "Taille de la carte d'ombres", + [UI_MENU_SHADOW_RES_DESC] = "Taille de la carte d'ombres du soleil. La taille du jeu change avec la vue, jusqu'à " + "environ 400 près du sol, si bien que les ombres des feuilles paraissent pixelisées " + "et sautent ; une taille fixe les garde stables et plus nettes. Au-delà de 1024, les " + "ombres coûtent plus de temps GPU et de mémoire vidéo.", + [UI_MENU_SHADOW_RES_GAME] = "Jeu (variable)", + [UI_MENU_ANISO] = "Filtrage des textures", + [UI_MENU_ANISO_DESC] = "Filtrage anisotrope des textures : le sol, les routes et les murs vus sous un angle " + "rasant restent nets au loin au lieu de devenir flous. Jeu : le niveau que demande le jeu, " + "comme sur la Switch.", + [UI_MENU_ANISO_GAME] = "Jeu", + [UI_MENU_LOD_STEADY] = "Détails stables sous charge", + [UI_MENU_LOD_STEADY_DESC] = "Ignore le mécanisme du jeu qui réduit les détails des modèles et des textures quand " + "la fréquence d'images baisse, comme le fait le mod d'émulateur Disable LOD Quality " + "Reduction. Versions 1.2.1 et 1.4.3 du jeu. Laissez-le désactivé sur les PC peu " + "puissants : cette baisse y maintient la fréquence d'images.", + [UI_MENU_SHARPNESS] = "Netteté FSR", + [UI_MENU_SHARPNESS_DESC] = "Accentuation après la mise à l'échelle FSR ; 0 la désactive.", + [UI_MENU_COLOR] = "Couleur", + [UI_MENU_COLOR_PRESET] = "Profil de couleur", + [UI_MENU_COLOR_PRESET_DESC] = "Règle les quatre valeurs ci-dessous. Vif : plus de contraste et de saturation, " + "ombres un peu éclaircies (pour les écrans OLED). Clarté : un peu plus de " + "contraste, de saturation et de luminosité. Modifier une valeur passe le profil en " + "Personnalisé. Le HUD change avec l'image ; ce menu, non.", + [UI_MENU_COLOR_DEFAULT] = "Celui du jeu", + [UI_MENU_COLOR_VIVID] = "Vif (OLED)", + [UI_MENU_COLOR_CLARITY] = "Clarté", + [UI_MENU_COLOR_CUSTOM] = "Personnalisé", + [UI_MENU_COLOR_BRIGHTNESS] = "Luminosité", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Ajoutée à chaque couleur ; 0 la laisse inchangée.", + [UI_MENU_COLOR_CONTRAST] = "Contraste", + [UI_MENU_COLOR_CONTRAST_DESC] = "Éloigne les couleurs du gris moyen (au-delà de 100 %) ou les en rapproche ; 100 " + "% les laisse inchangées.", + [UI_MENU_COLOR_SATURATION] = "Saturation", + [UI_MENU_COLOR_SATURATION_DESC] = "Intensité des couleurs par rapport au gris ; 100 % la laisse inchangée.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "En dessous de 1, éclaircit les tons sombres et moyens, au-dessus de 1, les " + "assombrit ; 1 les laisse inchangés.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "Sortie HDR", + [UI_MENU_HDR_DESC] = "Hautes lumières éclatantes sur un écran HDR. Demande le HDR activé dans Windows (« Utiliser " + "le HDR ») ou un compositeur Wayland avec gestion des couleurs ; sinon l'image reste en SDR. " + "S'applique après un redémarrage. Le profil de couleur ci-dessus est pour le SDR et n'est " + "pas utilisé en HDR.", + [UI_MENU_HDR_PEAK] = "Luminosité maximale", + [UI_MENU_HDR_PEAK_DESC] = "Le pic de votre écran en nits ; les hautes lumières les plus vives s'arrêtent là.", + [UI_MENU_HDR_GAME] = "Luminosité du jeu", + [UI_MENU_HDR_GAME_DESC] = "Nits du blanc de l'image (blanc papier). 203 est la référence HDR ; augmentez-la dans " + "une pièce lumineuse.", + [UI_MENU_HDR_UI] = "Luminosité du HUD et du menu", + [UI_MENU_HDR_UI_DESC] = "Nits du blanc du HUD et de ce menu.", + [UI_MENU_HDR_HUE] = "Teinte des hautes lumières", + [UI_MENU_HDR_HUE_DESC] = "Les couleurs vives comme le feu et les étincelles tirent vers le blanc comme dans " + "l'image SDR du jeu, en accord avec la lumière qu'elles projettent ; 0 les garde " + "entièrement saturées.", + [UI_MENU_SHADOW_SCALE] = "Résolution des ombres", + [UI_MENU_SHADOW_SCALE_DESC] = "Dessine les cartes d'ombres du soleil ce nombre de fois plus grandes de chaque " + "côté que les 960x960 du jeu : bords d'ombres et ombres des feuilles plus nets. " + "Prend effet au prochain démarrage.", + [UI_MENU_PCSS] = "Ombres douces", + [UI_MENU_PCSS_DESC] = "Ombres du soleil nettes là où un objet touche le sol et plus douces à mesure que l'ombre " + "s'éloigne (PCSS). 0 garde le filtre du jeu. Prend effet au prochain démarrage.", + [UI_MENU_CONTACT_SHADOWS] = "Ombres de contact", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Petites ombres du soleil que les cartes d'ombres manquent : aux pieds, sous les " + "pierres, dans l'herbe et les plis. Calculées à l'écran après l'éclairage. Prend " + "effet au prochain démarrage.", + [UI_MENU_SHADOW_RANGE] = "Portée des cascades d'ombres", + [UI_MENU_SHADOW_RANGE_DESC] = "Éloigne les paliers où les ombres deviennent plus douces (20, 40, 80 et 160 m dans " + "le jeu). Étale la carte d'ombres sur plus de terrain : augmentez aussi la " + "résolution des ombres. Prend effet au prochain démarrage.", + [UI_MENU_GRASS_RANGE] = "Portée de l'herbe", + [UI_MENU_GRASS_RANGE_DESC] = "Jusqu'où l'herbe pousse autour de la caméra (dans le jeu : 62,5 m). Plus haut garde " + "l'herbe des prairies plus loin au lieu de la faire pousser juste devant vous ; plus " + "bas en dessine moins. Prend effet au prochain démarrage.", + [UI_MENU_DLSS_PRESET] = "Modèle DLSS", + [UI_MENU_DLSS_PRESET_DESC] = "Le modèle DLSS utilisé. Automatique suit les conseils de NVIDIA pour chaque mode : " + "K pour DLAA, Qualité et Équilibré, M pour Performance, L pour Ultra Performance. J " + ": un peu moins de traînées derrière les personnages en mouvement, un peu plus de " + "scintillement. K : le modèle le plus net dans tous les modes. S'applique " + "immédiatement.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatique", + [UI_MENU_DLSS_PRESET_K] = "K (le plus net)", + [UI_MENU_DLSS_PRESET_J] = "J (moins de traînées)", + [UI_MENU_DLSS_CHARS] = "Traînées DLSS des personnages", + [UI_MENU_DLSS_CHARS_DESC] = "Réduit les légères traînées derrière les personnages et les animaux en mouvement et " + "ce qu'ils tiennent : DLSS y reprend moins des images précédentes. Un niveau plus " + "fort retire davantage de traînées et laisse ces bords un peu moins lisses. " + "S'applique immédiatement.", + [UI_MENU_DLSS_CHARS_OFF] = "Désactivé", + [UI_MENU_DLSS_CHARS_LIGHT] = "Léger", + [UI_MENU_DLSS_CHARS_MEDIUM] = "Moyen", + [UI_MENU_DLSS_CHARS_FULL] = "Complet", + [UI_MENU_DLSS] = "Mode de l'upscaler", + [UI_MENU_DLSS_DESC] = "Natif lisse les bords de la scène 3D en pleine résolution. Qualité, Équilibré, Performance " + "et Ultra Performance la dessinent à 67, 58, 50 et 33 % avant de laisser l'upscaler (DLSS " + "ou FSR 3.1) l'agrandir, ce qui économise du temps GPU ; ils remplacent l'échelle du rendu " + "3D. S'applique immédiatement.", + [UI_MENU_DLSS_DLAA] = "Natif", + [UI_MENU_DLSS_QUALITY] = "Qualité", + [UI_MENU_DLSS_BALANCED] = "Équilibré", + [UI_MENU_DLSS_PERFORMANCE] = "Performance", + [UI_MENU_DLSS_ULTRA] = "Ultra Performance", + [UI_MENU_FXAA] = "Anticrénelage du jeu (FXAA)", + [UI_MENU_FXAA_DESC] = "Le lissage des bords FXAA du jeu. Il floute un peu les détails fins ; avec DLAA, il n'est " + "pas nécessaire.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Faible latence", + [UI_MENU_REFLEX_DESC] = "Réduit la latence du système sur les GPU NVIDIA avec VK_NV_low_latency2. Activé + Boost " + "garde les fréquences du GPU élevées dans les scènes limitées par le CPU.", + [UI_MENU_REFLEX_OFF] = "Désactivé", + [UI_MENU_REFLEX_ON] = "Activé", + [UI_MENU_REFLEX_BOOST] = "Activé + Boost", + [UI_MENU_SCENE_UPSCALER] = "Upscaler de la scène 3D", + [UI_MENU_SCENE_UPSCALER_DESC] = "Un upscaler temporel pour la scène 3D : des bords plus lisses et moins de " + "scintillement, et dans un mode en dessous de Natif, il dessine la scène plus " + "petite puis l'agrandit, ce qui économise du temps GPU. NVIDIA DLSS demande un " + "GPU NVIDIA RTX et " DLSS_FILE " à côté de " EXE_FILE " ; AMD FSR 3.1 fonctionne " + "sur tout GPU. Désactivé garde la mise à l'échelle du jeu et son FXAA. Le HUD " + "n'est pas touché ; la mise à l'échelle vers la fenêtre et la netteté ci-dessus " + "adaptent toujours l'image du jeu à la fenêtre. S'applique après un redémarrage.", + [UI_MENU_SCENE_UPSCALER_OFF] = "Désactivé", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS : demande un GPU NVIDIA RTX", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS : " DLSS_FILE " manquant", + [UI_MENU_FSR3_SHARPNESS] = "Netteté FSR 3.1", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Accentuation de la scène 3D après FSR 3.1 ; 0 la désactive.", + [UI_MENU_FPS_LIMIT] = "Limite d'images par seconde", + [UI_MENU_FPS_LIMIT_DESC] = "Le nombre maximal d'images par seconde que dessine le jeu. Au-delà de 60, c'est " + "expérimental et demande « Vitesse du jeu selon l'horloge ».", + [UI_MENU_FPS_30] = "30 IPS", + [UI_MENU_FPS_40] = "40 IPS", + [UI_MENU_FPS_45] = "45 IPS", + [UI_MENU_FPS_60] = "60 IPS", + [UI_MENU_FPS_90] = "90 IPS", + [UI_MENU_FPS_120] = "120 IPS", + [UI_MENU_FPS_144] = "144 IPS", + [UI_MENU_FPS_DISPLAY] = "Fréquence de l'écran", + [UI_MENU_FPS_DISPLAY_HZ] = "Fréquence de l'écran (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "File d'images", + [UI_MENU_FRAME_QUEUE_DESC] = "Le jeu commence une image pendant que la précédente attend son tour à l'écran : " + "bien moins d'images perdues à la limite, jusqu'à une image de latence en plus. " + "S'applique immédiatement.", + [UI_MENU_FRAME_GEN] = "Génération d'images", + [UI_MENU_FRAME_GEN_OFF] = "Désactivé", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Une image générée entre chaque paire d'images que dessine le jeu : deux fois plus " + "d'images à l'écran, le jeu à la moitié de la limite d'images et les commandes environ " + "une demi-image plus tard. Pour les écrans de 120 Hz et plus. Pas avec DLSS ni HDR. " + "S'applique immédiatement.", + [UI_MENU_REALTIME] = "Vitesse du jeu selon l'horloge", + [UI_MENU_REALTIME_DESC] = "Fait avancer le jeu en temps réel, pour qu'une image lente ne ralentisse pas le jeu.", + [UI_MENU_CLOTH_REALTIME] = "Tissus selon l'horloge", + [UI_MENU_CLOTH_REALTIME_DESC] = "Fait aussi avancer les tissus et les cheveux en temps réel.", + [UI_MENU_HIGHFPS_FIX] = "Corrections pour hautes fréquences", + [UI_MENU_HIGHFPS_FIX_DESC] = "Corrige la physique qui se dérègle au-delà de 30 images par seconde, et les objets " + "qui restent transparents ou invisibles au-delà de 60.", + [UI_MENU_CLIMB_FIX] = "Correctif d'escalade", + [UI_MENU_CLIMB_FIX_DESC] = "Garde l'escalade des parois et des échelles à pleine vitesse au-delà de 60 images par " + "seconde, pour que Link atteigne le sommet.", + [UI_MENU_GAME_LANG] = "Langue du jeu", + [UI_MENU_GAME_LANG_DESC] = "Langue des textes et des voix du jeu.", + [UI_MENU_GAME_LANG_AUTO] = "Automatique", + [UI_MENU_OPERATION_MODE] = "Mode de la console", + [UI_MENU_OPERATION_MODE_DESC] = "Si le jeu se croit en mode TV ou en mode portable.", + [UI_MENU_MODE_DOCKED] = "Mode TV", + [UI_MENU_MODE_HANDHELD] = "Mode portable", + [UI_MENU_ASSUME_FOCUS] = "Continuer en arrière-plan", + [UI_MENU_ASSUME_FOCUS_DESC] = "Activé (par défaut), le jeu continue pendant que vous êtes dans une autre fenêtre, " + "et le clavier reste muet jusqu'au retour de la fenêtre au premier plan. Désactivé, " + "il se met en pause quand sa fenêtre perd le focus, comme sur la Switch quand on " + "appuie sur Home ; un chargement interrompu ainsi peut se bloquer définitivement.", + [UI_MENU_PLAY_TIME] = "Temps de jeu", + [UI_MENU_PLAY_TIME_DESC] = "Le temps passé dans le jeu sur toutes les sessions, compté tant que la fenêtre du jeu " + "a le focus et que le jeu dessine des images. Conservé dans playtime.txt dans le " + "dossier du profil, à côté des sauvegardes.", + [UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", + [UI_MENU_PLAY_TIME_SESSION] = "cette session : %s", + [UI_MENU_MODS_BUILTIN] = "Intégrés au portage", + [UI_MENU_MODS_INSTALLED] = "Mods installés", + [UI_MENU_MODS_NONE] = "Aucun mod pour l'instant. Décompressez un mod dans le dossier mods, un dossier par mod " + "avec son dossier romfs à l'intérieur, puis redémarrez le jeu. TKMM peut aussi y exporter " + "ses mods fusionnés dans un dossier.", + [UI_MENU_MODS_OPEN] = "Ouvrir le dossier des mods", + [UI_MENU_MODS_OPEN_DESC] = "Affiche le dossier où le jeu charge les mods. Il est créé s'il manque.", + [UI_MENU_MODS_ROW_DESC] = "Fichiers du jeu remplacés : %u. Nouveaux fichiers ajoutés : %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u de ses fichiers viennent de %s, placé plus haut dans la liste.", + [UI_MENU_MODS_MOVE_HINT] = "Le bouton du haut ou Ctrl+Haut le monte, le bouton de gauche ou Ctrl+Bas le descend. " + "Quand deux mods modifient le même fichier, celui du dessus l'emporte. Les changements " + "s'appliquent après un redémarrage.", + [UI_MENU_MODS_EMPTY] = "Ce dossier ne contient aucun fichier romfs, exefs ou cheats.", + [UI_MENU_MODS_SUBSDK] = "Ce mod apporte son propre code de jeu (un plugin subsdk ou un main remplacé). Le portage " + "ne peut pas charger de modules de code, donc tout le mod reste désactivé.", + [UI_MENU_MODS_EXEFS_LATER] = "Ce mod modifie le code du jeu (exefs). Le jeu intègre les correctifs à son prochain " + "démarrage (une reconstruction de quelques minutes) ; d'ici là, tout le mod reste " + "désactivé.", + [UI_MENU_MODS_CHEATS] = "Codes de triche : %d. Activez-les dans l'onglet Triches.", + [UI_MENU_MODS_CHEATS_FILE] = "Les codes de triche de cette version du jeu sont lus au démarrage depuis cheats\\%s " + "dans ce mod.", + [UI_MENU_MODS_BAD_NAME] = "Le nom du dossier contient |, que la liste des mods utilise entre les noms. Renommez " + "le dossier.", + [UI_MENU_MODS_OTHER_VERSION] = "%u de ses fichiers sont faits pour une autre version du jeu et sont ignorés. " + "Cherchez une version de ce mod faite pour votre version du jeu.", + [UI_MENU_MODS_UNUSED] = "non utilisé", + [UI_MENU_MODS_FPS60] = "Correctif 60 IPS", + [UI_MENU_MODS_FPS60_DESC] = "Le correctif du portage pour 60 images par seconde. Réglez-le avec la limite " + "d'images par seconde dans l'onglet Jeu.", + [UI_MENU_MODS_RES] = "Correctif de résolution", + [UI_MENU_MODS_RES_DESC] = "Le correctif du portage pour les résolutions au-delà de 1080p. Réglez-le avec la " + "résolution du jeu dans l'onglet Écran.", + [UI_MENU_MODS_QUICKMENU] = "Correction du menu rapide", + [UI_MENU_MODS_QUICKMENU_DESC] = "La correction du portage pour le fond noir des menus d'armes, de boucliers et de " + "matériaux à 60 IPS.", + [UI_MENU_VOLUME] = "Volume", + [UI_MENU_VOLUME_DESC] = "Volume général du jeu.", + [UI_MENU_VOLUME_MUSIC] = "Volume de la musique", + [UI_MENU_VOLUME_MUSIC_DESC] = "Volume de la musique de fond.", + [UI_MENU_VOLUME_SFX] = "Volume des effets", + [UI_MENU_VOLUME_SFX_DESC] = "Volume des effets sonores.", + [UI_MENU_VOLUME_VOICE] = "Volume des voix", + [UI_MENU_VOLUME_VOICE_DESC] = "Volume des voix des personnages.", + [UI_MENU_AUDIO_CHANNELS] = "Haut-parleurs", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Sortie stéréo ou surround 5.1. Automatique choisit 5.1 quand la configuration " + "des haut-parleurs de Windows a six canaux ou plus. S'applique après un " + "redémarrage.", + [UI_MENU_CHANNELS_AUTO] = "Automatique", + [UI_MENU_CHANNELS_STEREO] = "Stéréo", + [UI_MENU_CHANNELS_51] = "Surround 5.1", + [UI_MENU_AUDIO_DEVICE] = "Périphérique de sortie", + [UI_MENU_AUDIO_DEVICE_DESC] = "Où le son est joué. Par défaut du système suit le périphérique par défaut de " + "Windows. Un périphérique choisi qui est débranché cède la place à celui par défaut " + "du système jusqu'à son retour. S'applique immédiatement.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Par défaut du système", + [UI_MENU_MOTION] = "Commandes par mouvement", + [UI_MENU_MOTION_DESC] = "Visée avec le gyroscope de la manette.", + [UI_MENU_GYRO_CALIBRATION] = "Calibrage du gyroscope", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Soustrait la dérive au repos de la manette, mesurée avec la ligne de calibrage " + "ci-dessous. Les valeurs mesurées restent enregistrées quand ce réglage est " + "désactivé.", + [UI_MENU_GYRO_CALIBRATE] = "Calibrer le gyroscope", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Mesure la dérive au repos du gyroscope et la retire. Posez la manette ou " + "tenez-la immobile pendant deux secondes.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Calibrage...", + [UI_MENU_GYRO_CALIBRATED] = "%s, calibré", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Échec du calibrage", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "La manette a bougé : tenez-la immobile et réessayez", + [UI_MENU_GYRO_AUTO_BIAS] = "Apprentissage de la dérive au repos", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Apprend la dérive restante du gyroscope chaque fois que la manette repose " + "immobile sur une table, et la soustrait. Pour une visée à l'arc qui glisse " + "lentement même après le calibrage. Une manette tenue en main n'est pas prise en " + "compte. Expérimental.", + [UI_MENU_RUMBLE_STRENGTH] = "Intensité des vibrations", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "La force des vibrations de la manette.", + [UI_MENU_RUMBLE_CURVE] = "Courbe des vibrations", + [UI_MENU_RUMBLE_CURVE_DESC] = "Des valeurs plus basses renforcent les vibrations faibles.", + [UI_MENU_RUMBLE_TRIGGERS] = "Vibration des gâchettes (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Fait aussi vibrer les gâchettes d'une manette Xbox.", + [UI_MENU_PAD_LAYOUT] = "Disposition des boutons", + [UI_MENU_PAD_LAYOUT_DESC] = "Quel bouton est A. Nintendo : celui de droite, comme sur une Switch. Xbox : celui du " + "bas, comme indiqué sur une manette Xbox (croix sur une manette PlayStation). " + "Automatique choisit Nintendo pour les manettes aux inscriptions Nintendo et Xbox " + "pour les autres. La manette affichée dans les indications du jeu se règle dans " + "Icônes des boutons.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Automatique", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A à droite)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A en bas)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "utilisé : %s", + [UI_MENU_PROMPTS] = "Icônes des boutons", + [UI_MENU_PROMPTS_DESC] = "La manette dont les indications du jeu montrent les boutons. Nintendo : celles du jeu. " + "Xbox : LB, RB, LT, RT, Menu, Affichage et une croix directionnelle, et A, B, X et Y " + "tels qu'inscrits sur le bouton qu'actionne la disposition ci-dessus (avec Nintendo (A à " + "droite), le bouton de droite porte l'inscription B, donc les indications pour A " + "montrent B). PlayStation : les symboles d'une manette PlayStation (○ × △ □, L1, R1, L2, " + "R2, Options et Share), sur le bouton qu'actionne la disposition ci-dessus. PC : les " + "touches et boutons de souris de la disposition du clavier par défaut (E, Maj, Espace, " + "clic gauche...) et la souris pour la caméra. Le jeu lit ses indications au démarrage, " + "elles changent donc après un redémarrage. Elles font partie des fichiers du jeu, donc " + "un bouton réattribué dans Commandes garde son ancienne indication à l'écran.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "fichiers d'icônes manquants : relancez l'installation", + [UI_MENU_PROMPTS_FAILED] = "fichiers d'icônes endommagés : relancez l'installation", + [UI_MENU_PROMPTS_RESTART] = "les icônes changent après redémarrage", + [UI_MENU_PROMPTS_OFF_SHAPE] = "désactivé si la résolution du jeu n'est pas en 16:9", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "aucune disposition pour cette forme : relancez l'installation", + [UI_MENU_OUTPUT_RES_PREPARING] = "disposition en cours de création en arrière-plan ; utilisée au prochain " + "démarrage", + [UI_MENU_PROMPTS_PREPARING] = "fichiers d'icônes en cours de création en arrière-plan ; utilisés au prochain " + "démarrage", + [UI_MENU_PREPARE_RETRY] = "Réessayer", + [UI_MENU_PREPARE_RETRY_DESC] = "Relance les outils de l'installation pour créer en arrière-plan la disposition " + "d'interface ou les fichiers d'icônes des boutons manquants. Le jeu continue de " + "tourner ; il les utilise dès son prochain démarrage.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "les outils de l'installation n'ont pas démarré : relancez l'installation", + [UI_MENU_PROMPTS_OFF_MODS] = "désactivé : un mod RomFS remplace leurs fichiers", + [UI_MENU_PROMPTS_OFF_PATCHES] = "désactivé tant que TOTK_ROMFS_PATCHES est défini", + [UI_MENU_RESTART] = "Redémarrer maintenant", + [UI_MENU_RESTART_DESC] = "Ferme le jeu et le relance avec les nouvelles icônes. La progression depuis votre " + "dernière sauvegarde est perdue.", + [UI_MENU_RESTART_CONFIRM] = "Redémarrer le jeu maintenant ? La progression depuis votre dernière sauvegarde est " + "perdue.", + [UI_MENU_RESTART_YES] = "Redémarrer", + [UI_MENU_RESTART_SAVING] = "Le jeu sauvegarde : le redémarrage sera possible dans un instant.", + [UI_MENU_GROUP_STICKS] = "Sticks analogiques", + [UI_MENU_LSTICK_DEADZONE] = "Zone morte du stick gauche", + [UI_MENU_RSTICK_DEADZONE] = "Zone morte du stick droit", + [UI_MENU_STICK_DEADZONE_DESC] = "Jusqu'où un stick doit bouger avant que le jeu le remarque. Augmentez-la si le " + "personnage ou la caméra bouge tout seul : lâchez le stick, lisez « stick actuel " + "» et réglez la zone morte quelques pour cent au-dessus.", + [UI_MENU_STICK_DEADZONE_NOW] = "stick actuel : %.0f %%", + [UI_MENU_MOUSE_MODE] = "Caméra à la souris", + [UI_MENU_MOUSE_MODE_DESC] = "Direct : la caméra tourne selon le déplacement de la souris, comme dans un jeu PC, " + "sans zone morte ni courbe de stick (jeux 1.4.3 et 1.2.1 ; 1.1.0 utilise l'émulation " + "du stick). Émulation du stick : la souris agit comme le stick droit.", + [UI_MENU_MOUSE_STICK] = "Émulation du stick", + [UI_MENU_MOUSE_DIRECT] = "Direct", + [UI_MENU_MENU_CURSOR] = "Souris dans les menus du jeu", + [UI_MENU_MENU_CURSOR_DESC] = "Dans les menus du jeu lui-même (écran titre, inventaire, boutiques, choix de " + "dialogue), le pointeur s'affiche : l'élément en dessous est sélectionné, le clic " + "gauche confirme, le clic droit revient en arrière. Seulement si la souris ou une " + "touche a servi en dernier, si bien qu'une manette voit les menus inchangés (jeu " + "1.4.3).", + [UI_MENU_MAP_CLICK] = "Clic gauche sur la carte", + [UI_MENU_MAP_CLICK_DESC] = "Sur la carte de la tablette de Purah, le bouton gauche de la souris appuie sur A au " + "curseur de la carte au lieu du bouton qui lui est attribué (Y par défaut). Demande " + "Souris dans les menus du jeu (jeu 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Clics dans les dialogues", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Quand une boîte de dialogue est ouverte, le clic gauche appuie sur B (il fait " + "avancer le texte et saute son défilement) et le clic droit sur A, au lieu des " + "boutons qui leur sont attribués (Y par défaut, qui ouvre l'historique des " + "dialogues, et ZL). Les choix de dialogue gardent le pointeur : le clic gauche " + "choisit (jeu 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "Pointeur du jeu", + [UI_MENU_POINTER_IMAGE_DESC] = "Quand le curseur n'est pas capturé (menus du jeu, ce menu, après Échap), la " + "fenêtre affiche sa propre pointe de flèche dorée au lieu de la flèche du système, " + "à la taille de l'échelle de l'écran.", + [UI_MENU_QUICKSAVE] = "Sauvegarde/chargement rapide", + [UI_MENU_QUICKSAVE_DESC] = "Une touche sauvegarde la partie immédiatement et une autre charge cette sauvegarde " + "(les deux lignes ci-dessous : F6 et F7 par défaut, comme dans Half-Life), sans aucun " + "menu à l'écran. Touches du clavier et de la souris uniquement, jeu 1.4.3 uniquement. " + "La sauvegarde rapide demande au jeu l'une de ses propres sauvegardes automatiques, " + "elle remplace donc la plus ancienne sauvegarde automatique (la sauvegarde manuelle " + "reste), en garde une copie comme sauvegarde rapide (le dossier quicksave du profil) " + "et affiche \"Partie sauvegardée\" en haut de l'image. Le chargement rapide fige " + "l'image sur \"Chargement de la sauvegarde rapide\" pendant qu'il parcourt hors de vue " + "la liste de chargement du jeu, et le jeu charge la sauvegarde rapide (environ 5 s). " + "Là où le jeu ne ferait pas lui-même de sauvegarde automatique (une cinématique, un " + "dialogue), rien n'est sauvegardé et la ligne l'indique.", + [UI_MENU_QUICKSAVE_KEY] = "Sauvegarde rapide", + [UI_MENU_QUICKLOAD_KEY] = "Chargement rapide", + [UI_MENU_QUICKSAVE_KEY_DESC] = "La touche qui lance la sauvegarde rapide ou le chargement rapide ; F6 et F7 par " + "défaut, comme dans Half-Life. Sélectionnez la case et appuyez sur une touche ou " + "un bouton de souris ; Suppr laisse celle-ci sans touche. Tant que la sauvegarde " + "rapide est activée, les deux touches ne font rien d'autre (une note s'affiche " + "quand une attribution utilise aussi la touche). totk.ini accepte tout nom de " + "touche des attributions (quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Partie sauvegardée", + [UI_QS_LOADING] = "Chargement de la sauvegarde rapide", + [UI_QS_NOT_NOW] = "Sauvegarde rapide impossible pour le moment", + [UI_QS_NONE] = "Aucune sauvegarde rapide pour l'instant (la touche de sauvegarde rapide en crée une)", + [UI_QS_FAILED] = "Échec de la sauvegarde rapide : voir totk.log", + [UI_QS_LOAD_FAILED] = "Échec du chargement rapide : voir totk.log", + [UI_MENU_MOUSE_SENS] = "Sensibilité de la caméra à la souris", + [UI_MENU_MOUSE_SENS_DESC] = "La vitesse à laquelle la souris tourne la caméra.", + [UI_MENU_WALK_KEY] = "Touche de marche", + [UI_MENU_WALK_KEY_DESC] = "Maintenez-la pour n'incliner qu'en partie les sticks du clavier, afin que le clavier " + "marche au lieu de courir. Le facteur de marche fixe de combien. La manette et la " + "souris ne sont pas concernées.", + [UI_MENU_WALK_KEY_TAKEN] = "aussi %s", + [UI_MENU_WALK_SCALE] = "Facteur de marche", + [UI_MENU_WALK_SCALE_DESC] = "L'inclinaison des sticks du clavier pendant que la touche de marche est maintenue. " + "La moitié est une marche, l'inclinaison complète une course.", + [UI_MENU_FREECAM] = "Caméra libre", + [UI_MENU_FREECAM_DESC] = "Permet à une combinaison ou à une touche ci-dessous de détacher la vue de Link et de la " + "faire voler. Désactivée par défaut : ainsi, le code de caméra du jeu s'exécute tel " + "quel. S'applique après un redémarrage. Version 1.4.3 du jeu.", + [UI_MENU_FREECAM_OFF_NOTE] = "Activez Caméra libre ci-dessus, puis redémarrez", + [UI_MENU_FREECAM_PAD] = "Combinaison caméra libre", + [UI_MENU_FREECAM_PAD_DESC] = "Boutons de manette pressés ensemble qui font passer la vue par trois étapes : elle " + "quitte Link et vole, elle reste là où elle a été laissée pendant que Link continue " + "de jouer, puis elle revient. Pendant le vol, le jeu ne reçoit aucune entrée : le " + "stick gauche fait voler le long de la vue et sur les côtés, les gâchettes vers le " + "haut et le bas, le stick droit tourne, et chaque appui sur L ou R divise par deux " + "ou double la vitesse. Vue fixée, Link marche là où pointe le stick gauche à " + "l'écran. Version 1.4.3 du jeu.", + [UI_MENU_FREECAM_PAD_V143] = "Version 1.4.3 du jeu uniquement", + [UI_MENU_FREECAM_KEY] = "Touche de caméra libre", + [UI_MENU_FREECAM_KEY_DESC] = "Une touche qui fait passer la vue par les mêmes étapes : elle quitte Link et vole, " + "elle reste pendant que Link continue de jouer, puis elle revient. Pendant le vol : " + "W A S D font voler le long de la vue et sur les côtés, les touches attribuées à ZR " + "et ZL (X et Z par défaut) vers le haut et le bas, la souris et les flèches " + "tournent, et les touches attribuées à L et R (Q et R) divisent par deux ou doublent " + "la vitesse. Version 1.4.3 du jeu.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Ajustements de jeu", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Ajustements de jeu", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Commandes à la molette de la souris pour la rotation et la distance de " + "l'Emprise, le changement d'objets et d'armes, et un zoom fluide sur la " + "carte.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Rotation de l'Emprise à la molette", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Tourne directement les objets tenus par l'Emprise avec la molette de " + "la souris.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Axe de rotation C de l'Emprise", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "Maintenez C en faisant défiler pour tourner les objets tenus autour " + "de l'autre axe.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Sensibilité de rotation de l'Emprise", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Vitesse à laquelle la molette de la souris tourne les objets " + "tenus.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Distance de l'Emprise à la molette", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Clic droit + molette de la souris pousse ou tire les objets tenus.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Sensibilité de distance de l'Emprise", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Vitesse à laquelle la molette de la souris change la distance des " + "objets.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Choix d'arme à la molette", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Faites défiler la molette de la souris en exploration libre pour changer " + "d'arme. Confirmez avec E.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Sensibilité de la molette des armes", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Crans de molette nécessaires pour passer à l'arme suivante.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Molette dans le menu rapide", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Faites défiler la molette de la souris pour parcourir les objets quand un " + "menu de sélection rapide est ouvert.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Sensibilité de la molette du menu rapide", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Crans de molette nécessaires pour avancer d'un objet dans les menus " + "de sélection rapide.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "Menu rapide : navigation A / D", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "Appuyez sur A / D pour aller à gauche et à droite dans les menus de sélection " + "rapide.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Zoom fluide de la carte", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Zoom fluide avec inertie sur la carte de la tablette de Purah, à la molette " + "de la souris.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Sensibilité du zoom de la carte", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Vitesse à laquelle la molette de la souris zoome sur la carte.", + [UI_MENU_STICK_SENS] = "Vitesse de la caméra au stick", + [UI_MENU_STICK_SENS_DESC] = "Multiplie la vitesse de caméra du stick droit du jeu, vitesse maximale comprise, " + "pour chacune des cinq sensibilités de caméra du jeu. La souris garde son propre " + "réglage.", + [UI_BINDS_HELP] = "Sélectionnez une case et appuyez sur A ou Entrée, puis sur la touche, le bouton de souris ou " + "le bouton de manette. Suppr ou X vide une case. Une touche déjà utilisée est déplacée ici ; un " + "bouton de manette s'échange avec celui qu'il remplace.", + [UI_BINDS_COL_KEY1] = "Touche 1", + [UI_BINDS_COL_KEY2] = "Touche 2", + [UI_BINDS_COL_PAD] = "Manette", + [UI_BINDS_GROUP_BUTTONS] = "Boutons", + [UI_BINDS_GROUP_MOVE] = "Déplacement", + [UI_BINDS_GROUP_CAMERA] = "Caméra", + [UI_BINDS_PRESS_KEY] = "Appuyez sur une touche ou un bouton de souris pour %s", + [UI_BINDS_PRESS_PAD] = "Appuyez sur un bouton de manette pour %s", + [UI_BINDS_CANCEL_HINT] = "Échap annule, ou attendez %d s", + [UI_BINDS_TAKEN] = "%s a été retiré de %s", + [UI_BINDS_SWAPPED] = "%s échangé avec %s", + [UI_BINDS_RESET] = "Réinitialiser tous les boutons", + [UI_BINDS_RESET_DESC] = "Retour aux touches et boutons de manette par défaut. La disposition des boutons " + "ci-dessus s'applique de nouveau : les boutons de manette réattribués restent à leur " + "place jusqu'à cette réinitialisation.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Clic du stick gauche", + [UI_BIND_RCLICK] = "Clic du stick droit", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "Plus", + [UI_BIND_MINUS] = "Moins", + [UI_BIND_LEFT] = "Croix gauche", + [UI_BIND_UP] = "Croix haut", + [UI_BIND_RIGHT] = "Croix droite", + [UI_BIND_DOWN] = "Croix bas", + [UI_BIND_LSTICK_LEFT] = "Aller à gauche", + [UI_BIND_LSTICK_UP] = "Avancer", + [UI_BIND_LSTICK_RIGHT] = "Aller à droite", + [UI_BIND_LSTICK_DOWN] = "Reculer", + [UI_BIND_RSTICK_LEFT] = "Caméra à gauche", + [UI_BIND_RSTICK_UP] = "Caméra en haut", + [UI_BIND_RSTICK_RIGHT] = "Caméra à droite", + [UI_BIND_RSTICK_DOWN] = "Caméra en bas", + [UI_BIND_DESC_A] = "Interagir, ramasser, parler.", + [UI_BIND_DESC_B] = "Courir, annuler, revenir.", + [UI_BIND_DESC_X] = "Sauter.", + [UI_BIND_DESC_Y] = "Attaquer.", + [UI_BIND_DESC_LCLICK] = "S'accroupir.", + [UI_BIND_DESC_RCLICK] = "Vue à la première personne.", + [UI_BIND_DESC_L] = "Pouvoirs.", + [UI_BIND_DESC_R] = "Lancer une arme.", + [UI_BIND_DESC_ZL] = "Bouclier, cibler.", + [UI_BIND_DESC_ZR] = "Arc.", + [UI_BIND_DESC_PLUS] = "Menu, inventaire.", + [UI_BIND_DESC_MINUS] = "Carte.", + [UI_BIND_DESC_DPAD] = "Sélection rapide.", + [UI_BIND_DESC_MOVE] = "Déplace Link comme le stick gauche. Le stick gauche de la manette fonctionne toujours " + "aussi.", + [UI_BIND_DESC_CAMERA] = "Tourne la caméra comme le stick droit. La souris et le stick droit de la manette " + "fonctionnent toujours aussi.", + [UI_BIND_SHAKE] = "Secouer le stick de caméra", + [UI_BIND_DESC_SHAKE] = "Agite le stick droit à gauche et à droite pour le jeu : détache une pièce assemblée de ce " + "que tient l'Emprise. Maintenir la touche continue de secouer.", + [UI_KEY_SPACE] = "Espace", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "Maj gauche", + [UI_KEY_LCTRL] = "Ctrl gauche", + [UI_KEY_UP] = "Flèche haut", + [UI_KEY_DOWN] = "Flèche bas", + [UI_KEY_LEFT] = "Flèche gauche", + [UI_KEY_RIGHT] = "Flèche droite", + [UI_KEY_MOUSE_L] = "Clic gauche", + [UI_KEY_MOUSE_R] = "Clic droit", + [UI_KEY_MOUSE_M] = "Clic milieu", + [UI_KEY_MOUSE_X1] = "Souris 4", + [UI_KEY_MOUSE_X2] = "Souris 5", + [UI_KEY_ENTER] = "Entrée", + [UI_KEY_BACKSPACE] = "Retour arrière", + [UI_KEY_RSHIFT] = "Maj droite", + [UI_KEY_RCTRL] = "Ctrl droite", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Verr. Maj", + [UI_KEY_INSERT] = "Inser", + [UI_KEY_DELETE] = "Suppr", + [UI_KEY_HOME] = "Début", + [UI_KEY_END] = "Fin", + [UI_KEY_PAGEUP] = "Page préc.", + [UI_KEY_PAGEDOWN] = "Page suiv.", + [UI_KEY_NUM_FMT] = "Pavé num. %s", + [UI_PAD_SOUTH] = "Bouton du bas", + [UI_PAD_EAST] = "Bouton de droite", + [UI_PAD_WEST] = "Bouton de gauche", + [UI_PAD_NORTH] = "Bouton du haut", + [UI_PAD_LSTICK] = "Stick gauche", + [UI_PAD_RSTICK] = "Stick droit", + [UI_PAD_L] = "Bouton de tranche gauche", + [UI_PAD_R] = "Bouton de tranche droit", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Retour", + [UI_PAD_DPAD_LEFT] = "Croix gauche", + [UI_PAD_DPAD_UP] = "Croix haut", + [UI_PAD_DPAD_RIGHT] = "Croix droite", + [UI_PAD_DPAD_DOWN] = "Croix bas", + [UI_PAD_ZL] = "Gâchette gauche", + [UI_PAD_ZR] = "Gâchette droite", + [UI_PAD_LPADDLE1] = "Palette arrière gauche", + [UI_PAD_RPADDLE1] = "Palette arrière droite", + [UI_PAD_LPADDLE2] = "Palette arrière gauche 2", + [UI_PAD_RPADDLE2] = "Palette arrière droite 2", + [UI_PAD_TOUCHPAD] = "Clic du pavé tactile", + [UI_PAD_CROSS] = "Croix", + [UI_PAD_CIRCLE] = "Rond", + [UI_PAD_SQUARE] = "Carré", + [UI_PAD_TRIANGLE] = "Triangle", + [UI_MENU_AMIIBO_DIR] = "Dossier des amiibo", + [UI_MENU_AMIIBO_OPEN] = "Ouvrir", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Dossier par défaut", + [UI_MENU_AMIIBO_REFRESH] = "Actualiser", + [UI_MENU_AMIIBO_PICK] = "Dumps d'amiibo (fichiers .bin ou .nfc de 540 octets) :", + [UI_MENU_AMIIBO_NO_DIR] = "Impossible d'ouvrir le dossier %s", + [UI_MENU_AMIIBO_READER] = "Lecteur NFC", + [UI_MENU_AMIIBO_STATE] = "Lecteur :", + [UI_MENU_AMIIBO_STATE_IDLE] = "prêt", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "le jeu attend un amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo sur le lecteur", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "le jeu lit l'amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "désactivé", + [UI_MENU_AMIIBO_FILE] = "Fichier choisi :", + [UI_MENU_AMIIBO_NO_FILE] = "(aucun fichier choisi)", + [UI_MENU_AMIIBO_TAP] = "Poser l'amiibo", + [UI_MENU_AMIIBO_REMOVE] = "Retirer l'amiibo", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Retirer l'amiibo tout seul après l'avoir posé", + [UI_MENU_AMIIBO_HOLD] = "Temps sur le lecteur", + [UI_MENU_AMIIBO_SECONDS] = "%.1f s", + [UI_MENU_AMIIBO_TAG] = "Amiibo sur le lecteur :", + [UI_MENU_AMIIBO_NO_TAG] = "Aucun amiibo sur le lecteur.", + [UI_MENU_AMIIBO_TAG_FILE] = "Fichier : %s", + [UI_MENU_AMIIBO_TAG_ID] = "Personnage %s, série %02x, numéro %04x, type %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID : %s", + [UI_MENU_AMIIBO_READY] = "Prêt", + [UI_MENU_AMIIBO_TAPPED] = "Posé : %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "Pas un dump d'amiibo (NTAG215 de 540 octets) : %s", + [UI_MENU_AMIIBO_REMOVED] = "Amiibo retiré", + [UI_MENU_AMIIBO_STATUS] = "État : %s", + [UI_MENU_MENU_LANG] = "Langue du menu", + [UI_MENU_MENU_LANG_DESC] = "Langue de ce menu et de l'affichage des performances.", + [UI_MENU_MENU_LANG_AUTO] = "Automatique (selon Windows)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "Affiche \"Joue à TotK Recomp\" avec le temps de jeu dans votre statut Discord " + "pendant que le jeu tourne. discord_app_id et discord_image dans totk.ini " + "choisissent l'application.", + [UI_MENU_ADV_WARNING] = "Ces paramètres servent aux tests et au dépannage. Ne les modifiez que si vous savez " + "pourquoi.", + [UI_MENU_GROUP_SCHED] = "Ordonnancement", + [UI_MENU_GROUP_SHADERS] = "Shaders et pipelines", + [UI_MENU_GROUP_TEXMEM] = "Textures et mémoire", + [UI_MENU_GROUP_FIXES] = "Corrections du rendu", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "Diagnostic", + [UI_MENU_ASYNC_PREEMPT] = "Préemption des cœurs virtuels", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Permet à un thread du jeu d'en interrompre un autre sur le même cœur virtuel.", + [UI_MENU_PREEMPT_OFF] = "Désactivée", + [UI_MENU_PREEMPT_ON] = "Activée", + [UI_MENU_PREEMPT_INHERIT] = "Héritage seulement", + [UI_MENU_REPLAY_ASYNC] = "Préparation GPU des images sur son propre thread", + [UI_MENU_REPLAY_ASYNC_DESC] = "Prépare les images pour le GPU sur un thread séparé au lieu du thread du jeu. " + "Ajoute jusqu'à une image de latence.", + [UI_MENU_REPLAY_WORKERS] = "Threads de préparation GPU", + [UI_MENU_REPLAY_WORKERS_DESC] = "Enregistre les grandes images pour le GPU sur plusieurs threads à la fois. Utile " + "quand le CPU limite la fréquence d'images ; demande au moins 8 processeurs " + "logiques. Désactivé enregistre sur un seul thread.", + [UI_MENU_REPLAY_WORKERS_NOW] = "actuel : %s", + [UI_MENU_TIMER_1MS] = "Minuteur Windows de 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Porte la résolution du minuteur système à 1 ms pour un rythme d'images plus régulier.", + [UI_MENU_PIPE_WAIT] = "Gestion des draws en attente", + [UI_MENU_PIPE_WAIT_DESC] = "Par défaut garde l'ordonnancement actuel avec un worker réservé aux draws en attente " + "; Ancien (draw) utilise l'ordonnancement précédent.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Par défaut", + [UI_MENU_PIPE_WAIT_DRAW] = "Ancien (draw)", + [UI_MENU_PIPE_SKIP] = "Draws ignorés pendant la création d'un pipeline", + [UI_MENU_PIPE_SKIP_DESC] = "Quels draws sont abandonnés au lieu d'attendre leur pipeline.", + [UI_MENU_PIPE_SKIP_STRICT] = "Strict", + [UI_MENU_PIPE_SKIP_ANY] = "Tous", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Passes plein écran", + [UI_MENU_LIB_PREBUILD] = "Préconstruction des bibliothèques d'étapes", + [UI_MENU_LIB_PREBUILD_DESC] = "Construit à l'avance les bibliothèques d'étapes de shaders en arrière-plan.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Threads de préconstruction des bibliothèques", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Threads utilisés pour la préconstruction ; Automatique choisit un nombre " + "selon votre CPU.", + [UI_MENU_PIPE_PREBUILD] = "Préconstruction des pipelines", + [UI_MENU_PIPE_PREBUILD_DESC] = "Construit à l'avance les pipelines connus.", + [UI_MENU_PREWARM_XLATE] = "Préchauffage du traducteur", + [UI_MENU_PREWARM_XLATE_DESC] = "Threads qui traduisent les shaders connus au démarrage ; Automatique prend la " + "moitié des threads du CPU, 16 au plus.", + [UI_MENU_GPL] = "Bibliothèque de pipelines graphiques", + [UI_MENU_GPL_DESC] = "Utilise l'extension Vulkan de bibliothèque de pipelines ; désactivez-la si votre pilote " + "fonctionne mal avec.", + [UI_MENU_ASTC] = "Décodage des textures ASTC", + [UI_MENU_ASTC_DESC] = "Où les textures compressées ASTC sont décodées.", + [UI_MENU_ASTC_AUTO] = "Automatique", + [UI_MENU_ASTC_GPU] = "Shader GPU", + [UI_MENU_ASTC_NATIVE] = "Natif", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "Mode mémoire GPU", + [UI_MENU_MEMORY_DESC] = "Comment la mémoire du jeu est partagée avec le GPU.", + [UI_MENU_MEMORY_AUTO] = "Automatique", + [UI_MENU_MEMORY_IMPORT] = "Importation", + [UI_MENU_MEMORY_MIRROR] = "Miroir", + [UI_MENU_MEMORY_VERIFY] = "Vérification", + [UI_MENU_TEX_ALIAS] = "Alias de textures", + [UI_MENU_TEX_ALIAS_DESC] = "Une nouvelle texture créée sur la mémoire d'une texture active commence avec son " + "contenu au lieu d'être vide.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Limite de mémoire des textures", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Pourcentage de mémoire vidéo au-delà duquel les textures libérées par le jeu " + "sont abandonnées (elles reviennent du stockage quand elles resservent). 0 les " + "garde.", + [UI_MENU_ASTC_BC] = "Compresser l'ASTC en BC3", + [UI_MENU_ASTC_BC_DESC] = "Avec le décodeur GPU : réencode les textures ASTC décodées en BC3, un quart de la " + "mémoire vidéo. Pour les GPU de 4 Go ou moins ; les textures paraissent un peu plus " + "pixelisées.", + [UI_MENU_LOD_GUARD] = "Protection LOD", + [UI_MENU_LOD_GUARD_DESC] = "Évite que des objets clignotent au mauvais endroit ou que le lointain paraisse plat " + "pendant une image, en attendant que le jeu ait fini de réécrire les données de niveau " + "de détail avant que le GPU les lise.", + [UI_MENU_FIX_C0] = "Correction du tampon de constantes", + [UI_MENU_FIX_C0_DESC] = "Remplit la banque de constantes c0 réservée au pilote (tailles de stockage, taille de " + "dispatch, taille de point, instance de base) au lieu de lire des zéros.", + [UI_MENU_FIX_ZERO] = "Remettre à zéro la nouvelle mémoire GPU", + [UI_MENU_FIX_ZERO_DESC] = "Les nouveaux pools de mémoire GPU commencent remplis de zéros, comme la mémoire de la " + "Switch.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Brouillard et particules après DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Avec DLAA, le brouillard, la poussière et les autres particules sont " + "dessinés par-dessus l'image déjà lissée par DLSS, comme le jeu les dessine " + "sans DLSS : les petites particules dans le brouillard (sanctuaires) ne " + "disparaissent plus et ne laissent plus de traînées. Désactivé : DLSS traite " + "aussi ces effets, comme avant. Mode DLAA uniquement ; les modes DLSS avec " + "mise à l'échelle les traitent toujours. S'applique immédiatement.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposition DLSS fixe", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS prend la luminosité de l'image du jeu telle quelle au lieu d'estimer " + "l'exposition à chaque image : dans les scènes sombres (les Profondeurs), " + "les grandes zones de brouillard ne s'assombrissent ni ne s'éclaircissent " + "plus pendant une image quand la caméra bouge. Désactivé : DLSS estime " + "lui-même l'exposition, comme avant. S'applique immédiatement.", + [UI_MENU_BIND_SKIP] = "Ignorer les liaisons répétées", + [UI_MENU_BIND_SKIP_DESC] = "Optimisation : ignore les liaisons qui n'ont pas changé.", + [UI_MENU_SHADER_MEMO] = "Mémo des shaders", + [UI_MENU_SHADER_MEMO_DESC] = "Optimisation : mémorise les recherches de shaders.", + [UI_MENU_PIPE_MEMO] = "Mémo des pipelines", + [UI_MENU_PIPE_MEMO_DESC] = "Optimisation : réutilise le pipeline du draw précédent quand son état se répète.", + [UI_MENU_TEX_MEMO] = "Mémo des liaisons de textures", + [UI_MENU_TEX_MEMO_DESC] = "Optimisation : mémorise les descripteurs de textures entre les draws.", + [UI_MENU_DESC_TEMPLATE] = "Modèles de descripteurs", + [UI_MENU_DESC_TEMPLATE_DESC] = "Optimisation : met à jour les descripteurs en bloc.", + [UI_MENU_PUSH_SKIP] = "Ignorer les push constants répétées", + [UI_MENU_PUSH_SKIP_DESC] = "Optimisation : ignore les push constants qui n'ont pas changé.", + [UI_MENU_SPLIT_DRAWS] = "Envoi anticipé au GPU", + [UI_MENU_SPLIT_DRAWS_DESC] = "Envoie le travail GPU par parties tous les N draws entre les passes pour que le GPU " + "commence plus tôt ; 0 le désactive.", + [UI_MENU_VK_VALIDATION] = "Couche de validation", + [UI_MENU_VK_VALIDATION_DESC] = "Vérifie chaque appel Vulkan et ralentit beaucoup le jeu.", + [UI_MENU_VK_VALIDATION_MISSING] = "La couche de validation n'est pas installée.", + [UI_MENU_VK_DYN_VERTEX] = "État de sommets dynamique", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Force l'entrée de sommets dynamique en activé ou désactivé ; la valeur par défaut " + "dépend du GPU.", + [UI_MENU_VK_DYN_A2C] = "Alpha to coverage dynamique", + [UI_MENU_VK_DYN_A2C_DESC] = "Force l'alpha to coverage dynamique en activé ou désactivé. Par défaut : désactivé " + "avec le pilote AMD pour RDNA 2 et antérieurs, qui dessine alors les personnages en " + "noir, activé ailleurs.", + [UI_MENU_VK_SUBGROUP_PIN] = "Fixer la taille des sous-groupes", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Fixe la taille des sous-groupes des shaders.", + [UI_MENU_TRACE] = "Journal des performances", + [UI_MENU_TRACE_DESC] = "Écrit les temps d'image dans un fichier.", + [UI_MENU_FLIGHT] = "Enregistreur de vol", + [UI_MENU_FLIGHT_DESC] = "Garde un court historique et l'enregistre quand une image se fige.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Seuil de blocage (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Temps d'image compté comme un blocage.", + [UI_MENU_PASS_CRUMBS] = "Marques de passes GPU", + [UI_MENU_PASS_CRUMBS_DESC] = "Après un plantage du GPU, le journal nomme la passe de rendu en cours. Automatique " + ": AMD uniquement. Activé : aussi NVIDIA, pour un faible coût.", + [UI_MENU_INPUT_RECORD] = "Enregistrement des entrées", + [UI_MENU_INPUT_RECORD_DESC] = "Écrit vos entrées dans un fichier pour les rapports de bug.", + [UI_MENU_OPEN_LOG] = "Ouvrir le dossier des journaux", + [UI_MENU_OPEN_LOG_DESC] = "Affiche le dossier contenant les fichiers journaux.", + [UI_MENU_COPY_INFO] = "Copier les infos système", + [UI_MENU_COPY_INFO_DESC] = "Copie le GPU, le pilote, le CPU, la RAM et les paramètres modifiés dans le " + "presse-papiers.", + [UI_MENU_COPY_INFO_DONE] = "Copié", + [UI_MENU_ACTION_FAILED] = "n'a pas fonctionné", + [UI_MENU_RESET] = "Rétablir tous les paramètres par défaut", + [UI_MENU_RESET_DESC] = "S'applique à tous les onglets.", + [UI_MENU_RESET_CONFIRM] = "Rétablir chaque paramètre à sa valeur par défaut ?", + [UI_MENU_RESET_YES] = "Rétablir", + [UI_MENU_RESET_NO] = "Annuler", + [UI_MENU_OV_FPS] = "%.0f IPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "jeu %.0f%%", + [UI_MENU_OV_MAX_MS] = "max %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "IPS", + [UI_MENU_OV_FRAME_LABEL] = "Image", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% min %.0f", + [UI_MENU_OV_LOW01] = "0,1%% min %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Température", + [UI_MENU_OV_POWER] = "Puissance", + [UI_MENU_OV_CLOCK] = "Fréquence", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "Préparation GPU des images", + [UI_MENU_OV_GPU_TIME] = "GPU occupé par image", + [UI_MENU_OV_PIPE_WAIT] = "Attentes de pipelines", + [UI_MENU_OV_SHADER_WAIT] = "Attentes de shaders", + [UI_MENU_OV_TEX_UPLOADS] = "Envois de textures", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f Go", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f Go", + [UI_MENU_OV_GAME_GB] = "jeu %.1f Go", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "%.1f par image", + [UI_MENU_OV_WINDOW] = "Fenêtre", + [UI_MENU_OV_OUTPUT] = "Image du jeu", + [UI_MENU_OV_SCENE] = "Scène 3D", + [UI_MENU_OV_UPSCALER] = "Upscaler 3D", + [UI_MENU_OV_SCALING] = "Mise à l'échelle", + [UI_MENU_OV_LIMIT] = "Limite d'images", + [UI_MENU_OV_PRESENT] = "Présentation", + [UI_MENU_OV_SHOWN] = "Affichées", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, netteté %d%%", + [UI_MENU_OV_SCALE_NONE] = "aucune (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilinéaire", + [UI_MENU_OV_SCALE_DOWN] = "bilinéaire (FSR ne fait qu'agrandir)", + [UI_MENU_TAB_CHEATS] = "Triches", + [UI_MENU_CHEATS_NONE] = "Aucun code de triche pour cette version du jeu. Les codes d'un mod sont un fichier de " + "triche Atmosphère dans son dossier cheats, nommé d'après le build du jeu : " + "mods\\\\cheats\\%s. Redémarrez le jeu pour les lire. Pour les codes qui modifient " + "le code du jeu, le jeu se reconstruit au démarrage (quelques minutes).", + [UI_MENU_CHEATS_MOD] = "%s : %d codes", + [UI_MENU_CHEAT_CODE_DESC] = "Modifie le code du jeu. Bascule immédiatement.", + [UI_MENU_CHEAT_KEY_DESC] = "Modifie le code du jeu tant que vous maintenez %s. Bascule immédiatement.", + [UI_MENU_CHEAT_DATA_DESC] = "Écrit dans la mémoire du jeu à chaque image tant qu'il est activé.", + [UI_MENU_CHEAT_MASTER] = "toujours activé", + [UI_MENU_CHEAT_MASTER_DESC] = "Le code maître du fichier : il est toujours activé.", + [UI_MENU_CHEAT_RESTORE] = "inutile", + [UI_MENU_CHEAT_RESTORE_DESC] = "Il ne fait que réécrire le code d'origine du jeu. Désactiver un code le fait déjà.", + [UI_MENU_CHEAT_REBUILD] = "après la reconstruction", + [UI_MENU_CHEAT_REBUILD_DESC] = "Ce code modifie le code du jeu et est nouveau ou modifié depuis la construction " + "du jeu. Le jeu l'intègre à son prochain démarrage (quelques minutes), ou utilisez " + "Reconstruire le jeu maintenant.", + [UI_MENU_CHEAT_UNSUPPORTED] = "non pris en charge", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Ce code ne peut pas être utilisé avec cette version du jeu :", + [UI_MENU_CHEATS_REBUILD] = "Reconstruire le jeu maintenant", + [UI_MENU_CHEATS_REBUILD_DESC] = "Certains codes modifient le code du jeu et n'y sont pas intégrés : ils sont " + "nouveaux ou modifiés, ou leur dernière reconstruction a échoué ou a été annulée. " + "Ferme le jeu ; l'installation les intègre (quelques minutes) et relance le jeu. " + "La progression depuis votre dernière sauvegarde est perdue.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Ce mod modifie le code du jeu (exefs) d'une façon que le portage ne peut pas " + "appliquer, donc tout le mod reste désactivé. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Ses correctifs de code (exefs) sont faits pour une autre version du jeu.", + [UI_MENU_MODS_EXEFS_ON] = "Correctifs de code utilisés : %d fichiers.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Correctifs de code utilisés : %d fichiers. Ils remplacent le correctif %s du " + "portage, qui reste désactivé tant que ce mod est activé.", + [UI_MENU_MODS_CODE_SKIPPED] = "Son propre code de jeu (%s) n'est pas chargé : le reste du mod est utilisé. " + "Désactivez le mod si le jeu se comporte mal avec.", + [UI_MENU_MODS_PLUGIN_ON] = "Son plugin est actif : %d hooks dans le code du jeu.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Son plugin %s ne peut pas fonctionner dans le portage : %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "Tout le mod reste désactivé. Son interrupteur \"Utiliser ... sans son code\" " + "ci-dessous en utilise le reste.", + [UI_MENU_MODS_PLUGIN_OFF] = "Son plugin reste désactivé cette fois : il a démarré autrement que lors de la " + "construction (%s). Le jeu le reconstruit au prochain démarrage.", + [UI_MENU_MODS_WITHOUT_CODE] = "Utiliser %s sans son code", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "Le mod ci-dessus apporte du code que le portage ne peut pas exécuter : son " + "propre code de jeu (un plugin subsdk ou un main remplacé) ou des correctifs " + "de code (exefs) que le portage ne peut pas appliquer. Désactivé : tout le mod " + "reste désactivé. Activé : ce code est laissé de côté et le reste du mod est " + "utilisé : ses fichiers RomFS, ses codes de triche et les correctifs de code " + "qui fonctionnent. Ses fichiers peuvent avoir besoin du code manquant ; " + "désactivez-le de nouveau si le jeu se comporte mal. S'applique au prochain " + "démarrage.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Activé pour tous les mods : mods_without_code = 1 dans totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u de ses fichiers de correctifs de code (exefs) ne peuvent pas être appliqués et " + "sont laissés de côté : le reste du mod est utilisé. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u de ses fichiers remplacent ceux de %s, placé plus bas dans la liste.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u octets de ses modifications des données du jeu viennent de %s, placé plus " + "haut dans la liste.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u octets de ses modifications des données du jeu remplacent ceux de %s, placé " + "plus bas dans la liste.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u de ses emplacements de correctifs de code sont remplacés par ceux de %s, " + "placé plus haut dans la liste.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Il remplace %u emplacements de correctifs de code de %s, placé plus bas dans la " + "liste.", +}; + +// Spanish +static const char *const text_es[UI_TEXT_COUNT] = { + SWKBD("Introducir texto", "Introduce un nombre", "Caballo", "Aceptar", "Cancelar", "Mando: A = Aceptar, B = Cancelar"), + + [UI_MENU_TITLE] = "Ajustes", + [UI_MENU_TAB_SCREEN] = "Pantalla", + [UI_MENU_TAB_GAME] = "Juego", + [UI_MENU_TAB_MODS] = "Mods", + [UI_MENU_TAB_SOUND] = "Sonido", + [UI_MENU_TAB_CONTROLS] = "Controles", + [UI_MENU_TAB_AMIIBO] = "Amiibo", + [UI_MENU_TAB_MENU] = "Menú", + [UI_MENU_TAB_ADVANCED] = "Avanzado", + [UI_MENU_CONTINUE] = "Continuar", + [UI_MENU_QUIT] = "Salir del juego", + [UI_MENU_ON] = "Sí", + [UI_MENU_OFF] = "No", + [UI_MENU_AUTO] = "Automático", + [UI_MENU_DEFAULT_MARK] = "predeterminado", + [UI_MENU_AFTER_RESTART] = "tras reiniciar", + [UI_MENU_SET_BY_ENV] = "fijado por una variable de entorno", + [UI_MENU_SAVE_FAILED] = "no se pudieron guardar los ajustes", + [UI_MENU_VERSION] = "TotK Recomp %s, juego %s", + [UI_MENU_FULLSCREEN] = "Pantalla completa", + [UI_MENU_FULLSCREEN_DESC] = "El juego ocupa toda la pantalla; F11 la alterna.", + [UI_MENU_WINDOW_SIZE] = "Tamaño de la ventana", + [UI_MENU_WINDOW_SIZE_DESC] = "Tamaño de la ventana del juego fuera de la pantalla completa.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Personalizado", + [UI_MENU_PRESENT] = "Presentación", + [UI_MENU_PRESENT_DESC] = "Cómo llegan a la pantalla los fotogramas terminados.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", + [UI_MENU_PRESENT_VSYNC] = "VSync", + [UI_MENU_PRESENT_IMMEDIATE] = "Inmediato", + [UI_MENU_PRESENT_IN_USE] = "en uso: %s", + [UI_MENU_GPU] = "Tarjeta gráfica", + [UI_MENU_GPU_DESC] = "El dispositivo Vulkan que dibuja el juego.", + [UI_MENU_GPU_AUTO] = "Automática", + [UI_MENU_PERF_OVERLAY] = "Indicador de rendimiento", + [UI_MENU_PERF_OVERLAY_DESC] = "Fotogramas por segundo en la esquina superior derecha. Completo añade tiempos de " + "fotograma con un gráfico, carga de CPU, GPU y memoria, temperaturas y las esperas " + "del hilo de renderizado. F10 cambia de modo.", + [UI_MENU_PERF_OFF] = "No", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "Completo", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "%.0f fps dibujados, %.0f mostrados", + [UI_MENU_GRAPHICS] = "Imagen", + [UI_MENU_OUTPUT_RES] = "Resolución del juego", + [UI_MENU_OUTPUT_RES_DESC] = "El tamaño en el que el juego dibuja su imagen e interfaz. Por encima de 1920 x 1080 " + "el juego necesita más memoria de vídeo y tiempo de GPU. Un formato más ancho (21:9) " + "amplía la vista de la cámara y lleva el HUD a las esquinas de la pantalla; uno más " + "alto (16:10, Steam Deck) lo lleva a los bordes superior e inferior.", + [UI_MENU_HUD_WIDTH] = "Ancho del HUD", + [UI_MENU_HUD_WIDTH_DESC] = "En una pantalla más ancha que 16:9, cuánto se separan los lados izquierdo y derecho " + "del HUD. Pantalla completa los lleva a los bordes de la pantalla; 21:9 o 16:9 " + "mantiene el HUD en el centro de la pantalla con esa forma. Una distribución que falte " + "se crea en segundo plano y se usa tras reiniciar.", + [UI_MENU_HUD_WIDTH_FULL] = "Pantalla completa", + [UI_MENU_RENDER_SCALE] = "Escala de renderizado 3D", + [UI_MENU_RENDER_SCALE_DESC] = "Tamaño de la escena 3D respecto a la resolución del juego; el FSR del juego la " + "escala a ese tamaño. Por encima del 100 % suaviza los bordes dentados " + "(supermuestreo) con un alto coste de GPU.", + [UI_MENU_RENDER_SCALE_GAME] = "Juego (83 %)", + [UI_MENU_DYNAMIC_RES] = "Resolución dinámica", + [UI_MENU_DYNAMIC_RES_DESC] = "Permite que el juego baje la escena 3D al 90 o al 80 %. Decide según una estimación " + "hecha para Switch que no tiene en cuenta tu GPU, así que las escenas amplias bajan " + "incluso en un PC rápido. No: mantiene la escala de renderizado.", + [UI_MENU_UPSCALER] = "Escalado a la ventana", + [UI_MENU_UPSCALER_DESC] = "Cómo se escala la imagen cuando la ventana es mayor que la resolución del juego. FSR " + "mantiene los bordes y los detalles más nítidos que el bilineal.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "Bilineal", + [UI_MENU_ASPECT] = "Forma de la imagen", + [UI_MENU_ASPECT_DESC] = "Cuando la forma de la ventana difiere de la de la resolución del juego (una imagen 16:9 " + "en una pantalla 21:9): mantener la forma con franjas negras o estirarla sobre la ventana.", + [UI_MENU_ASPECT_FIT] = "Franjas negras", + [UI_MENU_ASPECT_STRETCH] = "Estirar", + [UI_MENU_MOVIE_ASPECT] = "Forma de vídeos", + [UI_MENU_MOVIE_ASPECT_DESC] = "Cuando la resolución del juego no es 16:9: mantener la forma propia de los vídeos " + "de las cinemáticas con franjas negras o estirarlos sobre toda la imagen. Se aplica " + "desde el siguiente vídeo.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Franjas negras", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "Estirar", + [UI_MENU_FOV] = "Campo de visión", + [UI_MENU_FOV_DESC] = "Cuánto del mundo muestra la cámara, en porcentaje del propio del juego. Solo la versión " + "1.4.3 del juego.", + [UI_MENU_SHADOW_RES] = "Tamaño del mapa de sombras", + [UI_MENU_SHADOW_RES_DESC] = "Tamaño del mapa de sombras del sol. El tamaño del juego cambia con la vista, hasta " + "unos 400 cerca del suelo, por lo que las sombras de las hojas se ven pixeladas y " + "saltan; un tamaño fijo las mantiene quietas y más nítidas. Por encima de 1024 las " + "sombras cuestan más tiempo de GPU y memoria de vídeo.", + [UI_MENU_SHADOW_RES_GAME] = "Juego (variable)", + [UI_MENU_ANISO] = "Filtrado de texturas", + [UI_MENU_ANISO_DESC] = "Filtrado anisótropo de las texturas: el suelo, los caminos y las paredes vistos en ángulo " + "rasante siguen nítidos en la distancia en lugar de difuminarse. Juego: el nivel que pide " + "el juego, como en Switch.", + [UI_MENU_ANISO_GAME] = "Juego", + [UI_MENU_LOD_STEADY] = "Detalle estable con carga", + [UI_MENU_LOD_STEADY_DESC] = "Omite el ajuste del juego que reduce el detalle de modelos y texturas cuando bajan " + "los fotogramas por segundo, como hace el mod de emulador Disable LOD Quality " + "Reduction. Versiones 1.2.1 y 1.4.3 del juego. Déjalo desactivado en PC poco " + "potentes: ahí esa reducción mantiene los fotogramas por segundo.", + [UI_MENU_SHARPNESS] = "Nitidez de FSR", + [UI_MENU_SHARPNESS_DESC] = "Enfoque tras el escalado FSR; 0 lo desactiva.", + [UI_MENU_COLOR] = "Color", + [UI_MENU_COLOR_PRESET] = "Perfil de color", + [UI_MENU_COLOR_PRESET_DESC] = "Fija los cuatro valores de abajo. Vivo: más contraste y saturación, sombras algo " + "más abiertas (pensado para pantallas OLED). Claridad: algo más de contraste, " + "saturación y brillo. Cambiar un valor pasa el perfil a Personalizado. El HUD " + "cambia con la imagen; este menú no.", + [UI_MENU_COLOR_DEFAULT] = "El del juego", + [UI_MENU_COLOR_VIVID] = "Vivo (OLED)", + [UI_MENU_COLOR_CLARITY] = "Claridad", + [UI_MENU_COLOR_CUSTOM] = "Personalizado", + [UI_MENU_COLOR_BRIGHTNESS] = "Brillo", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Se suma a cada color; 0 lo deja igual.", + [UI_MENU_COLOR_CONTRAST] = "Contraste", + [UI_MENU_COLOR_CONTRAST_DESC] = "Aleja los colores del gris medio (por encima del 100 %) o los acerca; 100 % los " + "deja igual.", + [UI_MENU_COLOR_SATURATION] = "Saturación", + [UI_MENU_COLOR_SATURATION_DESC] = "Intensidad del color frente al gris; 100 % la deja igual.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "Por debajo de 1 aclara los tonos oscuros y medios, por encima de 1 los oscurece; 1 " + "los deja igual.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "Salida HDR", + [UI_MENU_HDR_DESC] = "Luces brillantes en una pantalla HDR. Requiere el HDR activado en Windows («Usar HDR») o un " + "compositor Wayland con gestión del color; sin él la imagen sigue en SDR. Se aplica tras " + "reiniciar. El perfil de color de arriba es para SDR y no se usa en HDR.", + [UI_MENU_HDR_PEAK] = "Brillo máximo", + [UI_MENU_HDR_PEAK_DESC] = "El pico de tu pantalla en nits; las luces más brillantes se detienen ahí.", + [UI_MENU_HDR_GAME] = "Brillo del juego", + [UI_MENU_HDR_GAME_DESC] = "Nits del blanco de la imagen (blanco papel). 203 es la referencia HDR; súbelo en una " + "habitación luminosa.", + [UI_MENU_HDR_UI] = "Brillo del HUD y del menú", + [UI_MENU_HDR_UI_DESC] = "Nits del blanco del HUD y de este menú.", + [UI_MENU_HDR_HUE] = "Corrección del tono de luces", + [UI_MENU_HDR_HUE_DESC] = "Los colores brillantes, como el fuego y las chispas, tienden al blanco como en la " + "propia imagen SDR del juego, coincidiendo con la luz que emiten; 0 los mantiene " + "totalmente saturados.", + [UI_MENU_SHADOW_SCALE] = "Resolución de sombras", + [UI_MENU_SHADOW_SCALE_DESC] = "Dibuja los mapas de sombras del sol tantas veces más grandes por lado que los " + "960x960 del juego: bordes de sombra y sombras de hojas más nítidos. Se aplica en " + "el próximo inicio.", + [UI_MENU_PCSS] = "Sombras suaves", + [UI_MENU_PCSS_DESC] = "Sombras del sol nítidas donde un objeto toca el suelo y más suaves cuanto más lejos cae la " + "sombra (PCSS). 0 mantiene el filtro del juego. Se aplica en el próximo inicio.", + [UI_MENU_CONTACT_SHADOWS] = "Sombras de contacto", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Pequeñas sombras del sol que los mapas de sombras no captan: en los pies, bajo " + "las piedras, en la hierba y en los pliegues. Calculadas en pantalla tras la " + "iluminación. Se aplica en el próximo inicio.", + [UI_MENU_SHADOW_RANGE] = "Alcance de las cascadas de sombras", + [UI_MENU_SHADOW_RANGE_DESC] = "Aleja los escalones donde las sombras se vuelven más suaves (20, 40, 80 y 160 m en " + "el juego). Reparte el mapa de sombras sobre más terreno: sube también la " + "resolución de sombras. Se aplica en el próximo inicio.", + [UI_MENU_GRASS_RANGE] = "Alcance de hierba", + [UI_MENU_GRASS_RANGE_DESC] = "Hasta qué distancia alrededor de la cámara crece la hierba (en el juego: 62,5 m). " + "Más mantiene visible la hierba de los prados más lejos en lugar de hacerla crecer " + "justo delante de ti; menos dibuja menos hierba. Se aplica en el próximo inicio.", + [UI_MENU_DLSS_PRESET] = "Modelo DLSS", + [UI_MENU_DLSS_PRESET_DESC] = "Qué modelo de DLSS se usa. Automático sigue el consejo de NVIDIA para cada modo: K " + "para DLAA, Calidad y Equilibrado, M para Rendimiento, L para Ultrarrendimiento. J: " + "algo menos de estelas tras los personajes en movimiento y algo más de parpadeo. K: " + "el modelo más nítido en todos los modos. Se aplica al momento.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automático", + [UI_MENU_DLSS_PRESET_K] = "K (más nítido)", + [UI_MENU_DLSS_PRESET_J] = "J (menos estelas)", + [UI_MENU_DLSS_CHARS] = "Estelas de personajes en DLSS", + [UI_MENU_DLSS_CHARS_DESC] = "Reduce las leves estelas tras los personajes y animales en movimiento y lo que " + "llevan: ahí DLSS toma menos de los fotogramas anteriores. Más fuerte elimina más " + "estelas y deja esos bordes algo menos suaves. Se aplica al momento.", + [UI_MENU_DLSS_CHARS_OFF] = "No", + [UI_MENU_DLSS_CHARS_LIGHT] = "Leve", + [UI_MENU_DLSS_CHARS_MEDIUM] = "Medio", + [UI_MENU_DLSS_CHARS_FULL] = "Completo", + [UI_MENU_DLSS] = "Modo de escalado", + [UI_MENU_DLSS_DESC] = "Nativo suaviza los bordes de la escena 3D a resolución completa. Calidad, Equilibrado, " + "Rendimiento y Ultrarrendimiento la dibujan al 67, 58, 50 y 33 % y dejan que el escalador " + "(DLSS o FSR 3.1) la amplíe, lo que ahorra tiempo de GPU; sustituyen a la escala de " + "renderizado 3D. Se aplica al momento.", + [UI_MENU_DLSS_DLAA] = "Nativo", + [UI_MENU_DLSS_QUALITY] = "Calidad", + [UI_MENU_DLSS_BALANCED] = "Equilibrado", + [UI_MENU_DLSS_PERFORMANCE] = "Rendimiento", + [UI_MENU_DLSS_ULTRA] = "Ultrarrendimiento", + [UI_MENU_FXAA] = "Antialiasing del juego (FXAA)", + [UI_MENU_FXAA_DESC] = "El suavizado de bordes FXAA del propio juego. Difumina un poco los detalles finos; con " + "DLAA no hace falta.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "Reduce la latencia del sistema en GPU NVIDIA mediante VK_NV_low_latency2. Sí + Boost " + "mantiene altas las frecuencias de la GPU en escenas limitadas por la CPU.", + [UI_MENU_REFLEX_OFF] = "No", + [UI_MENU_REFLEX_ON] = "Sí", + [UI_MENU_REFLEX_BOOST] = "Sí + Boost", + [UI_MENU_SCENE_UPSCALER] = "Escalador de escena 3D", + [UI_MENU_SCENE_UPSCALER_DESC] = "Un escalador temporal para la escena 3D: bordes más suaves y menos centelleo, y " + "en un modo por debajo de Nativo dibuja la escena más pequeña y la amplía, lo que " + "ahorra tiempo de GPU. NVIDIA DLSS necesita una GPU NVIDIA RTX y " DLSS_FILE " " + "junto a " EXE_FILE "; AMD FSR 3.1 funciona en cualquier GPU. No: mantiene el " + "escalado y el FXAA propios del juego. El HUD no se toca; el escalado y la " + "nitidez de arriba siguen ajustando la imagen del juego a la ventana. Se aplica " + "tras reiniciar.", + [UI_MENU_SCENE_UPSCALER_OFF] = "No", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: necesita una GPU NVIDIA RTX", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: falta " DLSS_FILE, + [UI_MENU_FSR3_SHARPNESS] = "Nitidez de FSR 3.1", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Enfoque de la escena 3D tras FSR 3.1; 0 lo desactiva.", + [UI_MENU_FPS_LIMIT] = "Límite de fotogramas", + [UI_MENU_FPS_LIMIT_DESC] = "El máximo de fotogramas por segundo que dibuja el juego. Por encima de 60 es " + "experimental y requiere «Velocidad del juego según el reloj».", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "Frecuencia del monitor", + [UI_MENU_FPS_DISPLAY_HZ] = "Frecuencia del monitor (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "Cola de fotogramas", + [UI_MENU_FRAME_QUEUE_DESC] = "El juego empieza un fotograma mientras el anterior espera su turno en pantalla: " + "muchos menos fotogramas perdidos en el límite, hasta un fotograma más de latencia " + "de los controles. Se aplica al momento.", + [UI_MENU_FRAME_GEN] = "Generación de fotogramas", + [UI_MENU_FRAME_GEN_OFF] = "No", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Una imagen generada entre cada dos que dibuja el juego: el doble de imágenes en " + "pantalla, el juego a la mitad del límite de fotogramas y los controles, alrededor de " + "medio fotograma más tarde. Para pantallas de 120 Hz o más. No funciona con DLSS ni " + "HDR. Se aplica al momento.", + [UI_MENU_REALTIME] = "Velocidad del juego según el reloj", + [UI_MENU_REALTIME_DESC] = "Avanza el juego según el tiempo real, para que un fotograma lento no ralentice el " + "juego.", + [UI_MENU_CLOTH_REALTIME] = "Telas según el reloj", + [UI_MENU_CLOTH_REALTIME_DESC] = "Avanza también las telas y el pelo según el tiempo real.", + [UI_MENU_HIGHFPS_FIX] = "Correcciones para muchos FPS", + [UI_MENU_HIGHFPS_FIX_DESC] = "Corrige la física que falla por encima de 30 fotogramas por segundo y los objetos " + "que se quedan transparentes o invisibles por encima de 60.", + [UI_MENU_CLIMB_FIX] = "Corrección de escalada", + [UI_MENU_CLIMB_FIX_DESC] = "Mantiene la escalada por paredes y escaleras a velocidad completa por encima de 60 " + "fotogramas por segundo, para que Link llegue arriba.", + [UI_MENU_GAME_LANG] = "Idioma del juego", + [UI_MENU_GAME_LANG_DESC] = "Idioma de los textos y las voces del juego.", + [UI_MENU_GAME_LANG_AUTO] = "Automático", + [UI_MENU_OPERATION_MODE] = "Modo de la consola", + [UI_MENU_OPERATION_MODE_DESC] = "Si el juego cree que funciona en modo TV o en modo portátil.", + [UI_MENU_MODE_DOCKED] = "Modo TV", + [UI_MENU_MODE_HANDHELD] = "Modo portátil", + [UI_MENU_ASSUME_FOCUS] = "Seguir en segundo plano", + [UI_MENU_ASSUME_FOCUS_DESC] = "Sí (predeterminado): el juego sigue mientras estás en otra ventana, y el teclado " + "no responde hasta que la ventana vuelve al frente. No: se pausa cuando su ventana " + "pierde el foco, como en Switch al pulsar Home; una carga interrumpida así puede " + "quedarse bloqueada.", + [UI_MENU_PLAY_TIME] = "Tiempo de juego", + [UI_MENU_PLAY_TIME_DESC] = "Tiempo en el juego en todas las sesiones, contado mientras la ventana del juego tiene " + "el foco y el juego dibuja fotogramas. Se guarda en playtime.txt en la carpeta del " + "perfil, junto a las partidas guardadas.", + [UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", + [UI_MENU_PLAY_TIME_SESSION] = "esta sesión: %s", + [UI_MENU_MODS_BUILTIN] = "Incluidos en el port", + [UI_MENU_MODS_INSTALLED] = "Mods instalados", + [UI_MENU_MODS_NONE] = "Aún no hay mods. Descomprime un mod en la carpeta mods, una carpeta por mod con su carpeta " + "romfs dentro, y reinicia el juego. TKMM también puede exportar ahí sus mods combinados en " + "una carpeta.", + [UI_MENU_MODS_OPEN] = "Abrir carpeta de mods", + [UI_MENU_MODS_OPEN_DESC] = "Muestra la carpeta de la que el juego carga los mods. Se crea si falta.", + [UI_MENU_MODS_ROW_DESC] = "Archivos del juego que sustituye: %u. Archivos nuevos que añade: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u de sus archivos vienen de %s, que está más arriba en la lista.", + [UI_MENU_MODS_MOVE_HINT] = "El botón superior o Ctrl+Arriba lo sube, el botón izquierdo o Ctrl+Abajo lo baja. " + "Cuando dos mods cambian el mismo archivo, gana el de más arriba. Los cambios se " + "aplican tras reiniciar.", + [UI_MENU_MODS_EMPTY] = "Esta carpeta no tiene archivos romfs, exefs ni cheats.", + [UI_MENU_MODS_SUBSDK] = "Este mod trae su propio código de juego (un plugin subsdk o un main sustituido). El port " + "no puede cargar módulos de código, así que todo el mod queda desactivado.", + [UI_MENU_MODS_EXEFS_LATER] = "Este mod parchea el código del juego (exefs). El juego incorpora los parches en el " + "próximo inicio (una reconstrucción de unos minutos); hasta entonces todo el mod " + "queda desactivado.", + [UI_MENU_MODS_CHEATS] = "Trucos: %d. Actívalos en la pestaña Trucos.", + [UI_MENU_MODS_CHEATS_FILE] = "Los trucos para esta versión del juego se leen al iniciar desde cheats\\%s en este " + "mod.", + [UI_MENU_MODS_BAD_NAME] = "El nombre de la carpeta contiene |, que la lista de mods usa entre nombres. Cambia el " + "nombre de la carpeta.", + [UI_MENU_MODS_OTHER_VERSION] = "%u de sus archivos son para otra versión del juego y se omiten. Busca una versión " + "de este mod para tu versión del juego.", + [UI_MENU_MODS_UNUSED] = "sin usar", + [UI_MENU_MODS_FPS60] = "Parche de 60 FPS", + [UI_MENU_MODS_FPS60_DESC] = "El parche propio del port para 60 fotogramas por segundo. Se ajusta con el límite de " + "fotogramas en la pestaña Juego.", + [UI_MENU_MODS_RES] = "Parche de resolución", + [UI_MENU_MODS_RES_DESC] = "El parche propio del port para resoluciones por encima de 1080p. Se ajusta con la " + "resolución del juego en la pestaña Pantalla.", + [UI_MENU_MODS_QUICKMENU] = "Corrección del menú rápido", + [UI_MENU_MODS_QUICKMENU_DESC] = "La corrección del port para el fondo negro de los menús de armas, escudos y " + "materiales a 60 FPS.", + [UI_MENU_VOLUME] = "Volumen", + [UI_MENU_VOLUME_DESC] = "Volumen general del juego.", + [UI_MENU_VOLUME_MUSIC] = "Volumen de música", + [UI_MENU_VOLUME_MUSIC_DESC] = "Volumen de la música de fondo.", + [UI_MENU_VOLUME_SFX] = "Volumen de efectos", + [UI_MENU_VOLUME_SFX_DESC] = "Volumen de los efectos de sonido.", + [UI_MENU_VOLUME_VOICE] = "Volumen de voces", + [UI_MENU_VOLUME_VOICE_DESC] = "Volumen de las voces de los personajes.", + [UI_MENU_AUDIO_CHANNELS] = "Altavoces", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Salida estéreo o envolvente 5.1. Automático elige 5.1 cuando la configuración de " + "altavoces de Windows tiene seis canales o más. Se aplica tras reiniciar.", + [UI_MENU_CHANNELS_AUTO] = "Automático", + [UI_MENU_CHANNELS_STEREO] = "Estéreo", + [UI_MENU_CHANNELS_51] = "Envolvente 5.1", + [UI_MENU_AUDIO_DEVICE] = "Dispositivo de salida", + [UI_MENU_AUDIO_DEVICE_DESC] = "Dónde suena el sonido. Predeterminado del sistema sigue al dispositivo " + "predeterminado de Windows. Si el dispositivo elegido se desconecta, se usa el " + "predeterminado del sistema hasta que vuelva. Se aplica al momento.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Predeterminado del sistema", + [UI_MENU_MOTION] = "Control por movimiento", + [UI_MENU_MOTION_DESC] = "Apuntar con el giroscopio del mando.", + [UI_MENU_GYRO_CALIBRATION] = "Calibración del giroscopio", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Resta la deriva del mando en reposo, medida con la fila de calibración de " + "abajo. Los valores medidos siguen guardados cuando esto está desactivado.", + [UI_MENU_GYRO_CALIBRATE] = "Calibrar giroscopio", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Mide la deriva del giroscopio en reposo y la elimina. Deja el mando apoyado o " + "mantenlo quieto durante dos segundos.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Calibrando...", + [UI_MENU_GYRO_CALIBRATED] = "%s, calibrado", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Calibración fallida", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "El mando se movió: mantenlo quieto y vuelve a intentarlo", + [UI_MENU_GYRO_AUTO_BIAS] = "Aprender la deriva en reposo", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Aprende la deriva que queda en el giroscopio cada vez que el mando está quieto " + "sobre una mesa, y la resta. Para una mira del arco que se desliza lentamente " + "incluso tras calibrar. No aprende de un mando sostenido en la mano. Experimental.", + [UI_MENU_RUMBLE_STRENGTH] = "Intensidad de la vibración", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "Con qué fuerza vibra el mando.", + [UI_MENU_RUMBLE_CURVE] = "Curva de vibración", + [UI_MENU_RUMBLE_CURVE_DESC] = "Los valores bajos refuerzan la vibración débil.", + [UI_MENU_RUMBLE_TRIGGERS] = "Vibración de gatillos (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Hace vibrar también los gatillos de un mando Xbox.", + [UI_MENU_PAD_LAYOUT] = "Distribución de botones", + [UI_MENU_PAD_LAYOUT_DESC] = "Qué botón es A. Nintendo: el derecho, como en Switch. Xbox: el inferior, como está " + "rotulado en un mando Xbox (cruz en un mando PlayStation). Automático elige Nintendo " + "para mandos con rótulos de Nintendo y Xbox para los demás. El mando que muestran los " + "avisos del juego se elige en Iconos de botones.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Automático", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A a la derecha)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A abajo)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "en uso: %s", + [UI_MENU_PROMPTS] = "Iconos de botones", + [UI_MENU_PROMPTS_DESC] = "De qué mando son los botones que muestran los avisos del juego. Nintendo: los del " + "propio juego. Xbox: LB, RB, LT, RT, Menu, View y una cruceta, y A, B, X e Y según el " + "rótulo del botón que pulsa la distribución de arriba (con Nintendo (A a la derecha) el " + "botón derecho está rotulado B, así que los avisos de A muestran B). PlayStation: las " + "formas de un mando PlayStation (○ × △ □, L1, R1, L2, R2, Options y Share), en el botón " + "que pulsa la distribución de arriba. PC: las teclas y botones del ratón de la " + "distribución predeterminada del teclado (E, Mayús, Espacio, clic izquierdo...) y el " + "ratón para la cámara. El juego lee sus avisos al iniciar, así que cambian tras " + "reiniciar. Forman parte de los archivos del juego, así que un botón que reasignes en " + "Controles mantiene su aviso anterior en pantalla.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "faltan archivos de iconos: vuelve a ejecutar el instalador", + [UI_MENU_PROMPTS_FAILED] = "archivos de iconos dañados: vuelve a ejecutar el instalador", + [UI_MENU_PROMPTS_RESTART] = "los iconos cambian tras reiniciar", + [UI_MENU_PROMPTS_OFF_SHAPE] = "desactivado con una resolución del juego que no es 16:9", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "no hay distribución para esta forma: vuelve a ejecutar el instalador", + [UI_MENU_OUTPUT_RES_PREPARING] = "distribución creándose en segundo plano; se usará en el próximo inicio", + [UI_MENU_PROMPTS_PREPARING] = "archivos de iconos creándose en segundo plano; se usarán en el próximo inicio", + [UI_MENU_PREPARE_RETRY] = "Reintentar", + [UI_MENU_PREPARE_RETRY_DESC] = "Vuelve a iniciar las herramientas del instalador para crear en segundo plano la " + "distribución de la interfaz o los archivos de iconos de botones que faltan. El " + "juego sigue funcionando; los usará desde su próximo inicio.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "las herramientas del instalador no se iniciaron: vuelve a ejecutar el instalador", + [UI_MENU_PROMPTS_OFF_MODS] = "desactivado: un mod RomFS sustituye sus archivos", + [UI_MENU_PROMPTS_OFF_PATCHES] = "desactivado mientras TOTK_ROMFS_PATCHES esté definido", + [UI_MENU_RESTART] = "Reiniciar ahora", + [UI_MENU_RESTART_DESC] = "Cierra el juego y lo vuelve a iniciar con los nuevos iconos. Se pierde el progreso " + "desde tu último guardado.", + [UI_MENU_RESTART_CONFIRM] = "¿Reiniciar el juego ahora? Se pierde el progreso desde tu último guardado.", + [UI_MENU_RESTART_YES] = "Reiniciar", + [UI_MENU_RESTART_SAVING] = "El juego está guardando: podrás reiniciar en un momento.", + [UI_MENU_GROUP_STICKS] = "Sticks analógicos", + [UI_MENU_LSTICK_DEADZONE] = "Zona muerta del stick izquierdo", + [UI_MENU_RSTICK_DEADZONE] = "Zona muerta del stick derecho", + [UI_MENU_STICK_DEADZONE_DESC] = "Cuánto debe moverse un stick antes de que el juego lo note. Súbela si el " + "personaje o la cámara se mueven solos: suelta el stick, lee «stick ahora» y pon " + "la zona muerta unos puntos por encima.", + [UI_MENU_STICK_DEADZONE_NOW] = "stick ahora: %.0f %%", + [UI_MENU_MOUSE_MODE] = "Cámara con ratón", + [UI_MENU_MOUSE_MODE_DESC] = "Directo: la cámara gira según cuánto se mueve el ratón, como en un juego de PC, sin " + "zona muerta ni curva de stick (versiones 1.4.3 y 1.2.1 del juego; 1.1.0 usa la " + "emulación de stick). Emulación de stick: el ratón actúa como el stick derecho.", + [UI_MENU_MOUSE_STICK] = "Emulación de stick", + [UI_MENU_MOUSE_DIRECT] = "Directo", + [UI_MENU_MENU_CURSOR] = "Ratón en los menús del juego", + [UI_MENU_MENU_CURSOR_DESC] = "En los menús propios del juego (pantalla de título, inventario, tiendas, opciones " + "de diálogo) aparece el puntero: se selecciona el elemento bajo él, el clic " + "izquierdo confirma y el derecho vuelve atrás. Solo si lo último que se usó fue el " + "ratón o una tecla, así que con un mando los menús no cambian (versión 1.4.3 del " + "juego).", + [UI_MENU_MAP_CLICK] = "Clic izquierdo en el mapa", + [UI_MENU_MAP_CLICK_DESC] = "En el mapa de la tableta Sheikah, el botón izquierdo del ratón pulsa A en el cursor " + "del mapa en lugar del botón al que está asignado (predeterminado: Y). Requiere «Ratón " + "en los menús del juego» (versión 1.4.3 del juego).", + [UI_MENU_DIALOGUE_CLICK] = "Clics en diálogos", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Mientras hay un cuadro de diálogo abierto, el clic izquierdo pulsa B (continúa " + "el texto y salta su animación) y el clic derecho pulsa A, en lugar de los " + "botones a los que están asignados (predeterminados: Y, que abre el registro de " + "diálogos, y ZL). Las opciones de diálogo mantienen el puntero: el clic izquierdo " + "elige (versión 1.4.3 del juego).", + [UI_MENU_POINTER_IMAGE] = "Puntero del juego", + [UI_MENU_POINTER_IMAGE_DESC] = "Mientras el cursor no está capturado (menús del juego, este menú, tras Esc), la " + "ventana muestra su propia punta de flecha dorada en lugar de la flecha del " + "sistema, con un tamaño según la escala de la pantalla.", + [UI_MENU_QUICKSAVE] = "Guardado y carga rápidos", + [UI_MENU_QUICKSAVE_DESC] = "Una tecla guarda la partida al momento y otra carga ese guardado (las dos filas de " + "abajo: F6 y F7 de forma predeterminada, como en Half-Life), sin ningún menú en " + "pantalla. Solo teclas del teclado y del ratón, solo la versión 1.4.3 del juego. El " + "guardado rápido pide al juego uno de sus propios autoguardados, así que sustituye al " + "autoguardado más antiguo (el guardado manual se conserva), guarda una copia como " + "guardado rápido (la carpeta quicksave del perfil) y muestra \"Partida guardada\" en " + "la parte superior de la imagen. La carga rápida mantiene la imagen en \"Cargando el " + "guardado rápido\" mientras recorre fuera de la vista la lista de carga del juego, y " + "el juego carga el guardado rápido (unos 5 s). Donde el juego no haría un autoguardado " + "por sí mismo (una cinemática, un diálogo), no se guarda nada y la línea lo indica.", + [UI_MENU_QUICKSAVE_KEY] = "Tecla de guardado rápido", + [UI_MENU_QUICKLOAD_KEY] = "Tecla de carga rápida", + [UI_MENU_QUICKSAVE_KEY_DESC] = "La tecla que inicia el guardado rápido o la carga rápida; F6 y F7 de forma " + "predeterminada, como en Half-Life. Selecciona la celda y pulsa cualquier tecla o " + "botón del ratón; Supr deja esa acción sin tecla. Mientras el guardado rápido está " + "activado, las dos teclas no hacen nada más (aparece una nota cuando una " + "asignación también usa la tecla). totk.ini acepta cualquier nombre de tecla de " + "las asignaciones (quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Partida guardada", + [UI_QS_LOADING] = "Cargando el guardado rápido", + [UI_QS_NOT_NOW] = "El guardado rápido no es posible ahora", + [UI_QS_NONE] = "Aún no hay guardado rápido (la tecla de guardado rápido crea uno)", + [UI_QS_FAILED] = "El guardado rápido falló: consulta totk.log", + [UI_QS_LOAD_FAILED] = "La carga rápida falló: consulta totk.log", + [UI_MENU_MOUSE_SENS] = "Sensibilidad de cámara con ratón", + [UI_MENU_MOUSE_SENS_DESC] = "Lo rápido que el ratón gira la cámara.", + [UI_MENU_WALK_KEY] = "Tecla de caminar", + [UI_MENU_WALK_KEY_DESC] = "Mantenla pulsada para inclinar los sticks del teclado solo en parte, de modo que el " + "teclado camine en lugar de correr. La escala de caminar fija cuánto. El mando y el " + "ratón no se ven afectados.", + [UI_MENU_WALK_KEY_TAKEN] = "también %s", + [UI_MENU_WALK_SCALE] = "Escala de caminar", + [UI_MENU_WALK_SCALE_DESC] = "La inclinación de los sticks del teclado mientras se mantiene la tecla de caminar. " + "La mitad es caminar, la inclinación completa correr.", + [UI_MENU_FREECAM] = "Cámara libre", + [UI_MENU_FREECAM_DESC] = "Permite que una combinación o una tecla de abajo separe la vista de Link y la haga " + "volar. Desactivada de forma predeterminada: así el código de cámara del juego funciona " + "tal como se publicó. Se aplica tras reiniciar. Versión 1.4.3 del juego.", + [UI_MENU_FREECAM_OFF_NOTE] = "Activa «Cámara libre» arriba y reinicia", + [UI_MENU_FREECAM_PAD] = "Botones de cámara libre", + [UI_MENU_FREECAM_PAD_DESC] = "Botones del mando pulsados a la vez que pasan la vista por tres fases: se separa de " + "Link y vuela, se queda donde se dejó mientras sigues jugando con Link, y vuelve. " + "Mientras vuela, el juego no recibe entradas: el stick izquierdo vuela en la " + "dirección de la vista y de lado, los gatillos arriba y abajo, el stick derecho " + "gira, y cada pulsación de L o R divide a la mitad o duplica la velocidad. Con la " + "vista fija, Link camina hacia donde apunta el stick izquierdo en la pantalla. " + "Versión 1.4.3 del juego.", + [UI_MENU_FREECAM_PAD_V143] = "Solo la versión 1.4.3 del juego", + [UI_MENU_FREECAM_KEY] = "Tecla de cámara libre", + [UI_MENU_FREECAM_KEY_DESC] = "Una tecla que pasa la vista por las mismas fases: se separa de Link y vuela, se " + "queda quieta mientras sigues jugando con Link, y vuelve. Mientras vuela: W A S D " + "vuelan en la dirección de la vista y de lado, las teclas asignadas a ZR y ZL (X y Z " + "de forma predeterminada) arriba y abajo, el ratón y las flechas giran, y las teclas " + "asignadas a L y R (Q y R) dividen a la mitad o duplican la velocidad. Versión 1.4.3 " + "del juego.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Jugabilidad", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Ajustes de jugabilidad", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Controles con la rueda del ratón para el giro y la distancia de la " + "Ultramano, el cambio de objetos y armas, y un zoom suave del mapa.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Giro de Ultramano con rueda", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Gira directamente con la rueda del ratón los objetos sujetos con la " + "Ultramano.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Ultramano: eje de giro con C", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "Mantén C mientras usas la rueda para girar los objetos sujetos " + "alrededor del eje alternativo.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Sensibilidad de giro de Ultramano", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Lo rápido que la rueda del ratón gira los objetos sujetos.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Distancia de Ultramano con rueda", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Clic derecho + rueda del ratón acerca o aleja los objetos sujetos.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Sensibilidad de distancia de Ultramano", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Lo rápido que la rueda del ratón cambia la distancia del objeto.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Elegir arma con la rueda", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Usa la rueda del ratón mientras exploras libremente para cambiar de arma. " + "Confirma con E.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Sensibilidad de rueda de armas", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Pasos de la rueda necesarios para pasar a la siguiente arma.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Rueda en el menú rápido", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Usa la rueda del ratón para recorrer los objetos mientras un menú de " + "selección rápida está abierto.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Sensibilidad de rueda del menú rápido", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Pasos de la rueda necesarios para avanzar entre los objetos de los " + "menús de selección rápida.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "Navegación A / D en menú rápido", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "Pulsa A / D para moverte a la izquierda y a la derecha en los menús de " + "selección rápida.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Zoom suave del mapa", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Zoom suave con inercia en el mapa de la tableta Sheikah usando la rueda del " + "ratón.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Sensibilidad de zoom del mapa", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Lo rápido que la rueda del ratón amplía o reduce el mapa.", + [UI_MENU_STICK_SENS] = "Velocidad de cámara con stick", + [UI_MENU_STICK_SENS_DESC] = "Multiplica la velocidad de cámara del stick derecho del juego, velocidad máxima " + "incluida, en cada una de las cinco sensibilidades de cámara del juego. El ratón " + "conserva su propio ajuste.", + [UI_BINDS_HELP] = "Selecciona una celda y pulsa A o Intro, y luego la tecla, el botón del ratón o el botón del " + "mando. Supr o X vacía una celda. Una tecla ya en uso se mueve aquí; un botón del mando se " + "intercambia con el que sustituye.", + [UI_BINDS_COL_KEY1] = "Tecla 1", + [UI_BINDS_COL_KEY2] = "Tecla 2", + [UI_BINDS_COL_PAD] = "Mando", + [UI_BINDS_GROUP_BUTTONS] = "Botones", + [UI_BINDS_GROUP_MOVE] = "Movimiento", + [UI_BINDS_GROUP_CAMERA] = "Cámara", + [UI_BINDS_PRESS_KEY] = "Pulsa una tecla o un botón del ratón para %s", + [UI_BINDS_PRESS_PAD] = "Pulsa un botón del mando para %s", + [UI_BINDS_CANCEL_HINT] = "Esc cancela, o espera %d s", + [UI_BINDS_TAKEN] = "%s se quitó de %s", + [UI_BINDS_SWAPPED] = "%s intercambiado con %s", + [UI_BINDS_RESET] = "Restablecer todos los botones", + [UI_BINDS_RESET_DESC] = "Vuelve a las teclas y botones del mando predeterminados. La distribución de botones de " + "arriba vuelve a aplicarse: los botones del mando reasignados se quedan donde los pusiste " + "hasta este restablecimiento.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Pulsar stick izquierdo", + [UI_BIND_RCLICK] = "Pulsar stick derecho", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "Más", + [UI_BIND_MINUS] = "Menos", + [UI_BIND_LEFT] = "Cruceta izquierda", + [UI_BIND_UP] = "Cruceta arriba", + [UI_BIND_RIGHT] = "Cruceta derecha", + [UI_BIND_DOWN] = "Cruceta abajo", + [UI_BIND_LSTICK_LEFT] = "Moverse a la izquierda", + [UI_BIND_LSTICK_UP] = "Avanzar", + [UI_BIND_LSTICK_RIGHT] = "Moverse a la derecha", + [UI_BIND_LSTICK_DOWN] = "Retroceder", + [UI_BIND_RSTICK_LEFT] = "Cámara a la izquierda", + [UI_BIND_RSTICK_UP] = "Cámara arriba", + [UI_BIND_RSTICK_RIGHT] = "Cámara a la derecha", + [UI_BIND_RSTICK_DOWN] = "Cámara abajo", + [UI_BIND_DESC_A] = "Interactuar, recoger, hablar.", + [UI_BIND_DESC_B] = "Correr, cancelar, volver.", + [UI_BIND_DESC_X] = "Saltar.", + [UI_BIND_DESC_Y] = "Atacar.", + [UI_BIND_DESC_LCLICK] = "Agacharse.", + [UI_BIND_DESC_RCLICK] = "Vista en primera persona.", + [UI_BIND_DESC_L] = "Habilidades.", + [UI_BIND_DESC_R] = "Lanzar un arma.", + [UI_BIND_DESC_ZL] = "Escudo, fijar objetivo.", + [UI_BIND_DESC_ZR] = "Arco.", + [UI_BIND_DESC_PLUS] = "Menú, inventario.", + [UI_BIND_DESC_MINUS] = "Mapa.", + [UI_BIND_DESC_DPAD] = "Selección rápida.", + [UI_BIND_DESC_MOVE] = "Mueve a Link como el stick izquierdo. El stick izquierdo del mando también funciona " + "siempre.", + [UI_BIND_DESC_CAMERA] = "Gira la cámara como el stick derecho. El ratón y el stick derecho del mando también " + "funcionan siempre.", + [UI_BIND_SHAKE] = "Agitar el stick de cámara", + [UI_BIND_DESC_SHAKE] = "Mueve el stick derecho a izquierda y derecha para el juego: separa una pieza unida de lo " + "que sujeta la Ultramano. Mantener pulsada la tecla sigue agitando.", + [UI_KEY_SPACE] = "Espacio", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "Mayús izq.", + [UI_KEY_LCTRL] = "Ctrl izq.", + [UI_KEY_UP] = "Flecha arriba", + [UI_KEY_DOWN] = "Flecha abajo", + [UI_KEY_LEFT] = "Flecha izquierda", + [UI_KEY_RIGHT] = "Flecha derecha", + [UI_KEY_MOUSE_L] = "Botón izquierdo", + [UI_KEY_MOUSE_R] = "Botón derecho", + [UI_KEY_MOUSE_M] = "Botón central", + [UI_KEY_MOUSE_X1] = "Ratón 4", + [UI_KEY_MOUSE_X2] = "Ratón 5", + [UI_KEY_ENTER] = "Intro", + [UI_KEY_BACKSPACE] = "Retroceso", + [UI_KEY_RSHIFT] = "Mayús der.", + [UI_KEY_RCTRL] = "Ctrl der.", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Bloq Mayús", + [UI_KEY_INSERT] = "Insert", + [UI_KEY_DELETE] = "Supr", + [UI_KEY_HOME] = "Inicio", + [UI_KEY_END] = "Fin", + [UI_KEY_PAGEUP] = "Re Pág", + [UI_KEY_PAGEDOWN] = "Av Pág", + [UI_KEY_NUM_FMT] = "Num %s", + [UI_PAD_SOUTH] = "Botón inferior", + [UI_PAD_EAST] = "Botón derecho", + [UI_PAD_WEST] = "Botón izquierdo", + [UI_PAD_NORTH] = "Botón superior", + [UI_PAD_LSTICK] = "Stick izquierdo", + [UI_PAD_RSTICK] = "Stick derecho", + [UI_PAD_L] = "Botón superior izquierdo", + [UI_PAD_R] = "Botón superior derecho", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Atrás", + [UI_PAD_DPAD_LEFT] = "Cruceta izquierda", + [UI_PAD_DPAD_UP] = "Cruceta arriba", + [UI_PAD_DPAD_RIGHT] = "Cruceta derecha", + [UI_PAD_DPAD_DOWN] = "Cruceta abajo", + [UI_PAD_ZL] = "Gatillo izquierdo", + [UI_PAD_ZR] = "Gatillo derecho", + [UI_PAD_LPADDLE1] = "Botón trasero izquierdo", + [UI_PAD_RPADDLE1] = "Botón trasero derecho", + [UI_PAD_LPADDLE2] = "Botón trasero izquierdo 2", + [UI_PAD_RPADDLE2] = "Botón trasero derecho 2", + [UI_PAD_TOUCHPAD] = "Pulsar panel táctil", + [UI_PAD_CROSS] = "Cruz", + [UI_PAD_CIRCLE] = "Círculo", + [UI_PAD_SQUARE] = "Cuadrado", + [UI_PAD_TRIANGLE] = "Triángulo", + [UI_MENU_AMIIBO_DIR] = "Carpeta de amiibo", + [UI_MENU_AMIIBO_OPEN] = "Abrir", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Carpeta predeterminada", + [UI_MENU_AMIIBO_REFRESH] = "Actualizar", + [UI_MENU_AMIIBO_PICK] = "Volcados de amiibo (archivos .bin o .nfc de 540 bytes):", + [UI_MENU_AMIIBO_NO_DIR] = "No se puede abrir la carpeta %s", + [UI_MENU_AMIIBO_READER] = "Lector NFC", + [UI_MENU_AMIIBO_STATE] = "Lector:", + [UI_MENU_AMIIBO_STATE_IDLE] = "listo", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "el juego espera un amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo en el lector", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "el juego está leyendo el amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "desactivado", + [UI_MENU_AMIIBO_FILE] = "Archivo elegido:", + [UI_MENU_AMIIBO_NO_FILE] = "(ningún archivo elegido)", + [UI_MENU_AMIIBO_TAP] = "Acercar el amiibo", + [UI_MENU_AMIIBO_REMOVE] = "Retirar el amiibo", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Retirar el amiibo solo tras acercarlo", + [UI_MENU_AMIIBO_HOLD] = "Tiempo en el lector", + [UI_MENU_AMIIBO_SECONDS] = "%.1f s", + [UI_MENU_AMIIBO_TAG] = "Amiibo en el lector:", + [UI_MENU_AMIIBO_NO_TAG] = "No hay ningún amiibo en el lector.", + [UI_MENU_AMIIBO_TAG_FILE] = "Archivo: %s", + [UI_MENU_AMIIBO_TAG_ID] = "Personaje %s, serie %02x, número %04x, tipo %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "Listo", + [UI_MENU_AMIIBO_TAPPED] = "Acercado: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "No es un volcado de amiibo (NTAG215 de 540 bytes): %s", + [UI_MENU_AMIIBO_REMOVED] = "Amiibo retirado", + [UI_MENU_AMIIBO_STATUS] = "Estado: %s", + [UI_MENU_MENU_LANG] = "Idioma del menú", + [UI_MENU_MENU_LANG_DESC] = "Idioma de este menú y del indicador de rendimiento.", + [UI_MENU_MENU_LANG_AUTO] = "Automático (según Windows)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "Muestra \"Jugando a TotK Recomp\" con el tiempo de juego en tu estado de Discord " + "mientras el juego está abierto. discord_app_id y discord_image en totk.ini eligen " + "la aplicación.", + [UI_MENU_ADV_WARNING] = "Estos ajustes son para pruebas y resolución de problemas. Cámbialos solo si sabes por " + "qué.", + [UI_MENU_GROUP_SCHED] = "Planificación", + [UI_MENU_GROUP_SHADERS] = "Shaders y pipelines", + [UI_MENU_GROUP_TEXMEM] = "Texturas y memoria", + [UI_MENU_GROUP_FIXES] = "Correcciones de renderizado", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "Diagnóstico", + [UI_MENU_ASYNC_PREEMPT] = "Apropiación de núcleos virtuales", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Permite que un hilo del juego interrumpa a otro en el mismo núcleo virtual.", + [UI_MENU_PREEMPT_OFF] = "No", + [UI_MENU_PREEMPT_ON] = "Sí", + [UI_MENU_PREEMPT_INHERIT] = "Solo herencia", + [UI_MENU_REPLAY_ASYNC] = "Preparación de fotogramas GPU en su propio hilo", + [UI_MENU_REPLAY_ASYNC_DESC] = "Prepara los fotogramas para la GPU en un hilo aparte en lugar del hilo del juego. " + "Añade hasta un fotograma de latencia.", + [UI_MENU_REPLAY_WORKERS] = "Hilos de preparación GPU", + [UI_MENU_REPLAY_WORKERS_DESC] = "Registra los fotogramas grandes para la GPU en varios hilos a la vez. Ayuda " + "cuando la CPU limita los fotogramas por segundo; requiere 8 procesadores lógicos " + "o más. No: registra en un solo hilo.", + [UI_MENU_REPLAY_WORKERS_NOW] = "ahora: %s", + [UI_MENU_TIMER_1MS] = "Temporizador de Windows de 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Sube la resolución del temporizador del sistema a 1 ms para un ritmo de fotogramas " + "más estable.", + [UI_MENU_PIPE_WAIT] = "Gestión de draws en espera", + [UI_MENU_PIPE_WAIT_DESC] = "Predeterminado mantiene la planificación actual con un worker reservado para draws en " + "espera; Antiguo (draw) usa la planificación anterior.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Predeterminado", + [UI_MENU_PIPE_WAIT_DRAW] = "Antiguo (draw)", + [UI_MENU_PIPE_SKIP] = "Draws omitidos mientras se crea un pipeline", + [UI_MENU_PIPE_SKIP_DESC] = "Qué draws se descartan en lugar de esperar a su pipeline.", + [UI_MENU_PIPE_SKIP_STRICT] = "Estricto", + [UI_MENU_PIPE_SKIP_ANY] = "Cualquiera", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Pasadas a pantalla completa", + [UI_MENU_LIB_PREBUILD] = "Precompilación de bibliotecas de etapas", + [UI_MENU_LIB_PREBUILD_DESC] = "Compila de antemano en segundo plano las bibliotecas de etapas de shaders.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Hilos de precompilación de bibliotecas", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Hilos usados para la precompilación; Automático elige un número según tu " + "CPU.", + [UI_MENU_PIPE_PREBUILD] = "Precompilación de pipelines", + [UI_MENU_PIPE_PREBUILD_DESC] = "Compila de antemano los pipelines conocidos.", + [UI_MENU_PREWARM_XLATE] = "Precalentamiento del traductor", + [UI_MENU_PREWARM_XLATE_DESC] = "Hilos que traducen los shaders conocidos al iniciar; Automático usa la mitad de " + "los hilos de la CPU, 16 como máximo.", + [UI_MENU_GPL] = "Biblioteca de pipelines gráficos", + [UI_MENU_GPL_DESC] = "Usa la extensión de bibliotecas de pipelines de Vulkan; desactívala si tu controlador falla " + "con ella.", + [UI_MENU_ASTC] = "Descodificación de texturas ASTC", + [UI_MENU_ASTC_DESC] = "Dónde se descodifican las texturas comprimidas ASTC.", + [UI_MENU_ASTC_AUTO] = "Automático", + [UI_MENU_ASTC_GPU] = "Shader de GPU", + [UI_MENU_ASTC_NATIVE] = "Nativo", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "Modo de memoria GPU", + [UI_MENU_MEMORY_DESC] = "Cómo se comparte la memoria del juego con la GPU.", + [UI_MENU_MEMORY_AUTO] = "Automático", + [UI_MENU_MEMORY_IMPORT] = "Importar", + [UI_MENU_MEMORY_MIRROR] = "Espejo", + [UI_MENU_MEMORY_VERIFY] = "Verificar", + [UI_MENU_TEX_ALIAS] = "Alias de texturas", + [UI_MENU_TEX_ALIAS_DESC] = "Una textura nueva creada sobre la memoria de una textura viva empieza con ese " + "contenido en lugar de vacía.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Límite de memoria de texturas", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Porcentaje de memoria de vídeo por encima del cual se descartan las texturas " + "que el juego liberó (vuelven del almacenamiento cuando se usan de nuevo). 0 " + "las conserva.", + [UI_MENU_ASTC_BC] = "Comprimir ASTC a BC3", + [UI_MENU_ASTC_BC_DESC] = "Con el descodificador de GPU: recodifica las texturas ASTC descodificadas a BC3, una " + "cuarta parte de la memoria de vídeo. Para GPU de 4 GB o menos; las texturas se ven algo " + "más pixeladas.", + [UI_MENU_LOD_GUARD] = "Protección de LOD", + [UI_MENU_LOD_GUARD_DESC] = "Evita que los objetos parpadeen en el lugar equivocado o que la lejanía se vea plana " + "durante un fotograma, esperando a que el juego termine de reescribir los datos de " + "nivel de detalle antes de que la GPU los lea.", + [UI_MENU_FIX_C0] = "Corrección del búfer de constantes", + [UI_MENU_FIX_C0_DESC] = "Rellena el banco de constantes c0 reservado al controlador (tamaños de almacenamiento, " + "tamaño de dispatch, tamaño de punto, instancia base) en lugar de leer ceros.", + [UI_MENU_FIX_ZERO] = "Poner a cero la memoria GPU nueva", + [UI_MENU_FIX_ZERO_DESC] = "Los nuevos bloques de memoria GPU empiezan llenos de ceros, como la memoria de Switch.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Niebla y partículas tras DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, la niebla, el polvo y otras partículas se dibujan sobre la imagen " + "que DLSS ya ha suavizado, como las dibuja el juego sin DLSS: las partículas " + "pequeñas en la niebla (santuarios) ya no desaparecen ni dejan estelas. No: " + "DLSS también procesa estos efectos, como antes. Solo en el modo DLAA; los " + "modos DLSS con escalado siempre los procesan. Se aplica al momento.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Exposición fija de DLSS", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS toma el brillo de la imagen del juego tal cual en lugar de estimar la " + "exposición en cada fotograma: en escenas oscuras (el Subsuelo) las grandes " + "zonas con niebla ya no se oscurecen ni se aclaran durante un fotograma " + "mientras se mueve la cámara. No: DLSS estima la exposición por sí mismo, " + "como antes. Se aplica al momento.", + [UI_MENU_BIND_SKIP] = "Omitir enlaces repetidos", + [UI_MENU_BIND_SKIP_DESC] = "Optimización: omite los enlaces que no cambiaron.", + [UI_MENU_SHADER_MEMO] = "Memoria de shaders", + [UI_MENU_SHADER_MEMO_DESC] = "Optimización: recuerda las búsquedas de shaders.", + [UI_MENU_PIPE_MEMO] = "Memoria de pipelines", + [UI_MENU_PIPE_MEMO_DESC] = "Optimización: reutiliza el pipeline del draw anterior cuando su estado se repite.", + [UI_MENU_TEX_MEMO] = "Memoria de enlaces de texturas", + [UI_MENU_TEX_MEMO_DESC] = "Optimización: recuerda los descriptores de texturas entre draws.", + [UI_MENU_DESC_TEMPLATE] = "Plantillas de descriptores", + [UI_MENU_DESC_TEMPLATE_DESC] = "Optimización: actualiza los descriptores en bloque.", + [UI_MENU_PUSH_SKIP] = "Omitir push constants repetidas", + [UI_MENU_PUSH_SKIP_DESC] = "Optimización: omite las push constants que no cambiaron.", + [UI_MENU_SPLIT_DRAWS] = "Envío anticipado a la GPU", + [UI_MENU_SPLIT_DRAWS_DESC] = "Envía el trabajo de GPU por partes cada N draws entre pasadas para que la GPU " + "empiece antes; 0 lo desactiva.", + [UI_MENU_VK_VALIDATION] = "Capa de validación", + [UI_MENU_VK_VALIDATION_DESC] = "Comprueba cada llamada a Vulkan y ralentiza mucho el juego.", + [UI_MENU_VK_VALIDATION_MISSING] = "La capa de validación no está instalada.", + [UI_MENU_VK_DYN_VERTEX] = "Estado de vértices dinámico", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Fuerza la entrada de vértices dinámica activada o desactivada; el valor " + "predeterminado depende de la GPU.", + [UI_MENU_VK_DYN_A2C] = "Alpha to coverage dinámico", + [UI_MENU_VK_DYN_A2C_DESC] = "Fuerza el alpha to coverage dinámico activado o desactivado. Predeterminado: " + "desactivado con el controlador de AMD para RDNA 2 y anteriores, que con él dibuja a " + "los personajes en negro; activado en los demás.", + [UI_MENU_VK_SUBGROUP_PIN] = "Fijar tamaño de subgrupo", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Fija el tamaño de subgrupo de los shaders.", + [UI_MENU_TRACE] = "Registro de rendimiento", + [UI_MENU_TRACE_DESC] = "Escribe los tiempos de fotograma en un archivo.", + [UI_MENU_FLIGHT] = "Caja negra", + [UI_MENU_FLIGHT_DESC] = "Guarda un historial corto y lo escribe cuando un fotograma se congela.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Umbral de congelación (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Tiempo de fotograma que cuenta como congelación.", + [UI_MENU_PASS_CRUMBS] = "Marcas de pasadas GPU", + [UI_MENU_PASS_CRUMBS_DESC] = "Tras un fallo de la GPU, el registro indica la pasada de renderizado que se estaba " + "ejecutando. Automático: solo AMD. Sí: también NVIDIA, con un pequeño coste.", + [UI_MENU_INPUT_RECORD] = "Grabación de entradas", + [UI_MENU_INPUT_RECORD_DESC] = "Escribe tus entradas en un archivo para informes de errores.", + [UI_MENU_OPEN_LOG] = "Abrir carpeta de registros", + [UI_MENU_OPEN_LOG_DESC] = "Muestra la carpeta con los archivos de registro.", + [UI_MENU_COPY_INFO] = "Copiar información del sistema", + [UI_MENU_COPY_INFO_DESC] = "Copia la GPU, el controlador, la CPU, la RAM y los ajustes cambiados al portapapeles.", + [UI_MENU_COPY_INFO_DONE] = "Copiado", + [UI_MENU_ACTION_FAILED] = "no funcionó", + [UI_MENU_RESET] = "Restablecer todos los ajustes", + [UI_MENU_RESET_DESC] = "Se aplica a todas las pestañas.", + [UI_MENU_RESET_CONFIRM] = "¿Restablecer todos los ajustes a sus valores predeterminados?", + [UI_MENU_RESET_YES] = "Restablecer", + [UI_MENU_RESET_NO] = "Cancelar", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "juego %.0f%%", + [UI_MENU_OV_MAX_MS] = "máx. %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "Fotograma", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% mín. %.0f", + [UI_MENU_OV_LOW01] = "0.1%% mín. %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Temperatura", + [UI_MENU_OV_POWER] = "Consumo", + [UI_MENU_OV_CLOCK] = "Frecuencia", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "Preparación de fotogramas GPU", + [UI_MENU_OV_GPU_TIME] = "GPU ocupada por fotograma", + [UI_MENU_OV_PIPE_WAIT] = "Esperas de pipelines", + [UI_MENU_OV_SHADER_WAIT] = "Esperas de shaders", + [UI_MENU_OV_TEX_UPLOADS] = "Subidas de texturas", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "juego %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "%.1f por fotograma", + [UI_MENU_OV_WINDOW] = "Ventana", + [UI_MENU_OV_OUTPUT] = "Imagen del juego", + [UI_MENU_OV_SCENE] = "Escena 3D", + [UI_MENU_OV_UPSCALER] = "Escalador 3D", + [UI_MENU_OV_SCALING] = "Escalado", + [UI_MENU_OV_LIMIT] = "Límite de fotogramas", + [UI_MENU_OV_PRESENT] = "Presentación", + [UI_MENU_OV_SHOWN] = "Mostrados", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, nitidez %d%%", + [UI_MENU_OV_SCALE_NONE] = "ninguno (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilineal", + [UI_MENU_OV_SCALE_DOWN] = "bilineal (FSR solo amplía)", + [UI_MENU_TAB_CHEATS] = "Trucos", + [UI_MENU_CHEATS_NONE] = "No hay trucos para esta versión del juego. Los trucos de un mod son un archivo de trucos " + "de Atmosphère en su carpeta cheats, con el nombre de la build del juego: " + "mods\\\\cheats\\%s. Reinicia el juego para leerlos. Para los trucos que cambian el " + "código del juego, el juego se reconstruye al iniciar (unos minutos).", + [UI_MENU_CHEATS_MOD] = "%s: %d trucos", + [UI_MENU_CHEAT_CODE_DESC] = "Cambia el código del juego. Se activa al momento.", + [UI_MENU_CHEAT_KEY_DESC] = "Cambia el código del juego mientras mantienes %s. Se activa al momento.", + [UI_MENU_CHEAT_DATA_DESC] = "Escribe en la memoria del juego en cada fotograma mientras está activado.", + [UI_MENU_CHEAT_MASTER] = "siempre activo", + [UI_MENU_CHEAT_MASTER_DESC] = "El código maestro del archivo: siempre está activo.", + [UI_MENU_CHEAT_RESTORE] = "no hace falta", + [UI_MENU_CHEAT_RESTORE_DESC] = "Solo vuelve a escribir el código original del juego. Desactivar un truco ya lo " + "hace.", + [UI_MENU_CHEAT_REBUILD] = "tras la reconstrucción", + [UI_MENU_CHEAT_REBUILD_DESC] = "Este truco cambia el código del juego y es nuevo o se editó desde que se " + "construyó el juego. El juego lo incorpora en el próximo inicio (unos minutos), o " + "usa Reconstruir el juego ahora.", + [UI_MENU_CHEAT_UNSUPPORTED] = "no compatible", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Este truco no se puede usar con esta versión del juego:", + [UI_MENU_CHEATS_REBUILD] = "Reconstruir el juego ahora", + [UI_MENU_CHEATS_REBUILD_DESC] = "Algunos trucos cambian el código del juego y no están incorporados: son nuevos o " + "se editaron, o su última reconstrucción falló o se canceló. Cierra el juego; el " + "instalador los incorpora (unos minutos) y vuelve a iniciar el juego. Se pierde " + "el progreso desde tu último guardado.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Este mod parchea el código del juego (exefs) de una forma que el port no " + "puede aplicar, así que todo el mod queda desactivado. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Sus parches de código (exefs) son para otra versión del juego.", + [UI_MENU_MODS_EXEFS_ON] = "Parches de código en uso: %d archivos.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Parches de código en uso: %d archivos. Sustituyen al parche propio del port " + "%s, que queda desactivado mientras este mod esté activo.", + [UI_MENU_MODS_CODE_SKIPPED] = "Su propio código de juego (%s) no se carga: se usa el resto del mod. Desactiva el " + "mod si el juego se comporta mal con él.", + [UI_MENU_MODS_PLUGIN_ON] = "Su plugin funciona: %d enganches en el código del juego.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Su plugin %s no puede funcionar en el port: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "Todo el mod queda desactivado. Su interruptor \"Usar ... sin su código\" de " + "abajo usa el resto.", + [UI_MENU_MODS_PLUGIN_OFF] = "Su plugin queda desactivado esta vez: se inició de forma distinta que en la " + "reconstrucción (%s). El juego lo reconstruye en el próximo inicio.", + [UI_MENU_MODS_WITHOUT_CODE] = "Usar %s sin su código", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "El mod de arriba trae código que el port no puede ejecutar: su propio código " + "de juego (un plugin subsdk o un main sustituido) o parches de código (exefs) " + "que el port no puede aplicar. No: todo el mod queda desactivado. Sí: ese " + "código se omite y se usa el resto del mod: sus archivos RomFS, sus trucos y " + "los parches de código que funcionan. Sus archivos pueden contar con el código " + "que falta; vuelve a desactivarlo si el juego se comporta mal. Se aplica en el " + "próximo inicio.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Activado para todos los mods: mods_without_code = 1 en totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u de sus archivos de parches de código (exefs) no se pueden aplicar y se omiten: " + "se usa el resto del mod. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u de sus archivos sustituyen a los de %s, que está más abajo en la lista.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u bytes de sus cambios en los datos del juego vienen de %s, que está más " + "arriba en la lista.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u bytes de sus cambios en los datos del juego sustituyen a los de %s, que está " + "más abajo en la lista.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u de sus puntos de parche de código quedan anulados por %s, que está más " + "arriba en la lista.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Anula %u puntos de parche de código de %s, que está más abajo en la lista.", +}; + +// Italian +static const char *const text_it[UI_TEXT_COUNT] = { + SWKBD("Inserimento testo", "Inserisci un nome", "Cavallo", "OK", "Annulla", "Controller: A = OK, B = Annulla"), + + [UI_MENU_TITLE] = "Impostazioni", + [UI_MENU_TAB_SCREEN] = "Schermo", + [UI_MENU_TAB_GAME] = "Gioco", + [UI_MENU_TAB_MODS] = "Mod", + [UI_MENU_TAB_SOUND] = "Audio", + [UI_MENU_TAB_CONTROLS] = "Comandi", + [UI_MENU_TAB_AMIIBO] = "Amiibo", + [UI_MENU_TAB_MENU] = "Menu", + [UI_MENU_TAB_ADVANCED] = "Avanzate", + [UI_MENU_CONTINUE] = "Continua", + [UI_MENU_QUIT] = "Esci dal gioco", + [UI_MENU_ON] = "Sì", + [UI_MENU_OFF] = "No", + [UI_MENU_AUTO] = "Automatico", + [UI_MENU_DEFAULT_MARK] = "predefinito", + [UI_MENU_AFTER_RESTART] = "dopo il riavvio", + [UI_MENU_SET_BY_ENV] = "impostato da una variabile d'ambiente", + [UI_MENU_SAVE_FAILED] = "impossibile salvare le impostazioni", + [UI_MENU_VERSION] = "TotK Recomp %s, gioco %s", + [UI_MENU_FULLSCREEN] = "Schermo intero", + [UI_MENU_FULLSCREEN_DESC] = "Il gioco riempie lo schermo; F11 lo attiva e disattiva.", + [UI_MENU_WINDOW_SIZE] = "Dimensione finestra", + [UI_MENU_WINDOW_SIZE_DESC] = "Dimensione della finestra del gioco quando non è a schermo intero.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Personalizzata", + [UI_MENU_PRESENT] = "Presentazione", + [UI_MENU_PRESENT_DESC] = "Come i fotogrammi completati arrivano sullo schermo.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", + [UI_MENU_PRESENT_VSYNC] = "VSync", + [UI_MENU_PRESENT_IMMEDIATE] = "Immediata", + [UI_MENU_PRESENT_IN_USE] = "in uso: %s", + [UI_MENU_GPU] = "Scheda grafica", + [UI_MENU_GPU_DESC] = "Il dispositivo Vulkan che disegna il gioco.", + [UI_MENU_GPU_AUTO] = "Automatica", + [UI_MENU_PERF_OVERLAY] = "Indicatore prestazioni", + [UI_MENU_PERF_OVERLAY_DESC] = "Fotogrammi al secondo nell'angolo in alto a destra. Completo aggiunge i tempi dei " + "fotogrammi con un grafico, il carico di CPU, GPU e memoria, le temperature e le " + "attese del thread di rendering. F10 cambia modalità.", + [UI_MENU_PERF_OFF] = "No", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "Completo", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "%.0f fps disegnati, %.0f mostrati", + [UI_MENU_GRAPHICS] = "Immagine", + [UI_MENU_OUTPUT_RES] = "Risoluzione del gioco", + [UI_MENU_OUTPUT_RES_DESC] = "La dimensione in cui il gioco disegna immagine e interfaccia. Sopra 1920 x 1080 il " + "gioco richiede più memoria video e tempo GPU. Un formato più largo (21:9) allarga la " + "visuale della telecamera e sposta l'HUD negli angoli dello schermo; uno più alto " + "(16:10, Steam Deck) lo sposta sui bordi superiore e inferiore.", + [UI_MENU_HUD_WIDTH] = "Larghezza HUD", + [UI_MENU_HUD_WIDTH_DESC] = "Su uno schermo più largo di 16:9, quanto distano i lati sinistro e destro dell'HUD. " + "Schermo intero li mette ai bordi dello schermo; 21:9 o 16:9 mantiene l'HUD al centro " + "dello schermo, in un'area di quel formato. Un layout mancante viene creato in " + "background e usato dopo il riavvio.", + [UI_MENU_HUD_WIDTH_FULL] = "Schermo intero", + [UI_MENU_RENDER_SCALE] = "Scala di rendering 3D", + [UI_MENU_RENDER_SCALE_DESC] = "Dimensione della scena 3D rispetto alla risoluzione del gioco; l'FSR del gioco la " + "porta a quella dimensione. Sopra il 100 % smussa i bordi seghettati " + "(supersampling) con un alto costo per la GPU.", + [UI_MENU_RENDER_SCALE_GAME] = "Gioco (83 %)", + [UI_MENU_DYNAMIC_RES] = "Risoluzione dinamica", + [UI_MENU_DYNAMIC_RES_DESC] = "Permette al gioco di ridurre la scena 3D al 90 o all'80 %. Il gioco decide in base " + "a una stima fatta per Switch che ignora la tua GPU, quindi le scene ampie scendono " + "anche su un PC veloce. No mantiene la scala di rendering.", + [UI_MENU_UPSCALER] = "Ridimensionamento alla finestra", + [UI_MENU_UPSCALER_DESC] = "Come viene ridimensionata l'immagine quando la finestra è più grande della risoluzione " + "del gioco. FSR mantiene bordi e dettagli più nitidi del bilineare.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "Bilineare", + [UI_MENU_ASPECT] = "Forma dell'immagine", + [UI_MENU_ASPECT_DESC] = "Quando la forma della finestra differisce da quella della risoluzione del gioco " + "(un'immagine 16:9 su uno schermo 21:9): mantenere la forma con bande nere o allungarla " + "sulla finestra.", + [UI_MENU_ASPECT_FIT] = "Bande nere", + [UI_MENU_ASPECT_STRETCH] = "Allunga", + [UI_MENU_MOVIE_ASPECT] = "Forma dei filmati", + [UI_MENU_MOVIE_ASPECT_DESC] = "Quando la risoluzione del gioco non è 16:9, mantenere la forma originale dei " + "filmati con bande nere o allungarli sull'intera immagine. Si applica dal filmato " + "successivo.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Bande nere", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "Allunga", + [UI_MENU_FOV] = "Campo visivo", + [UI_MENU_FOV_DESC] = "Quanta parte del mondo mostra la telecamera, in percentuale di quella del gioco. Solo " + "versione 1.4.3 del gioco.", + [UI_MENU_SHADOW_RES] = "Dimensione della mappa delle ombre", + [UI_MENU_SHADOW_RES_DESC] = "Dimensione della mappa delle ombre del sole. Quella del gioco cambia con la visuale, " + "fino a circa 400 vicino al suolo, quindi le ombre delle foglie sembrano squadrate e " + "saltano; una dimensione fissa le mantiene ferme e più nitide. Sopra 1024 le ombre " + "costano più tempo GPU e memoria video.", + [UI_MENU_SHADOW_RES_GAME] = "Gioco (variabile)", + [UI_MENU_ANISO] = "Filtro delle texture", + [UI_MENU_ANISO_DESC] = "Filtro anisotropico delle texture: terreno, strade e muri visti di sbieco restano nitidi " + "in lontananza invece di sfocarsi. Gioco: il livello che chiede il gioco, come su Switch.", + [UI_MENU_ANISO_GAME] = "Gioco", + [UI_MENU_LOD_STEADY] = "Dettaglio stabile sotto carico", + [UI_MENU_LOD_STEADY_DESC] = "Salta l'impostazione del gioco che riduce il dettaglio di modelli e texture quando i " + "fotogrammi al secondo calano, come fa la mod per emulatore Disable LOD Quality " + "Reduction. Versioni del gioco 1.2.1 e 1.4.3. Lasciala disattivata sui PC poco " + "potenti: lì questa riduzione mantiene alti i fotogrammi al secondo.", + [UI_MENU_SHARPNESS] = "Nitidezza FSR", + [UI_MENU_SHARPNESS_DESC] = "Nitidezza dopo il ridimensionamento FSR; 0 la disattiva.", + [UI_MENU_COLOR] = "Colore", + [UI_MENU_COLOR_PRESET] = "Profilo colore", + [UI_MENU_COLOR_PRESET_DESC] = "Imposta i quattro valori qui sotto. Vivido: più contrasto e saturazione, ombre un " + "po' più aperte (pensato per schermi OLED). Nitidezza: un po' più di contrasto, " + "saturazione e luminosità. Cambiare un valore porta il profilo a Personalizzato. " + "L'HUD cambia con l'immagine; questo menu no.", + [UI_MENU_COLOR_DEFAULT] = "Quello del gioco", + [UI_MENU_COLOR_VIVID] = "Vivido (OLED)", + [UI_MENU_COLOR_CLARITY] = "Chiarezza", + [UI_MENU_COLOR_CUSTOM] = "Personalizzato", + [UI_MENU_COLOR_BRIGHTNESS] = "Luminosità", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Aggiunta a ogni colore; 0 la lascia invariata.", + [UI_MENU_COLOR_CONTRAST] = "Contrasto", + [UI_MENU_COLOR_CONTRAST_DESC] = "Allontana i colori dal grigio medio (sopra il 100 %) o li avvicina; 100 % li " + "lascia invariati.", + [UI_MENU_COLOR_SATURATION] = "Saturazione", + [UI_MENU_COLOR_SATURATION_DESC] = "Intensità del colore rispetto al grigio; 100 % la lascia invariata.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "Sotto 1 schiarisce i toni scuri e medi, sopra 1 li scurisce; 1 li lascia invariati.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "Uscita HDR", + [UI_MENU_HDR_DESC] = "Luci brillanti su uno schermo HDR. Richiede l'HDR attivo in Windows («Usa HDR») o un " + "compositor Wayland con gestione del colore; senza, l'immagine resta SDR. Si applica dopo il " + "riavvio. Il profilo colore sopra è per l'SDR e non si usa in HDR.", + [UI_MENU_HDR_PEAK] = "Luminosità di picco", + [UI_MENU_HDR_PEAK_DESC] = "Il picco del tuo schermo in nit; le luci più brillanti si fermano lì.", + [UI_MENU_HDR_GAME] = "Luminosità del gioco", + [UI_MENU_HDR_GAME_DESC] = "Nit del bianco dell'immagine (bianco carta). 203 è il riferimento HDR; aumentalo in " + "una stanza luminosa.", + [UI_MENU_HDR_UI] = "Luminosità di HUD e menu", + [UI_MENU_HDR_UI_DESC] = "Nit del bianco dell'HUD e di questo menu.", + [UI_MENU_HDR_HUE] = "Correzione tinta delle luci", + [UI_MENU_HDR_HUE_DESC] = "I colori brillanti come fuoco e scintille tendono al bianco come nell'immagine SDR del " + "gioco, in accordo con la luce che emettono; 0 li mantiene completamente saturi.", + [UI_MENU_SHADOW_SCALE] = "Risoluzione delle ombre", + [UI_MENU_SHADOW_SCALE_DESC] = "Disegna le mappe delle ombre del sole tante volte più grandi per lato rispetto ai " + "960x960 del gioco: bordi delle ombre e ombre delle foglie più nitidi. Ha effetto " + "al prossimo avvio.", + [UI_MENU_PCSS] = "Ombre morbide", + [UI_MENU_PCSS_DESC] = "Ombre del sole nitide dove un oggetto tocca il suolo e più morbide quanto più lontano cade " + "l'ombra (PCSS). 0 mantiene il filtro del gioco. Ha effetto al prossimo avvio.", + [UI_MENU_CONTACT_SHADOWS] = "Ombre di contatto", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Piccole ombre del sole che le mappe delle ombre non colgono: ai piedi, sotto le " + "pietre, nell'erba e nelle pieghe. Calcolate sullo schermo dopo l'illuminazione. " + "Ha effetto al prossimo avvio.", + [UI_MENU_SHADOW_RANGE] = "Portata delle cascate di ombre", + [UI_MENU_SHADOW_RANGE_DESC] = "Allontana i gradini in cui le ombre diventano più morbide (20, 40, 80 e 160 m nel " + "gioco). Distribuisce la mappa delle ombre su più terreno: aumenta anche la " + "risoluzione delle ombre. Ha effetto al prossimo avvio.", + [UI_MENU_GRASS_RANGE] = "Distanza dell'erba", + [UI_MENU_GRASS_RANGE_DESC] = "Fin dove cresce l'erba intorno alla telecamera (nel gioco: 62,5 m). Più alta " + "mantiene visibile l'erba dei prati più lontano invece di farla spuntare appena " + "davanti a te; più bassa ne disegna meno. Ha effetto al prossimo avvio.", + [UI_MENU_DLSS_PRESET] = "Modello DLSS", + [UI_MENU_DLSS_PRESET_DESC] = "Quale modello DLSS viene usato. Automatico segue il consiglio di NVIDIA per ogni " + "modalità: K per DLAA, Qualità e Bilanciata, M per Prestazioni, L per Ultra " + "prestazioni. J: un po' meno scie dietro i personaggi in movimento, un po' più di " + "sfarfallio. K: il modello più nitido in ogni modalità. Si applica subito.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatico", + [UI_MENU_DLSS_PRESET_K] = "K (più nitido)", + [UI_MENU_DLSS_PRESET_J] = "J (meno scie)", + [UI_MENU_DLSS_CHARS] = "Scie dei personaggi (DLSS)", + [UI_MENU_DLSS_CHARS_DESC] = "Riduce le deboli scie dietro personaggi e animali in movimento e ciò che tengono in " + "mano: lì DLSS prende meno dai fotogrammi precedenti. Più forte rimuove più scie e " + "lascia quei bordi un po' meno levigati. Si applica subito.", + [UI_MENU_DLSS_CHARS_OFF] = "No", + [UI_MENU_DLSS_CHARS_LIGHT] = "Leggera", + [UI_MENU_DLSS_CHARS_MEDIUM] = "Media", + [UI_MENU_DLSS_CHARS_FULL] = "Completa", + [UI_MENU_DLSS] = "Modalità di upscaling", + [UI_MENU_DLSS_DESC] = "Nativa applica l'antialiasing alla scena 3D a piena risoluzione. Qualità, Bilanciata, " + "Prestazioni e Ultra prestazioni la disegnano al 67, 58, 50 e 33 %, e lasciano che " + "l'upscaler (DLSS o FSR 3.1) la ingrandisca, risparmiando tempo GPU; sostituiscono la scala " + "di rendering 3D. Ha effetto subito.", + [UI_MENU_DLSS_DLAA] = "Nativa", + [UI_MENU_DLSS_QUALITY] = "Qualità", + [UI_MENU_DLSS_BALANCED] = "Bilanciata", + [UI_MENU_DLSS_PERFORMANCE] = "Prestazioni", + [UI_MENU_DLSS_ULTRA] = "Ultra prestazioni", + [UI_MENU_FXAA] = "Antialiasing del gioco (FXAA)", + [UI_MENU_FXAA_DESC] = "Lo smussamento dei bordi FXAA del gioco. Sfoca un po' i dettagli fini; con DLAA attivo non " + "serve.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "Riduce la latenza di sistema sulle GPU NVIDIA tramite VK_NV_low_latency2. Sì + Boost " + "mantiene alte le frequenze della GPU nelle scene limitate dalla CPU.", + [UI_MENU_REFLEX_OFF] = "No", + [UI_MENU_REFLEX_ON] = "Sì", + [UI_MENU_REFLEX_BOOST] = "Sì + Boost", + [UI_MENU_SCENE_UPSCALER] = "Upscaler della scena 3D", + [UI_MENU_SCENE_UPSCALER_DESC] = "Un upscaler temporale per la scena 3D: bordi più lisci e meno sfarfallio, e in " + "una modalità sotto Nativa disegna la scena più piccola e la ingrandisce, " + "risparmiando tempo GPU. NVIDIA DLSS richiede una GPU NVIDIA RTX e " DLSS_FILE " " + "accanto a " EXE_FILE "; AMD FSR 3.1 funziona su qualsiasi GPU. No mantiene il " + "ridimensionamento e l'FXAA del gioco. L'HUD non viene toccato; il " + "ridimensionamento e la nitidezza sopra adattano ancora l'immagine del gioco alla " + "finestra. Ha effetto dopo il riavvio.", + [UI_MENU_SCENE_UPSCALER_OFF] = "No", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: richiede una GPU NVIDIA RTX", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: " DLSS_FILE " mancante", + [UI_MENU_FSR3_SHARPNESS] = "Nitidezza FSR 3.1", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Nitidezza della scena 3D dopo FSR 3.1; 0 la disattiva.", + [UI_MENU_FPS_LIMIT] = "Limite fotogrammi", + [UI_MENU_FPS_LIMIT_DESC] = "Il massimo di fotogrammi al secondo che il gioco disegna. Sopra 60 è sperimentale e " + "richiede «Velocità del gioco secondo l'orologio».", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "Frequenza del monitor", + [UI_MENU_FPS_DISPLAY_HZ] = "Frequenza del monitor (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "Coda fotogrammi", + [UI_MENU_FRAME_QUEUE_DESC] = "Il gioco inizia un fotogramma mentre il precedente attende il suo turno sullo " + "schermo: molti meno fotogrammi persi al limite, fino a un fotogramma in più di " + "ritardo dei comandi. Si applica subito.", + [UI_MENU_FRAME_GEN] = "Generazione fotogrammi", + [UI_MENU_FRAME_GEN_OFF] = "No", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Un'immagine generata tra ogni due che il gioco disegna: il doppio delle immagini " + "sullo schermo, il gioco a metà del limite fotogrammi e i comandi circa mezzo " + "fotogramma più tardi. Per schermi da 120 Hz in su. Non con DLSS o HDR. Si applica " + "subito.", + [UI_MENU_REALTIME] = "Velocità del gioco secondo l'orologio", + [UI_MENU_REALTIME_DESC] = "Fa avanzare il gioco in tempo reale, così un fotogramma lento non rallenta il gioco.", + [UI_MENU_CLOTH_REALTIME] = "Tessuti secondo l'orologio", + [UI_MENU_CLOTH_REALTIME_DESC] = "Fa avanzare in tempo reale anche tessuti e capelli.", + [UI_MENU_HIGHFPS_FIX] = "Correzioni per alti FPS", + [UI_MENU_HIGHFPS_FIX_DESC] = "Corregge la fisica che sbaglia sopra i 30 fotogrammi al secondo e gli oggetti che " + "restano trasparenti o invisibili sopra i 60.", + [UI_MENU_CLIMB_FIX] = "Correzione arrampicata", + [UI_MENU_CLIMB_FIX_DESC] = "Mantiene a piena velocità l'arrampicata su pareti e scale sopra i 60 fotogrammi al " + "secondo, così Link arriva in cima.", + [UI_MENU_GAME_LANG] = "Lingua del gioco", + [UI_MENU_GAME_LANG_DESC] = "Lingua dei testi e delle voci del gioco.", + [UI_MENU_GAME_LANG_AUTO] = "Automatica", + [UI_MENU_OPERATION_MODE] = "Modalità console", + [UI_MENU_OPERATION_MODE_DESC] = "Se il gioco crede di essere in modalità TV o portatile.", + [UI_MENU_MODE_DOCKED] = "Modalità TV", + [UI_MENU_MODE_HANDHELD] = "Modalità portatile", + [UI_MENU_ASSUME_FOCUS] = "Continua in background", + [UI_MENU_ASSUME_FOCUS_DESC] = "Sì (predefinito): il gioco continua mentre sei in un'altra finestra, e la tastiera " + "resta inattiva finché la finestra non torna in primo piano. No: si mette in pausa " + "quando la finestra perde il focus, come su Switch premendo Home; un caricamento " + "interrotto così può bloccarsi per sempre.", + [UI_MENU_PLAY_TIME] = "Tempo di gioco", + [UI_MENU_PLAY_TIME_DESC] = "Tempo passato nel gioco in tutte le sessioni, contato mentre la finestra del gioco ha " + "il focus e il gioco disegna fotogrammi. Salvato in playtime.txt nella cartella del " + "profilo, accanto ai salvataggi.", + [UI_MENU_PLAY_TIME_HM] = "%llu h %02u min", + [UI_MENU_PLAY_TIME_SESSION] = "questa sessione: %s", + [UI_MENU_MODS_BUILTIN] = "Integrate nel port", + [UI_MENU_MODS_INSTALLED] = "Mod installate", + [UI_MENU_MODS_NONE] = "Ancora nessuna mod. Estrai una mod nella cartella mods, una cartella per mod con la sua " + "cartella romfs dentro, e riavvia il gioco. Anche TKMM può esportare lì le sue mod unite in " + "una cartella.", + [UI_MENU_MODS_OPEN] = "Apri cartella mod", + [UI_MENU_MODS_OPEN_DESC] = "Mostra la cartella da cui il gioco carica le mod. Viene creata se manca.", + [UI_MENU_MODS_ROW_DESC] = "File del gioco sostituiti: %u. Nuovi file aggiunti: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u dei suoi file provengono da %s, che è più in alto nell'elenco.", + [UI_MENU_MODS_MOVE_HINT] = "Il pulsante superiore o Ctrl+Su la sposta in alto, il pulsante sinistro o Ctrl+Giù in " + "basso. Quando due mod cambiano lo stesso file, vince quella più in alto. Le modifiche " + "si applicano dopo il riavvio.", + [UI_MENU_MODS_EMPTY] = "Questa cartella non contiene file romfs, exefs o cheats.", + [UI_MENU_MODS_SUBSDK] = "Questa mod porta il proprio codice di gioco (un plugin subsdk o un main sostituito). Il " + "port non può caricare moduli di codice, quindi l'intera mod resta disattivata.", + [UI_MENU_MODS_EXEFS_LATER] = "Questa mod modifica il codice del gioco (exefs). Il gioco integra le patch al " + "prossimo avvio (una ricostruzione di qualche minuto); fino ad allora l'intera mod " + "resta disattivata.", + [UI_MENU_MODS_CHEATS] = "Trucchi: %d. Attivali nella scheda Trucchi.", + [UI_MENU_MODS_CHEATS_FILE] = "I trucchi per questa versione del gioco vengono letti all'avvio da cheats\\%s in " + "questa mod.", + [UI_MENU_MODS_BAD_NAME] = "Il nome della cartella contiene |, che l'elenco delle mod usa tra i nomi. Rinomina la " + "cartella.", + [UI_MENU_MODS_OTHER_VERSION] = "%u dei suoi file sono fatti per un'altra versione del gioco e vengono esclusi. " + "Cerca una versione di questa mod fatta per la tua versione del gioco.", + [UI_MENU_MODS_UNUSED] = "non usato", + [UI_MENU_MODS_FPS60] = "Patch 60 FPS", + [UI_MENU_MODS_FPS60_DESC] = "La patch del port per 60 fotogrammi al secondo. Si imposta con il limite fotogrammi " + "nella scheda Gioco.", + [UI_MENU_MODS_RES] = "Patch risoluzione", + [UI_MENU_MODS_RES_DESC] = "La patch del port per risoluzioni sopra 1080p. Si imposta con la risoluzione del gioco " + "nella scheda Schermo.", + [UI_MENU_MODS_QUICKMENU] = "Correzione menu rapido", + [UI_MENU_MODS_QUICKMENU_DESC] = "La correzione del port per lo sfondo nero dei menu di armi, scudi e materiali a " + "60 FPS.", + [UI_MENU_VOLUME] = "Volume", + [UI_MENU_VOLUME_DESC] = "Volume generale del gioco.", + [UI_MENU_VOLUME_MUSIC] = "Volume musica", + [UI_MENU_VOLUME_MUSIC_DESC] = "Volume della musica di sottofondo.", + [UI_MENU_VOLUME_SFX] = "Volume effetti", + [UI_MENU_VOLUME_SFX_DESC] = "Volume degli effetti sonori.", + [UI_MENU_VOLUME_VOICE] = "Volume voci", + [UI_MENU_VOLUME_VOICE_DESC] = "Volume delle voci dei personaggi.", + [UI_MENU_AUDIO_CHANNELS] = "Altoparlanti", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Uscita stereo o surround 5.1. Automatico sceglie 5.1 quando la configurazione " + "degli altoparlanti di Windows ha sei o più canali. Si applica dopo il riavvio.", + [UI_MENU_CHANNELS_AUTO] = "Automatico", + [UI_MENU_CHANNELS_STEREO] = "Stereo", + [UI_MENU_CHANNELS_51] = "Surround 5.1", + [UI_MENU_AUDIO_DEVICE] = "Dispositivo di uscita", + [UI_MENU_AUDIO_DEVICE_DESC] = "Dove viene riprodotto l'audio. Predefinito di sistema segue il dispositivo " + "predefinito di Windows. Se il dispositivo scelto viene scollegato, l'audio passa " + "al predefinito di sistema finché non viene ricollegato. Si applica subito.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Predefinito di sistema", + [UI_MENU_MOTION] = "Comandi di movimento", + [UI_MENU_MOTION_DESC] = "Mira con il giroscopio del controller.", + [UI_MENU_GYRO_CALIBRATION] = "Correzione deriva giroscopio", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Sottrae la deriva a riposo del controller, misurata con la riga di " + "calibrazione qui sotto. I valori misurati restano salvati anche quando è " + "disattivata.", + [UI_MENU_GYRO_CALIBRATE] = "Calibra giroscopio", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Misura la deriva a riposo del giroscopio e la rimuove. Appoggia il controller o " + "tienilo fermo per due secondi.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Calibrazione...", + [UI_MENU_GYRO_CALIBRATED] = "%s, calibrato", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Calibrazione non riuscita", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "Il controller si è mosso: tienilo fermo e riprova", + [UI_MENU_GYRO_AUTO_BIAS] = "Apprendimento deriva a riposo", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Apprende la deriva rimasta nel giroscopio ogni volta che il controller è fermo " + "su un tavolo, e la sottrae. Per una mira con l'arco che scivola lentamente anche " + "dopo la calibrazione. Un controller tenuto in mano non viene usato per " + "l'apprendimento. Sperimentale.", + [UI_MENU_RUMBLE_STRENGTH] = "Intensità della vibrazione", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "Quanto forte vibra il controller.", + [UI_MENU_RUMBLE_CURVE] = "Curva della vibrazione", + [UI_MENU_RUMBLE_CURVE_DESC] = "Valori più bassi rendono più forte la vibrazione debole.", + [UI_MENU_RUMBLE_TRIGGERS] = "Vibrazione dei grilletti (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Fa vibrare anche i grilletti di un controller Xbox.", + [UI_MENU_PAD_LAYOUT] = "Disposizione dei pulsanti", + [UI_MENU_PAD_LAYOUT_DESC] = "Quale pulsante è A. Nintendo: quello a destra, come su Switch. Xbox: quello in " + "basso, come indicato su un controller Xbox (croce su un controller PlayStation). " + "Automatico sceglie Nintendo per i controller con scritte Nintendo e Xbox per gli " + "altri. Il controller mostrato nei suggerimenti del gioco si sceglie in Icone dei " + "pulsanti.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Automatico", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A a destra)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A in basso)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "in uso: %s", + [UI_MENU_PROMPTS] = "Icone dei pulsanti", + [UI_MENU_PROMPTS_DESC] = "Di quale controller sono i pulsanti mostrati nei suggerimenti del gioco. Nintendo: " + "quelli del gioco. Xbox: LB, RB, LT, RT, Menu, View e una croce, e A, B, X e Y come " + "indicati sul pulsante che preme la disposizione sopra (con Nintendo (A a destra) il " + "pulsante destro è indicato come B, quindi i suggerimenti per A mostrano B). " + "PlayStation: i simboli di un controller PlayStation (○ × △ □, L1, R1, L2, R2, Options e " + "Share), sul pulsante che preme la disposizione sopra. PC: i tasti e i pulsanti del " + "mouse della disposizione predefinita della tastiera (E, Maiusc, Spazio, clic " + "sinistro...) e il mouse per la telecamera. Il gioco legge i suggerimenti all'avvio, " + "quindi cambiano dopo il riavvio. Fanno parte dei file del gioco, quindi un pulsante che " + "riassegni in Comandi mantiene sullo schermo il suo vecchio suggerimento.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "file delle icone mancanti: esegui di nuovo l'installazione", + [UI_MENU_PROMPTS_FAILED] = "file delle icone danneggiati: esegui di nuovo l'installazione", + [UI_MENU_PROMPTS_RESTART] = "le icone cambiano dopo il riavvio", + [UI_MENU_PROMPTS_OFF_SHAPE] = "disattivato con una risoluzione del gioco non 16:9", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "nessun layout per questo formato: esegui di nuovo l'installazione", + [UI_MENU_OUTPUT_RES_PREPARING] = "layout in preparazione in background; usato al prossimo avvio", + [UI_MENU_PROMPTS_PREPARING] = "file delle icone in preparazione in background; usati al prossimo avvio", + [UI_MENU_PREPARE_RETRY] = "Riprova", + [UI_MENU_PREPARE_RETRY_DESC] = "Riavvia gli strumenti dell'installazione per creare in background il layout " + "dell'interfaccia o i file delle icone dei pulsanti mancanti. Il gioco continua; " + "li usa dal prossimo avvio.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "gli strumenti dell'installazione non sono partiti: esegui di nuovo " + "l'installazione", + [UI_MENU_PROMPTS_OFF_MODS] = "disattivato: una mod RomFS sostituisce i loro file", + [UI_MENU_PROMPTS_OFF_PATCHES] = "disattivato finché TOTK_ROMFS_PATCHES è impostato", + [UI_MENU_RESTART] = "Riavvia ora", + [UI_MENU_RESTART_DESC] = "Chiude il gioco e lo riavvia con le nuove icone. I progressi dall'ultimo salvataggio " + "vanno persi.", + [UI_MENU_RESTART_CONFIRM] = "Riavviare il gioco ora? I progressi dall'ultimo salvataggio vanno persi.", + [UI_MENU_RESTART_YES] = "Riavvia", + [UI_MENU_RESTART_SAVING] = "Il gioco sta salvando: il riavvio sarà possibile tra un momento.", + [UI_MENU_GROUP_STICKS] = "Levette analogiche", + [UI_MENU_LSTICK_DEADZONE] = "Zona morta levetta sinistra", + [UI_MENU_RSTICK_DEADZONE] = "Zona morta levetta destra", + [UI_MENU_STICK_DEADZONE_DESC] = "Quanto deve muoversi una levetta prima che il gioco se ne accorga. Aumentala se " + "il personaggio o la telecamera si muovono da soli: lascia la levetta, leggi " + "«levetta ora» e imposta la zona morta qualche punto sopra.", + [UI_MENU_STICK_DEADZONE_NOW] = "levetta ora: %.0f %%", + [UI_MENU_MOUSE_MODE] = "Telecamera con mouse", + [UI_MENU_MOUSE_MODE_DESC] = "Diretta: la telecamera gira di quanto si sposta il mouse, come in un gioco per PC, " + "senza zona morta né curva della levetta (gioco 1.4.3 e 1.2.1; 1.1.0 usa l'emulazione " + "levetta). Emulazione levetta: il mouse fa da levetta destra.", + [UI_MENU_MOUSE_STICK] = "Emulazione levetta", + [UI_MENU_MOUSE_DIRECT] = "Diretta", + [UI_MENU_MENU_CURSOR] = "Mouse nei menu del gioco", + [UI_MENU_MENU_CURSOR_DESC] = "Nei menu del gioco stesso (schermata del titolo, inventario, negozi, scelte nei " + "dialoghi) appare il puntatore: l'elemento sotto di esso viene selezionato, il clic " + "sinistro conferma, il clic destro torna indietro. Solo se per ultimi sono stati " + "usati il mouse o un tasto, così con un controller i menu restano invariati (gioco " + "1.4.3).", + [UI_MENU_MAP_CLICK] = "Clic sinistro sulla mappa", + [UI_MENU_MAP_CLICK_DESC] = "Sulla mappa del Purah Pad, il tasto sinistro del mouse preme A sul cursore della " + "mappa invece del pulsante a cui è assegnato (Y per impostazione predefinita). " + "Richiede «Mouse nei menu del gioco» (gioco 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Clic nei dialoghi", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Mentre è aperto un riquadro di dialogo, il clic sinistro preme B (prosegue il " + "testo e ne salta lo scorrimento) e il clic destro preme A, invece dei pulsanti a " + "cui sono assegnati (Y per impostazione predefinita, che apre il registro dei " + "dialoghi, e ZL). Le scelte nei dialoghi mantengono il puntatore: il clic " + "sinistro sceglie (gioco 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "Puntatore del gioco", + [UI_MENU_POINTER_IMAGE_DESC] = "Mentre il cursore non è catturato (menu del gioco, questo menu, dopo Esc), la " + "finestra mostra una propria punta di freccia dorata invece della freccia di " + "sistema, dimensionata secondo la scala dello schermo.", + [UI_MENU_QUICKSAVE] = "Salvataggio/caricamento rapido", + [UI_MENU_QUICKSAVE_DESC] = "Un tasto salva subito la partita e un altro carica quel salvataggio (le due righe qui " + "sotto: F6 e F7 per impostazione predefinita, come in Half-Life), senza nessun menu " + "sullo schermo. Solo tasti della tastiera e del mouse, solo gioco 1.4.3. Il " + "salvataggio rapido chiede al gioco uno dei suoi salvataggi automatici, quindi " + "sostituisce il salvataggio automatico più vecchio (il salvataggio manuale resta), ne " + "conserva una copia come salvataggio rapido (la cartella quicksave del profilo) e " + "mostra \"Partita salvata\" in alto nell'immagine. Il caricamento rapido mantiene " + "l'immagine su \"Caricamento del salvataggio rapido\" mentre scorre di nascosto " + "l'elenco dei caricamenti del gioco, e il gioco carica il salvataggio rapido (circa 5 " + "s). Dove il gioco non farebbe da sé un salvataggio automatico (una scena " + "d'intermezzo, un dialogo), non viene salvato nulla e la riga lo indica.", + [UI_MENU_QUICKSAVE_KEY] = "Tasto salvataggio rapido", + [UI_MENU_QUICKLOAD_KEY] = "Tasto caricamento rapido", + [UI_MENU_QUICKSAVE_KEY_DESC] = "Il tasto che avvia il salvataggio o il caricamento rapido; F6 e F7 per " + "impostazione predefinita, come in Half-Life. Seleziona la cella e premi un tasto " + "o un pulsante del mouse; Canc lascia quell'azione senza tasto. Mentre il " + "salvataggio rapido è attivo, i due tasti non fanno nient'altro (una nota appare " + "quando anche un'assegnazione usa il tasto). totk.ini accetta qualsiasi nome di " + "tasto delle assegnazioni (quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Partita salvata", + [UI_QS_LOADING] = "Caricamento del salvataggio rapido", + [UI_QS_NOT_NOW] = "Il salvataggio rapido non è possibile ora", + [UI_QS_NONE] = "Non c'è ancora un salvataggio rapido (lo crea il tasto di salvataggio rapido)", + [UI_QS_FAILED] = "Salvataggio rapido non riuscito: vedi totk.log", + [UI_QS_LOAD_FAILED] = "Caricamento rapido non riuscito: vedi totk.log", + [UI_MENU_MOUSE_SENS] = "Sensibilità telecamera con mouse", + [UI_MENU_MOUSE_SENS_DESC] = "Quanto velocemente il mouse gira la telecamera.", + [UI_MENU_WALK_KEY] = "Tasto camminata", + [UI_MENU_WALK_KEY_DESC] = "Tienilo premuto per inclinare solo in parte le levette della tastiera, così la " + "tastiera cammina invece di correre. La scala di camminata stabilisce quanto. " + "Controller e mouse non sono coinvolti.", + [UI_MENU_WALK_KEY_TAKEN] = "anche %s", + [UI_MENU_WALK_SCALE] = "Scala di camminata", + [UI_MENU_WALK_SCALE_DESC] = "L'inclinazione delle levette della tastiera mentre il tasto camminata è premuto. " + "Metà è camminare, l'inclinazione completa correre.", + [UI_MENU_FREECAM] = "Telecamera libera", + [UI_MENU_FREECAM_DESC] = "Permette a una combinazione o a un tasto qui sotto di staccare la visuale da Link e " + "farla volare. Disattivata per impostazione predefinita: così il codice della telecamera " + "del gioco funziona come in origine. Ha effetto dopo il riavvio. Versione del gioco " + "1.4.3.", + [UI_MENU_FREECAM_OFF_NOTE] = "Attiva «Telecamera libera» qui sopra, poi riavvia", + [UI_MENU_FREECAM_PAD] = "Combo telecamera libera", + [UI_MENU_FREECAM_PAD_DESC] = "Pulsanti del controller premuti insieme che portano la visuale attraverso tre fasi: " + "lascia Link e vola, resta dove è stata lasciata mentre Link continua a muoversi, e " + "torna indietro. Mentre vola il gioco non riceve input: la levetta sinistra la fa " + "volare lungo la visuale e di lato, i grilletti in su e in giù, la levetta destra la " + "gira, e ogni pressione di L o R dimezza o raddoppia la velocità. Quando è ferma, " + "Link cammina dove punta la levetta sinistra sullo schermo. Versione del gioco 1.4.3.", + [UI_MENU_FREECAM_PAD_V143] = "Solo versione 1.4.3 del gioco", + [UI_MENU_FREECAM_KEY] = "Tasto telecamera libera", + [UI_MENU_FREECAM_KEY_DESC] = "Un tasto che porta la visuale attraverso le stesse fasi: lascia Link e vola, resta " + "ferma mentre Link continua a muoversi, e torna indietro. Mentre vola: W A S D la " + "fanno volare lungo la visuale e di lato, i tasti assegnati a ZR e ZL (X e Z per " + "impostazione predefinita) in su e in giù, il mouse e i tasti freccia la girano, e i " + "tasti assegnati a L e R (Q e R) dimezzano o raddoppiano la velocità. Versione del " + "gioco 1.4.3.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Ritocchi di gioco", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Ritocchi di gioco", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Comandi con la rotellina del mouse per rotazione e distanza " + "dell'Ultramano, cambio di oggetti e armi, e zoom fluido della mappa.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Rotazione Ultramano con rotellina", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Ruota direttamente con la rotellina del mouse gli oggetti tenuti con " + "l'Ultramano.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Asse C di rotazione Ultramano", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "Tieni premuto C mentre scorri per ruotare gli oggetti tenuti attorno " + "all'asse alternativo.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Sensibilità rotazione Ultramano", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Quanto velocemente la rotellina del mouse ruota gli oggetti " + "tenuti.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Distanza Ultramano con rotellina", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Clic destro + rotellina del mouse allontana o avvicina gli oggetti " + "tenuti.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Sensibilità distanza Ultramano", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Quanto velocemente la rotellina del mouse cambia la distanza " + "degli oggetti.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Selezione armi con rotellina", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Scorri la rotellina del mouse durante l'esplorazione libera per cambiare " + "arma. Conferma con E.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Sensibilità rotellina armi", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Scatti di rotellina necessari per passare all'arma successiva.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Menu rapido con rotellina", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Scorri la rotellina del mouse per sfogliare gli oggetti mentre è aperto un " + "menu di selezione rapida.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Sensibilità rotellina menu rapido", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Scatti di rotellina necessari per passare da un oggetto all'altro nei " + "menu di selezione rapida.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "Menu rapido con A / D", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "Premi A / D per spostarti a sinistra e a destra nei menu di selezione rapida.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Zoom fluido della mappa", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Zoom fluido con inerzia sulla mappa del Purah Pad usando la rotellina del " + "mouse.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Sensibilità zoom mappa", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Quanto velocemente la rotellina del mouse ingrandisce la mappa.", + [UI_MENU_STICK_SENS] = "Velocità telecamera con levetta", + [UI_MENU_STICK_SENS_DESC] = "Moltiplica la velocità della telecamera della levetta destra del gioco, velocità " + "massima inclusa, per ognuna delle cinque sensibilità della telecamera del gioco. Il " + "mouse mantiene la propria impostazione.", + [UI_BINDS_HELP] = "Seleziona una cella e premi A o Invio, poi il tasto, il pulsante del mouse o del controller. " + "Canc o X svuota una cella. Un tasto già usato viene spostato qui; un pulsante del controller " + "si scambia con quello che sostituisce.", + [UI_BINDS_COL_KEY1] = "Tasto 1", + [UI_BINDS_COL_KEY2] = "Tasto 2", + [UI_BINDS_COL_PAD] = "Controller", + [UI_BINDS_GROUP_BUTTONS] = "Pulsanti", + [UI_BINDS_GROUP_MOVE] = "Movimento", + [UI_BINDS_GROUP_CAMERA] = "Telecamera", + [UI_BINDS_PRESS_KEY] = "Premi un tasto o un pulsante del mouse per %s", + [UI_BINDS_PRESS_PAD] = "Premi un pulsante del controller per %s", + [UI_BINDS_CANCEL_HINT] = "Esc annulla, oppure attendi %d s", + [UI_BINDS_TAKEN] = "%s è stato tolto da %s", + [UI_BINDS_SWAPPED] = "%s scambiato con %s", + [UI_BINDS_RESET] = "Ripristina tutti i pulsanti", + [UI_BINDS_RESET_DESC] = "Torna ai tasti e ai pulsanti del controller predefiniti. La disposizione dei pulsanti " + "sopra torna a valere: i pulsanti del controller riassegnati restano dove li hai messi " + "fino a questo ripristino.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Pressione levetta sinistra", + [UI_BIND_RCLICK] = "Pressione levetta destra", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "Più", + [UI_BIND_MINUS] = "Meno", + [UI_BIND_LEFT] = "Croce sinistra", + [UI_BIND_UP] = "Croce su", + [UI_BIND_RIGHT] = "Croce destra", + [UI_BIND_DOWN] = "Croce giù", + [UI_BIND_LSTICK_LEFT] = "Vai a sinistra", + [UI_BIND_LSTICK_UP] = "Avanti", + [UI_BIND_LSTICK_RIGHT] = "Vai a destra", + [UI_BIND_LSTICK_DOWN] = "Indietro", + [UI_BIND_RSTICK_LEFT] = "Telecamera a sinistra", + [UI_BIND_RSTICK_UP] = "Telecamera in alto", + [UI_BIND_RSTICK_RIGHT] = "Telecamera a destra", + [UI_BIND_RSTICK_DOWN] = "Telecamera in basso", + [UI_BIND_DESC_A] = "Interagire, raccogliere, parlare.", + [UI_BIND_DESC_B] = "Correre, annullare, tornare indietro.", + [UI_BIND_DESC_X] = "Saltare.", + [UI_BIND_DESC_Y] = "Attaccare.", + [UI_BIND_DESC_LCLICK] = "Accovacciarsi.", + [UI_BIND_DESC_RCLICK] = "Visuale in prima persona.", + [UI_BIND_DESC_L] = "Abilità.", + [UI_BIND_DESC_R] = "Lanciare un'arma.", + [UI_BIND_DESC_ZL] = "Scudo, mirare un bersaglio.", + [UI_BIND_DESC_ZR] = "Arco.", + [UI_BIND_DESC_PLUS] = "Menu, inventario.", + [UI_BIND_DESC_MINUS] = "Mappa.", + [UI_BIND_DESC_DPAD] = "Selezione rapida.", + [UI_BIND_DESC_MOVE] = "Muove Link come la levetta sinistra. Anche la levetta sinistra del controller funziona " + "sempre.", + [UI_BIND_DESC_CAMERA] = "Gira la telecamera come la levetta destra. Anche il mouse e la levetta destra del " + "controller funzionano sempre.", + [UI_BIND_SHAKE] = "Scuoti levetta telecamera", + [UI_BIND_DESC_SHAKE] = "Muove per il gioco la levetta destra a sinistra e a destra: stacca una parte attaccata da " + "ciò che tiene l'Ultramano. Tenendo premuto il tasto continua a scuotere.", + [UI_KEY_SPACE] = "Spazio", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "Maiusc sinistro", + [UI_KEY_LCTRL] = "Ctrl sinistro", + [UI_KEY_UP] = "Freccia su", + [UI_KEY_DOWN] = "Freccia giù", + [UI_KEY_LEFT] = "Freccia sinistra", + [UI_KEY_RIGHT] = "Freccia destra", + [UI_KEY_MOUSE_L] = "Tasto sinistro", + [UI_KEY_MOUSE_R] = "Tasto destro", + [UI_KEY_MOUSE_M] = "Tasto centrale", + [UI_KEY_MOUSE_X1] = "Mouse 4", + [UI_KEY_MOUSE_X2] = "Mouse 5", + [UI_KEY_ENTER] = "Invio", + [UI_KEY_BACKSPACE] = "Backspace", + [UI_KEY_RSHIFT] = "Maiusc destro", + [UI_KEY_RCTRL] = "Ctrl destro", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Bloc Maiusc", + [UI_KEY_INSERT] = "Ins", + [UI_KEY_DELETE] = "Canc", + [UI_KEY_HOME] = "Home", + [UI_KEY_END] = "Fine", + [UI_KEY_PAGEUP] = "Pag su", + [UI_KEY_PAGEDOWN] = "Pag giù", + [UI_KEY_NUM_FMT] = "Num %s", + [UI_PAD_SOUTH] = "Pulsante in basso", + [UI_PAD_EAST] = "Pulsante a destra", + [UI_PAD_WEST] = "Pulsante a sinistra", + [UI_PAD_NORTH] = "Pulsante in alto", + [UI_PAD_LSTICK] = "Levetta sinistra", + [UI_PAD_RSTICK] = "Levetta destra", + [UI_PAD_L] = "Dorsale sinistro", + [UI_PAD_R] = "Dorsale destro", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Indietro", + [UI_PAD_DPAD_LEFT] = "Croce sinistra", + [UI_PAD_DPAD_UP] = "Croce su", + [UI_PAD_DPAD_RIGHT] = "Croce destra", + [UI_PAD_DPAD_DOWN] = "Croce giù", + [UI_PAD_ZL] = "Grilletto sinistro", + [UI_PAD_ZR] = "Grilletto destro", + [UI_PAD_LPADDLE1] = "Pulsante posteriore sinistro", + [UI_PAD_RPADDLE1] = "Pulsante posteriore destro", + [UI_PAD_LPADDLE2] = "Pulsante posteriore sinistro 2", + [UI_PAD_RPADDLE2] = "Pulsante posteriore destro 2", + [UI_PAD_TOUCHPAD] = "Pressione touchpad", + [UI_PAD_CROSS] = "Croce", + [UI_PAD_CIRCLE] = "Cerchio", + [UI_PAD_SQUARE] = "Quadrato", + [UI_PAD_TRIANGLE] = "Triangolo", + [UI_MENU_AMIIBO_DIR] = "Cartella amiibo", + [UI_MENU_AMIIBO_OPEN] = "Apri", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Cartella predefinita", + [UI_MENU_AMIIBO_REFRESH] = "Aggiorna", + [UI_MENU_AMIIBO_PICK] = "Dump di amiibo (file .bin o .nfc da 540 byte):", + [UI_MENU_AMIIBO_NO_DIR] = "Impossibile aprire la cartella %s", + [UI_MENU_AMIIBO_READER] = "Lettore NFC", + [UI_MENU_AMIIBO_STATE] = "Lettore:", + [UI_MENU_AMIIBO_STATE_IDLE] = "pronto", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "il gioco attende un amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo sul lettore", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "il gioco sta leggendo l'amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "disattivato", + [UI_MENU_AMIIBO_FILE] = "File scelto:", + [UI_MENU_AMIIBO_NO_FILE] = "(nessun file scelto)", + [UI_MENU_AMIIBO_TAP] = "Avvicina l'amiibo", + [UI_MENU_AMIIBO_REMOVE] = "Allontana l'amiibo", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Allontana l'amiibo da solo dopo averlo avvicinato", + [UI_MENU_AMIIBO_HOLD] = "Tempo sul lettore", + [UI_MENU_AMIIBO_SECONDS] = "%.1f s", + [UI_MENU_AMIIBO_TAG] = "Amiibo sul lettore:", + [UI_MENU_AMIIBO_NO_TAG] = "Nessun amiibo sul lettore.", + [UI_MENU_AMIIBO_TAG_FILE] = "File: %s", + [UI_MENU_AMIIBO_TAG_ID] = "Personaggio %s, serie %02x, numero %04x, tipo %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "Pronto", + [UI_MENU_AMIIBO_TAPPED] = "Avvicinato: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "Non è un dump di amiibo (NTAG215 da 540 byte): %s", + [UI_MENU_AMIIBO_REMOVED] = "Amiibo allontanato", + [UI_MENU_AMIIBO_STATUS] = "Stato: %s", + [UI_MENU_MENU_LANG] = "Lingua del menu", + [UI_MENU_MENU_LANG_DESC] = "Lingua di questo menu e dell'indicatore prestazioni.", + [UI_MENU_MENU_LANG_AUTO] = "Automatica (da Windows)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "Mostra \"Sta giocando a TotK Recomp\" con il tempo di gioco nel tuo stato Discord " + "mentre il gioco è in esecuzione. discord_app_id e discord_image in totk.ini " + "scelgono l'applicazione.", + [UI_MENU_ADV_WARNING] = "Queste impostazioni servono per test e risoluzione dei problemi. Cambiale solo se sai " + "perché.", + [UI_MENU_GROUP_SCHED] = "Pianificazione", + [UI_MENU_GROUP_SHADERS] = "Shader e pipeline", + [UI_MENU_GROUP_TEXMEM] = "Texture e memoria", + [UI_MENU_GROUP_FIXES] = "Correzioni di rendering", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "Diagnostica", + [UI_MENU_ASYNC_PREEMPT] = "Prelazione dei core virtuali", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Permette a un thread del gioco di interromperne un altro sullo stesso core " + "virtuale.", + [UI_MENU_PREEMPT_OFF] = "No", + [UI_MENU_PREEMPT_ON] = "Sì", + [UI_MENU_PREEMPT_INHERIT] = "Solo ereditarietà", + [UI_MENU_REPLAY_ASYNC] = "Preparazione fotogrammi GPU su thread proprio", + [UI_MENU_REPLAY_ASYNC_DESC] = "Prepara i fotogrammi per la GPU su un thread separato invece che sul thread del " + "gioco. Aggiunge fino a un fotogramma di latenza.", + [UI_MENU_REPLAY_WORKERS] = "Thread di preparazione GPU", + [UI_MENU_REPLAY_WORKERS_DESC] = "Registra i fotogrammi grandi per la GPU su più thread contemporaneamente. Aiuta " + "quando la CPU limita i fotogrammi al secondo; richiede 8 o più processori " + "logici. No registra su un solo thread.", + [UI_MENU_REPLAY_WORKERS_NOW] = "ora: %s", + [UI_MENU_TIMER_1MS] = "Timer di Windows a 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Porta la risoluzione del timer di sistema a 1 ms per un ritmo dei fotogrammi più " + "regolare.", + [UI_MENU_PIPE_WAIT] = "Gestione dei draw in attesa", + [UI_MENU_PIPE_WAIT_DESC] = "Predefinito mantiene la pianificazione attuale con un worker riservato ai draw in " + "attesa; Vecchio (draw) usa la pianificazione precedente.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Predefinito", + [UI_MENU_PIPE_WAIT_DRAW] = "Vecchio (draw)", + [UI_MENU_PIPE_SKIP] = "Draw saltati durante la creazione di una pipeline", + [UI_MENU_PIPE_SKIP_DESC] = "Quali draw vengono scartati invece di attendere la loro pipeline.", + [UI_MENU_PIPE_SKIP_STRICT] = "Rigoroso", + [UI_MENU_PIPE_SKIP_ANY] = "Qualsiasi", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Passate a schermo intero", + [UI_MENU_LIB_PREBUILD] = "Precompilazione librerie di stadi", + [UI_MENU_LIB_PREBUILD_DESC] = "Compila in anticipo in background le librerie di stadi degli shader.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Thread di precompilazione librerie", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Thread usati per la precompilazione; Automatico sceglie un numero in base " + "alla CPU.", + [UI_MENU_PIPE_PREBUILD] = "Precompilazione pipeline", + [UI_MENU_PIPE_PREBUILD_DESC] = "Compila in anticipo le pipeline note.", + [UI_MENU_PREWARM_XLATE] = "Preriscaldamento del traduttore", + [UI_MENU_PREWARM_XLATE_DESC] = "Thread che traducono gli shader noti all'avvio; Automatico usa metà dei thread " + "della CPU, al massimo 16.", + [UI_MENU_GPL] = "Libreria di pipeline grafiche", + [UI_MENU_GPL_DESC] = "Usa l'estensione Vulkan per le librerie di pipeline; disattivala se il driver non funziona " + "bene con essa.", + [UI_MENU_ASTC] = "Decodifica texture ASTC", + [UI_MENU_ASTC_DESC] = "Dove vengono decodificate le texture compresse ASTC.", + [UI_MENU_ASTC_AUTO] = "Automatica", + [UI_MENU_ASTC_GPU] = "Shader GPU", + [UI_MENU_ASTC_NATIVE] = "Nativa", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "Modalità memoria GPU", + [UI_MENU_MEMORY_DESC] = "Come la memoria del gioco viene condivisa con la GPU.", + [UI_MENU_MEMORY_AUTO] = "Automatica", + [UI_MENU_MEMORY_IMPORT] = "Importa", + [UI_MENU_MEMORY_MIRROR] = "Specchio", + [UI_MENU_MEMORY_VERIFY] = "Verifica", + [UI_MENU_TEX_ALIAS] = "Alias delle texture", + [UI_MENU_TEX_ALIAS_DESC] = "Una nuova texture creata sulla memoria di una texture attiva parte con quel contenuto " + "invece che vuota.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Limite memoria texture", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Percentuale di memoria video oltre la quale le texture rilasciate dal gioco " + "vengono scartate (tornano dall'archivio quando servono di nuovo). 0 le " + "mantiene.", + [UI_MENU_ASTC_BC] = "Comprimi ASTC in BC3", + [UI_MENU_ASTC_BC_DESC] = "Con il decodificatore GPU: ricodifica le texture ASTC decodificate in BC3, un quarto " + "della memoria video. Per GPU con 4 GB o meno; le texture appaiono un po' più squadrate.", + [UI_MENU_LOD_GUARD] = "Protezione LOD", + [UI_MENU_LOD_GUARD_DESC] = "Evita che gli oggetti lampeggino nel posto sbagliato o che lo sfondo lontano appaia " + "piatto per un fotogramma, attendendo che il gioco finisca di riscrivere i dati del " + "livello di dettaglio prima che la GPU li legga.", + [UI_MENU_FIX_C0] = "Correzione del buffer delle costanti", + [UI_MENU_FIX_C0_DESC] = "Riempie il banco di costanti c0 riservato al driver (dimensioni di storage, dimensione " + "del dispatch, dimensione dei punti, istanza base) invece di leggere zeri.", + [UI_MENU_FIX_ZERO] = "Azzera la nuova memoria GPU", + [UI_MENU_FIX_ZERO_DESC] = "I nuovi pool di memoria GPU partono riempiti di zeri, come la memoria di Switch.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Nebbia e particelle dopo DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, nebbia, polvere e altre particelle vengono disegnate sopra " + "l'immagine già levigata da DLSS, come le disegna il gioco senza DLSS: le " + "piccole particelle nella nebbia (sacrari) non spariscono più né lasciano " + "scie. No: DLSS elabora anche questi effetti, come prima. Solo in modalità " + "DLAA; le modalità DLSS con upscaling li elaborano sempre. Si applica subito.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Esposizione DLSS fissa", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS prende la luminosità dell'immagine del gioco così com'è invece di " + "stimare l'esposizione da ogni fotogramma: nelle scene buie (il Sottosuolo) " + "le ampie zone nella nebbia non diventano più scure o chiare per un " + "fotogramma mentre la telecamera si muove. No: DLSS stima l'esposizione da " + "sé, come prima. Si applica subito.", + [UI_MENU_BIND_SKIP] = "Salta i binding ripetuti", + [UI_MENU_BIND_SKIP_DESC] = "Ottimizzazione: salta i binding che non sono cambiati.", + [UI_MENU_SHADER_MEMO] = "Memo degli shader", + [UI_MENU_SHADER_MEMO_DESC] = "Ottimizzazione: ricorda le ricerche degli shader.", + [UI_MENU_PIPE_MEMO] = "Memo delle pipeline", + [UI_MENU_PIPE_MEMO_DESC] = "Ottimizzazione: riusa la pipeline del draw precedente quando il suo stato si ripete.", + [UI_MENU_TEX_MEMO] = "Memo dei binding delle texture", + [UI_MENU_TEX_MEMO_DESC] = "Ottimizzazione: ricorda i descrittori delle texture tra i draw.", + [UI_MENU_DESC_TEMPLATE] = "Modelli di descrittori", + [UI_MENU_DESC_TEMPLATE_DESC] = "Ottimizzazione: aggiorna i descrittori in blocco.", + [UI_MENU_PUSH_SKIP] = "Salta le push constant ripetute", + [UI_MENU_PUSH_SKIP_DESC] = "Ottimizzazione: salta le push constant che non sono cambiate.", + [UI_MENU_SPLIT_DRAWS] = "Invio anticipato alla GPU", + [UI_MENU_SPLIT_DRAWS_DESC] = "Invia il lavoro GPU a parti ogni N draw tra le passate perché la GPU inizi prima; 0 " + "lo disattiva.", + [UI_MENU_VK_VALIDATION] = "Livello di convalida", + [UI_MENU_VK_VALIDATION_DESC] = "Controlla ogni chiamata Vulkan e rallenta molto il gioco.", + [UI_MENU_VK_VALIDATION_MISSING] = "Il livello di convalida non è installato.", + [UI_MENU_VK_DYN_VERTEX] = "Stato dei vertici dinamico", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Forza l'input dei vertici dinamico attivo o disattivo; il valore predefinito " + "dipende dalla GPU.", + [UI_MENU_VK_DYN_A2C] = "Alpha to coverage dinamico", + [UI_MENU_VK_DYN_A2C_DESC] = "Forza l'alpha to coverage dinamico attivo o disattivo. Predefinito: disattivo con il " + "driver AMD per RDNA 2 e precedenti, che con esso disegna i personaggi neri, attivo " + "altrove.", + [UI_MENU_VK_SUBGROUP_PIN] = "Fissa la dimensione dei subgroup", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Fissa la dimensione dei subgroup degli shader.", + [UI_MENU_TRACE] = "Registro prestazioni", + [UI_MENU_TRACE_DESC] = "Scrive i tempi dei fotogrammi in un file.", + [UI_MENU_FLIGHT] = "Scatola nera", + [UI_MENU_FLIGHT_DESC] = "Mantiene una breve cronologia e la salva quando un fotogramma si blocca.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Soglia di blocco (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Tempo del fotogramma che conta come blocco.", + [UI_MENU_PASS_CRUMBS] = "Marcatori passate GPU", + [UI_MENU_PASS_CRUMBS_DESC] = "Dopo un crash della GPU, il log indica la passata di rendering in corso. " + "Automatico: solo AMD. Sì: anche NVIDIA, con un piccolo costo.", + [UI_MENU_INPUT_RECORD] = "Registrazione degli input", + [UI_MENU_INPUT_RECORD_DESC] = "Scrive i tuoi input in un file per le segnalazioni di bug.", + [UI_MENU_OPEN_LOG] = "Apri cartella dei log", + [UI_MENU_OPEN_LOG_DESC] = "Mostra la cartella con i file di log.", + [UI_MENU_COPY_INFO] = "Copia info di sistema", + [UI_MENU_COPY_INFO_DESC] = "Copia negli appunti GPU, driver, CPU, RAM e impostazioni modificate.", + [UI_MENU_COPY_INFO_DONE] = "Copiato", + [UI_MENU_ACTION_FAILED] = "non ha funzionato", + [UI_MENU_RESET] = "Ripristina tutte le impostazioni", + [UI_MENU_RESET_DESC] = "Vale per tutte le schede.", + [UI_MENU_RESET_CONFIRM] = "Ripristinare ogni impostazione al valore predefinito?", + [UI_MENU_RESET_YES] = "Ripristina", + [UI_MENU_RESET_NO] = "Annulla", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "gioco %.0f%%", + [UI_MENU_OV_MAX_MS] = "max %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "Fotogramma", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% min %.0f", + [UI_MENU_OV_LOW01] = "0,1%% min %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Temperatura", + [UI_MENU_OV_POWER] = "Potenza", + [UI_MENU_OV_CLOCK] = "Frequenza", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "Preparazione fotogrammi GPU", + [UI_MENU_OV_GPU_TIME] = "GPU occupata per fotogramma", + [UI_MENU_OV_PIPE_WAIT] = "Attese pipeline", + [UI_MENU_OV_SHADER_WAIT] = "Attese shader", + [UI_MENU_OV_TEX_UPLOADS] = "Caricamenti texture", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "gioco %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "%.1f per fotogramma", + [UI_MENU_OV_WINDOW] = "Finestra", + [UI_MENU_OV_OUTPUT] = "Immagine del gioco", + [UI_MENU_OV_SCENE] = "Scena 3D", + [UI_MENU_OV_UPSCALER] = "Upscaler 3D", + [UI_MENU_OV_SCALING] = "Ridimensionamento", + [UI_MENU_OV_LIMIT] = "Limite fotogrammi", + [UI_MENU_OV_PRESENT] = "Presentazione", + [UI_MENU_OV_SHOWN] = "Mostrati", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, nitidezza %d%%", + [UI_MENU_OV_SCALE_NONE] = "nessuno (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilineare", + [UI_MENU_OV_SCALE_DOWN] = "bilineare (FSR solo ingrandisce)", + [UI_MENU_TAB_CHEATS] = "Trucchi", + [UI_MENU_CHEATS_NONE] = "Nessun trucco per questa versione del gioco. I trucchi di una mod sono un file di " + "trucchi Atmosphère nella sua cartella cheats, con il nome della build del gioco: " + "mods\\\\cheats\\%s. Riavvia il gioco per leggerli. Per i trucchi che cambiano il " + "codice del gioco, il gioco si ricostruisce all'avvio (qualche minuto).", + [UI_MENU_CHEATS_MOD] = "%s: %d trucchi", + [UI_MENU_CHEAT_CODE_DESC] = "Cambia il codice del gioco. Si attiva subito.", + [UI_MENU_CHEAT_KEY_DESC] = "Cambia il codice del gioco mentre tieni premuto %s. Si attiva subito.", + [UI_MENU_CHEAT_DATA_DESC] = "Scrive nella memoria del gioco a ogni fotogramma finché è attivo.", + [UI_MENU_CHEAT_MASTER] = "sempre attivo", + [UI_MENU_CHEAT_MASTER_DESC] = "Il codice master del file: è sempre attivo.", + [UI_MENU_CHEAT_RESTORE] = "non serve", + [UI_MENU_CHEAT_RESTORE_DESC] = "Riscrive solo il codice originale del gioco. Disattivare un trucco lo fa già.", + [UI_MENU_CHEAT_REBUILD] = "dopo la ricostruzione", + [UI_MENU_CHEAT_REBUILD_DESC] = "Questo trucco cambia il codice del gioco ed è nuovo o modificato da quando il " + "gioco è stato costruito. Il gioco lo integra al prossimo avvio (qualche minuto), " + "oppure usa Ricostruisci il gioco ora.", + [UI_MENU_CHEAT_UNSUPPORTED] = "non supportato", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Questo trucco non può essere usato con questa versione del gioco:", + [UI_MENU_CHEATS_REBUILD] = "Ricostruisci il gioco ora", + [UI_MENU_CHEATS_REBUILD_DESC] = "Alcuni trucchi cambiano il codice del gioco e non vi sono integrati: sono nuovi " + "o modificati, oppure la loro ultima ricostruzione è fallita o è stata annullata. " + "Chiude il gioco; l'installazione li integra (qualche minuto) e riavvia il gioco. " + "I progressi dall'ultimo salvataggio vanno persi.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Questa mod modifica il codice del gioco (exefs) in un modo che il port non " + "può applicare, quindi l'intera mod resta disattivata. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Le sue patch del codice (exefs) sono fatte per un'altra versione del gioco.", + [UI_MENU_MODS_EXEFS_ON] = "Patch del codice in uso: %d file.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Patch del codice in uso: %d file. Sostituiscono la patch %s del port, che " + "resta disattivata finché questa mod è attiva.", + [UI_MENU_MODS_CODE_SKIPPED] = "Il suo codice di gioco (%s) non viene caricato: il resto della mod viene usato. " + "Disattiva la mod se il gioco si comporta in modo strano.", + [UI_MENU_MODS_PLUGIN_ON] = "Il suo plugin è attivo: %d hook nel codice del gioco.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Il suo plugin %s non può funzionare nel port: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "L'intera mod resta disattivata. Il suo interruttore \"Usa ... senza il suo " + "codice\" qui sotto ne usa il resto.", + [UI_MENU_MODS_PLUGIN_OFF] = "Il suo plugin questa volta resta disattivato: si è avviato in modo diverso dalla " + "build (%s). Il gioco lo ricostruisce al prossimo avvio.", + [UI_MENU_MODS_WITHOUT_CODE] = "Usa %s senza il suo codice", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "La mod qui sopra porta codice che il port non può eseguire: il proprio codice " + "di gioco (un plugin subsdk o un main sostituito) o patch del codice (exefs) " + "che il port non può applicare. No: l'intera mod resta disattivata. Sì: quel " + "codice viene escluso e il resto della mod viene usato: i suoi file RomFS, i " + "trucchi e le patch del codice che funzionano. I suoi file potrebbero " + "aspettarsi il codice mancante; disattivala di nuovo se il gioco si comporta " + "in modo strano. Si applica al prossimo avvio.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Attivo per ogni mod: mods_without_code = 1 in totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u dei suoi file di patch del codice (exefs) non possono essere applicati e " + "vengono esclusi: il resto della mod viene usato. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u dei suoi file sostituiscono quelli di %s, che è più in basso nell'elenco.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u byte delle sue modifiche ai dati del gioco provengono da %s, che è più in " + "alto nell'elenco.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u byte delle sue modifiche ai dati del gioco sostituiscono quelle di %s, che è " + "più in basso nell'elenco.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u dei suoi punti di patch del codice sono sostituiti da %s, che è più in alto " + "nell'elenco.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Sostituisce %u punti di patch del codice di %s, che è più in basso nell'elenco.", +}; + +// Dutch +static const char *const text_nl[UI_TEXT_COUNT] = { + SWKBD("Tekstinvoer", "Voer een naam in", "Paard", "OK", "Annuleren", "Controller: A = OK, B = Annuleren"), + + [UI_MENU_TITLE] = "Instellingen", + [UI_MENU_TAB_SCREEN] = "Scherm", + [UI_MENU_TAB_GAME] = "Spel", + [UI_MENU_TAB_MODS] = "Mods", + [UI_MENU_TAB_SOUND] = "Geluid", + [UI_MENU_TAB_CONTROLS] = "Besturing", + [UI_MENU_TAB_AMIIBO] = "Amiibo", + [UI_MENU_TAB_MENU] = "Menu", + [UI_MENU_TAB_ADVANCED] = "Geavanceerd", + [UI_MENU_CONTINUE] = "Doorgaan", + [UI_MENU_QUIT] = "Spel afsluiten", + [UI_MENU_ON] = "Aan", + [UI_MENU_OFF] = "Uit", + [UI_MENU_AUTO] = "Automatisch", + [UI_MENU_DEFAULT_MARK] = "standaard", + [UI_MENU_AFTER_RESTART] = "na herstart", + [UI_MENU_SET_BY_ENV] = "ingesteld door omgevingsvariabele", + [UI_MENU_SAVE_FAILED] = "instellingen konden niet worden opgeslagen", + [UI_MENU_VERSION] = "TotK Recomp %s, spel %s", + [UI_MENU_FULLSCREEN] = "Volledig scherm", + [UI_MENU_FULLSCREEN_DESC] = "Het spel vult het scherm; F11 schakelt het om.", + [UI_MENU_WINDOW_SIZE] = "Venstergrootte", + [UI_MENU_WINDOW_SIZE_DESC] = "Grootte van het spelvenster buiten volledig scherm.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Aangepast", + [UI_MENU_PRESENT] = "Weergave", + [UI_MENU_PRESENT_DESC] = "Hoe voltooide beelden het scherm bereiken.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", + [UI_MENU_PRESENT_VSYNC] = "VSync", + [UI_MENU_PRESENT_IMMEDIATE] = "Direct", + [UI_MENU_PRESENT_IN_USE] = "in gebruik: %s", + [UI_MENU_GPU] = "Videokaart", + [UI_MENU_GPU_DESC] = "Het Vulkan-apparaat dat het spel tekent.", + [UI_MENU_GPU_AUTO] = "Automatisch", + [UI_MENU_PERF_OVERLAY] = "Prestatieweergave", + [UI_MENU_PERF_OVERLAY_DESC] = "Beelden per seconde rechtsboven. Volledig voegt beeldtijden met een grafiek toe, " + "CPU-, GPU- en geheugenbelasting, temperaturen en de wachttijden van de " + "renderthread. F10 wisselt de modi.", + [UI_MENU_PERF_OFF] = "Uit", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "Volledig", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "%.0f fps getekend, %.0f getoond", + [UI_MENU_GRAPHICS] = "Beeld", + [UI_MENU_OUTPUT_RES] = "Spelresolutie", + [UI_MENU_OUTPUT_RES_DESC] = "De grootte waarin het spel zijn beeld en interface tekent. Boven 1920 x 1080 heeft " + "het spel meer videogeheugen en GPU-tijd nodig. Een breder formaat (21:9) verbreedt " + "het zicht van de camera en zet de HUD in de hoeken van het scherm; een hoger formaat " + "(16:10, Steam Deck) zet hem aan de boven- en onderrand.", + [UI_MENU_HUD_WIDTH] = "HUD-breedte", + [UI_MENU_HUD_WIDTH_DESC] = "Op een scherm breder dan 16:9: hoe ver de linker- en rechterkant van de HUD uit " + "elkaar staan. Volledig scherm zet ze aan de randen van het scherm; 21:9 of 16:9 houdt " + "de HUD binnen het midden van een scherm met die vorm. Een ontbrekende indeling wordt " + "op de achtergrond gemaakt en na een herstart gebruikt.", + [UI_MENU_HUD_WIDTH_FULL] = "Volledig scherm", + [UI_MENU_RENDER_SCALE] = "3D-renderschaal", + [UI_MENU_RENDER_SCALE_DESC] = "Grootte van de 3D-scène ten opzichte van de spelresolutie; de FSR van het spel " + "schaalt hem naar die grootte. Boven 100 % worden kartelranden gladder " + "(supersampling) tegen hoge GPU-kosten.", + [UI_MENU_RENDER_SCALE_GAME] = "Spel (83 %)", + [UI_MENU_DYNAMIC_RES] = "Dynamische resolutie", + [UI_MENU_DYNAMIC_RES_DESC] = "Laat het spel de 3D-scène verlagen naar 90 of 80 %. Het oordeelt op basis van een " + "schatting voor de Switch die je GPU negeert, dus brede scènes zakken zelfs op een " + "snelle pc. Uit houdt de renderschaal.", + [UI_MENU_UPSCALER] = "Schalen naar het venster", + [UI_MENU_UPSCALER_DESC] = "Hoe het beeld wordt geschaald als het venster groter is dan de spelresolutie. FSR " + "houdt randen en details scherper dan bilineair.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "Bilineair", + [UI_MENU_ASPECT] = "Beeldverhouding", + [UI_MENU_ASPECT_DESC] = "Als de vorm van het venster afwijkt van die van de spelresolutie (een 16:9-beeld op een " + "21:9-scherm): de vorm behouden met zwarte balken, of het beeld over het venster " + "uitrekken.", + [UI_MENU_ASPECT_FIT] = "Zwarte balken", + [UI_MENU_ASPECT_STRETCH] = "Uitrekken", + [UI_MENU_MOVIE_ASPECT] = "Filmvorm", + [UI_MENU_MOVIE_ASPECT_DESC] = "Als de spelresolutie niet 16:9 is: de eigen vorm van de tussenfilmpjes behouden " + "met zwarte balken, of ze over het hele beeld uitrekken. Werkt vanaf het volgende " + "filmpje.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Zwarte balken", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "Uitrekken", + [UI_MENU_FOV] = "Gezichtsveld", + [UI_MENU_FOV_DESC] = "Hoeveel van de wereld de camera toont, in procenten van dat van het spel. Alleen spelversie " + "1.4.3.", + [UI_MENU_SHADOW_RES] = "Grootte van de schaduwkaart", + [UI_MENU_SHADOW_RES_DESC] = "Grootte van de schaduwkaart van de zon. De grootte van het spel verandert met het " + "zicht, tot ongeveer 400 dicht bij de grond, waardoor bladschaduwen blokkerig ogen en " + "verspringen; een vaste grootte houdt ze stil en scherper. Boven 1024 kosten de " + "schaduwen meer GPU-tijd en videogeheugen.", + [UI_MENU_SHADOW_RES_GAME] = "Spel (wisselend)", + [UI_MENU_ANISO] = "Textuurfiltering", + [UI_MENU_ANISO_DESC] = "Anisotrope filtering van oppervlaktetexturen: grond, wegen en muren onder een schuine " + "hoek blijven tot in de verte scherp in plaats van te vervagen. Spel: het niveau dat het " + "spel vraagt, zoals op de Switch.", + [UI_MENU_ANISO_GAME] = "Spel", + [UI_MENU_LOD_STEADY] = "Stabiel detail bij belasting", + [UI_MENU_LOD_STEADY_DESC] = "Slaat de regeling van het spel over die model- en textuurdetail verlaagt als de " + "beeldsnelheid daalt, zoals de emulatormod Disable LOD Quality Reduction doet. " + "Spelversies 1.2.1 en 1.4.3. Laat het uit op zwakke pc's: daar houdt deze verlaging " + "de beeldsnelheid op peil.", + [UI_MENU_SHARPNESS] = "FSR-scherpte", + [UI_MENU_SHARPNESS_DESC] = "Verscherpen na FSR-schaling; 0 zet het uit.", + [UI_MENU_COLOR] = "Kleur", + [UI_MENU_COLOR_PRESET] = "Kleurprofiel", + [UI_MENU_COLOR_PRESET_DESC] = "Stelt de vier waarden hieronder in. Levendig: meer contrast en verzadiging, " + "schaduwen iets lichter (voor OLED-schermen). Helderheid: iets meer contrast, " + "verzadiging en helderheid. Een waarde wijzigen maakt het profiel Aangepast. De HUD " + "verandert mee met het beeld; dit menu niet.", + [UI_MENU_COLOR_DEFAULT] = "Van het spel", + [UI_MENU_COLOR_VIVID] = "Levendig (OLED)", + [UI_MENU_COLOR_CLARITY] = "Helder", + [UI_MENU_COLOR_CUSTOM] = "Aangepast", + [UI_MENU_COLOR_BRIGHTNESS] = "Helderheid", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Wordt bij elke kleur opgeteld; 0 laat haar ongewijzigd.", + [UI_MENU_COLOR_CONTRAST] = "Contrast", + [UI_MENU_COLOR_CONTRAST_DESC] = "Duwt kleuren weg van middengrijs (boven 100 %) of ernaartoe; 100 % laat ze " + "ongewijzigd.", + [UI_MENU_COLOR_SATURATION] = "Verzadiging", + [UI_MENU_COLOR_SATURATION_DESC] = "Kleursterkte ten opzichte van grijs; 100 % laat haar ongewijzigd.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "Onder 1 worden donkere en middentonen lichter, boven 1 donkerder; 1 laat ze " + "ongewijzigd.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "HDR-uitvoer", + [UI_MENU_HDR_DESC] = "Felle hooglichten op een HDR-scherm. Vereist HDR aan in Windows (\"HDR gebruiken\") of een " + "Wayland-compositor met kleurbeheer; anders blijft het beeld SDR. Werkt na een herstart. Het " + "kleurprofiel hierboven is voor SDR en wordt in HDR niet gebruikt.", + [UI_MENU_HDR_PEAK] = "Piekhelderheid", + [UI_MENU_HDR_PEAK_DESC] = "De piek van je scherm in nits; de felste hooglichten stoppen daar.", + [UI_MENU_HDR_GAME] = "Spelhelderheid", + [UI_MENU_HDR_GAME_DESC] = "Nits van het wit van het beeld (papierwit). 203 is de HDR-referentie; verhoog het in " + "een lichte kamer.", + [UI_MENU_HDR_UI] = "Helderheid van HUD en menu", + [UI_MENU_HDR_UI_DESC] = "Nits van het wit van de HUD en dit menu.", + [UI_MENU_HDR_HUE] = "Tintcorrectie hooglichten", + [UI_MENU_HDR_HUE_DESC] = "Felle kleuren zoals vuur en vonken neigen naar wit, zoals in het eigen SDR-beeld van " + "het spel, passend bij het licht dat ze verspreiden; 0 houdt ze volledig verzadigd.", + [UI_MENU_SHADOW_SCALE] = "Schaduwresolutie", + [UI_MENU_SHADOW_SCALE_DESC] = "Tekent de schaduwkaarten van de zon per zijde zoveel keer groter dan de 960x960 " + "van het spel: scherpere schaduwranden en bladschaduwen. Werkt bij de volgende " + "start.", + [UI_MENU_PCSS] = "Zachte schaduwen", + [UI_MENU_PCSS_DESC] = "Zonneschaduwen scherp waar een voorwerp de grond raakt en zachter naarmate de schaduw " + "verder valt (PCSS). 0 houdt het filter van het spel. Werkt bij de volgende start.", + [UI_MENU_CONTACT_SHADOWS] = "Contactschaduwen", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Kleine zonneschaduwen die de schaduwkaarten missen: bij voeten, onder stenen, " + "in gras en plooien. Na de belichting op het scherm berekend. Werkt bij de " + "volgende start.", + [UI_MENU_SHADOW_RANGE] = "Bereik van schaduwcascades", + [UI_MENU_SHADOW_RANGE_DESC] = "Verlegt de stappen waar schaduwen zachter worden (in het spel 20, 40, 80 en 160 m) " + "verder weg. Spreidt de schaduwkaart over meer grond: verhoog de schaduwresolutie " + "mee. Werkt bij de volgende start.", + [UI_MENU_GRASS_RANGE] = "Grasbereik", + [UI_MENU_GRASS_RANGE_DESC] = "Hoe ver rond de camera gras groeit (in het spel: 62,5 m). Hoger houdt het gras in " + "weiden verder weg zichtbaar in plaats van het pas vlak voor je te laten opgroeien; " + "lager tekent er minder van. Werkt bij de volgende start.", + [UI_MENU_DLSS_PRESET] = "DLSS-model", + [UI_MENU_DLSS_PRESET_DESC] = "Welk DLSS-model draait. Automatisch volgt het advies van NVIDIA per modus: K voor " + "DLAA, Kwaliteit en Gebalanceerd, M voor Prestaties, L voor Ultraprestaties. J: iets " + "minder ghosting achter bewegende personages, iets meer flikkering. K: het scherpste " + "model in elke modus. Werkt meteen.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatisch", + [UI_MENU_DLSS_PRESET_K] = "K (scherpst)", + [UI_MENU_DLSS_PRESET_J] = "J (minder ghosting)", + [UI_MENU_DLSS_CHARS] = "DLSS-sporen van personages", + [UI_MENU_DLSS_CHARS_DESC] = "Vermindert de vage sporen achter bewegende personages, dieren en wat ze vasthouden: " + "DLSS neemt daar minder over van de vorige beelden. Een sterkere stand verwijdert " + "meer van de sporen en laat die randen iets minder glad. Werkt meteen.", + [UI_MENU_DLSS_CHARS_OFF] = "Uit", + [UI_MENU_DLSS_CHARS_LIGHT] = "Licht", + [UI_MENU_DLSS_CHARS_MEDIUM] = "Gemiddeld", + [UI_MENU_DLSS_CHARS_FULL] = "Volledig", + [UI_MENU_DLSS] = "Upscalingmodus", + [UI_MENU_DLSS_DESC] = "Native verzacht de randen van de 3D-scène op volledige resolutie. Kwaliteit, Gebalanceerd, " + "Prestaties en Ultraprestaties tekenen hem op 67, 58, 50 en 33 % van die resolutie en laten " + "de upscaler (DLSS of FSR 3.1) hem opschalen, wat GPU-tijd bespaart; ze vervangen de " + "3D-renderschaal. Werkt meteen.", + [UI_MENU_DLSS_DLAA] = "Native", + [UI_MENU_DLSS_QUALITY] = "Kwaliteit", + [UI_MENU_DLSS_BALANCED] = "Gebalanceerd", + [UI_MENU_DLSS_PERFORMANCE] = "Prestaties", + [UI_MENU_DLSS_ULTRA] = "Ultraprestaties", + [UI_MENU_FXAA] = "Anti-aliasing van het spel (FXAA)", + [UI_MENU_FXAA_DESC] = "De eigen FXAA-randverzachting van het spel. Ze maakt fijne details iets vager; met DLAA is " + "ze niet nodig.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "Vermindert de systeemlatentie op NVIDIA-GPU's met VK_NV_low_latency2. Aan + Boost houdt " + "de GPU-kloksnelheden hoog in scènes die door de CPU worden beperkt.", + [UI_MENU_REFLEX_OFF] = "Uit", + [UI_MENU_REFLEX_ON] = "Aan", + [UI_MENU_REFLEX_BOOST] = "Aan + Boost", + [UI_MENU_SCENE_UPSCALER] = "Upscaler 3D-scène", + [UI_MENU_SCENE_UPSCALER_DESC] = "Een temporele upscaler voor de 3D-scène: gladdere randen en minder flikkering, " + "en in een modus onder Native tekent hij de scène kleiner en schaalt hem op, wat " + "GPU-tijd bespaart. NVIDIA DLSS vereist een NVIDIA RTX-GPU en " DLSS_FILE " naast " + EXE_FILE "; AMD FSR 3.1 draait op elke GPU. Uit houdt de eigen schaling en FXAA " + "van het spel. De HUD blijft onaangeroerd; de schaling en scherpte hierboven " + "passen het spelbeeld nog steeds aan het venster aan. Werkt na een herstart.", + [UI_MENU_SCENE_UPSCALER_OFF] = "Uit", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: vereist een NVIDIA RTX-GPU", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: " DLSS_FILE " ontbreekt", + [UI_MENU_FSR3_SHARPNESS] = "FSR 3.1-scherpte", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Verscherpen van de 3D-scène na FSR 3.1; 0 zet het uit.", + [UI_MENU_FPS_LIMIT] = "Beeldsnelheidslimiet", + [UI_MENU_FPS_LIMIT_DESC] = "Het hoogste aantal beelden per seconde dat het spel tekent. Boven 60 is experimenteel " + "en vereist \"Spelsnelheid volgt de klok\".", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "Monitorfrequentie", + [UI_MENU_FPS_DISPLAY_HZ] = "Monitorfrequentie (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "Beeldwachtrij", + [UI_MENU_FRAME_QUEUE_DESC] = "Het spel begint aan een beeld terwijl het vorige op zijn beurt op het scherm wacht: " + "veel minder overgeslagen beelden bij de limiet, tot één beeld meer " + "invoervertraging. Werkt meteen.", + [UI_MENU_FRAME_GEN] = "Beeldgeneratie", + [UI_MENU_FRAME_GEN_OFF] = "Uit", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Een gegenereerd beeld tussen elke twee die het spel tekent: twee keer zoveel beelden " + "op het scherm, het spel op de helft van de beeldlimiet en de besturing ongeveer een " + "half beeld later. Voor schermen van 120 Hz en meer. Niet met DLSS of HDR. Werkt " + "meteen.", + [UI_MENU_REALTIME] = "Spelsnelheid volgt de klok", + [UI_MENU_REALTIME_DESC] = "Laat het spel in echte tijd lopen, zodat een traag beeld het spel niet vertraagt.", + [UI_MENU_CLOTH_REALTIME] = "Stof op de klok", + [UI_MENU_CLOTH_REALTIME_DESC] = "Laat ook stof en haar in echte tijd lopen.", + [UI_MENU_HIGHFPS_FIX] = "Correcties voor hoge beeldsnelheid", + [UI_MENU_HIGHFPS_FIX_DESC] = "Corrigeert natuurkunde die boven 30 beelden per seconde misgaat, en voorwerpen die " + "boven 60 doorzichtig of onzichtbaar blijven.", + [UI_MENU_CLIMB_FIX] = "Correctie klimsnelheid", + [UI_MENU_CLIMB_FIX_DESC] = "Houdt klimmen tegen muren en ladders op volle snelheid boven 60 beelden per seconde, " + "zodat Link de top bereikt.", + [UI_MENU_GAME_LANG] = "Taal van het spel", + [UI_MENU_GAME_LANG_DESC] = "Taal van de teksten en stemmen van het spel.", + [UI_MENU_GAME_LANG_AUTO] = "Automatisch", + [UI_MENU_OPERATION_MODE] = "Consolemodus", + [UI_MENU_OPERATION_MODE_DESC] = "Of het spel denkt dat het in tv- of handheldmodus draait.", + [UI_MENU_MODE_DOCKED] = "Tv-modus", + [UI_MENU_MODE_HANDHELD] = "Handheld", + [UI_MENU_ASSUME_FOCUS] = "Op de achtergrond doorlopen", + [UI_MENU_ASSUME_FOCUS_DESC] = "Aan (standaard): het spel loopt door terwijl je in een ander venster bent, en het " + "toetsenbord blijft stil tot het venster weer voorop staat. Uit: het pauzeert als " + "zijn venster de focus verliest, zoals op de Switch bij het indrukken van Home; een " + "zo onderbroken laadactie kan voorgoed vastlopen.", + [UI_MENU_PLAY_TIME] = "Speeltijd", + [UI_MENU_PLAY_TIME_DESC] = "Tijd in het spel over alle sessies, geteld zolang het spelvenster de focus heeft en " + "het spel beelden tekent. Bewaard in playtime.txt in de profielmap, naast de " + "opslagbestanden.", + [UI_MENU_PLAY_TIME_HM] = "%llu u %02u min", + [UI_MENU_PLAY_TIME_SESSION] = "deze sessie: %s", + [UI_MENU_MODS_BUILTIN] = "Ingebouwd in de port", + [UI_MENU_MODS_INSTALLED] = "Geïnstalleerde mods", + [UI_MENU_MODS_NONE] = "Nog geen mods. Pak een mod uit in de map mods, één map per mod met de romfs-map erin, en " + "start het spel opnieuw. TKMM kan zijn samengevoegde mods daar ook naar een map exporteren.", + [UI_MENU_MODS_OPEN] = "Modsmap openen", + [UI_MENU_MODS_OPEN_DESC] = "Toont de map waaruit het spel mods laadt. Hij wordt aangemaakt als hij ontbreekt.", + [UI_MENU_MODS_ROW_DESC] = "Vervangen spelbestanden: %u. Nieuwe bestanden: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u van zijn bestanden komen van %s, dat hoger in de lijst staat.", + [UI_MENU_MODS_MOVE_HINT] = "De bovenste knop of Ctrl+Omhoog verplaatst hem omhoog, de linkerknop of Ctrl+Omlaag " + "omlaag. Als twee mods hetzelfde bestand wijzigen, wint de bovenste. Wijzigingen " + "werken na een herstart.", + [UI_MENU_MODS_EMPTY] = "Deze map bevat geen romfs-, exefs- of cheats-bestanden.", + [UI_MENU_MODS_SUBSDK] = "Deze mod brengt eigen spelcode mee (een subsdk-plug-in of een vervangen main). De port " + "kan geen codemodules laden, dus de hele mod blijft uit.", + [UI_MENU_MODS_EXEFS_LATER] = "Deze mod past de spelcode aan (exefs). Het spel bouwt de patches in bij de volgende " + "start (een herbouw van enkele minuten); tot dan blijft de hele mod uit.", + [UI_MENU_MODS_CHEATS] = "Cheats: %d. Zet ze aan op het tabblad Cheats.", + [UI_MENU_MODS_CHEATS_FILE] = "Cheats voor deze spelversie worden bij de start gelezen uit cheats\\%s in deze mod.", + [UI_MENU_MODS_BAD_NAME] = "De mapnaam bevat |, dat de modlijst tussen namen gebruikt. Hernoem de map.", + [UI_MENU_MODS_OTHER_VERSION] = "%u van zijn bestanden zijn gemaakt voor een andere spelversie en worden " + "weggelaten. Zoek een versie van deze mod voor jouw spelversie.", + [UI_MENU_MODS_UNUSED] = "niet gebruikt", + [UI_MENU_MODS_FPS60] = "60 FPS-patch", + [UI_MENU_MODS_FPS60_DESC] = "De eigen patch van de port voor 60 beelden per seconde. Stel hem in met de " + "beeldsnelheidslimiet op het tabblad Spel.", + [UI_MENU_MODS_RES] = "Resolutiepatch", + [UI_MENU_MODS_RES_DESC] = "De eigen patch van de port voor resoluties boven 1080p. Stel hem in met de " + "spelresolutie op het tabblad Scherm.", + [UI_MENU_MODS_QUICKMENU] = "Correctie snelmenu", + [UI_MENU_MODS_QUICKMENU_DESC] = "De correctie van de port voor de zwarte achtergrond van de wapen-, schild- en " + "materiaalmenu's bij 60 FPS.", + [UI_MENU_VOLUME] = "Volume", + [UI_MENU_VOLUME_DESC] = "Hoofdvolume van het spel.", + [UI_MENU_VOLUME_MUSIC] = "Muziekvolume", + [UI_MENU_VOLUME_MUSIC_DESC] = "Volume van de achtergrondmuziek.", + [UI_MENU_VOLUME_SFX] = "Effectenvolume", + [UI_MENU_VOLUME_SFX_DESC] = "Volume van de geluidseffecten.", + [UI_MENU_VOLUME_VOICE] = "Stemvolume", + [UI_MENU_VOLUME_VOICE_DESC] = "Volume van de stemmen van personages.", + [UI_MENU_AUDIO_CHANNELS] = "Luidsprekers", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Stereo- of 5.1-surrounduitvoer. Automatisch kiest 5.1 als de " + "luidsprekerinstelling van Windows zes of meer kanalen heeft. Werkt na een " + "herstart.", + [UI_MENU_CHANNELS_AUTO] = "Automatisch", + [UI_MENU_CHANNELS_STEREO] = "Stereo", + [UI_MENU_CHANNELS_51] = "5.1 surround", + [UI_MENU_AUDIO_DEVICE] = "Uitvoerapparaat", + [UI_MENU_AUDIO_DEVICE_DESC] = "Waar het geluid speelt. Systeemstandaard volgt het standaardapparaat van Windows. " + "Een gekozen apparaat dat is losgekoppeld, valt terug op de systeemstandaard tot " + "het er weer is. Werkt meteen.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Systeemstandaard", + [UI_MENU_MOTION] = "Bewegingsbesturing", + [UI_MENU_MOTION_DESC] = "Richten met de gyroscoop van de controller.", + [UI_MENU_GYRO_CALIBRATION] = "Kalibratie gyroafwijking", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Trekt de rustdrift van de controller af, gemeten met de kalibratierij " + "hieronder. De gemeten waarden blijven bewaard als dit uit staat.", + [UI_MENU_GYRO_CALIBRATE] = "Gyro kalibreren", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Meet de rustdrift van de gyroscoop en verwijdert die. Leg de controller neer of " + "houd hem twee seconden stil.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Kalibreren...", + [UI_MENU_GYRO_CALIBRATED] = "%s, gekalibreerd", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Kalibratie mislukt", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "Controller bewogen: houd hem stil en probeer opnieuw", + [UI_MENU_GYRO_AUTO_BIAS] = "Gyrodrift leren in rust", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Leert de drift die in de gyro overblijft wanneer de controller stil op een tafel " + "ligt, en trekt die af. Voor een boogrichting die zelfs na kalibratie langzaam " + "wegglijdt. Van een controller in de hand wordt niet geleerd. Experimenteel.", + [UI_MENU_RUMBLE_STRENGTH] = "Trilsterkte", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "Hoe sterk de controller trilt.", + [UI_MENU_RUMBLE_CURVE] = "Trilcurve", + [UI_MENU_RUMBLE_CURVE_DESC] = "Lagere waarden maken zwak trillen sterker.", + [UI_MENU_RUMBLE_TRIGGERS] = "Triggertrilling (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Laat ook de triggers van een Xbox-controller trillen.", + [UI_MENU_PAD_LAYOUT] = "Knopindeling", + [UI_MENU_PAD_LAYOUT_DESC] = "Welke knop A is. Nintendo: de rechter, zoals op een Switch. Xbox: de onderste, zoals " + "gelabeld op een Xbox-controller (kruis op een PlayStation-controller). Automatisch " + "kiest Nintendo voor controllers met Nintendo-labels en Xbox voor de rest. Welke " + "controller de aanwijzingen van het spel tonen, stel je in bij Knopsymbolen.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Automatisch", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A rechts)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A onder)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "in gebruik: %s", + [UI_MENU_PROMPTS] = "Knopsymbolen", + [UI_MENU_PROMPTS_DESC] = "Van welke controller de aanwijzingen van het spel de knoppen tonen. Nintendo: die van " + "het spel zelf. Xbox: LB, RB, LT, RT, Menu, View en een richtingskruis, en A, B, X en Y " + "zoals gelabeld op de knop die de knopindeling hierboven indrukt (met Nintendo (A " + "rechts) heet de rechterknop B, dus de aanwijzingen voor A tonen B). PlayStation: de " + "symbolen op een PlayStation-controller (○ × △ □, L1, R1, L2, R2, Options en Share), op " + "de knop die de knopindeling hierboven indrukt. PC: de toetsen en muisknoppen van de " + "standaardindeling van het toetsenbord (E, Shift, Spatie, linkerklik...) en de muis voor " + "de camera. Het spel leest zijn aanwijzingen bij de start, dus ze veranderen na een " + "herstart. Ze horen bij de spelbestanden, dus een knop die je bij Besturing omzet, houdt " + "zijn oude aanwijzing op het scherm.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "symboolbestanden ontbreken: voer de installatie opnieuw uit", + [UI_MENU_PROMPTS_FAILED] = "symboolbestanden beschadigd: voer de installatie opnieuw uit", + [UI_MENU_PROMPTS_RESTART] = "symbolen veranderen na herstart", + [UI_MENU_PROMPTS_OFF_SHAPE] = "uit bij een spelresolutie die niet 16:9 is", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "geen indeling voor deze vorm: voer de installatie opnieuw uit", + [UI_MENU_OUTPUT_RES_PREPARING] = "indeling wordt op de achtergrond gemaakt; gebruikt bij de volgende start", + [UI_MENU_PROMPTS_PREPARING] = "symboolbestanden worden op de achtergrond gemaakt; gebruikt bij de volgende start", + [UI_MENU_PREPARE_RETRY] = "Opnieuw proberen", + [UI_MENU_PREPARE_RETRY_DESC] = "Start de hulpmiddelen van de installatie opnieuw om de ontbrekende " + "interface-indeling of knopsymboolbestanden op de achtergrond te maken. Het spel " + "blijft lopen; het gebruikt ze vanaf de volgende start.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "de hulpmiddelen van de installatie zijn niet gestart: voer de installatie " + "opnieuw uit", + [UI_MENU_PROMPTS_OFF_MODS] = "uit: een RomFS-mod vervangt hun bestanden", + [UI_MENU_PROMPTS_OFF_PATCHES] = "uit zolang TOTK_ROMFS_PATCHES is ingesteld", + [UI_MENU_RESTART] = "Nu herstarten", + [UI_MENU_RESTART_DESC] = "Sluit het spel en start het opnieuw met de nieuwe symbolen. Voortgang sinds je laatste " + "opslag gaat verloren.", + [UI_MENU_RESTART_CONFIRM] = "Het spel nu herstarten? Voortgang sinds je laatste opslag gaat verloren.", + [UI_MENU_RESTART_YES] = "Herstarten", + [UI_MENU_RESTART_SAVING] = "Het spel slaat op: herstarten kan zo meteen.", + [UI_MENU_GROUP_STICKS] = "Analoge sticks", + [UI_MENU_LSTICK_DEADZONE] = "Dode zone linkerstick", + [UI_MENU_RSTICK_DEADZONE] = "Dode zone rechterstick", + [UI_MENU_STICK_DEADZONE_DESC] = "Hoe ver een stick moet bewegen voordat het spel het merkt. Verhoog hem als het " + "personage of de camera vanzelf beweegt: laat de stick los, lees \"stick nu\" af " + "en zet de dode zone een paar procent hoger.", + [UI_MENU_STICK_DEADZONE_NOW] = "stick nu: %.0f %%", + [UI_MENU_MOUSE_MODE] = "Muiscamera", + [UI_MENU_MOUSE_MODE_DESC] = "Direct: de camera draait zover als de muis beweegt, zoals in een pc-game, zonder " + "dode zone of curve van de stick (spel 1.4.3 en 1.2.1; 1.1.0 gebruikt stickemulatie). " + "Stickemulatie: de muis werkt als de rechterstick.", + [UI_MENU_MOUSE_STICK] = "Stickemulatie", + [UI_MENU_MOUSE_DIRECT] = "Direct", + [UI_MENU_MENU_CURSOR] = "Muis in de spelmenu's", + [UI_MENU_MENU_CURSOR_DESC] = "In de eigen menu's van het spel (titelscherm, inventaris, winkels, dialoogkeuzes) " + "verschijnt de aanwijzer: het item eronder wordt geselecteerd, linkerklik bevestigt, " + "rechterklik gaat terug. Alleen als de muis of een toets het laatst is gebruikt, " + "zodat een controller de menu's ongewijzigd ziet (spel 1.4.3).", + [UI_MENU_MAP_CLICK] = "Linkerklik op de kaart", + [UI_MENU_MAP_CLICK_DESC] = "Op de kaart van de Purah Pad drukt de linkermuisknop A in bij de cursor van de kaart, " + "in plaats van de knop waaraan hij is gekoppeld (standaard Y). Vereist Muis in de " + "spelmenu's (spel 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Klikken in dialogen", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Zolang een dialoogvenster open is, drukt linkerklik op B (de tekst gaat verder " + "en het doorrollen wordt overgeslagen) en rechterklik op A, in plaats van de " + "knoppen waaraan ze zijn gekoppeld (standaard Y, dat het dialooglogboek opent, en " + "ZL). Dialoogkeuzes houden de aanwijzer: linkerklik kiest (spel 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "Spelaanwijzer", + [UI_MENU_POINTER_IMAGE_DESC] = "Zolang de cursor niet is vastgezet (de spelmenu's, dit menu, na Esc), toont het " + "venster een eigen gouden pijlpunt in plaats van de systeempijl, op maat van de " + "schaal van het scherm.", + [UI_MENU_QUICKSAVE] = "Snel opslaan en laden", + [UI_MENU_QUICKSAVE_DESC] = "Eén toets slaat het spel meteen op en een andere laadt die opslag (de twee rijen " + "hieronder: standaard F6 en F7, zoals in Half-Life), zonder menu op het scherm. Alleen " + "toetsenbord- en muisknoppen, alleen spel 1.4.3. Snel opslaan vraagt het spel om een " + "van zijn eigen automatische opslagen, dus het vervangt de oudste automatische opslag " + "(de handmatige opslag blijft), bewaart er een kopie van als snelle opslag (de map " + "quicksave van het profiel) en toont \"Spel opgeslagen\" boven in het beeld. Snel " + "laden houdt het beeld op \"Snelle opslag wordt geladen\" terwijl het buiten zicht " + "door de laadlijst van het spel gaat, en het spel laadt de snelle opslag (ongeveer 5 " + "s). Waar het spel zelf geen automatische opslag zou maken (een tussenfilmpje, een " + "dialoog), wordt niets opgeslagen en meldt de regel dat.", + [UI_MENU_QUICKSAVE_KEY] = "Toets snel opslaan", + [UI_MENU_QUICKLOAD_KEY] = "Toets snel laden", + [UI_MENU_QUICKSAVE_KEY_DESC] = "De toets die snel opslaan of snel laden start; standaard F6 en F7, zoals in " + "Half-Life. Kies de cel en druk op een toets of muisknop; Delete laat die zonder " + "toets. Zolang snel opslaan aan staat, doen de twee toetsen niets anders (er " + "verschijnt een melding als een toewijzing de toets ook gebruikt). totk.ini " + "accepteert elke toetsnaam uit de toewijzingen (quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Spel opgeslagen", + [UI_QS_LOADING] = "Snelle opslag wordt geladen", + [UI_QS_NOT_NOW] = "Snel opslaan kan nu niet", + [UI_QS_NONE] = "Er is nog geen snelle opslag (de toets voor snel opslaan maakt er een)", + [UI_QS_FAILED] = "Snel opslaan mislukt: zie totk.log", + [UI_QS_LOAD_FAILED] = "Snel laden mislukt: zie totk.log", + [UI_MENU_MOUSE_SENS] = "Muisgevoeligheid camera", + [UI_MENU_MOUSE_SENS_DESC] = "Hoe snel de muis de camera draait.", + [UI_MENU_WALK_KEY] = "Looptoets", + [UI_MENU_WALK_KEY_DESC] = "Houd hem ingedrukt om de sticks van het toetsenbord maar gedeeltelijk te kantelen, " + "zodat het toetsenbord loopt in plaats van rent. De loopschaal bepaalt hoeveel. " + "Controller en muis worden niet beïnvloed.", + [UI_MENU_WALK_KEY_TAKEN] = "ook %s", + [UI_MENU_WALK_SCALE] = "Loopschaal", + [UI_MENU_WALK_SCALE_DESC] = "De kanteling van de toetsenbordsticks zolang de looptoets wordt ingedrukt. De helft " + "is lopen, volledig kantelen rennen.", + [UI_MENU_FREECAM] = "Vrije camera", + [UI_MENU_FREECAM_DESC] = "Laat een combinatie of een toets hieronder het beeld van Link losmaken en ermee " + "vliegen. Standaard uit: zolang het uit staat, draait de cameracode van het spel zoals " + "uitgebracht. Werkt na een herstart. Spelversie 1.4.3.", + [UI_MENU_FREECAM_OFF_NOTE] = "Zet Vrije camera hierboven aan en herstart", + [UI_MENU_FREECAM_PAD] = "Combinatie vrije camera", + [UI_MENU_FREECAM_PAD_DESC] = "Controllerknoppen die samen ingedrukt het beeld door drie fasen leiden: het verlaat " + "Link en vliegt, het blijft staan waar het werd achtergelaten terwijl Link verder " + "speelt, en het komt terug. Zolang het vliegt, krijgt het spel geen invoer: de " + "linkerstick vliegt langs de kijkrichting en zijwaarts, de triggers omhoog en " + "omlaag, de rechterstick draait, en elke druk op L of R halveert of verdubbelt de " + "snelheid. Vastgezet loopt Link waar de linkerstick op het scherm heen wijst. " + "Spelversie 1.4.3.", + [UI_MENU_FREECAM_PAD_V143] = "Alleen spelversie 1.4.3", + [UI_MENU_FREECAM_KEY] = "Toets vrije camera", + [UI_MENU_FREECAM_KEY_DESC] = "Een toets die het beeld door dezelfde fasen leidt: het verlaat Link en vliegt, het " + "blijft staan terwijl Link verder speelt, en het komt terug. Zolang het vliegt: W A " + "S D vliegen langs de kijkrichting en zijwaarts, de toetsen gekoppeld aan ZR en ZL " + "(standaard X en Z) omhoog en omlaag, de muis en de pijltoetsen draaien, en de " + "toetsen gekoppeld aan L en R (Q en R) halveren of verdubbelen de snelheid. " + "Spelversie 1.4.3.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Spelaanpassingen", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Spelaanpassingen", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Muiswielbesturing voor draaien en afstand bij Ultrahand, wisselen van " + "voorwerpen en wapens, en vloeiend zoomen op de kaart.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Ultrahand draaien met wiel", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Draai voorwerpen die Ultrahand vasthoudt direct met het muiswiel.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Ultrahand C-draaias", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "Houd C ingedrukt tijdens het scrollen om vastgehouden voorwerpen om " + "de andere as te draaien.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Draaigevoeligheid Ultrahand", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Hoe snel het muiswiel vastgehouden voorwerpen draait.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Ultrahand-afstand met wiel", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Rechterklik + muiswiel duwt vastgehouden voorwerpen weg of trekt ze " + "dichterbij.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Afstandsgevoeligheid Ultrahand", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Hoe snel het muiswiel de afstand van voorwerpen verandert.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Wapenkeuze met wiel", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Scroll met het muiswiel tijdens vrij rondlopen om van wapen te wisselen. " + "Bevestig met E.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Gevoeligheid wapenwiel", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Aantal scrollstappen om naar het volgende wapen te gaan.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Snelmenukeuze met wiel", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Scroll met het muiswiel door voorwerpen zolang een snelmenu open is.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Gevoeligheid snelmenuwiel", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Aantal scrollstappen om in snelmenu's naar het volgende voorwerp te " + "gaan.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "A / D in snelmenu's", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "Druk op A / D om in snelmenu's naar links en rechts te gaan.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Vloeiend kaartzoomen", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Vloeiend zoomen met naloop op de kaart van de Purah Pad met het muiswiel.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Gevoeligheid kaartzoom", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Hoe snel het muiswiel op de kaart zoomt.", + [UI_MENU_STICK_SENS] = "Camerasnelheid stick", + [UI_MENU_STICK_SENS_DESC] = "Vermenigvuldigt de camerasnelheid van de rechterstick in het spel, topsnelheid " + "inbegrepen, bij elk van de vijf cameragevoeligheden van het spel. De muis houdt zijn " + "eigen instelling.", + [UI_BINDS_HELP] = "Kies een cel en druk op A of Enter, daarna op de toets, muisknop of controllerknop. Delete of " + "X wist een cel. Een toets die al in gebruik is verhuist hierheen; een controllerknop ruilt met " + "de knop die hij vervangt.", + [UI_BINDS_COL_KEY1] = "Toets 1", + [UI_BINDS_COL_KEY2] = "Toets 2", + [UI_BINDS_COL_PAD] = "Controller", + [UI_BINDS_GROUP_BUTTONS] = "Knoppen", + [UI_BINDS_GROUP_MOVE] = "Beweging", + [UI_BINDS_GROUP_CAMERA] = "Camera", + [UI_BINDS_PRESS_KEY] = "Druk op een toets of muisknop voor %s", + [UI_BINDS_PRESS_PAD] = "Druk op een controllerknop voor %s", + [UI_BINDS_CANCEL_HINT] = "Esc annuleert, of wacht %d s", + [UI_BINDS_TAKEN] = "%s is weggehaald bij %s", + [UI_BINDS_SWAPPED] = "%s geruild met %s", + [UI_BINDS_RESET] = "Alle knoppen herstellen", + [UI_BINDS_RESET_DESC] = "Terug naar de standaardtoetsen en -controllerknoppen. De knopindeling hierboven geldt " + "weer: omgezette controllerknoppen blijven tot dit herstel waar je ze hebt gezet.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Linkerstick indrukken", + [UI_BIND_RCLICK] = "Rechterstick indrukken", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "Plus", + [UI_BIND_MINUS] = "Min", + [UI_BIND_LEFT] = "Richtingskruis links", + [UI_BIND_UP] = "Richtingskruis omhoog", + [UI_BIND_RIGHT] = "Richtingskruis rechts", + [UI_BIND_DOWN] = "Richtingskruis omlaag", + [UI_BIND_LSTICK_LEFT] = "Naar links", + [UI_BIND_LSTICK_UP] = "Vooruit", + [UI_BIND_LSTICK_RIGHT] = "Naar rechts", + [UI_BIND_LSTICK_DOWN] = "Achteruit", + [UI_BIND_RSTICK_LEFT] = "Camera links", + [UI_BIND_RSTICK_UP] = "Camera omhoog", + [UI_BIND_RSTICK_RIGHT] = "Camera rechts", + [UI_BIND_RSTICK_DOWN] = "Camera omlaag", + [UI_BIND_DESC_A] = "Gebruiken, oppakken, praten.", + [UI_BIND_DESC_B] = "Rennen, annuleren, terug.", + [UI_BIND_DESC_X] = "Springen.", + [UI_BIND_DESC_Y] = "Aanvallen.", + [UI_BIND_DESC_LCLICK] = "Hurken.", + [UI_BIND_DESC_RCLICK] = "Eerstepersoonsweergave.", + [UI_BIND_DESC_L] = "Vaardigheden.", + [UI_BIND_DESC_R] = "Wapen gooien.", + [UI_BIND_DESC_ZL] = "Schild, vastzetten.", + [UI_BIND_DESC_ZR] = "Boog.", + [UI_BIND_DESC_PLUS] = "Menu, inventaris.", + [UI_BIND_DESC_MINUS] = "Kaart.", + [UI_BIND_DESC_DPAD] = "Snelkeuze.", + [UI_BIND_DESC_MOVE] = "Beweegt Link zoals de linkerstick. De linkerstick van de controller werkt ook altijd.", + [UI_BIND_DESC_CAMERA] = "Draait de camera zoals de rechterstick. De muis en de rechterstick van de controller " + "werken ook altijd.", + [UI_BIND_SHAKE] = "Camerastick schudden", + [UI_BIND_DESC_SHAKE] = "Zwaait de rechterstick voor het spel naar links en rechts: maakt een vastgemaakt " + "onderdeel los van wat Ultrahand vasthoudt. Ingedrukt houden blijft schudden.", + [UI_KEY_SPACE] = "Spatie", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "Linker Shift", + [UI_KEY_LCTRL] = "Linker Ctrl", + [UI_KEY_UP] = "Pijl omhoog", + [UI_KEY_DOWN] = "Pijl omlaag", + [UI_KEY_LEFT] = "Pijl links", + [UI_KEY_RIGHT] = "Pijl rechts", + [UI_KEY_MOUSE_L] = "Linkermuisknop", + [UI_KEY_MOUSE_R] = "Rechtermuisknop", + [UI_KEY_MOUSE_M] = "Middelste muisknop", + [UI_KEY_MOUSE_X1] = "Muis 4", + [UI_KEY_MOUSE_X2] = "Muis 5", + [UI_KEY_ENTER] = "Enter", + [UI_KEY_BACKSPACE] = "Backspace", + [UI_KEY_RSHIFT] = "Rechter Shift", + [UI_KEY_RCTRL] = "Rechter Ctrl", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Caps Lock", + [UI_KEY_INSERT] = "Insert", + [UI_KEY_DELETE] = "Delete", + [UI_KEY_HOME] = "Home", + [UI_KEY_END] = "End", + [UI_KEY_PAGEUP] = "Page Up", + [UI_KEY_PAGEDOWN] = "Page Down", + [UI_KEY_NUM_FMT] = "Num %s", + [UI_PAD_SOUTH] = "Onderste knop", + [UI_PAD_EAST] = "Rechterknop", + [UI_PAD_WEST] = "Linkerknop", + [UI_PAD_NORTH] = "Bovenste knop", + [UI_PAD_LSTICK] = "Linkerstick", + [UI_PAD_RSTICK] = "Rechterstick", + [UI_PAD_L] = "Linker schouderknop", + [UI_PAD_R] = "Rechter schouderknop", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Terug", + [UI_PAD_DPAD_LEFT] = "Richtingskruis links", + [UI_PAD_DPAD_UP] = "Richtingskruis omhoog", + [UI_PAD_DPAD_RIGHT] = "Richtingskruis rechts", + [UI_PAD_DPAD_DOWN] = "Richtingskruis omlaag", + [UI_PAD_ZL] = "Linkertrigger", + [UI_PAD_ZR] = "Rechtertrigger", + [UI_PAD_LPADDLE1] = "Linker achterknop", + [UI_PAD_RPADDLE1] = "Rechter achterknop", + [UI_PAD_LPADDLE2] = "Linker achterknop 2", + [UI_PAD_RPADDLE2] = "Rechter achterknop 2", + [UI_PAD_TOUCHPAD] = "Touchpadklik", + [UI_PAD_CROSS] = "Kruis", + [UI_PAD_CIRCLE] = "Cirkel", + [UI_PAD_SQUARE] = "Vierkant", + [UI_PAD_TRIANGLE] = "Driehoek", + [UI_MENU_AMIIBO_DIR] = "Amiibomap", + [UI_MENU_AMIIBO_OPEN] = "Openen", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Standaardmap", + [UI_MENU_AMIIBO_REFRESH] = "Vernieuwen", + [UI_MENU_AMIIBO_PICK] = "Amiibo-dumps (.bin- of .nfc-bestanden van 540 bytes):", + [UI_MENU_AMIIBO_NO_DIR] = "Kan de map %s niet openen", + [UI_MENU_AMIIBO_READER] = "NFC-lezer", + [UI_MENU_AMIIBO_STATE] = "Lezer:", + [UI_MENU_AMIIBO_STATE_IDLE] = "gereed", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "het spel wacht op een amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo op de lezer", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "het spel leest de amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "uit", + [UI_MENU_AMIIBO_FILE] = "Gekozen bestand:", + [UI_MENU_AMIIBO_NO_FILE] = "(geen bestand gekozen)", + [UI_MENU_AMIIBO_TAP] = "Amiibo aanhouden", + [UI_MENU_AMIIBO_REMOVE] = "Amiibo weghalen", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Amiibo na het aanhouden vanzelf weghalen", + [UI_MENU_AMIIBO_HOLD] = "Tijd op de lezer", + [UI_MENU_AMIIBO_SECONDS] = "%.1f s", + [UI_MENU_AMIIBO_TAG] = "Amiibo op de lezer:", + [UI_MENU_AMIIBO_NO_TAG] = "Geen amiibo op de lezer.", + [UI_MENU_AMIIBO_TAG_FILE] = "Bestand: %s", + [UI_MENU_AMIIBO_TAG_ID] = "Personage %s, serie %02x, nummer %04x, type %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "Gereed", + [UI_MENU_AMIIBO_TAPPED] = "Aangehouden: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "Geen amiibo-dump (NTAG215 van 540 bytes): %s", + [UI_MENU_AMIIBO_REMOVED] = "Amiibo weggehaald", + [UI_MENU_AMIIBO_STATUS] = "Status: %s", + [UI_MENU_MENU_LANG] = "Menutaal", + [UI_MENU_MENU_LANG_DESC] = "Taal van dit menu en de prestatieweergave.", + [UI_MENU_MENU_LANG_AUTO] = "Automatisch (uit Windows)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "Toont \"Speelt TotK Recomp\" met de speeltijd in je Discord-status terwijl het spel " + "draait. discord_app_id en discord_image in totk.ini kiezen de applicatie.", + [UI_MENU_ADV_WARNING] = "Deze instellingen zijn voor testen en probleemoplossing. Wijzig ze alleen als je weet " + "waarom.", + [UI_MENU_GROUP_SCHED] = "Planning", + [UI_MENU_GROUP_SHADERS] = "Shaders en pipelines", + [UI_MENU_GROUP_TEXMEM] = "Texturen en geheugen", + [UI_MENU_GROUP_FIXES] = "Rendercorrecties", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "Diagnose", + [UI_MENU_ASYNC_PREEMPT] = "Onderbreking op virtuele kernen", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Laat een spelthread een andere op dezelfde virtuele kern onderbreken.", + [UI_MENU_PREEMPT_OFF] = "Uit", + [UI_MENU_PREEMPT_ON] = "Aan", + [UI_MENU_PREEMPT_INHERIT] = "Alleen overerving", + [UI_MENU_REPLAY_ASYNC] = "GPU-beeldvoorbereiding op eigen thread", + [UI_MENU_REPLAY_ASYNC_DESC] = "Bereidt beelden voor de GPU voor op een aparte thread in plaats van de spelthread. " + "Voegt tot één beeld vertraging toe.", + [UI_MENU_REPLAY_WORKERS] = "Threads GPU-beeldvoorbereiding", + [UI_MENU_REPLAY_WORKERS_DESC] = "Stelt grote beelden voor de GPU samen op meerdere threads tegelijk. Helpt als de " + "CPU de beeldsnelheid beperkt; vereist 8 of meer logische processors. Uit stelt " + "ze samen op één thread.", + [UI_MENU_REPLAY_WORKERS_NOW] = "nu: %s", + [UI_MENU_TIMER_1MS] = "Windows-timer van 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Verhoogt de resolutie van de systeemtimer naar 1 ms voor een gelijkmatiger beeldritme.", + [UI_MENU_PIPE_WAIT] = "Afhandeling van wachtende draws", + [UI_MENU_PIPE_WAIT_DESC] = "Standaard houdt de huidige planning met een gereserveerde worker voor wachtende " + "draws; Oud (draw) gebruikt de vorige planning.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Standaard", + [UI_MENU_PIPE_WAIT_DRAW] = "Oud (draw)", + [UI_MENU_PIPE_SKIP] = "Overgeslagen draws tijdens pipelinebouw", + [UI_MENU_PIPE_SKIP_DESC] = "Welke draws worden weggelaten in plaats van op hun pipeline te wachten.", + [UI_MENU_PIPE_SKIP_STRICT] = "Strikt", + [UI_MENU_PIPE_SKIP_ANY] = "Alle", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Volledigschermpassen", + [UI_MENU_LIB_PREBUILD] = "Stagebibliotheken vooraf bouwen", + [UI_MENU_LIB_PREBUILD_DESC] = "Bouwt shader-stagebibliotheken vooraf op de achtergrond.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Threads voor stagebibliotheken", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Threads voor het vooraf bouwen; Automatisch kiest een aantal op basis van " + "je CPU.", + [UI_MENU_PIPE_PREBUILD] = "Pipelines vooraf bouwen", + [UI_MENU_PIPE_PREBUILD_DESC] = "Bouwt bekende pipelines vooraf.", + [UI_MENU_PREWARM_XLATE] = "Vertaler voorverwarmen", + [UI_MENU_PREWARM_XLATE_DESC] = "Threads die bekende shaders bij de start vertalen; Automatisch neemt de helft van " + "de CPU-threads, maximaal 16.", + [UI_MENU_GPL] = "Graphics-pipelinebibliotheek", + [UI_MENU_GPL_DESC] = "Gebruikt de Vulkan-extensie voor pipelinebibliotheken; zet hem uit als je stuurprogramma er " + "problemen mee heeft.", + [UI_MENU_ASTC] = "ASTC-textuurdecodering", + [UI_MENU_ASTC_DESC] = "Waar gecomprimeerde ASTC-texturen worden gedecodeerd.", + [UI_MENU_ASTC_AUTO] = "Automatisch", + [UI_MENU_ASTC_GPU] = "GPU-shader", + [UI_MENU_ASTC_NATIVE] = "Native", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "GPU-geheugenmodus", + [UI_MENU_MEMORY_DESC] = "Hoe het spelgeheugen met de GPU wordt gedeeld.", + [UI_MENU_MEMORY_AUTO] = "Automatisch", + [UI_MENU_MEMORY_IMPORT] = "Importeren", + [UI_MENU_MEMORY_MIRROR] = "Spiegelen", + [UI_MENU_MEMORY_VERIFY] = "Controleren", + [UI_MENU_TEX_ALIAS] = "Textuur-aliasing", + [UI_MENU_TEX_ALIAS_DESC] = "Een nieuwe textuur in het geheugen van een levende textuur begint met die inhoud in " + "plaats van leeg.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Limiet textuurgeheugen", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Percentage videogeheugen waarboven texturen die het spel heeft vrijgegeven " + "worden weggegooid (ze komen terug uit de opslag als ze weer nodig zijn). 0 " + "bewaart ze.", + [UI_MENU_ASTC_BC] = "ASTC comprimeren naar BC3", + [UI_MENU_ASTC_BC_DESC] = "Met de GPU-decoder: codeert gedecodeerde ASTC-texturen opnieuw naar BC3, een kwart van " + "het videogeheugen. Voor GPU's met 4 GB of minder; texturen ogen iets blokkeriger.", + [UI_MENU_LOD_GUARD] = "LOD-bewaking", + [UI_MENU_LOD_GUARD_DESC] = "Voorkomt dat voorwerpen een beeld lang op de verkeerde plek oplichten of de verte " + "plat oogt, door te wachten tot het spel klaar is met het herschrijven van de " + "detailniveaugegevens voordat de GPU ze leest.", + [UI_MENU_FIX_C0] = "Correctie constantenbuffer", + [UI_MENU_FIX_C0_DESC] = "Vult de door het stuurprogramma gereserveerde constantenbank c0 (opslaggroottes, " + "dispatchgrootte, puntgrootte, basisinstantie) in plaats van nullen te lezen.", + [UI_MENU_FIX_ZERO] = "Nieuw GPU-geheugen op nul zetten", + [UI_MENU_FIX_ZERO_DESC] = "Nieuwe GPU-geheugenpools beginnen gevuld met nullen, zoals Switch-geheugen.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Mist en deeltjes na DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Met DLAA worden mist, stof en andere deeltjes over het beeld getekend dat " + "DLSS al heeft gladgestreken, zoals het spel ze zonder DLSS tekent: kleine " + "deeltjes in mist (heiligdommen) verdwijnen niet meer en laten geen sporen " + "meer achter. Uit: DLSS verwerkt deze effecten ook, zoals voorheen. Alleen in " + "DLAA-modus; de upscalingmodi van DLSS verwerken ze altijd. Werkt meteen.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Vaste DLSS-belichting", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS neemt de helderheid van het spelbeeld zoals ze is, in plaats van de " + "belichting per beeld te schatten: in donkere scènes (de Diepten) worden " + "grote mistige vlakken niet meer een beeld lang donkerder of lichter terwijl " + "de camera beweegt. Uit: DLSS schat de belichting zelf, zoals voorheen. " + "Werkt meteen.", + [UI_MENU_BIND_SKIP] = "Herhaalde bindingen overslaan", + [UI_MENU_BIND_SKIP_DESC] = "Optimalisatie: slaat ongewijzigde bindingen over.", + [UI_MENU_SHADER_MEMO] = "Shadergeheugen", + [UI_MENU_SHADER_MEMO_DESC] = "Optimalisatie: onthoudt shaderopzoekingen.", + [UI_MENU_PIPE_MEMO] = "Pipelinegeheugen", + [UI_MENU_PIPE_MEMO_DESC] = "Optimalisatie: hergebruikt de pipeline van de vorige draw als de toestand zich " + "herhaalt.", + [UI_MENU_TEX_MEMO] = "Geheugen textuurbindingen", + [UI_MENU_TEX_MEMO_DESC] = "Optimalisatie: onthoudt textuurdescriptors tussen draws.", + [UI_MENU_DESC_TEMPLATE] = "Descriptorsjablonen", + [UI_MENU_DESC_TEMPLATE_DESC] = "Optimalisatie: werkt descriptors in bulk bij.", + [UI_MENU_PUSH_SKIP] = "Herhaalde push constants overslaan", + [UI_MENU_PUSH_SKIP_DESC] = "Optimalisatie: slaat ongewijzigde push constants over.", + [UI_MENU_SPLIT_DRAWS] = "Vroege GPU-indiening", + [UI_MENU_SPLIT_DRAWS_DESC] = "Dient GPU-werk tussen passen in delen in, elke N draws, zodat de GPU eerder begint; " + "0 zet het uit.", + [UI_MENU_VK_VALIDATION] = "Validatielaag", + [UI_MENU_VK_VALIDATION_DESC] = "Controleert elke Vulkan-aanroep en vertraagt het spel sterk.", + [UI_MENU_VK_VALIDATION_MISSING] = "De validatielaag is niet geïnstalleerd.", + [UI_MENU_VK_DYN_VERTEX] = "Dynamische vertextoestand", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Dwingt dynamische vertexinvoer aan of uit; de standaard hangt af van de GPU.", + [UI_MENU_VK_DYN_A2C] = "Dynamische alpha-to-coverage", + [UI_MENU_VK_DYN_A2C_DESC] = "Dwingt dynamische alpha-to-coverage aan of uit. Standaard: uit bij het " + "AMD-stuurprogramma voor RDNA 2 en ouder, dat personages er zwart mee tekent, elders " + "aan.", + [UI_MENU_VK_SUBGROUP_PIN] = "Subgroepgrootte vastzetten", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Zet de subgroepgrootte van de shaders vast.", + [UI_MENU_TRACE] = "Prestatielogboek", + [UI_MENU_TRACE_DESC] = "Schrijft beeldtijden naar een bestand.", + [UI_MENU_FLIGHT] = "Zwarte doos", + [UI_MENU_FLIGHT_DESC] = "Houdt een korte geschiedenis bij en slaat die op als een beeld vastloopt.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Drempel voor vastlopers (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Beeldtijd die als vastloper telt.", + [UI_MENU_PASS_CRUMBS] = "GPU-pasmarkeringen", + [UI_MENU_PASS_CRUMBS_DESC] = "Na een GPU-crash noemt het logboek de renderpas die bezig was. Automatisch: alleen " + "AMD. Aan: ook NVIDIA, wat iets prestaties kost.", + [UI_MENU_INPUT_RECORD] = "Invoer opnemen", + [UI_MENU_INPUT_RECORD_DESC] = "Schrijft je invoer naar een bestand voor foutrapporten.", + [UI_MENU_OPEN_LOG] = "Logmap openen", + [UI_MENU_OPEN_LOG_DESC] = "Toont de map met de logbestanden.", + [UI_MENU_COPY_INFO] = "Systeeminfo kopiëren", + [UI_MENU_COPY_INFO_DESC] = "Kopieert GPU, stuurprogramma, CPU, RAM en gewijzigde instellingen naar het klembord.", + [UI_MENU_COPY_INFO_DONE] = "Gekopieerd", + [UI_MENU_ACTION_FAILED] = "werkte niet", + [UI_MENU_RESET] = "Alle instellingen herstellen", + [UI_MENU_RESET_DESC] = "Geldt voor alle tabbladen.", + [UI_MENU_RESET_CONFIRM] = "Alle instellingen terugzetten naar standaard?", + [UI_MENU_RESET_YES] = "Herstellen", + [UI_MENU_RESET_NO] = "Annuleren", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "spel %.0f%%", + [UI_MENU_OV_MAX_MS] = "max %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "Beeld", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% laagst %.0f", + [UI_MENU_OV_LOW01] = "0,1%% laagst %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Temperatuur", + [UI_MENU_OV_POWER] = "Vermogen", + [UI_MENU_OV_CLOCK] = "Kloksnelheid", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "GPU-beeldvoorbereiding", + [UI_MENU_OV_GPU_TIME] = "GPU bezig per beeld", + [UI_MENU_OV_PIPE_WAIT] = "Pipelinewachttijden", + [UI_MENU_OV_SHADER_WAIT] = "Shaderwachttijden", + [UI_MENU_OV_TEX_UPLOADS] = "Textuuruploads", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "spel %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "%.1f per beeld", + [UI_MENU_OV_WINDOW] = "Venster", + [UI_MENU_OV_OUTPUT] = "Spelbeeld", + [UI_MENU_OV_SCENE] = "3D-scène", + [UI_MENU_OV_UPSCALER] = "3D-upscaler", + [UI_MENU_OV_SCALING] = "Schaling", + [UI_MENU_OV_LIMIT] = "Beeldlimiet", + [UI_MENU_OV_PRESENT] = "Weergave", + [UI_MENU_OV_SHOWN] = "Getoond", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, scherpte %d%%", + [UI_MENU_OV_SCALE_NONE] = "geen (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilineair", + [UI_MENU_OV_SCALE_DOWN] = "bilineair (FSR vergroot alleen)", + [UI_MENU_TAB_CHEATS] = "Cheats", + [UI_MENU_CHEATS_NONE] = "Geen cheats voor deze spelversie. De cheats van een mod zijn een Atmosphère-cheatbestand " + "in zijn cheats-map, genoemd naar de build van het spel: mods\\\\cheats\\%s. Start " + "het spel opnieuw om ze te lezen. Voor cheats die de spelcode wijzigen, bouwt het spel " + "zichzelf bij de start opnieuw (enkele minuten).", + [UI_MENU_CHEATS_MOD] = "%s: %d cheats", + [UI_MENU_CHEAT_CODE_DESC] = "Wijzigt de spelcode. Schakelt meteen.", + [UI_MENU_CHEAT_KEY_DESC] = "Wijzigt de spelcode zolang je %s ingedrukt houdt. Schakelt meteen.", + [UI_MENU_CHEAT_DATA_DESC] = "Schrijft elk beeld naar het spelgeheugen zolang hij aan staat.", + [UI_MENU_CHEAT_MASTER] = "altijd aan", + [UI_MENU_CHEAT_MASTER_DESC] = "De mastercode van het bestand: hij staat altijd aan.", + [UI_MENU_CHEAT_RESTORE] = "niet nodig", + [UI_MENU_CHEAT_RESTORE_DESC] = "Hij schrijft alleen de oorspronkelijke spelcode terug. Een cheat uitzetten doet " + "dat al.", + [UI_MENU_CHEAT_REBUILD] = "na de herbouw", + [UI_MENU_CHEAT_REBUILD_DESC] = "Deze cheat wijzigt de spelcode en is nieuw of bewerkt sinds het spel werd " + "gebouwd. Het spel bouwt hem in bij de volgende start (enkele minuten), of gebruik " + "Spel nu herbouwen.", + [UI_MENU_CHEAT_UNSUPPORTED] = "niet ondersteund", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Deze cheat kan niet worden gebruikt met deze spelversie:", + [UI_MENU_CHEATS_REBUILD] = "Spel nu herbouwen", + [UI_MENU_CHEATS_REBUILD_DESC] = "Sommige cheats wijzigen de spelcode en zijn niet ingebouwd: ze zijn nieuw of " + "bewerkt, of hun laatste herbouw is mislukt of geannuleerd. Sluit het spel; de " + "installatie bouwt ze in (enkele minuten) en start het spel opnieuw. Voortgang " + "sinds je laatste opslag gaat verloren.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Deze mod past de spelcode aan (exefs) op een manier die de port niet kan " + "toepassen, dus de hele mod blijft uit. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Zijn codepatches (exefs) zijn gemaakt voor een andere spelversie.", + [UI_MENU_MODS_EXEFS_ON] = "Codepatches in gebruik: %d bestanden.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Codepatches in gebruik: %d bestanden. Ze vervangen de eigen patch %s van de " + "port, die uit blijft zolang deze mod aan staat.", + [UI_MENU_MODS_CODE_SKIPPED] = "Zijn eigen spelcode (%s) wordt niet geladen: de rest van de mod wordt gebruikt. " + "Zet de mod uit als het spel zich ermee misdraagt.", + [UI_MENU_MODS_PLUGIN_ON] = "Zijn plug-in draait: %d hooks in de spelcode.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Zijn plug-in %s kan niet draaien in de port: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "De hele mod blijft uit. Zijn schakelaar \"... gebruiken zonder zijn code\" " + "hieronder gebruikt de rest ervan.", + [UI_MENU_MODS_PLUGIN_OFF] = "Zijn plug-in blijft deze keer uit: hij startte anders dan bij het bouwen (%s). Het " + "spel bouwt hem opnieuw bij de volgende start.", + [UI_MENU_MODS_WITHOUT_CODE] = "%s gebruiken zonder zijn code", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "De mod hierboven brengt code mee die de port niet kan uitvoeren: eigen " + "spelcode (een subsdk-plug-in of een vervangen main) of codepatches (exefs) " + "die de port niet kan toepassen. Uit: de hele mod blijft uit. Aan: die code " + "wordt weggelaten en de rest van de mod wordt gebruikt: zijn RomFS-bestanden, " + "cheats en de codepatches die werken. Zijn bestanden kunnen de ontbrekende " + "code verwachten; zet het weer uit als het spel zich misdraagt. Werkt bij de " + "volgende start.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Aan voor elke mod: mods_without_code = 1 in totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u van zijn codepatchbestanden (exefs) kunnen niet worden toegepast en worden " + "weggelaten: de rest van de mod wordt gebruikt. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u van zijn bestanden vervangen die van %s, dat lager in de lijst staat.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u bytes van zijn wijzigingen in de spelgegevens komen van %s, dat hoger in de " + "lijst staat.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u bytes van zijn wijzigingen in de spelgegevens vervangen die van %s, dat lager " + "in de lijst staat.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u van zijn codepatchplaatsen worden overschreven door %s, dat hoger in de " + "lijst staat.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Hij overschrijft %u codepatchplaatsen van %s, dat lager in de lijst staat.", +}; + +// Japanese +static const char *const text_ja[UI_TEXT_COUNT] = { + SWKBD("文字入力", "名前を入力してください", "ウマ", "OK", "キャンセル", "コントローラー: A = OK、B = キャンセル"), + + [UI_MENU_TITLE] = "設定", + [UI_MENU_TAB_SCREEN] = "画面", + [UI_MENU_TAB_GAME] = "ゲーム", + [UI_MENU_TAB_MODS] = "Mod", + [UI_MENU_TAB_SOUND] = "サウンド", + [UI_MENU_TAB_CONTROLS] = "操作", + [UI_MENU_TAB_AMIIBO] = "amiibo", + [UI_MENU_TAB_MENU] = "メニュー", + [UI_MENU_TAB_ADVANCED] = "詳細", + [UI_MENU_CONTINUE] = "続ける", + [UI_MENU_QUIT] = "ゲームを終了", + [UI_MENU_ON] = "オン", + [UI_MENU_OFF] = "オフ", + [UI_MENU_AUTO] = "自動", + [UI_MENU_DEFAULT_MARK] = "既定", + [UI_MENU_AFTER_RESTART] = "再起動後", + [UI_MENU_SET_BY_ENV] = "環境変数で固定", + [UI_MENU_SAVE_FAILED] = "設定を保存できませんでした", + [UI_MENU_VERSION] = "TotK Recomp %s、ゲーム %s", + [UI_MENU_FULLSCREEN] = "フルスクリーン", + [UI_MENU_FULLSCREEN_DESC] = "ゲームで画面全体を使います。F11 で切り替えます。", + [UI_MENU_WINDOW_SIZE] = "ウィンドウサイズ", + [UI_MENU_WINDOW_SIZE_DESC] = "フルスクリーンでないときのゲームウィンドウの大きさです。", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "カスタム", + [UI_MENU_PRESENT] = "表示方式", + [UI_MENU_PRESENT_DESC] = "完成したフレームを画面に出す方法です。", + [UI_MENU_PRESENT_MAILBOX] = "メールボックス", + [UI_MENU_PRESENT_VSYNC] = "垂直同期", + [UI_MENU_PRESENT_IMMEDIATE] = "即時", + [UI_MENU_PRESENT_IN_USE] = "使用中: %s", + [UI_MENU_GPU] = "グラフィックカード", + [UI_MENU_GPU_DESC] = "ゲームを描画する Vulkan デバイスです。", + [UI_MENU_GPU_AUTO] = "自動", + [UI_MENU_PERF_OVERLAY] = "パフォーマンス表示", + [UI_MENU_PERF_OVERLAY_DESC] = "右上にフレームレートを表示します。「詳細」では、グラフ付きのフレーム時間、CPU・GPU・メモリの負荷、温度、描画スレッドの待ち時間も表示します。F10 " + "でモードを切り替えます。", + [UI_MENU_PERF_OFF] = "オフ", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "詳細", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "描画 %.0f fps、表示 %.0f", + [UI_MENU_GRAPHICS] = "画質", + [UI_MENU_OUTPUT_RES] = "ゲーム解像度", + [UI_MENU_OUTPUT_RES_DESC] = "ゲームが画面とインターフェースを描く大きさです。1920 x 1080 を超えると、ビデオメモリと GPU 時間がより多く必要になります。横長の比率 (21:9) " + "ではカメラの視界が広がり HUD が画面の隅に移り、縦長の比率 (16:10、Steam Deck) では上下の端に移ります。", + [UI_MENU_HUD_WIDTH] = "HUD の幅", + [UI_MENU_HUD_WIDTH_DESC] = "16:9 より横長の画面で、HUD の左右をどれだけ離すかです。「全画面」では画面の端に置きます。21:9 または 16:9 では、その形の画面の中央部分に HUD " + "を収めます。足りないレイアウトはバックグラウンドで作成され、再起動後に使われます。", + [UI_MENU_HUD_WIDTH_FULL] = "全画面", + [UI_MENU_RENDER_SCALE] = "3D 描画スケール", + [UI_MENU_RENDER_SCALE_DESC] = "ゲーム解像度に対する 3D シーンの大きさです。ゲームの FSR がその大きさに拡大します。100 % を超えるとギザギザが滑らかになります " + "(スーパーサンプリング) が、GPU の負荷が大きく増えます。", + [UI_MENU_RENDER_SCALE_GAME] = "ゲーム (83 %)", + [UI_MENU_DYNAMIC_RES] = "動的解像度", + [UI_MENU_DYNAMIC_RES_DESC] = "ゲームが 3D シーンを 90 % または 80 % に下げられるようにします。判断には Switch 向けの見積もりが使われ、お使いの GPU " + "は考慮されないため、広い景色では高速な PC でも解像度が下がります。オフでは描画スケールを保ちます。", + [UI_MENU_UPSCALER] = "ウィンドウへの拡大", + [UI_MENU_UPSCALER_DESC] = "ウィンドウがゲーム解像度より大きいときの拡大方法です。FSR はバイリニアより輪郭と細部をくっきり保ちます。", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "バイリニア", + [UI_MENU_ASPECT] = "画面の形", + [UI_MENU_ASPECT_DESC] = "ウィンドウの形がゲーム解像度の形と違うとき (21:9 の画面に 16:9 の映像など): 黒帯を付けて形を保つか、ウィンドウいっぱいに引き伸ばすかを選びます。", + [UI_MENU_ASPECT_FIT] = "黒帯", + [UI_MENU_ASPECT_STRETCH] = "引き伸ばし", + [UI_MENU_MOVIE_ASPECT] = "ムービーの形", + [UI_MENU_MOVIE_ASPECT_DESC] = "ゲーム解像度が 16:9 でないとき、ムービーを黒帯付きで本来の形のまま表示するか、映像全体に引き伸ばすかを選びます。次のムービーから反映されます。", + [UI_MENU_MOVIE_ASPECT_KEEP] = "黒帯", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "引き伸ばし", + [UI_MENU_FOV] = "視野角", + [UI_MENU_FOV_DESC] = "カメラが映す範囲を、ゲーム本来の視野に対するパーセントで指定します。ゲームのバージョン 1.4.3 のみ。", + [UI_MENU_SHADOW_RES] = "シャドウマップのサイズ", + [UI_MENU_SHADOW_RES_DESC] = "太陽のシャドウマップの大きさです。ゲーム本来のサイズは視点によって変わり、地面近くでは約 400 まで下がるため、葉の影がブロック状になって跳ねます。固定サイ" + "ズにすると影が安定し、くっきりします。1024 を超えると GPU 時間とビデオメモリが増えます。", + [UI_MENU_SHADOW_RES_GAME] = "ゲーム (可変)", + [UI_MENU_ANISO] = "テクスチャフィルタリング", + [UI_MENU_ANISO_DESC] = "表面テクスチャの異方性フィルタリングです。浅い角度で見た地面、道、壁がぼやけずに遠くまでくっきりします。「ゲーム」は Switch と同じく、ゲームが求めるレベルです。", + [UI_MENU_ANISO_GAME] = "ゲーム", + [UI_MENU_LOD_STEADY] = "負荷時も詳細度を維持", + [UI_MENU_LOD_STEADY_DESC] = "フレームレートが下がったときにモデルとテクスチャの詳細度を下げるゲームの仕組みを飛ばします。エミュレーター用 Mod の Disable LOD Quality " + "Reduction と同じ動作です。ゲームのバージョン 1.2.1 と 1.4.3。性能の低い PC ではオフのままにしてください: " + "そこではこの低下がフレームレートを保っています。", + [UI_MENU_SHARPNESS] = "FSR シャープネス", + [UI_MENU_SHARPNESS_DESC] = "FSR で拡大した後のシャープ化です。0 でオフになります。", + [UI_MENU_COLOR] = "色", + [UI_MENU_COLOR_PRESET] = "カラープロファイル", + [UI_MENU_COLOR_PRESET_DESC] = "下の 4 つの値をまとめて設定します。ビビッド: コントラストと彩度を上げ、暗部を少し明るくします (OLED 画面向け)。クリア: " + "コントラスト、彩度、明るさを少し上げます。値を動かすとプロファイルは「カスタム」になります。HUD は映像と一緒に変わりますが、このメニューは変わりません。", + [UI_MENU_COLOR_DEFAULT] = "ゲーム標準", + [UI_MENU_COLOR_VIVID] = "ビビッド (OLED)", + [UI_MENU_COLOR_CLARITY] = "クリア", + [UI_MENU_COLOR_CUSTOM] = "カスタム", + [UI_MENU_COLOR_BRIGHTNESS] = "明るさ", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "すべての色に加算します。0 で変更なし。", + [UI_MENU_COLOR_CONTRAST] = "コントラスト", + [UI_MENU_COLOR_CONTRAST_DESC] = "色を中間のグレーから遠ざけ (100 % 超)、または近づけます。100 % で変更なし。", + [UI_MENU_COLOR_SATURATION] = "彩度", + [UI_MENU_COLOR_SATURATION_DESC] = "グレーに対する色の強さです。100 % で変更なし。", + [UI_MENU_COLOR_GAMMA] = "ガンマ", + [UI_MENU_COLOR_GAMMA_DESC] = "1 未満で暗部と中間調を明るく、1 を超えると暗くします。1 で変更なし。", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "HDR 出力", + [UI_MENU_HDR_DESC] = "HDR ディスプレイで明るいハイライトを表示します。Windows で HDR をオン (「HDR を使用する」) にするか、カラーマネジメント対応の Wayland " + "コンポジターが必要です。ない場合は SDR のままです。再起動後に反映されます。上のカラープロファイルは SDR 用で、HDR では使われません。", + [UI_MENU_HDR_PEAK] = "ピーク輝度", + [UI_MENU_HDR_PEAK_DESC] = "ディスプレイのピーク輝度 (nit) です。最も明るいハイライトはここで止まります。", + [UI_MENU_HDR_GAME] = "ゲームの明るさ", + [UI_MENU_HDR_GAME_DESC] = "映像の白 (ペーパーホワイト) の nit 値です。203 が HDR の基準です。明るい部屋では上げてください。", + [UI_MENU_HDR_UI] = "HUD とメニューの明るさ", + [UI_MENU_HDR_UI_DESC] = "HUD とこのメニューの白の nit 値です。", + [UI_MENU_HDR_HUE] = "ハイライトの色相補正", + [UI_MENU_HDR_HUE_DESC] = "炎や火花などの明るい色を、ゲーム本来の SDR 映像と同じく白に近づけ、それらが放つ光と合わせます。0 では彩度を完全に保ちます。", + [UI_MENU_SHADOW_SCALE] = "影の解像度", + [UI_MENU_SHADOW_SCALE_DESC] = "太陽のシャドウマップを、ゲーム標準の 960x960 より各辺でこの倍率だけ大きく描きます。影の輪郭と葉の影がくっきりします。次回の起動時に反映されます。", + [UI_MENU_PCSS] = "ソフトシャドウ", + [UI_MENU_PCSS_DESC] = "物体が地面に接する部分では太陽の影をくっきりと、影が遠くに落ちるほど柔らかくします (PCSS)。0 でゲームのフィルターのままです。次回の起動時に反映されます。", + [UI_MENU_CONTACT_SHADOWS] = "接触影", + [UI_MENU_CONTACT_SHADOWS_DESC] = "シャドウマップが拾えない小さな太陽の影です。足元、石の下、草むら、くぼみなど。ライティングの後に画面上で計算します。次回の起動時に反映されます。", + [UI_MENU_SHADOW_RANGE] = "影のカスケード範囲", + [UI_MENU_SHADOW_RANGE_DESC] = "影が柔らかくなる段階 (ゲームでは 20、40、80、160 m) をより遠くに移します。シャドウマップがより広い範囲に広がるの" + "で、影の解像度も一緒に上げてください。次回の起動時に反映されます。", + [UI_MENU_GRASS_RANGE] = "草の描画範囲", + [UI_MENU_GRASS_RANGE_DESC] = "カメラの周りのどこまで草が生えるかです (ゲームでは 62.5 m)。高くすると草原の草がより遠くまで残り、目の前で生えてく" + "ることがなくなります。低くすると描かれる草が減ります。次回の起動時に反映されます。", + [UI_MENU_DLSS_PRESET] = "DLSS モデル", + [UI_MENU_DLSS_PRESET_DESC] = "どの DLSS モデルを使うかです。「自動」はモードごとの NVIDIA の推奨に従います: DLAA、クオリティ、バランスでは K、パフォーマンスでは " + "M、ウルトラパフォーマンスでは L。J: 動くキャラクターの後ろの残像がやや少なく、ちらつきがやや多くなります。K: " + "どのモードでも最もシャープなモデルです。すぐに反映されます。", + [UI_MENU_DLSS_PRESET_DEFAULT] = "自動", + [UI_MENU_DLSS_PRESET_K] = "K (最もシャープ)", + [UI_MENU_DLSS_PRESET_J] = "J (残像が少ない)", + [UI_MENU_DLSS_CHARS] = "DLSS のキャラクター残像", + [UI_MENU_DLSS_CHARS_DESC] = "動くキャラクター、動物、それらが持つ物の後ろに出るかすかな残像を減らします: その部分では DLSS が前のフレームをあまり使いません。強くするほど残像が消えます" + "が、その輪郭は少し滑らかさを失います。すぐに反映されます。", + [UI_MENU_DLSS_CHARS_OFF] = "オフ", + [UI_MENU_DLSS_CHARS_LIGHT] = "弱", + [UI_MENU_DLSS_CHARS_MEDIUM] = "中", + [UI_MENU_DLSS_CHARS_FULL] = "最大", + [UI_MENU_DLSS] = "アップスケーリングモード", + [UI_MENU_DLSS_DESC] = "ネイティブは 3D シーンをフル解像度でアンチエイリアス処理します。クオリティ、バランス、パフォーマンス、ウルトラパフォーマンスはそれぞれ 67、58、50、33 % " + "で描画し、アップスケーラー (DLSS または FSR 3.1) で拡大することで GPU 時間を節約します。これらは 3D 描画スケールの代わりになります。すぐに反映されます。", + [UI_MENU_DLSS_DLAA] = "ネイティブ", + [UI_MENU_DLSS_QUALITY] = "クオリティ", + [UI_MENU_DLSS_BALANCED] = "バランス", + [UI_MENU_DLSS_PERFORMANCE] = "パフォーマンス", + [UI_MENU_DLSS_ULTRA] = "ウルトラパフォーマンス", + [UI_MENU_FXAA] = "ゲームのアンチエイリアス (FXAA)", + [UI_MENU_FXAA_DESC] = "ゲーム標準の FXAA による輪郭の平滑化です。細部が少しぼやけます。DLAA がオンなら不要です。", + [UI_MENU_REFLEX] = "NVIDIA Reflex 低遅延モード", + [UI_MENU_REFLEX_DESC] = "VK_NV_low_latency2 を使って、NVIDIA GPU のシステム遅延を減らします。「オン + ブースト」は、CPU がボトルネックの場面でも GPU " + "のクロックを高く保ちます。", + [UI_MENU_REFLEX_OFF] = "オフ", + [UI_MENU_REFLEX_ON] = "オン", + [UI_MENU_REFLEX_BOOST] = "オン + ブースト", + [UI_MENU_SCENE_UPSCALER] = "3D シーンのアップスケーラー", + [UI_MENU_SCENE_UPSCALER_DESC] = "3D シーン用のテンポラルアップスケーラーです: 輪郭が滑らかになり、ちらつきが減ります。ネイティブより下のモードではシーンを小さく描いて拡大し、GPU " + "時間を節約します。NVIDIA DLSS には NVIDIA RTX GPU と、" DLSS_FILE " (" EXE_FILE " " + "と同じフォルダーに置く) が必要です。AMD FSR 3.1 はどの GPU でも動作します。オフではゲーム本来のスケーリングと FXAA のままです。HUD " + "には影響しません。上の「ウィンドウへの拡大」とシャープネスは、引き続きゲーム画像をウィンドウに合わせます。再起動後に反映されます。", + [UI_MENU_SCENE_UPSCALER_OFF] = "オフ", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: NVIDIA RTX GPU が必要です", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: " DLSS_FILE " がありません", + [UI_MENU_FSR3_SHARPNESS] = "FSR 3.1 シャープネス", + [UI_MENU_FSR3_SHARPNESS_DESC] = "FSR 3.1 の後の 3D シーンのシャープ化です。0 でオフになります。", + [UI_MENU_FPS_LIMIT] = "フレームレート上限", + [UI_MENU_FPS_LIMIT_DESC] = "ゲームが描く 1 秒あたりの最大フレーム数です。60 を超える設定は実験的で、「ゲーム速度を時計に合わせる」が必要です。", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "モニターのリフレッシュレート", + [UI_MENU_FPS_DISPLAY_HZ] = "モニターのリフレッシュレート (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "フレームキュー", + [UI_MENU_FRAME_QUEUE_DESC] = "前のフレームが画面に出る順番を待つ間に、ゲームが次のフレームを始めます: 上限でのフレーム落ちが大幅に減り、入力遅延が最大 1 フレーム増えます。すぐに反映されます。", + [UI_MENU_FRAME_GEN] = "フレーム生成", + [UI_MENU_FRAME_GEN_OFF] = "オフ", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "ゲームが描く 2 枚の画像の間に、生成した画像を 1 枚入れます: 画面上の画像は 2 倍になり、ゲームはフレーム上限の半分で動き、操作は約半フレーム遅れます。120 " + "Hz 以上のディスプレイ向けです。DLSS や HDR とは併用できません。すぐに反映されます。", + [UI_MENU_REALTIME] = "ゲーム速度を時計に合わせる", + [UI_MENU_REALTIME_DESC] = "ゲームを実時間で進め、遅いフレームがあってもゲームが遅くならないようにします。", + [UI_MENU_CLOTH_REALTIME] = "布を時計に合わせる", + [UI_MENU_CLOTH_REALTIME_DESC] = "布や髪も実時間で進めます。", + [UI_MENU_HIGHFPS_FIX] = "高フレームレート用の修正", + [UI_MENU_HIGHFPS_FIX_DESC] = "30 fps を超えるとおかしくなる物理と、60 を超えると透けたり見えなくなったりする物体を修正します。", + [UI_MENU_CLIMB_FIX] = "登る速さの修正", + [UI_MENU_CLIMB_FIX_DESC] = "60 fps を超えても壁やはしごを登る速さを保ち、リンクが上まで登れるようにします。", + [UI_MENU_GAME_LANG] = "ゲームの言語", + [UI_MENU_GAME_LANG_DESC] = "ゲームのテキストと音声の言語です。", + [UI_MENU_GAME_LANG_AUTO] = "自動", + [UI_MENU_OPERATION_MODE] = "本体のモード", + [UI_MENU_OPERATION_MODE_DESC] = "ゲームが TV モードと携帯モードのどちらで動いていると見なすかです。", + [UI_MENU_MODE_DOCKED] = "TV モード", + [UI_MENU_MODE_HANDHELD] = "携帯モード", + [UI_MENU_ASSUME_FOCUS] = "フォーカスがなくても動かす", + [UI_MENU_ASSUME_FOCUS_DESC] = "オン (既定) では、別のウィンドウにいる間もゲームは動き続け、ウィンドウが前面に戻るまでキーボードは反応しません。オフでは、Switch で HOME " + "ボタンを押したときのように、ウィンドウがフォーカスを失うと一時停止します。この方法で中断された読み込みは止まったままになることがあります。", + [UI_MENU_PLAY_TIME] = "プレイ時間", + [UI_MENU_PLAY_TIME_DESC] = "すべての起動を合計したゲーム内の時間です。ゲームウィンドウにフォーカスがあり、ゲームがフレームを描いている間だけ数えます。プロファイルフォルダーの " + "playtime.txt (セーブデータと同じ場所) に保存されます。", + [UI_MENU_PLAY_TIME_HM] = "%llu 時間 %02u 分", + [UI_MENU_PLAY_TIME_SESSION] = "今回: %s", + [UI_MENU_MODS_BUILTIN] = "移植版に組み込み", + [UI_MENU_MODS_INSTALLED] = "インストール済みの Mod", + [UI_MENU_MODS_NONE] = "Mod はまだありません。Mod を mods フォルダーに展開し (Mod ごとに 1 フォルダー、その中に romfs フォルダー)、ゲームを再起動してください。TKMM " + "も、統合した Mod をそこにフォルダーとして書き出せます。", + [UI_MENU_MODS_OPEN] = "mods フォルダーを開く", + [UI_MENU_MODS_OPEN_DESC] = "ゲームが Mod を読み込むフォルダーを表示します。ない場合は作成されます。", + [UI_MENU_MODS_ROW_DESC] = "置き換えるゲームファイル: %u。追加する新しいファイル: %u。", + [UI_MENU_MODS_OVERRIDDEN] = "%u 個のファイルは、リストでより上にある %s のものが使われます。", + [UI_MENU_MODS_MOVE_HINT] = "上のボタンか Ctrl+↑ で上へ、左のボタンか Ctrl+↓ で下へ移動します。2 つの Mod が同じファイルを変更する場合は、上にある方が優先されます。変" + "更は再起動後に反映されます。", + [UI_MENU_MODS_EMPTY] = "このフォルダーには romfs、exefs、cheats のファイルがありません。", + [UI_MENU_MODS_SUBSDK] = "この Mod は独自のゲームコード (subsdk プラグインや置き換えた main) を含みます。移植版はコードモジュールを読み込めないため、Mod 全体がオフのままです。", + [UI_MENU_MODS_EXEFS_LATER] = "この Mod はゲームコードを書き換えます (exefs)。次回の起動時にパッチを組み込みます (数分の再ビルド)。それまでは Mod 全体がオフのままです。", + [UI_MENU_MODS_CHEATS] = "チート: %d 個。「チート」タブで切り替えます。", + [UI_MENU_MODS_CHEATS_FILE] = "このゲームバージョン用のチートは、起動時にこの Mod の cheats\\%s から読み込まれます。", + [UI_MENU_MODS_BAD_NAME] = "フォルダー名に | が含まれています。Mod リストは名前の区切りに | を使います。フォルダー名を変えてください。", + [UI_MENU_MODS_OTHER_VERSION] = "%u 個のファイルは別のゲームバージョン用のため除外されます。お使いのゲームバージョン用のこの Mod を探してください。", + [UI_MENU_MODS_UNUSED] = "未使用", + [UI_MENU_MODS_FPS60] = "60 FPS パッチ", + [UI_MENU_MODS_FPS60_DESC] = "60 fps 用の移植版独自のパッチです。「ゲーム」タブのフレームレート上限で設定します。", + [UI_MENU_MODS_RES] = "解像度パッチ", + [UI_MENU_MODS_RES_DESC] = "1080p を超える解像度用の移植版独自のパッチです。「画面」タブのゲーム解像度で設定します。", + [UI_MENU_MODS_QUICKMENU] = "クイックメニューの修正", + [UI_MENU_MODS_QUICKMENU_DESC] = "60 FPS で武器、盾、素材のメニューの背景が黒くなる問題に対する移植版の修正です。", + [UI_MENU_VOLUME] = "音量", + [UI_MENU_VOLUME_DESC] = "ゲーム全体の音量です。", + [UI_MENU_VOLUME_MUSIC] = "音楽の音量", + [UI_MENU_VOLUME_MUSIC_DESC] = "BGM の音量です。", + [UI_MENU_VOLUME_SFX] = "効果音の音量", + [UI_MENU_VOLUME_SFX_DESC] = "効果音の音量です。", + [UI_MENU_VOLUME_VOICE] = "ボイスの音量", + [UI_MENU_VOLUME_VOICE_DESC] = "キャラクターのボイスの音量です。", + [UI_MENU_AUDIO_CHANNELS] = "スピーカー", + [UI_MENU_AUDIO_CHANNELS_DESC] = "ステレオまたは 5.1 サラウンドで出力します。「自動」は、Windows のスピーカー設定が 6 チャンネル以上なら 5.1 " + "を選びます。再起動後に反映されます。", + [UI_MENU_CHANNELS_AUTO] = "自動", + [UI_MENU_CHANNELS_STEREO] = "ステレオ", + [UI_MENU_CHANNELS_51] = "5.1 サラウンド", + [UI_MENU_AUDIO_DEVICE] = "出力デバイス", + [UI_MENU_AUDIO_DEVICE_DESC] = "音を再生する場所です。「システムの既定」は Windows の既定のデバイスに従います。選んだデバイスが外れている間は、" + "戻るまでシステムの既定を使います。すぐに反映されます。", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "システムの既定", + [UI_MENU_MOTION] = "モーション操作", + [UI_MENU_MOTION_DESC] = "コントローラーのジャイロで狙いを付けます。", + [UI_MENU_GYRO_CALIBRATION] = "ジャイロのバイアス補正", + [UI_MENU_GYRO_CALIBRATION_DESC] = "下のキャリブレーションの行で測った、静止時のコントローラーのドリフトを差し引きます。オフにしても測定値は保存されたままです。", + [UI_MENU_GYRO_CALIBRATE] = "ジャイロのキャリブレーション", + [UI_MENU_GYRO_CALIBRATE_DESC] = "静止時のジャイロのドリフトを測り、取り除きます。コントローラーを置くか、2 秒間動かさずに持ってください。", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "キャリブレーション中...", + [UI_MENU_GYRO_CALIBRATED] = "%s、キャリブレーション済み", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "キャリブレーションに失敗しました", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "コントローラーが動きました: 動かさずに持って、もう一度お試しください", + [UI_MENU_GYRO_AUTO_BIAS] = "静止時のジャイロドリフト学習", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "コントローラーが机の上に静かに置かれているたびに、ジャイロに残ったドリフトを学習して差し引きます。キャリブレーション後も" + "弓の狙いがゆっくりずれる場合に使います。手に持っているコントローラーからは学習しません。実験的な機能です。", + [UI_MENU_RUMBLE_STRENGTH] = "振動の強さ", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "コントローラーの振動の強さです。", + [UI_MENU_RUMBLE_CURVE] = "振動カーブ", + [UI_MENU_RUMBLE_CURVE_DESC] = "値を下げると弱い振動が強くなります。", + [UI_MENU_RUMBLE_TRIGGERS] = "トリガーの振動 (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Xbox コントローラーのトリガーも振動させます。", + [UI_MENU_PAD_LAYOUT] = "ボタン配置", + [UI_MENU_PAD_LAYOUT_DESC] = "どのボタンを A にするかです。Nintendo: Switch と同じく右のボタン。Xbox: Xbox コントローラーの表記どおり下のボタン " + "(PlayStation コントローラーでは ×)。自動は、Nintendo 表記のコントローラーには Nintendo を、それ以外には Xbox " + "を選びます。ゲームのボタン表示にどのコントローラーを使うかは「ボタン表示」で設定します。", + [UI_MENU_PAD_LAYOUT_AUTO] = "自動", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A が右)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A が下)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "使用中: %s", + [UI_MENU_PROMPTS] = "ボタン表示", + [UI_MENU_PROMPTS_DESC] = "ゲームのボタン表示にどのコントローラーのボタンを使うかです。Nintendo: ゲーム本来の表示。Xbox: LB、RB、LT、RT、Menu、View、十字キー、そして" + "上のボタン配置で押されるボタンの表記どおりの A、B、X、Y (Nintendo (A が右) では右のボタンの表記は B なので、A の表示は B " + "になります)。PlayStation: PlayStation コントローラーの記号 (○ × △ □、L1、R1、L2、R2、Options、Share) " + "を、上のボタン配置で押されるボタンに合わせて表示します。PC: キーボードの既定の配置のキーとマウスボタン (E、Shift、スペース、左クリック...) " + "と、カメラ用のマウス。ゲームは起動時にボタン表示を読み込むため、変更は再起動後に反映されます。ボタン表示はゲームのファイ" + "ルの一部なので、「操作」で割り当てを変えたボタンは、画面上では元の表示のままです。", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "ボタン表示のファイルがありません: セットアップを再実行してください", + [UI_MENU_PROMPTS_FAILED] = "ボタン表示のファイルが壊れています: セットアップを再実行してください", + [UI_MENU_PROMPTS_RESTART] = "表示は再起動後に変わります", + [UI_MENU_PROMPTS_OFF_SHAPE] = "ゲーム解像度が 16:9 でないためオフ", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "この形のレイアウトがありません: セットアップを再実行してください", + [UI_MENU_OUTPUT_RES_PREPARING] = "レイアウトをバックグラウンドで作成中です。次回の起動時に使われます", + [UI_MENU_PROMPTS_PREPARING] = "ボタン表示のファイルをバックグラウンドで作成中です。次回の起動時に使われます", + [UI_MENU_PREPARE_RETRY] = "再試行", + [UI_MENU_PREPARE_RETRY_DESC] = "セットアップのツールを再び起動し、足りないインターフェースのレイアウトやボタン表示のファイルをバックグラウンドで作成しま" + "す。ゲームは動き続け、次回の起動時からそれらを使います。", + [UI_MENU_SHAPE_PREPARE_FAILED] = "セットアップのツールが起動しませんでした: セットアップを再実行してください", + [UI_MENU_PROMPTS_OFF_MODS] = "オフ: RomFS の Mod がファイルを置き換えています", + [UI_MENU_PROMPTS_OFF_PATCHES] = "TOTK_ROMFS_PATCHES が設定されている間はオフ", + [UI_MENU_RESTART] = "今すぐ再起動", + [UI_MENU_RESTART_DESC] = "ゲームを閉じ、新しいボタン表示で起動し直します。最後のセーブ以降の進行状況は失われます。", + [UI_MENU_RESTART_CONFIRM] = "今すぐゲームを再起動しますか?最後のセーブ以降の進行状況は失われます。", + [UI_MENU_RESTART_YES] = "再起動", + [UI_MENU_RESTART_SAVING] = "ゲームがセーブ中です。少し待つと再起動できます。", + [UI_MENU_GROUP_STICKS] = "アナログスティック", + [UI_MENU_LSTICK_DEADZONE] = "左スティックのデッドゾーン", + [UI_MENU_RSTICK_DEADZONE] = "右スティックのデッドゾーン", + [UI_MENU_STICK_DEADZONE_DESC] = "スティックをどれだけ動かすとゲームが反応するかです。キャラクターやカメラが勝手に動く場合は上げてください。スティックから" + "手を離し、「現在のスティック」の値を読んで、それより数パーセント上に設定します。", + [UI_MENU_STICK_DEADZONE_NOW] = "現在のスティック: %.0f %%", + [UI_MENU_MOUSE_MODE] = "マウスのカメラ操作", + [UI_MENU_MOUSE_MODE_DESC] = "ダイレクト: PC ゲームのように、マウスを動かした量だけカメラが回ります。スティックのデッドゾーンやカーブはありません (ゲーム 1.4.3 と " + "1.2.1。1.1.0 ではスティックエミュレーション)。スティックエミュレーション: マウスが右スティックとして動作します。", + [UI_MENU_MOUSE_STICK] = "スティックエミュレーション", + [UI_MENU_MOUSE_DIRECT] = "ダイレクト", + [UI_MENU_MENU_CURSOR] = "ゲームのメニューでマウスを使う", + [UI_MENU_MENU_CURSOR_DESC] = "ゲーム本来のメニュー (タイトル、ポーチ、ショップ、会話の選択肢) でポインターを表示します: ポインターの下の項目が選ばれ、左クリックで決定、右クリックで" + "戻ります。最後に使ったのがマウスかキーのときだけなので、ゲームパッドではメニューは変わりません (ゲーム 1.4.3)。", + [UI_MENU_MAP_CLICK] = "マップで左クリック", + [UI_MENU_MAP_CLICK_DESC] = "プルアパッドのマップで、マウスの左ボタンが、割り当てられたボタン (既定では Y) の代わりに、マップのカーソル位置で A " + "を押します。「ゲームのメニューでマウスを使う」が必要です (ゲーム 1.4.3)。", + [UI_MENU_DIALOGUE_CLICK] = "会話中のクリック", + [UI_MENU_DIALOGUE_CLICK_DESC] = "会話ウィンドウが開いている間、左クリックで B (テキストを進め、文字送りを飛ばします)、右クリックで A を押します。割り当てられたボタン " + "(既定では会話ログを開く Y と、ZL) の代わりです。会話の選択肢ではポインターのままです: 左クリックで選びます (ゲーム 1.4.3)。", + [UI_MENU_POINTER_IMAGE] = "ゲームのポインター", + [UI_MENU_POINTER_IMAGE_DESC] = "カーソルがキャプチャされていない間 (ゲームのメニュー、このメニュー、Esc の後)、ウィンドウにはシステムの矢印の代わりに独自の金色の矢" + "じりが、画面の拡大率に合わせた大きさで表示されます。", + [UI_MENU_QUICKSAVE] = "クイックセーブとロード", + [UI_MENU_QUICKSAVE_DESC] = "1 つのキーでゲームをすぐにセーブし、もう 1 つのキーでそのセーブを読み込みます (下の 2 行: 既定では Half-Life と同じく F6 と " + "F7)。画面にメニューは出ません。キーボードとマウスのキーのみ、ゲーム 1.4.3 のみです。クイックセーブはゲーム自身にオートセーブを 1 " + "つ作らせるため、最も古いオートセーブが置き換わり (手動セーブはそのまま)、そのコピーをクイックセーブとして保存し (プロファイルの quicksave " + "フォルダー)、画面上部に \"セーブしました\" と表示します。クイックロードは、画面に \"クイックセーブを読み込み中\" " + "を表示したまま、見えないところでゲームのロード一覧をたどり、ゲームがクイックセーブを読み込みます (約 5 秒)。ゲーム自身がオートセーブを作らない場面 " + "(ムービー、会話) では何もセーブされず、その旨が表示されます。", + [UI_MENU_QUICKSAVE_KEY] = "クイックセーブのキー", + [UI_MENU_QUICKLOAD_KEY] = "クイックロードのキー", + [UI_MENU_QUICKSAVE_KEY_DESC] = "クイックセーブまたはクイックロードを行うキーです。既定では Half-Life と同じく F6 と F7。セルを選んで任意のキーかマウスボタンを押します。Del" + "ete でそのキーを空にします。クイックセーブがオンの間、この 2 つのキーは他の動作をしません (割り当てでも同じキーを使っている場合は注記が出ます)。to" + "tk.ini では、割り当てで使える任意のキー名を指定できます (quicksave_key、quickload_key)。", + [UI_QS_SAVED] = "セーブしました", + [UI_QS_LOADING] = "クイックセーブを読み込み中", + [UI_QS_NOT_NOW] = "今はクイックセーブできません", + [UI_QS_NONE] = "クイックセーブはまだありません (クイックセーブのキーで作成できます)", + [UI_QS_FAILED] = "クイックセーブに失敗しました: totk.log を確認してください", + [UI_QS_LOAD_FAILED] = "クイックロードに失敗しました: totk.log を確認してください", + [UI_MENU_MOUSE_SENS] = "マウスのカメラ感度", + [UI_MENU_MOUSE_SENS_DESC] = "マウスでカメラが回る速さです。", + [UI_MENU_WALK_KEY] = "歩きキー", + [UI_MENU_WALK_KEY_DESC] = "押している間、キーボードのスティック入力を途中までだけ傾け、走らずに歩くようにします。どれだけ傾けるかは歩きの度合いで決めます。コントローラーとマウスには影響しません。", + [UI_MENU_WALK_KEY_TAKEN] = "%s にも割り当て", + [UI_MENU_WALK_SCALE] = "歩きの度合い", + [UI_MENU_WALK_SCALE_DESC] = "歩きキーを押している間のキーボードのスティックの傾きです。半分で歩き、いっぱいで走りです。", + [UI_MENU_FREECAM] = "フリーカメラ", + [UI_MENU_FREECAM_DESC] = "下のボタンの組み合わせかキーで、視点をリンクから切り離して自由に飛ばせるようにします。既定ではオフ: オフの間は、ゲームのカメラコードは元のまま動きます。再起動後" + "に反映されます。ゲームのバージョン 1.4.3。", + [UI_MENU_FREECAM_OFF_NOTE] = "上のフリーカメラをオンにして再起動してください", + [UI_MENU_FREECAM_PAD] = "フリーカメラのボタン", + [UI_MENU_FREECAM_PAD_DESC] = "同時に押すゲームパッドのボタンで、視点を 3 段階で切り替えます: リンクから離れて飛ぶ、リンクがプレイを続ける間その場にとどま" + "る、元に戻る。飛んでいる間、ゲームには入力が届きません: 左スティックで視線の方向と横に飛び、トリガーで上下、右スティックで向きを変え、L か R " + "を押すたびに速度が半分または 2 倍になります。固定中は、リンクは左スティックが画面上で指す方向に歩きます。ゲームのバージョン 1.4.3。", + [UI_MENU_FREECAM_PAD_V143] = "ゲームのバージョン 1.4.3 のみ", + [UI_MENU_FREECAM_KEY] = "フリーカメラのキー", + [UI_MENU_FREECAM_KEY_DESC] = "視点を同じ段階で切り替えるキーです: リンクから離れて飛ぶ、リンクがプレイを続ける間とどまる、元に戻る。飛んでいる間: W A S D で視線の方向と横に飛び、ZR " + "と ZL に割り当てたキー (既定では X と Z) で上下、マウスと矢印キーで向きを変え、L と R に割り当てたキー (Q と R) で速度を半分または 2 " + "倍にします。ゲームのバージョン 1.4.3。", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "ゲームプレイの調整", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "ゲームプレイの調整", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "マウスホイールによる、ウルトラハンドの回転と距離、アイテムと武器の切り替え、マップの滑らかなズームの操作です。", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "ホイールでウルトラハンド回転", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "ウルトラハンドで持っている物を、マウスホイールで直接回します。", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "ウルトラハンドの C 回転軸", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "C を押しながらスクロールすると、持っている物を別の軸で回します。", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "ウルトラハンドの回転感度", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "マウスホイールで持っている物が回る速さです。", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "ホイールでウルトラハンドの距離", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "右クリック + マウスホイールで、持っている物を押し出したり引き寄せたりします。", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "ウルトラハンドの距離感度", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "マウスホイールで物の距離が変わる速さです。", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "ホイールで武器を選択", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "フィールドでマウスホイールをスクロールして武器を切り替えます。E で決定します。", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "武器ホイールの感度", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "次の武器に進むのに必要なスクロールの段数です。", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "ホイールでクイックメニューを選択", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "クイック選択メニューが開いている間、マウスホイールをスクロールしてアイテムを切り替えます。", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "クイックメニューのホイール感度", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "クイック選択メニューで次のアイテムに進むのに必要なスクロールの段数です。", + [UI_MENU_GAMEPLAY_ITEM_AD] = "クイックメニューの A / D 操作", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "クイック選択メニューで A / D を押して左右に移動します。", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "マップの滑らかなズーム", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "マウスホイールで、プルアパッドのマップを慣性付きで滑らかにズームします。", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "マップのズーム感度", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "マウスホイールでマップがズームする速さです。", + [UI_MENU_STICK_SENS] = "スティックのカメラ速度", + [UI_MENU_STICK_SENS_DESC] = "ゲームの 5 段階のカメラ感度それぞれで、右スティックのカメラ速度 (最高速度を含む) を何倍にするかです。マウスは独自の設定を使います。", + [UI_BINDS_HELP] = "セルを選んで A か Enter を押し、続けてキー、マウスボタン、コントローラーのボタンを押します。Delete か X でセルを空にします。使用中のキーはここに移ります。コントロー" + "ラーのボタンは置き換えるボタンと入れ替わります。", + [UI_BINDS_COL_KEY1] = "キー 1", + [UI_BINDS_COL_KEY2] = "キー 2", + [UI_BINDS_COL_PAD] = "コントローラー", + [UI_BINDS_GROUP_BUTTONS] = "ボタン", + [UI_BINDS_GROUP_MOVE] = "移動", + [UI_BINDS_GROUP_CAMERA] = "カメラ", + [UI_BINDS_PRESS_KEY] = "%s に割り当てるキーかマウスボタンを押してください", + [UI_BINDS_PRESS_PAD] = "%s に割り当てるコントローラーのボタンを押してください", + [UI_BINDS_CANCEL_HINT] = "Esc でキャンセル、または %d 秒待ってください", + [UI_BINDS_TAKEN] = "%s を %s から外しました", + [UI_BINDS_SWAPPED] = "%s を %s と入れ替えました", + [UI_BINDS_RESET] = "すべてのボタンを元に戻す", + [UI_BINDS_RESET_DESC] = "既定のキーとコントローラーのボタンに戻します。上のボタン配置が再び適用されます。割り当てを変えたコントローラーのボタンは、このリセットまで変えた位置のままです。", + [UI_BIND_A] = "Aボタン", + [UI_BIND_B] = "Bボタン", + [UI_BIND_X] = "Xボタン", + [UI_BIND_Y] = "Yボタン", + [UI_BIND_LCLICK] = "左スティック押し込み", + [UI_BIND_RCLICK] = "右スティック押し込み", + [UI_BIND_L] = "Lボタン", + [UI_BIND_R] = "Rボタン", + [UI_BIND_ZL] = "ZLボタン", + [UI_BIND_ZR] = "ZRボタン", + [UI_BIND_PLUS] = "+ボタン", + [UI_BIND_MINUS] = "-ボタン", + [UI_BIND_LEFT] = "十字キー左", + [UI_BIND_UP] = "十字キー上", + [UI_BIND_RIGHT] = "十字キー右", + [UI_BIND_DOWN] = "十字キー下", + [UI_BIND_LSTICK_LEFT] = "左へ移動", + [UI_BIND_LSTICK_UP] = "前へ移動", + [UI_BIND_LSTICK_RIGHT] = "右へ移動", + [UI_BIND_LSTICK_DOWN] = "後ろへ移動", + [UI_BIND_RSTICK_LEFT] = "カメラ左", + [UI_BIND_RSTICK_UP] = "カメラ上", + [UI_BIND_RSTICK_RIGHT] = "カメラ右", + [UI_BIND_RSTICK_DOWN] = "カメラ下", + [UI_BIND_DESC_A] = "調べる、拾う、話す。", + [UI_BIND_DESC_B] = "ダッシュ、キャンセル、戻る。", + [UI_BIND_DESC_X] = "ジャンプ。", + [UI_BIND_DESC_Y] = "攻撃。", + [UI_BIND_DESC_LCLICK] = "しゃがむ。", + [UI_BIND_DESC_RCLICK] = "一人称視点。", + [UI_BIND_DESC_L] = "能力。", + [UI_BIND_DESC_R] = "武器を投げる。", + [UI_BIND_DESC_ZL] = "盾、注目。", + [UI_BIND_DESC_ZR] = "弓。", + [UI_BIND_DESC_PLUS] = "メニュー、ポーチ。", + [UI_BIND_DESC_MINUS] = "マップ。", + [UI_BIND_DESC_DPAD] = "クイック選択。", + [UI_BIND_DESC_MOVE] = "左スティックと同じようにリンクを動かします。コントローラーの左スティックもいつでも使えます。", + [UI_BIND_DESC_CAMERA] = "右スティックと同じようにカメラを回します。マウスとコントローラーの右スティックもいつでも使えます。", + [UI_BIND_SHAKE] = "右スティックを振る", + [UI_BIND_DESC_SHAKE] = "ゲームに対して右スティックを左右に振ります: ウルトラハンドで持っている物から、くっつけた部品を外します。キーを押し続けると振り続けます。", + [UI_KEY_SPACE] = "スペース", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "左 Shift", + [UI_KEY_LCTRL] = "左 Ctrl", + [UI_KEY_UP] = "↑ キー", + [UI_KEY_DOWN] = "↓ キー", + [UI_KEY_LEFT] = "← キー", + [UI_KEY_RIGHT] = "→ キー", + [UI_KEY_MOUSE_L] = "マウス左", + [UI_KEY_MOUSE_R] = "マウス右", + [UI_KEY_MOUSE_M] = "マウス中", + [UI_KEY_MOUSE_X1] = "マウス 4", + [UI_KEY_MOUSE_X2] = "マウス 5", + [UI_KEY_ENTER] = "Enter", + [UI_KEY_BACKSPACE] = "Backspace", + [UI_KEY_RSHIFT] = "右 Shift", + [UI_KEY_RCTRL] = "右 Ctrl", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Caps Lock", + [UI_KEY_INSERT] = "Insert", + [UI_KEY_DELETE] = "Delete", + [UI_KEY_HOME] = "Home", + [UI_KEY_END] = "End", + [UI_KEY_PAGEUP] = "Page Up", + [UI_KEY_PAGEDOWN] = "Page Down", + [UI_KEY_NUM_FMT] = "テンキー %s", + [UI_PAD_SOUTH] = "下のボタン", + [UI_PAD_EAST] = "右のボタン", + [UI_PAD_WEST] = "左のボタン", + [UI_PAD_NORTH] = "上のボタン", + [UI_PAD_LSTICK] = "左スティック", + [UI_PAD_RSTICK] = "右スティック", + [UI_PAD_L] = "左バンパー", + [UI_PAD_R] = "右バンパー", + [UI_PAD_START] = "スタート", + [UI_PAD_BACK] = "バック", + [UI_PAD_DPAD_LEFT] = "十字キー左", + [UI_PAD_DPAD_UP] = "十字キー上", + [UI_PAD_DPAD_RIGHT] = "十字キー右", + [UI_PAD_DPAD_DOWN] = "十字キー下", + [UI_PAD_ZL] = "左トリガー", + [UI_PAD_ZR] = "右トリガー", + [UI_PAD_LPADDLE1] = "左背面ボタン", + [UI_PAD_RPADDLE1] = "右背面ボタン", + [UI_PAD_LPADDLE2] = "左背面ボタン 2", + [UI_PAD_RPADDLE2] = "右背面ボタン 2", + [UI_PAD_TOUCHPAD] = "タッチパッド押し込み", + [UI_PAD_CROSS] = "×ボタン", + [UI_PAD_CIRCLE] = "○ボタン", + [UI_PAD_SQUARE] = "□ボタン", + [UI_PAD_TRIANGLE] = "△ボタン", + [UI_MENU_AMIIBO_DIR] = "amiibo フォルダー", + [UI_MENU_AMIIBO_OPEN] = "開く", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "既定のフォルダー", + [UI_MENU_AMIIBO_REFRESH] = "更新", + [UI_MENU_AMIIBO_PICK] = "amiibo のダンプ (540 バイトの .bin または .nfc ファイル):", + [UI_MENU_AMIIBO_NO_DIR] = "フォルダー %s を開けません", + [UI_MENU_AMIIBO_READER] = "NFC リーダー", + [UI_MENU_AMIIBO_STATE] = "リーダー:", + [UI_MENU_AMIIBO_STATE_IDLE] = "準備完了", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "ゲームが amiibo を待っています", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo がリーダーの上にあります", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "ゲームが amiibo を読み込んでいます", + [UI_MENU_AMIIBO_STATE_OFF] = "オフ", + [UI_MENU_AMIIBO_FILE] = "選んだファイル:", + [UI_MENU_AMIIBO_NO_FILE] = "(ファイルが選ばれていません)", + [UI_MENU_AMIIBO_TAP] = "amiibo をタッチ", + [UI_MENU_AMIIBO_REMOVE] = "amiibo を離す", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "タッチ後に amiibo を自動で離す", + [UI_MENU_AMIIBO_HOLD] = "リーダー上の時間", + [UI_MENU_AMIIBO_SECONDS] = "%.1f 秒", + [UI_MENU_AMIIBO_TAG] = "リーダー上の amiibo:", + [UI_MENU_AMIIBO_NO_TAG] = "リーダーに amiibo がありません。", + [UI_MENU_AMIIBO_TAG_FILE] = "ファイル: %s", + [UI_MENU_AMIIBO_TAG_ID] = "キャラクター %s、シリーズ %02x、番号 %04x、タイプ %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "準備完了", + [UI_MENU_AMIIBO_TAPPED] = "タッチ済み: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "amiibo のダンプ (540 バイトの NTAG215) ではありません: %s", + [UI_MENU_AMIIBO_REMOVED] = "amiibo を離しました", + [UI_MENU_AMIIBO_STATUS] = "状態: %s", + [UI_MENU_MENU_LANG] = "メニューの言語", + [UI_MENU_MENU_LANG_DESC] = "このメニューとパフォーマンス表示の言語です。", + [UI_MENU_MENU_LANG_AUTO] = "自動 (Windows に合わせる)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "ゲームの実行中、Discord のステータスにプレイ時間付きで \"TotK Recomp をプレイ中\" と表示します。totk.ini の " + "discord_app_id と discord_image でアプリケーションを選びます。", + [UI_MENU_ADV_WARNING] = "これらはテストとトラブルシューティング用の設定です。理由がわかっているときだけ変更してください。", + [UI_MENU_GROUP_SCHED] = "スケジューリング", + [UI_MENU_GROUP_SHADERS] = "シェーダーとパイプライン", + [UI_MENU_GROUP_TEXMEM] = "テクスチャとメモリ", + [UI_MENU_GROUP_FIXES] = "描画の修正", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "診断", + [UI_MENU_ASYNC_PREEMPT] = "仮想コアのプリエンプション", + [UI_MENU_ASYNC_PREEMPT_DESC] = "同じ仮想コア上で、ゲームのスレッドが別のスレッドに割り込めるようにします。", + [UI_MENU_PREEMPT_OFF] = "オフ", + [UI_MENU_PREEMPT_ON] = "オン", + [UI_MENU_PREEMPT_INHERIT] = "継承のみ", + [UI_MENU_REPLAY_ASYNC] = "GPU のフレーム準備を別スレッドで", + [UI_MENU_REPLAY_ASYNC_DESC] = "GPU 用のフレームを、ゲームのスレッドではなく別のスレッドで準備します。遅延が最大 1 フレーム増えます。", + [UI_MENU_REPLAY_WORKERS] = "GPU フレーム準備のスレッド", + [UI_MENU_REPLAY_WORKERS_DESC] = "大きなフレームを、複数のスレッドで同時に GPU 用に記録します。CPU がフレームレートを制限している場合に効果があります。論理プロセッサーが 8 " + "個以上必要です。オフでは 1 つのスレッドで記録します。", + [UI_MENU_REPLAY_WORKERS_NOW] = "現在: %s", + [UI_MENU_TIMER_1MS] = "1 ms の Windows タイマー", + [UI_MENU_TIMER_1MS_DESC] = "システムタイマーの分解能を 1 ms に上げ、フレーム間隔を安定させます。", + [UI_MENU_PIPE_WAIT] = "待機中の描画の扱い", + [UI_MENU_PIPE_WAIT_DESC] = "「既定」は待機中の描画用にワーカーを確保した現在のスケジューリングを使い、「旧方式 (draw)」は以前のスケジューリングを使います。", + [UI_MENU_PIPE_WAIT_DEFAULT] = "既定", + [UI_MENU_PIPE_WAIT_DRAW] = "旧方式 (draw)", + [UI_MENU_PIPE_SKIP] = "パイプライン作成中に飛ばす描画", + [UI_MENU_PIPE_SKIP_DESC] = "パイプラインを待たずに捨てる描画の種類です。", + [UI_MENU_PIPE_SKIP_STRICT] = "厳密", + [UI_MENU_PIPE_SKIP_ANY] = "すべて", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "全画面パス", + [UI_MENU_LIB_PREBUILD] = "ステージライブラリの事前ビルド", + [UI_MENU_LIB_PREBUILD_DESC] = "シェーダーのステージライブラリを、バックグラウンドで先にビルドします。", + [UI_MENU_LIB_PREBUILD_THREADS] = "ステージライブラリ事前ビルドのスレッド数", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "事前ビルドに使うスレッド数です。自動では CPU に合わせて決めます。", + [UI_MENU_PIPE_PREBUILD] = "パイプラインの事前ビルド", + [UI_MENU_PIPE_PREBUILD_DESC] = "既知のパイプラインを先にビルドします。", + [UI_MENU_PREWARM_XLATE] = "トランスレーターの事前準備", + [UI_MENU_PREWARM_XLATE_DESC] = "起動時に既知のシェーダーを変換するスレッド数です。自動では CPU スレッドの半分 (最大 16) を使います。", + [UI_MENU_GPL] = "グラフィックスパイプラインライブラリ", + [UI_MENU_GPL_DESC] = "Vulkan のパイプラインライブラリ拡張を使います。ドライバーとの相性が悪い場合はオフにしてください。", + [UI_MENU_ASTC] = "ASTC テクスチャのデコード", + [UI_MENU_ASTC_DESC] = "圧縮された ASTC テクスチャをどこでデコードするかです。", + [UI_MENU_ASTC_AUTO] = "自動", + [UI_MENU_ASTC_GPU] = "GPU シェーダー", + [UI_MENU_ASTC_NATIVE] = "ネイティブ", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "GPU メモリモード", + [UI_MENU_MEMORY_DESC] = "ゲームのメモリを GPU とどう共有するかです。", + [UI_MENU_MEMORY_AUTO] = "自動", + [UI_MENU_MEMORY_IMPORT] = "インポート", + [UI_MENU_MEMORY_MIRROR] = "ミラー", + [UI_MENU_MEMORY_VERIFY] = "検証", + [UI_MENU_TEX_ALIAS] = "テクスチャのエイリアス", + [UI_MENU_TEX_ALIAS_DESC] = "使用中のテクスチャのメモリ上に作られた新しいテクスチャを、空ではなくその内容から始めます。", + [UI_MENU_TEX_VRAM_PRESSURE] = "テクスチャメモリの上限", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "ビデオメモリの使用率がこのパーセントを超えると、ゲームが解放したテクスチャを破棄します (再び使うときはストレージから戻します)。0 で保持します。", + [UI_MENU_ASTC_BC] = "ASTC を BC3 に圧縮", + [UI_MENU_ASTC_BC_DESC] = "GPU デコーダー使用時、デコードした ASTC テクスチャを BC3 に再エンコードし、ビデオメモリを 4 分の 1 にします。4 GB 以下の GPU " + "向けです。テクスチャが少しブロック状に見えます。", + [UI_MENU_LOD_GUARD] = "LOD ガード", + [UI_MENU_LOD_GUARD_DESC] = "GPU が詳細度データを読む前に、ゲームがその書き換えを終えるのを待つことで、物体が 1 フレームだけ違う場所に表示されたり、遠景が平らに見えたりするのを防ぎます。", + [UI_MENU_FIX_C0] = "定数バッファの修正", + [UI_MENU_FIX_C0_DESC] = "ドライバー予約の定数バンク c0 (ストレージサイズ、ディスパッチサイズ、ポイントサイズ、ベースインスタンス) を、ゼロを読む代わりに埋めます。", + [UI_MENU_FIX_ZERO] = "新しい GPU メモリをゼロで埋める", + [UI_MENU_FIX_ZERO_DESC] = "Switch のメモリと同じく、新しい GPU メモリプールをゼロで埋めた状態から始めます。", + [UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA の後に霧とパーティクル", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 使用時、霧、ちり、その他のパーティクルを、DLSS が滑らかにした後の映像の上に描きます。DLSS なしでゲームが描くのと同じです: " + "霧の中の小さなパーティクル (祠) が消えたり残像を残したりしなくなります。オフ: これまでどおり DLSS がこれらのエフェクトも処理します。DLAA " + "モードのみ。アップスケーリングする DLSS モードでは常に処理されます。すぐに反映されます。", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS の露出を固定", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS が各フレームから露出を推定せず、ゲームの映像の明るさをそのまま使います: 暗い場面 (地底) " + "で、カメラを動かしている間に霧のかかった広い範囲が 1 フレームだけ暗くなったり明るくなったりしなくなります。オフ: これまでどおり DLSS " + "が自分で露出を推定します。すぐに反映されます。", + [UI_MENU_BIND_SKIP] = "同じバインドを省略", + [UI_MENU_BIND_SKIP_DESC] = "最適化: 変わっていないバインドを省略します。", + [UI_MENU_SHADER_MEMO] = "シェーダーのメモ化", + [UI_MENU_SHADER_MEMO_DESC] = "最適化: シェーダーの検索結果を覚えておきます。", + [UI_MENU_PIPE_MEMO] = "パイプラインのメモ化", + [UI_MENU_PIPE_MEMO_DESC] = "最適化: 状態が同じなら、直前の描画のパイプラインを再利用します。", + [UI_MENU_TEX_MEMO] = "テクスチャバインドのメモ化", + [UI_MENU_TEX_MEMO_DESC] = "最適化: 描画間でテクスチャディスクリプターを覚えておきます。", + [UI_MENU_DESC_TEMPLATE] = "ディスクリプターテンプレート", + [UI_MENU_DESC_TEMPLATE_DESC] = "最適化: ディスクリプターをまとめて更新します。", + [UI_MENU_PUSH_SKIP] = "同じプッシュ定数を省略", + [UI_MENU_PUSH_SKIP_DESC] = "最適化: 変わっていないプッシュ定数を省略します。", + [UI_MENU_SPLIT_DRAWS] = "GPU への早期送信", + [UI_MENU_SPLIT_DRAWS_DESC] = "パスの間で N 回の描画ごとに GPU の作業を分けて送り、GPU が早く始められるようにします。0 でオフ。", + [UI_MENU_VK_VALIDATION] = "検証レイヤー", + [UI_MENU_VK_VALIDATION_DESC] = "すべての Vulkan 呼び出しを検査し、ゲームがとても遅くなります。", + [UI_MENU_VK_VALIDATION_MISSING] = "検証レイヤーがインストールされていません。", + [UI_MENU_VK_DYN_VERTEX] = "動的頂点ステート", + [UI_MENU_VK_DYN_VERTEX_DESC] = "動的頂点入力を強制的にオンまたはオフにします。既定値は GPU によって決まります。", + [UI_MENU_VK_DYN_A2C] = "動的 Alpha to Coverage", + [UI_MENU_VK_DYN_A2C_DESC] = "動的 Alpha to Coverage を強制的にオンまたはオフにします。既定: RDNA 2 以前向けの AMD ドライバーではオフ " + "(オンだとキャラクターが黒く描かれるため)、それ以外ではオン。", + [UI_MENU_VK_SUBGROUP_PIN] = "サブグループサイズを固定", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "シェーダーのサブグループサイズを固定します。", + [UI_MENU_TRACE] = "パフォーマンスログ", + [UI_MENU_TRACE_DESC] = "フレーム時間をファイルに書き出します。", + [UI_MENU_FLIGHT] = "フライトレコーダー", + [UI_MENU_FLIGHT_DESC] = "短い履歴を保持し、フレームが固まったときに保存します。", + [UI_MENU_FLIGHT_SPIKE_MS] = "フリーズのしきい値 (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "フリーズとみなすフレーム時間です。", + [UI_MENU_PASS_CRUMBS] = "GPU パスの記録", + [UI_MENU_PASS_CRUMBS_DESC] = "GPU がクラッシュした後、実行中だった描画パスをログに記録します。自動: AMD のみ。オン: NVIDIA でも記録します (わずかな負荷があります)。", + [UI_MENU_INPUT_RECORD] = "入力の記録", + [UI_MENU_INPUT_RECORD_DESC] = "不具合報告用に、入力をファイルに書き出します。", + [UI_MENU_OPEN_LOG] = "ログフォルダーを開く", + [UI_MENU_OPEN_LOG_DESC] = "ログファイルのあるフォルダーを表示します。", + [UI_MENU_COPY_INFO] = "システム情報をコピー", + [UI_MENU_COPY_INFO_DESC] = "GPU、ドライバー、CPU、RAM、変更した設定をクリップボードにコピーします。", + [UI_MENU_COPY_INFO_DONE] = "コピーしました", + [UI_MENU_ACTION_FAILED] = "失敗しました", + [UI_MENU_RESET] = "すべての設定を既定に戻す", + [UI_MENU_RESET_DESC] = "すべてのタブに適用されます。", + [UI_MENU_RESET_CONFIRM] = "すべての設定を既定値に戻しますか?", + [UI_MENU_RESET_YES] = "戻す", + [UI_MENU_RESET_NO] = "キャンセル", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "ゲーム %.0f%%", + [UI_MENU_OV_MAX_MS] = "最大 %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "フレーム", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "下位 1%% %.0f", + [UI_MENU_OV_LOW01] = "下位 0.1%% %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "温度", + [UI_MENU_OV_POWER] = "電力", + [UI_MENU_OV_CLOCK] = "クロック", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "GPU のフレーム準備", + [UI_MENU_OV_GPU_TIME] = "1 フレームの GPU 使用時間", + [UI_MENU_OV_PIPE_WAIT] = "パイプライン待ち", + [UI_MENU_OV_SHADER_WAIT] = "シェーダー待ち", + [UI_MENU_OV_TEX_UPLOADS] = "テクスチャ転送", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "ゲーム %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "1 フレームあたり %.1f", + [UI_MENU_OV_WINDOW] = "ウィンドウ", + [UI_MENU_OV_OUTPUT] = "ゲーム画像", + [UI_MENU_OV_SCENE] = "3D シーン", + [UI_MENU_OV_UPSCALER] = "3D アップスケーラー", + [UI_MENU_OV_SCALING] = "拡大方法", + [UI_MENU_OV_LIMIT] = "フレーム上限", + [UI_MENU_OV_PRESENT] = "表示方式", + [UI_MENU_OV_SHOWN] = "表示", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u、%.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1、シャープネス %d%%", + [UI_MENU_OV_SCALE_NONE] = "なし (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "バイリニア", + [UI_MENU_OV_SCALE_DOWN] = "バイリニア (FSR は拡大のみ)", + [UI_MENU_TAB_CHEATS] = "チート", + [UI_MENU_CHEATS_NONE] = "このゲームバージョン用のチートはありません。Mod のチートは、その cheats フォルダーにある、ゲームのビルド名を付けた Atmosphère のチートファイルです: " + "mods\\\\cheats\\%s。読み込むにはゲームを再起動してください。ゲームコードを変えるチートの場合、ゲームは起動時に自分を再ビルドします (数分)。", + [UI_MENU_CHEATS_MOD] = "%s: チート %d 個", + [UI_MENU_CHEAT_CODE_DESC] = "ゲームコードを変えます。すぐに切り替わります。", + [UI_MENU_CHEAT_KEY_DESC] = "%s を押している間、ゲームコードを変えます。すぐに切り替わります。", + [UI_MENU_CHEAT_DATA_DESC] = "オンの間、毎フレームゲームのメモリに書き込みます。", + [UI_MENU_CHEAT_MASTER] = "常にオン", + [UI_MENU_CHEAT_MASTER_DESC] = "ファイルのマスターコードです。常にオンです。", + [UI_MENU_CHEAT_RESTORE] = "不要", + [UI_MENU_CHEAT_RESTORE_DESC] = "ゲーム本来のコードを書き戻すだけです。チートをオフにすれば同じことが行われます。", + [UI_MENU_CHEAT_REBUILD] = "再ビルド後", + [UI_MENU_CHEAT_REBUILD_DESC] = "このチートはゲームコードを変えるもので、ゲームのビルド後に追加または編集されています。次回の起動時に組み込まれます " + "(数分)。または「今すぐゲームを再ビルド」を使ってください。", + [UI_MENU_CHEAT_UNSUPPORTED] = "非対応", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "このチートはこのバージョンのゲームでは使えません:", + [UI_MENU_CHEATS_REBUILD] = "今すぐゲームを再ビルド", + [UI_MENU_CHEATS_REBUILD_DESC] = "ゲームコードを変えるチートの一部がまだ組み込まれていません。新規または編集済みか、前回の再ビルドが失敗またはキャンセルさ" + "れました。ゲームを閉じ、セットアップがそれらを組み込んで (数分) ゲームを起動し直します。最後のセーブ以降の進行状況は失われます。", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "この Mod は移植版が適用できない方法でゲームコード (exefs) を書き換えるため、Mod 全体がオフのままです。%s", + [UI_MENU_MODS_EXEFS_OTHER] = "コードパッチ (exefs) は別のゲームバージョン用です。", + [UI_MENU_MODS_EXEFS_ON] = "使用中のコードパッチ: %d ファイル。", + [UI_MENU_MODS_REPLACES_BUILTIN] = "使用中のコードパッチ: %d ファイル。移植版独自のパッチ %s を置き換え、この Mod がオンの間はそのパッチはオフになります。", + [UI_MENU_MODS_CODE_SKIPPED] = "独自のゲームコード (%s) は読み込まれませんが、Mod の残りの部分は使われます。ゲームの動作がおかしい場合は Mod をオフにしてください。", + [UI_MENU_MODS_PLUGIN_ON] = "プラグインが動作中: ゲームコードへのフック %d 個。", + [UI_MENU_MODS_PLUGIN_REFUSED] = "プラグイン %s は移植版では動作できません: %s。", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "Mod 全体がオフのままです。下の \"... をコードなしで使う\" スイッチで、残りの部分を使えます。", + [UI_MENU_MODS_PLUGIN_OFF] = "今回はプラグインがオフのままです: ビルド時と異なる状態で起動しました (%s)。ゲームは次回の起動時にプラグインを再ビルドします。", + [UI_MENU_MODS_WITHOUT_CODE] = "%s をコードなしで使う", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "上の Mod には移植版が実行できないコードが含まれています: 独自のゲームコード (subsdk プラグインや置き換えた main) " + "か、移植版が適用できないコードパッチ (exefs) です。オフ: Mod 全体がオフのままです。オン: そのコードを除き、Mod の残りの部分 " + "(RomFS のファイル、チート、適用できるコードパッチ) を使います。Mod のファイルが除いたコードを前提にしていることがあります。ゲー" + "ムの動作がおかしい場合は再びオフにしてください。次回の起動時に反映されます。", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "すべての Mod でオン: totk.ini の mods_without_code = 1。", + [UI_MENU_MODS_EXEFS_SKIPPED] = "コードパッチファイル (exefs) のうち %u 個は適用できないため除外され、Mod の残りの部分が使われます。%s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u 個のファイルが、リストでより下にある %s のものを置き換えます。", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "ゲームデータの変更のうち %u バイトは、リストでより上にある %s のものが使われます。", + [UI_MENU_MODS_OVERRIDES_DATA] = "ゲームデータの変更のうち %u バイトが、リストでより下にある %s のものを置き換えます。", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "コードパッチ箇所のうち %u 個は、リストでより上にある %s のものが優先されます。", + [UI_MENU_MODS_OVERRIDES_CODE] = "%u 個のコードパッチ箇所で、リストでより下にある %s より優先されます。", +}; + +// Korean +static const char *const text_ko[UI_TEXT_COUNT] = { + SWKBD("문자 입력", "이름을 입력하세요", "말", "확인", "취소", "컨트롤러: A 확인, B 취소"), + + [UI_MENU_TITLE] = "설정", + [UI_MENU_TAB_SCREEN] = "화면", + [UI_MENU_TAB_GAME] = "게임", + [UI_MENU_TAB_MODS] = "모드", + [UI_MENU_TAB_SOUND] = "사운드", + [UI_MENU_TAB_CONTROLS] = "조작", + [UI_MENU_TAB_AMIIBO] = "amiibo", + [UI_MENU_TAB_MENU] = "메뉴", + [UI_MENU_TAB_ADVANCED] = "고급", + [UI_MENU_CONTINUE] = "계속하기", + [UI_MENU_QUIT] = "게임 종료", + [UI_MENU_ON] = "켜기", + [UI_MENU_OFF] = "끄기", + [UI_MENU_AUTO] = "자동", + [UI_MENU_DEFAULT_MARK] = "기본값", + [UI_MENU_AFTER_RESTART] = "재시작 후", + [UI_MENU_SET_BY_ENV] = "환경 변수로 고정됨", + [UI_MENU_SAVE_FAILED] = "설정을 저장할 수 없습니다", + [UI_MENU_VERSION] = "TotK Recomp %s, 게임 %s", + [UI_MENU_FULLSCREEN] = "전체 화면", + [UI_MENU_FULLSCREEN_DESC] = "게임이 화면 전체를 사용합니다. F11로 전환합니다.", + [UI_MENU_WINDOW_SIZE] = "창 크기", + [UI_MENU_WINDOW_SIZE_DESC] = "전체 화면이 아닐 때 게임 창의 크기입니다.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "사용자 지정", + [UI_MENU_PRESENT] = "표시 방식", + [UI_MENU_PRESENT_DESC] = "완성된 프레임을 화면에 내보내는 방식입니다.", + [UI_MENU_PRESENT_MAILBOX] = "메일박스", + [UI_MENU_PRESENT_VSYNC] = "수직 동기화", + [UI_MENU_PRESENT_IMMEDIATE] = "즉시", + [UI_MENU_PRESENT_IN_USE] = "사용 중: %s", + [UI_MENU_GPU] = "그래픽 카드", + [UI_MENU_GPU_DESC] = "게임을 그리는 Vulkan 장치입니다.", + [UI_MENU_GPU_AUTO] = "자동", + [UI_MENU_PERF_OVERLAY] = "성능 표시", + [UI_MENU_PERF_OVERLAY_DESC] = "오른쪽 위에 프레임 속도를 표시합니다. '상세'는 그래프가 있는 프레임 시간, CPU·GPU·메모리 부하, 온도, 렌더링 스레드 대기 시간도 보여 " + "줍니다. F10으로 모드를 전환합니다.", + [UI_MENU_PERF_OFF] = "끄기", + [UI_MENU_PERF_FPS] = "FPS", + [UI_MENU_PERF_FULL] = "상세", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "%.0f fps 렌더링, %.0f 표시", + [UI_MENU_GRAPHICS] = "그래픽", + [UI_MENU_OUTPUT_RES] = "게임 해상도", + [UI_MENU_OUTPUT_RES_DESC] = "게임이 화면과 인터페이스를 그리는 크기입니다. 1920 x 1080을 넘으면 비디오 메모리와 GPU 시간이 더 필요합니다. 더 넓은 비율(21:9)은 " + "카메라 시야를 넓히고 HUD를 화면 모서리로 옮기며, 더 높은 비율(16:10, Steam Deck)은 위아래 가장자리로 옮깁니다.", + [UI_MENU_HUD_WIDTH] = "HUD 너비", + [UI_MENU_HUD_WIDTH_DESC] = "16:9보다 넓은 화면에서 HUD의 왼쪽과 오른쪽이 얼마나 떨어질지입니다. '전체 화면'은 화면 가장자리에 두고, 21:9나 16:9는 HUD를 그 비율 " + "화면의 가운데 안에 둡니다. 없는 레이아웃은 백그라운드에서 만들어 재시작 후 사용합니다.", + [UI_MENU_HUD_WIDTH_FULL] = "전체 너비", + [UI_MENU_RENDER_SCALE] = "3D 렌더링 배율", + [UI_MENU_RENDER_SCALE_DESC] = "게임 해상도에 대한 3D 장면의 크기입니다. 게임의 FSR이 그 크기로 확대합니다. 100 %를 넘으면 계단 현상이 부드러워지지만(슈퍼샘플링) " + "GPU 부하가 크게 늘어납니다.", + [UI_MENU_RENDER_SCALE_GAME] = "게임 (83 %)", + [UI_MENU_DYNAMIC_RES] = "동적 해상도", + [UI_MENU_DYNAMIC_RES_DESC] = "게임이 3D 장면을 90 또는 80 %까지 낮출 수 있게 합니다. GPU를 고려하지 않는 Switch용 추정치로 판단하므로 빠른 PC에서도 넓은 " + "장면에서는 낮아집니다. 끄면 렌더링 배율을 유지합니다.", + [UI_MENU_UPSCALER] = "창에 맞춰 확대", + [UI_MENU_UPSCALER_DESC] = "창이 게임 해상도보다 클 때의 확대 방식입니다. FSR은 바이리니어보다 윤곽과 세부를 더 선명하게 유지합니다.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", + [UI_MENU_UPSCALER_BILINEAR] = "바이리니어", + [UI_MENU_ASPECT] = "화면 비율", + [UI_MENU_ASPECT_DESC] = "창의 비율이 게임 해상도의 비율과 다를 때(21:9 화면에 16:9 영상 등): 검은 띠를 넣어 비율을 유지하거나 창에 맞게 늘립니다.", + [UI_MENU_ASPECT_FIT] = "검은 띠", + [UI_MENU_ASPECT_STRETCH] = "늘리기", + [UI_MENU_MOVIE_ASPECT] = "동영상 비율", + [UI_MENU_MOVIE_ASPECT_DESC] = "게임 해상도가 16:9가 아닐 때 컷신 동영상의 원래 비율을 검은 띠로 유지하거나 영상 전체로 늘립니다. 다음 동영상부터 적용됩니다.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "검은 띠", + [UI_MENU_MOVIE_ASPECT_STRETCH] = "늘리기", + [UI_MENU_FOV] = "시야각", + [UI_MENU_FOV_DESC] = "카메라가 보여 주는 범위를 게임 원래 시야에 대한 퍼센트로 지정합니다. 게임 버전 1.4.3 전용입니다.", + [UI_MENU_SHADOW_RES] = "그림자 맵 크기", + [UI_MENU_SHADOW_RES_DESC] = "태양 그림자 맵의 크기입니다. 게임 원래 크기는 시점에 따라 바뀌며 지면 가까이에서는 약 400까지 내려가서 나뭇잎 그림자가 각지고 튀게 됩니다. 고정 " + "크기로 하면 그림자가 안정되고 선명해집니다. 1024를 넘으면 GPU 시간과 비디오 메모리가 늘어납니다.", + [UI_MENU_SHADOW_RES_GAME] = "게임 (가변)", + [UI_MENU_ANISO] = "텍스처 필터링", + [UI_MENU_ANISO_DESC] = "표면 텍스처의 비등방성 필터링입니다. 비스듬히 보이는 땅, 길, 벽이 흐려지지 않고 먼 곳까지 선명하게 유지됩니다. '게임'은 Switch처럼 게임이 요청하는 " + "수준입니다.", + [UI_MENU_ANISO_GAME] = "게임", + [UI_MENU_LOD_STEADY] = "부하 시에도 세부 유지", + [UI_MENU_LOD_STEADY_DESC] = "프레임 속도가 떨어질 때 모델과 텍스처의 세부를 낮추는 게임 설정을 건너뜁니다. 에뮬레이터 모드 Disable LOD Quality Reduction과 " + "같은 효과입니다. 게임 버전 1.2.1과 1.4.3 전용입니다. 성능이 낮은 PC에서는 끄세요. 그런 PC에서는 이 저하가 프레임 속도를 유지해 줍니다.", + [UI_MENU_SHARPNESS] = "FSR 선명도", + [UI_MENU_SHARPNESS_DESC] = "FSR로 확대한 뒤의 선명화입니다. 0이면 꺼집니다.", + [UI_MENU_COLOR] = "색상", + [UI_MENU_COLOR_PRESET] = "색상 프로필", + [UI_MENU_COLOR_PRESET_DESC] = "아래 네 값을 한 번에 설정합니다. 비비드: 대비와 채도를 높이고 어두운 부분을 조금 밝게 합니다(OLED 화면용). 클리어: 대비, 채도, 밝기를 " + "조금 높입니다. 값을 움직이면 프로필이 '사용자 지정'으로 바뀝니다. HUD는 영상과 함께 바뀌지만 이 메뉴는 바뀌지 않습니다.", + [UI_MENU_COLOR_DEFAULT] = "게임 기본", + [UI_MENU_COLOR_VIVID] = "비비드 (OLED)", + [UI_MENU_COLOR_CLARITY] = "클리어", + [UI_MENU_COLOR_CUSTOM] = "사용자 지정", + [UI_MENU_COLOR_BRIGHTNESS] = "밝기", + [UI_MENU_COLOR_BRIGHTNESS_DESC] = "모든 색에 더해집니다. 0이면 변화 없음.", + [UI_MENU_COLOR_CONTRAST] = "대비", + [UI_MENU_COLOR_CONTRAST_DESC] = "색을 중간 회색에서 멀어지게(100 % 초과) 하거나 가까워지게 합니다. 100 %면 변화 없음.", + [UI_MENU_COLOR_SATURATION] = "채도", + [UI_MENU_COLOR_SATURATION_DESC] = "회색 대비 색의 강도입니다. 100 %면 변화 없음.", + [UI_MENU_COLOR_GAMMA] = "감마", + [UI_MENU_COLOR_GAMMA_DESC] = "1 미만이면 어두운 부분과 중간 톤이 밝아지고, 1 초과면 어두워집니다. 1이면 변화 없음.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "HDR 출력", + [UI_MENU_HDR_DESC] = "HDR 디스플레이에서 밝은 하이라이트를 표시합니다. Windows에서 HDR을 켜거나('HDR 사용') 색 관리를 지원하는 Wayland 컴포지터가 필요하며, " + "없으면 SDR로 유지됩니다. 재시작 후 적용됩니다. 위의 색상 프로필은 SDR용이며 HDR에서는 사용되지 않습니다.", + [UI_MENU_HDR_PEAK] = "최대 밝기", + [UI_MENU_HDR_PEAK_DESC] = "디스플레이의 최대 밝기(니트)입니다. 가장 밝은 하이라이트는 여기서 멈춥니다.", + [UI_MENU_HDR_GAME] = "게임 밝기", + [UI_MENU_HDR_GAME_DESC] = "영상의 흰색(페이퍼 화이트) 니트 값입니다. 203이 HDR 기준입니다. 밝은 방에서는 올리세요.", + [UI_MENU_HDR_UI] = "HUD 및 메뉴 밝기", + [UI_MENU_HDR_UI_DESC] = "HUD와 이 메뉴의 흰색 니트 값입니다.", + [UI_MENU_HDR_HUE] = "하이라이트 색조 보정", + [UI_MENU_HDR_HUE_DESC] = "불이나 불똥 같은 밝은 색을 게임 원래 SDR 영상처럼 흰색 쪽으로 바꿔, 그 색이 비추는 빛과 맞춥니다. 0이면 채도를 그대로 유지합니다.", + [UI_MENU_SHADOW_SCALE] = "그림자 해상도", + [UI_MENU_SHADOW_SCALE_DESC] = "태양 그림자 맵을 게임 기본 960x960보다 각 변에서 이 배율만큼 크게 그립니다. 그림자 윤곽과 나뭇잎 그림자가 선명해집니다. 다음 실행 시 " + "적용됩니다.", + [UI_MENU_PCSS] = "부드러운 그림자", + [UI_MENU_PCSS_DESC] = "물체가 땅에 닿는 곳에서는 태양 그림자를 선명하게, 그림자가 멀리 드리울수록 부드럽게 합니다(PCSS). 0이면 게임의 필터를 유지합니다. 다음 실행 시 " + "적용됩니다.", + [UI_MENU_CONTACT_SHADOWS] = "접촉 그림자", + [UI_MENU_CONTACT_SHADOWS_DESC] = "그림자 맵이 놓치는 작은 태양 그림자입니다. 발밑, 돌 아래, 풀숲, 움푹한 곳 등. 조명 후 화면 공간에서 계산합니다. 다음 실행 시 " + "적용됩니다.", + [UI_MENU_SHADOW_RANGE] = "그림자 단계 범위", + [UI_MENU_SHADOW_RANGE_DESC] = "그림자가 부드러워지는 단계(게임에서는 20, 40, 80, 160 m)를 더 멀리 옮깁니다. 그림자 맵이 더 넓은 범위에 퍼지므로 그림자 해상도도 " + "함께 올리세요. 다음 실행 시 적용됩니다.", + [UI_MENU_GRASS_RANGE] = "풀 표시 거리", + [UI_MENU_GRASS_RANGE_DESC] = "카메라 주변 어디까지 풀이 자라는지입니다(게임: 62.5 m). 높이면 초원의 풀이 바로 앞에서 자라나지 않고 더 멀리까지 보이며, 낮추면 풀을 덜 " + "그립니다. 다음 실행 시 적용됩니다.", + [UI_MENU_DLSS_PRESET] = "DLSS 모델", + [UI_MENU_DLSS_PRESET_DESC] = "어느 DLSS 모델을 실행할지입니다. '자동'은 모드별 NVIDIA 권장을 따릅니다: DLAA, 품질, 균형은 K, 성능은 M, 울트라 성능은 L. " + "J: 움직이는 캐릭터 뒤의 잔상이 약간 적고 깜박임이 조금 많습니다. K: 모든 모드에서 가장 선명한 모델입니다. 즉시 적용됩니다.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "자동", + [UI_MENU_DLSS_PRESET_K] = "K (가장 선명)", + [UI_MENU_DLSS_PRESET_J] = "J (잔상 적음)", + [UI_MENU_DLSS_CHARS] = "DLSS 캐릭터 잔상", + [UI_MENU_DLSS_CHARS_DESC] = "움직이는 캐릭터와 동물, 그들이 든 물건 뒤의 희미한 잔상을 줄입니다. 그 부분에서는 DLSS가 이전 프레임을 덜 사용합니다. 강할수록 잔상이 더 " + "사라지고 그 윤곽이 조금 덜 부드러워집니다. 즉시 적용됩니다.", + [UI_MENU_DLSS_CHARS_OFF] = "끄기", + [UI_MENU_DLSS_CHARS_LIGHT] = "약하게", + [UI_MENU_DLSS_CHARS_MEDIUM] = "보통", + [UI_MENU_DLSS_CHARS_FULL] = "최대", + [UI_MENU_DLSS] = "업스케일링 모드", + [UI_MENU_DLSS_DESC] = "'네이티브'는 3D 장면을 전체 해상도에서 안티에일리어싱합니다. '품질', '균형', '성능', '울트라 성능'은 장면을 67, 58, 50, 33 %로 그리고 " + "업스케일러(DLSS 또는 FSR 3.1)로 확대해 GPU 시간을 절약하며, 3D 렌더링 배율을 대신합니다. 즉시 적용됩니다.", + [UI_MENU_DLSS_DLAA] = "네이티브", + [UI_MENU_DLSS_QUALITY] = "품질", + [UI_MENU_DLSS_BALANCED] = "균형", + [UI_MENU_DLSS_PERFORMANCE] = "성능", + [UI_MENU_DLSS_ULTRA] = "울트라 성능", + [UI_MENU_FXAA] = "게임 안티에일리어싱 (FXAA)", + [UI_MENU_FXAA_DESC] = "게임 기본 FXAA 윤곽 부드럽게 하기입니다. 세부가 약간 흐려집니다. DLAA가 켜져 있으면 필요 없습니다.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "VK_NV_low_latency2를 사용해 NVIDIA GPU에서 시스템 지연 시간을 줄입니다. '켜기 + 부스트'는 CPU 병목 장면에서 GPU 클럭을 높게 " + "유지합니다.", + [UI_MENU_REFLEX_OFF] = "끄기", + [UI_MENU_REFLEX_ON] = "켜기", + [UI_MENU_REFLEX_BOOST] = "켜기 + 부스트", + [UI_MENU_SCENE_UPSCALER] = "3D 장면 업스케일러", + [UI_MENU_SCENE_UPSCALER_DESC] = "3D 장면용 시간적 업스케일러입니다. 윤곽이 더 매끄럽고 깜박임이 줄며, '네이티브'보다 낮은 모드에서는 장면을 더 작게 그린 뒤 확대해 GPU " + "시간을 절약합니다. NVIDIA DLSS를 쓰려면 NVIDIA RTX GPU가 필요하고 " DLSS_FILE " 파일이 " EXE_FILE " " + "옆에 있어야 합니다. AMD FSR 3.1은 모든 GPU에서 작동합니다. '끄기'는 게임 자체의 확대와 FXAA를 유지합니다. HUD는 건드리지 " + "않으며, 위의 '창에 맞춰 확대'와 선명도가 여전히 게임 이미지를 창에 맞춥니다. 재시작 후 적용됩니다.", + [UI_MENU_SCENE_UPSCALER_OFF] = "끄기", + [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: NVIDIA RTX GPU 필요", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: " DLSS_FILE " 없음", + [UI_MENU_FSR3_SHARPNESS] = "FSR 3.1 선명도", + [UI_MENU_FSR3_SHARPNESS_DESC] = "FSR 3.1 뒤 3D 장면의 선명화입니다. 0이면 꺼집니다.", + [UI_MENU_FPS_LIMIT] = "프레임 속도 제한", + [UI_MENU_FPS_LIMIT_DESC] = "게임이 초당 그리는 최대 프레임 수입니다. 60을 넘는 설정은 실험적이며 '게임 속도를 시계에 맞추기'가 필요합니다.", + [UI_MENU_FPS_30] = "30 FPS", + [UI_MENU_FPS_40] = "40 FPS", + [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", + [UI_MENU_FPS_90] = "90 FPS", + [UI_MENU_FPS_120] = "120 FPS", + [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "모니터 주사율", + [UI_MENU_FPS_DISPLAY_HZ] = "모니터 주사율 (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "프레임 대기열", + [UI_MENU_FRAME_QUEUE_DESC] = "이전 프레임이 화면에 표시될 차례를 기다리는 동안 게임이 다음 프레임을 시작합니다. 제한 속도에서 빠지는 프레임이 훨씬 줄고, 입력 지연은 최대 " + "1프레임 늘어납니다. 즉시 적용됩니다.", + [UI_MENU_FRAME_GEN] = "프레임 생성", + [UI_MENU_FRAME_GEN_OFF] = "끄기", + [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "게임이 그리는 두 프레임 사이마다 생성된 프레임을 넣습니다. 화면의 프레임은 두 배가 되고, 게임은 프레임 제한의 절반으로 돌며 조작은 약 반 프레임 " + "늦어집니다. 120 Hz 이상 디스플레이용입니다. DLSS나 HDR과는 함께 쓸 수 없습니다. 즉시 적용됩니다.", + [UI_MENU_REALTIME] = "게임 속도를 시계에 맞추기", + [UI_MENU_REALTIME_DESC] = "게임을 실제 시간에 맞춰 진행해 느린 프레임이 있어도 게임이 느려지지 않게 합니다.", + [UI_MENU_CLOTH_REALTIME] = "천을 시계에 맞추기", + [UI_MENU_CLOTH_REALTIME_DESC] = "천과 머리카락도 실제 시간에 맞춰 진행합니다.", + [UI_MENU_HIGHFPS_FIX] = "높은 프레임 속도 수정", + [UI_MENU_HIGHFPS_FIX_DESC] = "30 fps를 넘으면 이상해지는 물리와 60을 넘으면 비치거나 사라지는 물체를 수정합니다.", + [UI_MENU_CLIMB_FIX] = "등반 속도 수정", + [UI_MENU_CLIMB_FIX_DESC] = "초당 60프레임을 넘어도 벽과 사다리를 오르는 속도를 제대로 유지해 링크가 꼭대기까지 오르게 합니다.", + [UI_MENU_GAME_LANG] = "게임 언어", + [UI_MENU_GAME_LANG_DESC] = "게임 텍스트와 음성의 언어입니다.", + [UI_MENU_GAME_LANG_AUTO] = "자동", + [UI_MENU_OPERATION_MODE] = "본체 모드", + [UI_MENU_OPERATION_MODE_DESC] = "게임이 TV 모드와 휴대 모드 중 어느 쪽에서 실행 중이라고 생각할지입니다.", + [UI_MENU_MODE_DOCKED] = "TV 모드", + [UI_MENU_MODE_HANDHELD] = "휴대 모드", + [UI_MENU_ASSUME_FOCUS] = "포커스 없이도 실행", + [UI_MENU_ASSUME_FOCUS_DESC] = "켜면(기본값) 다른 창에 있는 동안에도 게임이 계속 실행되며, 창이 다시 앞으로 올 때까지 키보드는 반응하지 않습니다. 끄면 Switch에서 " + "HOME 버튼을 누른 것처럼 창이 포커스를 잃을 때 일시 정지합니다. 이렇게 중단된 로딩은 멈춘 채로 남을 수 있습니다.", + [UI_MENU_PLAY_TIME] = "플레이 시간", + [UI_MENU_PLAY_TIME_DESC] = "모든 실행에 걸친 게임 시간으로, 게임 창에 포커스가 있고 게임이 프레임을 그리는 동안 셉니다. 프로필 폴더의 저장 데이터 옆 playtime.txt에 " + "보관됩니다.", + [UI_MENU_PLAY_TIME_HM] = "%llu시간 %02u분", + [UI_MENU_PLAY_TIME_SESSION] = "이번 실행: %s", + [UI_MENU_MODS_BUILTIN] = "포트에 내장", + [UI_MENU_MODS_INSTALLED] = "설치된 모드", + [UI_MENU_MODS_NONE] = "아직 모드가 없습니다. 모드를 mods 폴더에 압축 해제하고(모드마다 폴더 하나, 그 안에 romfs 폴더) 게임을 재시작하세요. TKMM도 병합한 모드를 그곳에 " + "폴더로 내보낼 수 있습니다.", + [UI_MENU_MODS_OPEN] = "mods 폴더 열기", + [UI_MENU_MODS_OPEN_DESC] = "게임이 모드를 읽는 폴더를 보여 줍니다. 없으면 만듭니다.", + [UI_MENU_MODS_ROW_DESC] = "교체하는 게임 파일: %u. 추가하는 새 파일: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "파일 %u개는 목록에서 더 위에 있는 %s의 것을 사용합니다.", + [UI_MENU_MODS_MOVE_HINT] = "위 버튼이나 Ctrl+↑로 위로, 왼쪽 버튼이나 Ctrl+↓로 아래로 옮깁니다. 두 모드가 같은 파일을 바꾸면 위에 있는 모드가 우선합니다. 변경은 " + "재시작 후 적용됩니다.", + [UI_MENU_MODS_EMPTY] = "이 폴더에는 romfs, exefs, cheats 파일이 없습니다.", + [UI_MENU_MODS_SUBSDK] = "이 모드는 자체 게임 코드(subsdk 플러그인이나 교체된 main)를 포함합니다. 포트는 코드 모듈을 불러올 수 없으므로 모드 전체가 꺼진 상태로 유지됩니다.", + [UI_MENU_MODS_EXEFS_LATER] = "이 모드는 게임 코드를 수정합니다(exefs). 다음 실행 시 패치를 빌드해 넣습니다(몇 분간 재빌드). 그때까지 모드 전체가 꺼진 상태로 유지됩니다.", + [UI_MENU_MODS_CHEATS] = "치트: %d개. '치트' 탭에서 전환합니다.", + [UI_MENU_MODS_CHEATS_FILE] = "이 게임 버전용 치트는 시작 시 이 모드의 cheats\\%s에서 읽습니다.", + [UI_MENU_MODS_BAD_NAME] = "폴더 이름에 |가 있습니다. 모드 목록은 이름 구분에 |를 사용합니다. 폴더 이름을 바꾸세요.", + [UI_MENU_MODS_OTHER_VERSION] = "파일 %u개는 다른 게임 버전용이라 제외됩니다. 사용 중인 게임 버전용 이 모드를 찾으세요.", + [UI_MENU_MODS_UNUSED] = "사용 안 함", + [UI_MENU_MODS_FPS60] = "60 FPS 패치", + [UI_MENU_MODS_FPS60_DESC] = "60 fps용 포트 자체 패치입니다. '게임' 탭의 프레임 속도 제한으로 설정합니다.", + [UI_MENU_MODS_RES] = "해상도 패치", + [UI_MENU_MODS_RES_DESC] = "1080p를 넘는 해상도용 포트 자체 패치입니다. '화면' 탭의 게임 해상도로 설정합니다.", + [UI_MENU_MODS_QUICKMENU] = "빠른 메뉴 수정", + [UI_MENU_MODS_QUICKMENU_DESC] = "60 FPS에서 무기, 방패, 소재 메뉴의 배경이 검게 되는 문제에 대한 포트의 수정입니다.", + [UI_MENU_VOLUME] = "음량", + [UI_MENU_VOLUME_DESC] = "게임 전체 음량입니다.", + [UI_MENU_VOLUME_MUSIC] = "음악 음량", + [UI_MENU_VOLUME_MUSIC_DESC] = "배경 음악의 음량입니다.", + [UI_MENU_VOLUME_SFX] = "효과음 음량", + [UI_MENU_VOLUME_SFX_DESC] = "효과음의 음량입니다.", + [UI_MENU_VOLUME_VOICE] = "음성 음량", + [UI_MENU_VOLUME_VOICE_DESC] = "캐릭터 음성의 음량입니다.", + [UI_MENU_AUDIO_CHANNELS] = "스피커", + [UI_MENU_AUDIO_CHANNELS_DESC] = "스테레오 또는 5.1 서라운드 출력입니다. '자동'은 Windows 스피커 설정이 6채널 이상이면 5.1을 고릅니다. 재시작 후 적용됩니다.", + [UI_MENU_CHANNELS_AUTO] = "자동", + [UI_MENU_CHANNELS_STEREO] = "스테레오", + [UI_MENU_CHANNELS_51] = "5.1 서라운드", + [UI_MENU_AUDIO_DEVICE] = "출력 장치", + [UI_MENU_AUDIO_DEVICE_DESC] = "소리가 나오는 곳입니다. '시스템 기본값'은 Windows 기본 장치를 따릅니다. 선택한 장치가 분리되면 다시 연결될 때까지 시스템 기본값으로 " + "출력합니다. 즉시 적용됩니다.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "시스템 기본값", + [UI_MENU_MOTION] = "모션 조작", + [UI_MENU_MOTION_DESC] = "컨트롤러의 자이로로 조준합니다.", + [UI_MENU_GYRO_CALIBRATION] = "자이로 오프셋 보정", + [UI_MENU_GYRO_CALIBRATION_DESC] = "아래 '자이로 보정'으로 측정한, 정지 상태에서의 컨트롤러 드리프트를 뺍니다. 이 설정을 꺼도 측정값은 저장된 채로 남습니다.", + [UI_MENU_GYRO_CALIBRATE] = "자이로 보정", + [UI_MENU_GYRO_CALIBRATE_DESC] = "정지 상태에서의 자이로스코프 드리프트를 측정해 제거합니다. 컨트롤러를 내려놓거나 2초 동안 가만히 들고 있으세요.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "보정 중...", + [UI_MENU_GYRO_CALIBRATED] = "%s, 보정됨", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "보정 실패", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "컨트롤러가 움직였습니다: 가만히 들고 다시 시도하세요", + [UI_MENU_GYRO_AUTO_BIAS] = "정지 시 자이로 드리프트 학습", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "컨트롤러가 책상 위에 가만히 놓여 있을 때마다 자이로에 남은 드리프트를 학습해 뺍니다. 보정 후에도 활 조준이 천천히 흘러갈 때 쓰세요. 손에 " + "든 컨트롤러로는 학습하지 않습니다. 실험적 기능입니다.", + [UI_MENU_RUMBLE_STRENGTH] = "진동 세기", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "컨트롤러 진동의 세기입니다.", + [UI_MENU_RUMBLE_CURVE] = "진동 곡선", + [UI_MENU_RUMBLE_CURVE_DESC] = "값을 낮추면 약한 진동이 강해집니다.", + [UI_MENU_RUMBLE_TRIGGERS] = "트리거 진동 (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Xbox 컨트롤러의 트리거도 진동시킵니다.", + [UI_MENU_PAD_LAYOUT] = "버튼 배치", + [UI_MENU_PAD_LAYOUT_DESC] = "어느 버튼을 A로 할지입니다. Nintendo: Switch처럼 오른쪽 버튼. Xbox: Xbox 컨트롤러 표기대로 아래 버튼(PlayStation " + "컨트롤러에서는 ×). 자동은 Nintendo 표기 컨트롤러에는 Nintendo를, 그 외에는 Xbox를 고릅니다. 게임의 버튼 표시에 어느 컨트롤러를 " + "쓸지는 '버튼 표시'에서 설정합니다.", + [UI_MENU_PAD_LAYOUT_AUTO] = "자동", + [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A가 오른쪽)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A가 아래)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "사용 중: %s", + [UI_MENU_PROMPTS] = "버튼 표시", + [UI_MENU_PROMPTS_DESC] = "게임의 버튼 표시가 어느 컨트롤러의 버튼을 보여 줄지입니다. Nintendo: 게임 원래 표시. Xbox: LB, RB, LT, RT, Menu, View, " + "방향 패드 십자, 그리고 A, B, X, Y는 위의 버튼 배치가 누르는 버튼의 표기대로 표시합니다(Nintendo (A가 오른쪽)에서는 오른쪽 버튼이 B로 " + "표기되므로 A의 표시가 B가 됩니다). PlayStation: PlayStation 컨트롤러의 기호(○ × △ □, L1, R1, L2, R2, " + "Options, Share)를 위의 버튼 배치가 누르는 버튼에 표시합니다. PC: 키보드 기본 배치의 키와 마우스 버튼(E, Shift, 스페이스, 왼쪽 " + "클릭...)과 카메라용 마우스. 게임은 시작할 때 버튼 표시를 읽으므로 재시작 후 바뀝니다. 버튼 표시는 게임 파일의 일부라서 '조작' 탭에서 다시 지정한 " + "버튼에는 화면에 예전 표시가 남습니다.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", + [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", + [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "버튼 표시 파일이 없습니다: 설치를 다시 실행하세요", + [UI_MENU_PROMPTS_FAILED] = "버튼 표시 파일이 손상되었습니다: 설치를 다시 실행하세요", + [UI_MENU_PROMPTS_RESTART] = "표시는 재시작 후 바뀝니다", + [UI_MENU_PROMPTS_OFF_SHAPE] = "게임 해상도가 16:9가 아니라 꺼짐", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "이 비율용 레이아웃이 없습니다: 설치를 다시 실행하세요", + [UI_MENU_OUTPUT_RES_PREPARING] = "백그라운드에서 레이아웃을 만드는 중입니다. 다음 실행 시 사용됩니다", + [UI_MENU_PROMPTS_PREPARING] = "백그라운드에서 버튼 표시 파일을 만드는 중입니다. 다음 실행 시 사용됩니다", + [UI_MENU_PREPARE_RETRY] = "다시 시도", + [UI_MENU_PREPARE_RETRY_DESC] = "설치 프로그램의 도구를 다시 시작해 없는 인터페이스 레이아웃이나 버튼 표시 파일을 백그라운드에서 만듭니다. 게임은 계속 실행되며, 다음 실행부터 " + "그 파일을 사용합니다.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "설치 프로그램의 도구가 시작되지 않았습니다: 설치를 다시 실행하세요", + [UI_MENU_PROMPTS_OFF_MODS] = "꺼짐: RomFS 모드가 파일을 교체함", + [UI_MENU_PROMPTS_OFF_PATCHES] = "TOTK_ROMFS_PATCHES가 설정된 동안 꺼짐", + [UI_MENU_RESTART] = "지금 재시작", + [UI_MENU_RESTART_DESC] = "게임을 닫고 새 버튼 표시로 다시 시작합니다. 마지막 저장 이후의 진행은 사라집니다.", + [UI_MENU_RESTART_CONFIRM] = "지금 게임을 재시작할까요? 마지막 저장 이후의 진행은 사라집니다.", + [UI_MENU_RESTART_YES] = "재시작", + [UI_MENU_RESTART_SAVING] = "게임이 저장 중입니다. 잠시 후 재시작할 수 있습니다.", + [UI_MENU_GROUP_STICKS] = "아날로그 스틱", + [UI_MENU_LSTICK_DEADZONE] = "왼쪽 스틱 데드존", + [UI_MENU_RSTICK_DEADZONE] = "오른쪽 스틱 데드존", + [UI_MENU_STICK_DEADZONE_DESC] = "스틱을 얼마나 움직여야 게임이 반응할지입니다. 캐릭터나 카메라가 저절로 움직이면 올리세요. 스틱에서 손을 떼고 '현재 스틱' 값을 읽은 뒤 " + "그보다 몇 퍼센트 높게 설정하세요.", + [UI_MENU_STICK_DEADZONE_NOW] = "현재 스틱: %.0f %%", + [UI_MENU_MOUSE_MODE] = "마우스 카메라", + [UI_MENU_MOUSE_MODE_DESC] = "직접: PC 게임처럼 마우스를 움직인 만큼 카메라가 돌며, 스틱 데드존이나 곡선이 없습니다(게임 1.4.3과 1.2.1. 1.1.0은 스틱 에뮬레이션 " + "사용). 스틱 에뮬레이션: 마우스가 오른쪽 스틱처럼 작동합니다.", + [UI_MENU_MOUSE_STICK] = "스틱 에뮬레이션", + [UI_MENU_MOUSE_DIRECT] = "직접", + [UI_MENU_MENU_CURSOR] = "게임 메뉴에서 마우스", + [UI_MENU_MENU_CURSOR_DESC] = "게임 자체 메뉴(타이틀, 인벤토리, 상점, 대화 선택지)에 포인터가 나타납니다. 포인터 아래 항목이 선택되고, 왼쪽 클릭으로 결정, 오른쪽 클릭으로 " + "뒤로 갑니다. 마지막으로 마우스나 키를 사용했을 때만 나타나므로 컨트롤러로는 메뉴가 그대로입니다(게임 1.4.3).", + [UI_MENU_MAP_CLICK] = "지도에서 왼쪽 클릭", + [UI_MENU_MAP_CLICK_DESC] = "푸르아 패드의 지도에서 마우스 왼쪽 버튼이 지정된 버튼(기본값 Y) 대신 지도 커서 위치에서 A를 누릅니다. '게임 메뉴에서 마우스'가 필요합니다(게임 " + "1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "대화 중 클릭", + [UI_MENU_DIALOGUE_CLICK_DESC] = "대화창이 열려 있는 동안 왼쪽 클릭은 B(텍스트를 진행하고 스크롤을 건너뜀)를, 오른쪽 클릭은 A를 누릅니다. 원래 지정된 버튼(기본값: 대화 " + "기록을 여는 Y와 ZL) 대신입니다. 대화 선택지에서는 포인터가 그대로이며 왼쪽 클릭으로 고릅니다(게임 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "게임 포인터", + [UI_MENU_POINTER_IMAGE_DESC] = "커서가 잡혀 있지 않은 동안(게임 메뉴, 이 메뉴, Esc 이후) 창에 시스템 화살표 대신 화면 배율에 맞춘 자체 금색 화살촉이 표시됩니다.", + [UI_MENU_QUICKSAVE] = "빠른 저장 및 불러오기", + [UI_MENU_QUICKSAVE_DESC] = "키 하나로 즉시 게임을 저장하고, 다른 키로 그 저장을 불러옵니다(아래 두 줄: 기본값은 Half-Life처럼 F6, F7). 화면에 메뉴가 뜨지 " + "않습니다. 키보드와 마우스 키 전용이며 게임 1.4.3 전용입니다. 빠른 저장은 게임에 자체 자동 저장 하나를 요청하므로 가장 오래된 자동 저장을 " + "대체하고(수동 저장은 남음), 그 사본을 빠른 저장으로 보관하며(프로필의 quicksave 폴더) 화면 위쪽에 \"게임을 저장했습니다\"를 표시합니다. " + "빠른 불러오기는 보이지 않는 곳에서 게임의 불러오기 과정을 거치는 동안 화면을 \"빠른 저장 불러오는 중\"에 멈춰 두고, 게임이 빠른 저장을 " + "불러옵니다(약 5초). 게임이 스스로 자동 저장하지 않을 곳(컷신, 대화)에서는 아무것도 저장되지 않으며 그렇다고 표시합니다.", + [UI_MENU_QUICKSAVE_KEY] = "빠른 저장 키", + [UI_MENU_QUICKLOAD_KEY] = "빠른 불러오기 키", + [UI_MENU_QUICKSAVE_KEY_DESC] = "빠른 저장 또는 빠른 불러오기를 시작하는 키입니다. 기본값은 Half-Life처럼 F6, F7입니다. 칸을 선택하고 아무 키나 마우스 버튼을 " + "누르세요. Delete로 그 동작의 키를 비웁니다. 빠른 저장이 켜져 있는 동안 두 키는 다른 동작을 하지 않습니다(다른 지정에서도 그 키를 쓰면 " + "안내가 표시됩니다). totk.ini에는 키 지정에서 쓰는 어떤 키 이름이든 쓸 수 있습니다(quicksave_key, quickload_key).", + [UI_QS_SAVED] = "게임을 저장했습니다", + [UI_QS_LOADING] = "빠른 저장 불러오는 중", + [UI_QS_NOT_NOW] = "지금은 빠른 저장을 할 수 없습니다", + [UI_QS_NONE] = "아직 빠른 저장이 없습니다(빠른 저장 키로 만듭니다)", + [UI_QS_FAILED] = "빠른 저장 실패: totk.log를 확인하세요", + [UI_QS_LOAD_FAILED] = "빠른 불러오기 실패: totk.log를 확인하세요", + [UI_MENU_MOUSE_SENS] = "마우스 카메라 감도", + [UI_MENU_MOUSE_SENS_DESC] = "마우스로 카메라가 도는 속도입니다.", + [UI_MENU_WALK_KEY] = "걷기 키", + [UI_MENU_WALK_KEY_DESC] = "누르고 있는 동안 키보드 스틱 입력을 일부만 기울여 뛰지 않고 걷게 합니다. 얼마나 기울일지는 걷기 정도로 정합니다. 컨트롤러와 마우스에는 영향이 없습니다.", + [UI_MENU_WALK_KEY_TAKEN] = "%s에도 지정됨", + [UI_MENU_WALK_SCALE] = "걷기 정도", + [UI_MENU_WALK_SCALE_DESC] = "걷기 키를 누르고 있는 동안 키보드 스틱의 기울기입니다. 절반이면 걷기, 끝까지면 달리기입니다.", + [UI_MENU_FREECAM] = "자유 카메라", + [UI_MENU_FREECAM_DESC] = "아래 조합이나 키로 시점을 링크에게서 떼어 내 날아다니게 합니다. 기본값은 끔이며, 끄면 게임의 카메라 코드가 원래대로 실행됩니다. 재시작 후 적용됩니다. " + "게임 버전 1.4.3.", + [UI_MENU_FREECAM_OFF_NOTE] = "위의 '자유 카메라'를 켜고 재시작하세요", + [UI_MENU_FREECAM_PAD] = "자유 카메라 조합", + [UI_MENU_FREECAM_PAD_DESC] = "함께 누르면 시점을 세 단계로 바꾸는 컨트롤러 버튼입니다: 링크에게서 떨어져 날아다니고, 링크가 계속 플레이하는 동안 남겨진 자리에 머물고, 다시 " + "돌아옵니다. 날아다니는 동안에는 게임에 입력이 가지 않습니다. 왼쪽 스틱은 시선 방향과 옆으로, 트리거는 위아래로 움직이고, 오른쪽 스틱은 회전하며, " + "L이나 R을 누를 때마다 속도가 절반 또는 두 배가 됩니다. 고정된 동안에는 링크가 화면에서 왼쪽 스틱이 가리키는 쪽으로 걷습니다. 게임 버전 " + "1.4.3.", + [UI_MENU_FREECAM_PAD_V143] = "게임 버전 1.4.3 전용", + [UI_MENU_FREECAM_KEY] = "자유 카메라 키", + [UI_MENU_FREECAM_KEY_DESC] = "시점을 같은 단계로 바꾸는 키입니다: 링크에게서 떨어져 날아다니고, 링크가 계속 플레이하는 동안 머물고, 다시 돌아옵니다. 날아다니는 동안: W A " + "S D는 시선 방향과 옆으로, ZR과 ZL에 지정된 키(기본값 X와 Z)는 위아래로 움직이고, 마우스와 화살표 키는 회전하며, L과 R에 지정된 " + "키(Q와 R)는 속도를 절반 또는 두 배로 합니다. 게임 버전 1.4.3.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "게임플레이 조정", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "게임플레이 조정", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "울트라핸드 회전과 거리, 아이템과 무기 전환, 부드러운 지도 확대를 마우스 휠로 조작합니다.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "울트라핸드 휠 회전", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "울트라핸드로 잡은 물체를 마우스 휠로 바로 회전합니다.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "울트라핸드 C 회전축", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "C를 누른 채 휠을 굴리면 잡은 물체를 다른 축으로 회전합니다.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "울트라핸드 회전 감도", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "마우스 휠이 잡은 물체를 회전하는 속도입니다.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "울트라핸드 휠 거리", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "오른쪽 클릭 + 마우스 휠로 잡은 물체를 밀거나 당깁니다.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "울트라핸드 거리 감도", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "마우스 휠이 물체 거리를 바꾸는 속도입니다.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "휠로 무기 선택", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "필드에서 마우스 휠을 굴려 무기를 바꿉니다. E로 확정합니다.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "무기 휠 감도", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "다음 무기로 넘어가는 데 필요한 휠 단계 수입니다.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "휠로 빠른 메뉴 선택", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "빠른 선택 메뉴가 열려 있는 동안 마우스 휠로 아이템을 넘겨 봅니다.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "빠른 메뉴 휠 감도", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "빠른 선택 메뉴에서 다음 아이템으로 넘어가는 데 필요한 휠 단계 수입니다.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "빠른 메뉴 A / D 이동", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "빠른 선택 메뉴에서 A / D를 눌러 왼쪽과 오른쪽으로 이동합니다.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "부드러운 지도 확대", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "마우스 휠로 푸르아 패드 지도를 관성 있게 부드럽게 확대합니다.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "지도 확대 감도", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "마우스 휠이 지도를 확대·축소하는 속도입니다.", + [UI_MENU_STICK_SENS] = "스틱 카메라 속도", + [UI_MENU_STICK_SENS_DESC] = "게임의 5단계 카메라 감도 각각에서 오른쪽 스틱 카메라 속도(최고 속도 포함)를 몇 배로 할지입니다. 마우스는 자체 설정을 사용합니다.", + [UI_BINDS_HELP] = "칸을 선택하고 A나 Enter를 누른 다음 키, 마우스 버튼 또는 컨트롤러 버튼을 누르세요. Delete나 X로 칸을 비웁니다. 이미 쓰인 키는 이곳으로 옮겨지고, " + "컨트롤러 버튼은 교체되는 버튼과 서로 바뀝니다.", + [UI_BINDS_COL_KEY1] = "키 1", + [UI_BINDS_COL_KEY2] = "키 2", + [UI_BINDS_COL_PAD] = "컨트롤러", + [UI_BINDS_GROUP_BUTTONS] = "버튼", + [UI_BINDS_GROUP_MOVE] = "이동", + [UI_BINDS_GROUP_CAMERA] = "카메라", + [UI_BINDS_PRESS_KEY] = "%s에 지정할 키나 마우스 버튼을 누르세요", + [UI_BINDS_PRESS_PAD] = "%s에 지정할 컨트롤러 버튼을 누르세요", + [UI_BINDS_CANCEL_HINT] = "Esc로 취소하거나 %d초 기다리세요", + [UI_BINDS_TAKEN] = "%s을(를) %s에서 해제했습니다", + [UI_BINDS_SWAPPED] = "%s을(를) %s와(과) 바꿨습니다", + [UI_BINDS_RESET] = "모든 버튼 초기화", + [UI_BINDS_RESET_DESC] = "기본 키와 컨트롤러 버튼으로 되돌립니다. 위의 버튼 배치가 다시 적용됩니다. 다시 지정한 컨트롤러 버튼은 이 초기화 전까지 지정한 위치를 유지합니다.", + [UI_BIND_A] = "A", + [UI_BIND_B] = "B", + [UI_BIND_X] = "X", + [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "왼쪽 스틱 누르기", + [UI_BIND_RCLICK] = "오른쪽 스틱 누르기", + [UI_BIND_L] = "L", + [UI_BIND_R] = "R", + [UI_BIND_ZL] = "ZL", + [UI_BIND_ZR] = "ZR", + [UI_BIND_PLUS] = "+ 버튼", + [UI_BIND_MINUS] = "- 버튼", + [UI_BIND_LEFT] = "방향 패드 왼쪽", + [UI_BIND_UP] = "방향 패드 위", + [UI_BIND_RIGHT] = "방향 패드 오른쪽", + [UI_BIND_DOWN] = "방향 패드 아래", + [UI_BIND_LSTICK_LEFT] = "왼쪽으로 이동", + [UI_BIND_LSTICK_UP] = "앞으로 이동", + [UI_BIND_LSTICK_RIGHT] = "오른쪽으로 이동", + [UI_BIND_LSTICK_DOWN] = "뒤로 이동", + [UI_BIND_RSTICK_LEFT] = "카메라 왼쪽", + [UI_BIND_RSTICK_UP] = "카메라 위", + [UI_BIND_RSTICK_RIGHT] = "카메라 오른쪽", + [UI_BIND_RSTICK_DOWN] = "카메라 아래", + [UI_BIND_DESC_A] = "조사, 줍기, 말하기.", + [UI_BIND_DESC_B] = "달리기, 취소, 뒤로.", + [UI_BIND_DESC_X] = "점프.", + [UI_BIND_DESC_Y] = "공격.", + [UI_BIND_DESC_LCLICK] = "웅크리기.", + [UI_BIND_DESC_RCLICK] = "1인칭 시점.", + [UI_BIND_DESC_L] = "능력.", + [UI_BIND_DESC_R] = "무기 던지기.", + [UI_BIND_DESC_ZL] = "방패, 주목.", + [UI_BIND_DESC_ZR] = "활.", + [UI_BIND_DESC_PLUS] = "메뉴, 파우치.", + [UI_BIND_DESC_MINUS] = "지도.", + [UI_BIND_DESC_DPAD] = "빠른 선택.", + [UI_BIND_DESC_MOVE] = "왼쪽 스틱처럼 링크를 움직입니다. 컨트롤러의 왼쪽 스틱도 언제나 작동합니다.", + [UI_BIND_DESC_CAMERA] = "오른쪽 스틱처럼 카메라를 돌립니다. 마우스와 컨트롤러의 오른쪽 스틱도 언제나 작동합니다.", + [UI_BIND_SHAKE] = "카메라 스틱 흔들기", + [UI_BIND_DESC_SHAKE] = "게임에 오른쪽 스틱을 좌우로 흔드는 입력을 보냅니다. 울트라핸드로 잡은 것에서 붙인 부품을 떼어 냅니다. 키를 누르고 있으면 계속 흔듭니다.", + [UI_KEY_SPACE] = "스페이스", + [UI_KEY_TAB] = "Tab", + [UI_KEY_LSHIFT] = "왼쪽 Shift", + [UI_KEY_LCTRL] = "왼쪽 Ctrl", + [UI_KEY_UP] = "↑ 키", + [UI_KEY_DOWN] = "↓ 키", + [UI_KEY_LEFT] = "← 키", + [UI_KEY_RIGHT] = "→ 키", + [UI_KEY_MOUSE_L] = "마우스 왼쪽", + [UI_KEY_MOUSE_R] = "마우스 오른쪽", + [UI_KEY_MOUSE_M] = "마우스 가운데", + [UI_KEY_MOUSE_X1] = "마우스 4", + [UI_KEY_MOUSE_X2] = "마우스 5", + [UI_KEY_ENTER] = "Enter", + [UI_KEY_BACKSPACE] = "Backspace", + [UI_KEY_RSHIFT] = "오른쪽 Shift", + [UI_KEY_RCTRL] = "오른쪽 Ctrl", + [UI_KEY_LALT] = "Alt", + [UI_KEY_CAPSLOCK] = "Caps Lock", + [UI_KEY_INSERT] = "Insert", + [UI_KEY_DELETE] = "Delete", + [UI_KEY_HOME] = "Home", + [UI_KEY_END] = "End", + [UI_KEY_PAGEUP] = "Page Up", + [UI_KEY_PAGEDOWN] = "Page Down", + [UI_KEY_NUM_FMT] = "숫자 패드 %s", + [UI_PAD_SOUTH] = "아래 버튼", + [UI_PAD_EAST] = "오른쪽 버튼", + [UI_PAD_WEST] = "왼쪽 버튼", + [UI_PAD_NORTH] = "위 버튼", + [UI_PAD_LSTICK] = "왼쪽 스틱", + [UI_PAD_RSTICK] = "오른쪽 스틱", + [UI_PAD_L] = "왼쪽 범퍼", + [UI_PAD_R] = "오른쪽 범퍼", + [UI_PAD_START] = "Start", + [UI_PAD_BACK] = "Back", + [UI_PAD_DPAD_LEFT] = "방향 패드 왼쪽", + [UI_PAD_DPAD_UP] = "방향 패드 위", + [UI_PAD_DPAD_RIGHT] = "방향 패드 오른쪽", + [UI_PAD_DPAD_DOWN] = "방향 패드 아래", + [UI_PAD_ZL] = "왼쪽 트리거", + [UI_PAD_ZR] = "오른쪽 트리거", + [UI_PAD_LPADDLE1] = "왼쪽 후면 버튼", + [UI_PAD_RPADDLE1] = "오른쪽 후면 버튼", + [UI_PAD_LPADDLE2] = "왼쪽 후면 버튼 2", + [UI_PAD_RPADDLE2] = "오른쪽 후면 버튼 2", + [UI_PAD_TOUCHPAD] = "터치패드 클릭", + [UI_PAD_CROSS] = "× 버튼", + [UI_PAD_CIRCLE] = "○ 버튼", + [UI_PAD_SQUARE] = "□ 버튼", + [UI_PAD_TRIANGLE] = "△ 버튼", + [UI_MENU_AMIIBO_DIR] = "amiibo 폴더", + [UI_MENU_AMIIBO_OPEN] = "열기", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "기본 폴더", + [UI_MENU_AMIIBO_REFRESH] = "새로 고침", + [UI_MENU_AMIIBO_PICK] = "amiibo 덤프 (540바이트 .bin 또는 .nfc 파일):", + [UI_MENU_AMIIBO_NO_DIR] = "폴더 %s을(를) 열 수 없습니다", + [UI_MENU_AMIIBO_READER] = "NFC 리더", + [UI_MENU_AMIIBO_STATE] = "리더:", + [UI_MENU_AMIIBO_STATE_IDLE] = "준비됨", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "게임이 amiibo를 기다리는 중", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo가 리더 위에 있음", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "게임이 amiibo를 읽는 중", + [UI_MENU_AMIIBO_STATE_OFF] = "꺼짐", + [UI_MENU_AMIIBO_FILE] = "선택한 파일:", + [UI_MENU_AMIIBO_NO_FILE] = "(선택한 파일 없음)", + [UI_MENU_AMIIBO_TAP] = "amiibo 터치", + [UI_MENU_AMIIBO_REMOVE] = "amiibo 떼기", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "터치 후 amiibo 자동으로 떼기", + [UI_MENU_AMIIBO_HOLD] = "리더 위 시간", + [UI_MENU_AMIIBO_SECONDS] = "%.1f초", + [UI_MENU_AMIIBO_TAG] = "리더 위의 amiibo:", + [UI_MENU_AMIIBO_NO_TAG] = "리더에 amiibo가 없습니다.", + [UI_MENU_AMIIBO_TAG_FILE] = "파일: %s", + [UI_MENU_AMIIBO_TAG_ID] = "캐릭터 %s, 시리즈 %02x, 번호 %04x, 유형 %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "준비됨", + [UI_MENU_AMIIBO_TAPPED] = "터치함: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "amiibo 덤프(540바이트 NTAG215)가 아닙니다: %s", + [UI_MENU_AMIIBO_REMOVED] = "amiibo를 뗐습니다", + [UI_MENU_AMIIBO_STATUS] = "상태: %s", + [UI_MENU_MENU_LANG] = "메뉴 언어", + [UI_MENU_MENU_LANG_DESC] = "이 메뉴와 성능 표시의 언어입니다.", + [UI_MENU_MENU_LANG_AUTO] = "자동 (Windows에 맞춤)", + [UI_MENU_DISCORD_RPC] = "Discord Rich Presence", + [UI_MENU_DISCORD_RPC_DESC] = "게임이 실행되는 동안 Discord 상태에 플레이 시간과 함께 \"TotK Recomp 플레이 중\"을 표시합니다. totk.ini의 " + "discord_app_id와 discord_image로 애플리케이션을 고릅니다.", + [UI_MENU_ADV_WARNING] = "테스트와 문제 해결용 설정입니다. 이유를 알 때만 바꾸세요.", + [UI_MENU_GROUP_SCHED] = "스케줄링", + [UI_MENU_GROUP_SHADERS] = "셰이더와 파이프라인", + [UI_MENU_GROUP_TEXMEM] = "텍스처와 메모리", + [UI_MENU_GROUP_FIXES] = "렌더링 수정", + [UI_MENU_GROUP_VULKAN] = "Vulkan", + [UI_MENU_GROUP_DIAG] = "진단", + [UI_MENU_ASYNC_PREEMPT] = "가상 코어 선점", + [UI_MENU_ASYNC_PREEMPT_DESC] = "같은 가상 코어에서 게임 스레드가 다른 스레드를 중단시킬 수 있게 합니다.", + [UI_MENU_PREEMPT_OFF] = "끄기", + [UI_MENU_PREEMPT_ON] = "켜기", + [UI_MENU_PREEMPT_INHERIT] = "상속만", + [UI_MENU_REPLAY_ASYNC] = "별도 스레드에서 GPU 프레임 준비", + [UI_MENU_REPLAY_ASYNC_DESC] = "GPU용 프레임을 게임 스레드가 아닌 별도 스레드에서 준비합니다. 지연이 최대 1프레임 늘어납니다.", + [UI_MENU_REPLAY_WORKERS] = "GPU 프레임 준비 스레드", + [UI_MENU_REPLAY_WORKERS_DESC] = "큰 프레임을 여러 스레드에서 동시에 GPU용으로 기록합니다. CPU가 프레임 속도를 제한할 때 도움이 되며, 논리 프로세서가 8개 이상 " + "필요합니다. 끄면 스레드 하나에서 기록합니다.", + [UI_MENU_REPLAY_WORKERS_NOW] = "현재: %s", + [UI_MENU_TIMER_1MS] = "1 ms Windows 타이머", + [UI_MENU_TIMER_1MS_DESC] = "시스템 타이머 해상도를 1 ms로 올려 프레임 간격을 고르게 합니다.", + [UI_MENU_PIPE_WAIT] = "대기 중인 그리기 처리", + [UI_MENU_PIPE_WAIT_DESC] = "'기본값'은 대기 중인 그리기용 워커를 둔 현재 스케줄링을, '이전 방식(draw)'은 예전 스케줄링을 사용합니다.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "기본값", + [UI_MENU_PIPE_WAIT_DRAW] = "이전 방식 (draw)", + [UI_MENU_PIPE_SKIP] = "파이프라인 빌드 중 건너뛸 그리기", + [UI_MENU_PIPE_SKIP_DESC] = "파이프라인을 기다리지 않고 버리는 그리기의 종류입니다.", + [UI_MENU_PIPE_SKIP_STRICT] = "엄격", + [UI_MENU_PIPE_SKIP_ANY] = "전부", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "전체 화면 패스", + [UI_MENU_LIB_PREBUILD] = "스테이지 라이브러리 미리 빌드", + [UI_MENU_LIB_PREBUILD_DESC] = "셰이더 스테이지 라이브러리를 백그라운드에서 미리 빌드합니다.", + [UI_MENU_LIB_PREBUILD_THREADS] = "스테이지 라이브러리 미리 빌드 스레드", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "미리 빌드에 쓰는 스레드 수입니다. 자동은 CPU에 맞춰 정합니다.", + [UI_MENU_PIPE_PREBUILD] = "파이프라인 미리 빌드", + [UI_MENU_PIPE_PREBUILD_DESC] = "알려진 파이프라인을 미리 빌드합니다.", + [UI_MENU_PREWARM_XLATE] = "변환기 예열", + [UI_MENU_PREWARM_XLATE_DESC] = "시작 시 알려진 셰이더를 변환하는 스레드 수입니다. 자동은 CPU 스레드의 절반(최대 16)을 씁니다.", + [UI_MENU_GPL] = "그래픽 파이프라인 라이브러리", + [UI_MENU_GPL_DESC] = "Vulkan 파이프라인 라이브러리 확장을 사용합니다. 드라이버와 맞지 않으면 끄세요.", + [UI_MENU_ASTC] = "ASTC 텍스처 디코딩", + [UI_MENU_ASTC_DESC] = "압축된 ASTC 텍스처를 어디서 디코딩할지입니다.", + [UI_MENU_ASTC_AUTO] = "자동", + [UI_MENU_ASTC_GPU] = "GPU 셰이더", + [UI_MENU_ASTC_NATIVE] = "네이티브", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "GPU 메모리 모드", + [UI_MENU_MEMORY_DESC] = "게임 메모리를 GPU와 어떻게 공유할지입니다.", + [UI_MENU_MEMORY_AUTO] = "자동", + [UI_MENU_MEMORY_IMPORT] = "가져오기", + [UI_MENU_MEMORY_MIRROR] = "미러", + [UI_MENU_MEMORY_VERIFY] = "검증", + [UI_MENU_TEX_ALIAS] = "텍스처 별칭", + [UI_MENU_TEX_ALIAS_DESC] = "사용 중인 텍스처의 메모리 위에 만든 새 텍스처를 빈 상태가 아니라 그 내용에서 시작합니다.", + [UI_MENU_TEX_VRAM_PRESSURE] = "텍스처 메모리 한도", + [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "비디오 메모리 사용률이 이 퍼센트를 넘으면 게임이 해제한 텍스처를 버립니다(다시 쓰면 저장소에서 되돌립니다). 0이면 유지합니다.", + [UI_MENU_ASTC_BC] = "ASTC를 BC3로 압축", + [UI_MENU_ASTC_BC_DESC] = "GPU 디코더 사용 시 디코딩한 ASTC 텍스처를 BC3로 다시 인코딩해 비디오 메모리를 4분의 1로 줄입니다. 4 GB 이하 GPU용입니다. 텍스처가 약간 " + "각져 보입니다.", + [UI_MENU_LOD_GUARD] = "LOD 보호", + [UI_MENU_LOD_GUARD_DESC] = "GPU가 세부 수준 데이터를 읽기 전에 게임이 그 수정을 끝내기를 기다려, 물체가 한 프레임 동안 엉뚱한 곳에 보이거나 먼 지형이 평평해 보이는 것을 " + "막습니다.", + [UI_MENU_FIX_C0] = "상수 버퍼 수정", + [UI_MENU_FIX_C0_DESC] = "드라이버 예약 상수 뱅크 c0(저장소 크기, 디스패치 크기, 포인트 크기, 기본 인스턴스)을 0을 읽는 대신 채웁니다.", + [UI_MENU_FIX_ZERO] = "새 GPU 메모리를 0으로 채우기", + [UI_MENU_FIX_ZERO_DESC] = "Switch 메모리처럼 새 GPU 메모리 풀을 0으로 채운 상태에서 시작합니다.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA 후 안개와 파티클", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 사용 시 안개, 먼지 등 파티클을 DLSS가 이미 부드럽게 한 영상 위에 그립니다. DLSS 없이 게임이 그리는 방식과 " + "같습니다. 안개 속의 작은 파티클(사당)이 더 이상 사라지거나 잔상을 남기지 않습니다. 끄기: 예전처럼 DLSS가 이 효과도 처리합니다. " + "DLAA 모드 전용이며, 업스케일링 DLSS 모드는 항상 이 효과를 처리합니다. 즉시 적용됩니다.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS 노출 고정", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS가 프레임마다 노출을 추정하지 않고 게임 영상의 밝기를 그대로 사용합니다. 어두운 장면(지저)에서 안개 낀 넓은 영역이 카메라가 " + "움직일 때 한 프레임 동안 어두워지거나 밝아지지 않습니다. 끄기: 예전처럼 DLSS가 노출을 직접 추정합니다. 즉시 적용됩니다.", + [UI_MENU_BIND_SKIP] = "같은 바인딩 건너뛰기", + [UI_MENU_BIND_SKIP_DESC] = "최적화: 바뀌지 않은 바인딩을 건너뜁니다.", + [UI_MENU_SHADER_MEMO] = "셰이더 메모이제이션", + [UI_MENU_SHADER_MEMO_DESC] = "최적화: 셰이더 조회 결과를 기억합니다.", + [UI_MENU_PIPE_MEMO] = "파이프라인 메모이제이션", + [UI_MENU_PIPE_MEMO_DESC] = "최적화: 상태가 같으면 직전 그리기의 파이프라인을 재사용합니다.", + [UI_MENU_TEX_MEMO] = "텍스처 바인딩 메모이제이션", + [UI_MENU_TEX_MEMO_DESC] = "최적화: 그리기 사이에 텍스처 디스크립터를 기억합니다.", + [UI_MENU_DESC_TEMPLATE] = "디스크립터 템플릿", + [UI_MENU_DESC_TEMPLATE_DESC] = "최적화: 디스크립터를 한 번에 갱신합니다.", + [UI_MENU_PUSH_SKIP] = "같은 푸시 상수 건너뛰기", + [UI_MENU_PUSH_SKIP_DESC] = "최적화: 바뀌지 않은 푸시 상수를 건너뜁니다.", + [UI_MENU_SPLIT_DRAWS] = "GPU에 일찍 제출", + [UI_MENU_SPLIT_DRAWS_DESC] = "패스 사이에서 그리기 N번마다 GPU 작업을 나눠 보내 GPU가 더 일찍 시작하게 합니다. 0이면 끕니다.", + [UI_MENU_VK_VALIDATION] = "검증 레이어", + [UI_MENU_VK_VALIDATION_DESC] = "모든 Vulkan 호출을 검사하며 게임이 매우 느려집니다.", + [UI_MENU_VK_VALIDATION_MISSING] = "검증 레이어가 설치되어 있지 않습니다.", + [UI_MENU_VK_DYN_VERTEX] = "동적 정점 상태", + [UI_MENU_VK_DYN_VERTEX_DESC] = "동적 정점 입력을 강제로 켜거나 끕니다. 기본값은 GPU에 따라 정해집니다.", + [UI_MENU_VK_DYN_A2C] = "동적 Alpha to Coverage", + [UI_MENU_VK_DYN_A2C_DESC] = "동적 Alpha to Coverage를 강제로 켜거나 끕니다. 기본값: RDNA 2 이전용 AMD 드라이버에서는 끔(켜면 캐릭터가 검게 그려짐), 그 " + "외에는 켬.", + [UI_MENU_VK_SUBGROUP_PIN] = "서브그룹 크기 고정", + [UI_MENU_VK_SUBGROUP_PIN_DESC] = "셰이더 서브그룹 크기를 고정합니다.", + [UI_MENU_TRACE] = "성능 로그", + [UI_MENU_TRACE_DESC] = "프레임 시간을 파일에 기록합니다.", + [UI_MENU_FLIGHT] = "플라이트 레코더", + [UI_MENU_FLIGHT_DESC] = "짧은 기록을 유지하다가 프레임이 멈추면 저장합니다.", + [UI_MENU_FLIGHT_SPIKE_MS] = "멈춤 기준 (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "멈춤으로 볼 프레임 시간입니다.", + [UI_MENU_PASS_CRUMBS] = "GPU 패스 표시", + [UI_MENU_PASS_CRUMBS_DESC] = "GPU 충돌 후 로그에 실행 중이던 렌더 패스 이름을 남깁니다. 자동: AMD만. 켜기: NVIDIA도 포함하며 부하가 약간 있습니다.", + [UI_MENU_INPUT_RECORD] = "입력 기록", + [UI_MENU_INPUT_RECORD_DESC] = "버그 보고용으로 입력을 파일에 기록합니다.", + [UI_MENU_OPEN_LOG] = "로그 폴더 열기", + [UI_MENU_OPEN_LOG_DESC] = "로그 파일이 있는 폴더를 보여 줍니다.", + [UI_MENU_COPY_INFO] = "시스템 정보 복사", + [UI_MENU_COPY_INFO_DESC] = "GPU, 드라이버, CPU, RAM, 변경한 설정을 클립보드에 복사합니다.", + [UI_MENU_COPY_INFO_DONE] = "복사됨", + [UI_MENU_ACTION_FAILED] = "실패함", + [UI_MENU_RESET] = "모든 설정 초기화", + [UI_MENU_RESET_DESC] = "모든 탭에 적용됩니다.", + [UI_MENU_RESET_CONFIRM] = "모든 설정을 기본값으로 되돌릴까요?", + [UI_MENU_RESET_YES] = "초기화", + [UI_MENU_RESET_NO] = "취소", + [UI_MENU_OV_FPS] = "%.0f FPS", + [UI_MENU_OV_FRAME_MS] = "%.1f ms", + [UI_MENU_OV_GAME_PCT] = "게임 %.0f%%", + [UI_MENU_OV_MAX_MS] = "최대 %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", + [UI_MENU_OV_FRAME_LABEL] = "프레임", + [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "하위 1%% %.0f", + [UI_MENU_OV_LOW01] = "하위 0.1%% %.0f", + [UI_MENU_OV_GPU] = "GPU", + [UI_MENU_OV_CPU] = "CPU", + [UI_MENU_OV_RAM] = "RAM", + [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "온도", + [UI_MENU_OV_POWER] = "전력", + [UI_MENU_OV_CLOCK] = "클럭", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "GPU 프레임 준비", + [UI_MENU_OV_GPU_TIME] = "프레임당 GPU 사용 시간", + [UI_MENU_OV_PIPE_WAIT] = "파이프라인 대기", + [UI_MENU_OV_SHADER_WAIT] = "셰이더 대기", + [UI_MENU_OV_TEX_UPLOADS] = "텍스처 업로드", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", + [UI_MENU_OV_FMT_TEMP] = "%.0f °C", + [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", + [UI_MENU_OV_FMT_GB] = "%.1f GB", + [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "게임 %.1f GB", + [UI_MENU_OV_FMT_MS] = "%.2f ms", + [UI_MENU_OV_PER_FRAME] = "프레임당 %.1f", + [UI_MENU_OV_WINDOW] = "창", + [UI_MENU_OV_OUTPUT] = "게임 이미지", + [UI_MENU_OV_SCENE] = "3D 장면", + [UI_MENU_OV_UPSCALER] = "3D 업스케일러", + [UI_MENU_OV_SCALING] = "확대 방식", + [UI_MENU_OV_LIMIT] = "프레임 제한", + [UI_MENU_OV_PRESENT] = "표시 방식", + [UI_MENU_OV_SHOWN] = "표시", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", + [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, 선명도 %d%%", + [UI_MENU_OV_SCALE_NONE] = "없음 (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "바이리니어", + [UI_MENU_OV_SCALE_DOWN] = "바이리니어 (FSR은 확대 전용)", + [UI_MENU_TAB_CHEATS] = "치트", + [UI_MENU_CHEATS_NONE] = "이 게임 버전용 치트가 없습니다. 모드의 치트는 그 cheats 폴더에 있는, 게임 빌드 이름을 붙인 Atmosphère 치트 파일입니다: " + "mods\\\\cheats\\%s. 불러오려면 게임을 재시작하세요. 게임 코드를 바꾸는 치트라면 게임이 시작 시 스스로를 다시 빌드합니다(몇 분).", + [UI_MENU_CHEATS_MOD] = "%s: 치트 %d개", + [UI_MENU_CHEAT_CODE_DESC] = "게임 코드를 바꿉니다. 즉시 전환됩니다.", + [UI_MENU_CHEAT_KEY_DESC] = "%s을(를) 누르고 있는 동안 게임 코드를 바꿉니다. 즉시 전환됩니다.", + [UI_MENU_CHEAT_DATA_DESC] = "켜져 있는 동안 매 프레임 게임 메모리에 씁니다.", + [UI_MENU_CHEAT_MASTER] = "항상 켜짐", + [UI_MENU_CHEAT_MASTER_DESC] = "파일의 마스터 코드입니다. 항상 켜져 있습니다.", + [UI_MENU_CHEAT_RESTORE] = "필요 없음", + [UI_MENU_CHEAT_RESTORE_DESC] = "게임 원래 코드를 되돌려 쓸 뿐입니다. 치트를 끄면 같은 일이 일어납니다.", + [UI_MENU_CHEAT_REBUILD] = "재빌드 후", + [UI_MENU_CHEAT_REBUILD_DESC] = "이 치트는 게임 코드를 바꾸며 게임이 빌드된 뒤에 추가되거나 수정되었습니다. 다음 실행 시 빌드해 넣습니다(몇 분). 또는 '지금 게임 재빌드'를 " + "사용하세요.", + [UI_MENU_CHEAT_UNSUPPORTED] = "지원 안 함", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "이 치트는 이 버전의 게임에서 작동하지 않습니다:", + [UI_MENU_CHEATS_REBUILD] = "지금 게임 재빌드", + [UI_MENU_CHEATS_REBUILD_DESC] = "게임 코드를 바꾸는 일부 치트가 아직 빌드되지 않았습니다. 새로 추가·수정되었거나 이전 재빌드가 실패 또는 취소되었습니다. 게임을 닫고 설치 " + "프로그램이 이를 빌드해 넣은 뒤(몇 분) 게임을 다시 시작합니다. 마지막 저장 이후의 진행은 사라집니다.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "이 모드는 포트가 적용할 수 없는 방식으로 게임 코드(exefs)를 수정하므로 모드 전체가 꺼진 상태로 유지됩니다. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "코드 패치(exefs)가 다른 게임 버전용입니다.", + [UI_MENU_MODS_EXEFS_ON] = "사용 중인 코드 패치: 파일 %d개.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "사용 중인 코드 패치: 파일 %d개. 포트 자체 패치 %s을(를) 대체하며, 이 모드가 켜져 있는 동안 그 패치는 꺼집니다.", + [UI_MENU_MODS_CODE_SKIPPED] = "자체 게임 코드(%s)는 불러오지 않으며, 모드의 나머지는 사용됩니다. 게임이 이상하게 동작하면 모드를 끄세요.", + [UI_MENU_MODS_PLUGIN_ON] = "플러그인 작동 중: 게임 코드 후크 %d개.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "플러그인 %s은(는) 포트에서 실행할 수 없습니다: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "모드 전체가 꺼진 상태로 유지됩니다. 아래의 \"...을(를) 코드 없이 사용\"을 켜면 모드의 나머지를 사용합니다.", + [UI_MENU_MODS_PLUGIN_OFF] = "이번에는 플러그인이 꺼진 상태입니다: 빌드 때와 다르게 시작되었습니다(%s). 다음 실행 시 게임이 다시 빌드합니다.", + [UI_MENU_MODS_WITHOUT_CODE] = "%s을(를) 코드 없이 사용", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "위 모드는 포트가 실행할 수 없는 코드를 포함합니다: 자체 게임 코드(subsdk 플러그인이나 교체된 main) 또는 포트가 적용할 수 " + "없는 코드 패치(exefs). 끄기: 모드 전체가 꺼진 상태로 유지됩니다. 켜기: 그 코드는 제외하고 모드의 나머지(RomFS 파일, " + "치트, 작동하는 코드 패치)를 사용합니다. 모드의 파일이 빠진 코드를 전제로 할 수 있으니 게임이 이상하게 동작하면 다시 끄세요. 다음 " + "실행 시 적용됩니다.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "모든 모드에 켜짐: totk.ini의 mods_without_code = 1.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "코드 패치 파일(exefs) %u개는 적용할 수 없어 제외되며, 모드의 나머지는 사용됩니다. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "이 모드의 파일 %u개가 목록에서 더 아래에 있는 %s의 파일을 대체합니다.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "게임 데이터 변경 중 %u바이트는 목록에서 더 위에 있는 %s의 것을 사용합니다.", + [UI_MENU_MODS_OVERRIDES_DATA] = "게임 데이터 변경 %u바이트가 목록에서 더 아래에 있는 %s의 변경을 대체합니다.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "코드 패치 위치 %u곳은 목록에서 더 위에 있는 %s의 패치가 우선합니다.", + [UI_MENU_MODS_OVERRIDES_CODE] = "코드 패치 위치 %u곳에서 목록에서 더 아래에 있는 %s의 패치보다 우선합니다.", +}; + #define SWKBD_ONLY(name, ...) static const char *const name[UI_TEXT_COUNT] = {SWKBD(__VA_ARGS__)} -SWKBD_ONLY(text_ja, "文字入力", "名前を入力してください", "ウマ", "OK", "キャンセル", "コントローラー: A = OK、B = キャンセル"); -SWKBD_ONLY(text_fr, "Saisie de texte", "Entrez un nom", "Cheval", "OK", "Annuler", "Manette : A = OK, B = Annuler"); -SWKBD_ONLY(text_de, "Texteingabe", "Gib einen Namen ein", "Pferd", "OK", "Abbrechen", "Controller: A = OK, B = Abbrechen"); -SWKBD_ONLY(text_it, "Inserimento testo", "Inserisci un nome", "Cavallo", "OK", "Annulla", "Controller: A = OK, B = Annulla"); -SWKBD_ONLY(text_es, "Introducir texto", "Introduce un nombre", "Caballo", "Aceptar", "Cancelar", - "Mando: A = Aceptar, B = Cancelar"); -SWKBD_ONLY(text_nl, "Tekstinvoer", "Voer een naam in", "Paard", "OK", "Annuleren", "Controller: A = OK, B = Annuleren"); SWKBD_ONLY(text_pt, "Inserir texto", "Introduz um nome", "Cavalo", "OK", "Cancelar", "Comando: A = OK, B = Cancelar"); SWKBD_ONLY(text_zh_hant, "文字輸入", "請輸入名字", "馬兒", "確定", "取消", "手把:A 確定,B 取消"); -SWKBD_ONLY(text_ko, "문자 입력", "이름을 입력하세요", "말", "확인", "취소", "컨트롤러: A 확인, B 취소"); static const Row rows[] = { {"en", text_en}, {"ja", text_ja}, {"fr", text_fr}, {"de", text_de}, {"it", text_it}, {"es", text_es}, @@ -2830,6 +8834,8 @@ static const char *resolve_menu_lang(void) { memcpy(base, lang, n), base[n] = 0; if (ui_text_defined(base, UI_MENU_TITLE)) return find_row(base)->lang; } + // Traditional Chinese has no menu text: a Chinese reader gets the Simplified Chinese menu, not the English one. + if (!strncmp(lang, "zh", 2)) return "zh-Hans"; return "en"; } diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 3cdb2ff4..0321f8e7 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -11,8 +11,8 @@ typedef enum { UI_SWKBD_CANCEL, UI_SWKBD_PAD_HINT, // how a controller answers - // Menu: window, tabs, bottom row. UI_MENU_FIRST..UI_MENU_LAST_ID carry English, Russian, Brazilian Portuguese and - // Simplified Chinese texts. + // Menu: window, tabs, bottom row. UI_MENU_FIRST..UI_MENU_LAST_ID carry English, Russian, Brazilian Portuguese, + // Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese and Korean texts. UI_MENU_FIRST, UI_MENU_TITLE = UI_MENU_FIRST, UI_MENU_TAB_SCREEN, UI_MENU_TAB_GAME, UI_MENU_TAB_MODS, UI_MENU_TAB_SOUND, UI_MENU_TAB_CONTROLS, UI_MENU_TAB_AMIIBO, @@ -331,7 +331,7 @@ const char *ui_text_lang(const char *switch_code); typedef struct { const char *code; UiTextId name; } UiGameLang; int ui_text_game_langs(int game_version, UiGameLang *out, int max); -// Menu text: ui_text_in(menu language, id). The menu language is TOTK_MENU_LANG ("en", "ru", "pt-BR", "zh-Hans"); -// unset, the system UI language when the catalog has menu text for it (English, Russian, Brazilian Portuguese, -// Simplified Chinese), else English. Follows a live change of the setting. +// Menu text: ui_text_in(menu language, id). The menu language is TOTK_MENU_LANG ("en", "ru", "pt-BR", "zh-Hans", "de", +// "fr", "es", "it", "nl", "ja", "ko"); unset, the system UI language when the catalog has menu text for it, Simplified +// Chinese for Traditional Chinese, else English. Follows a live change of the setting. const char *menu_text(UiTextId id); diff --git a/totk.ini.example b/totk.ini.example index d773f1df..de8d3f07 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -367,8 +367,8 @@ # lang = en-US # System mode reported to the game: docked or handheld. # operation_mode = docked -# Language of the settings menu and the overlay: en, ru, pt-BR or zh-Hans. Default: the Windows display language, English if -# it is none of them. +# Language of the settings menu and the overlay: en, ru, pt-BR, zh-Hans, de, fr, es, it, nl, ja or ko. Default: the Windows +# display language (Simplified Chinese for any Chinese), English if it is none of them. # menu_lang = en [discord] From 23ac5f18d102df285531283010591b94d62d60d4 Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Sun, 22 Nov 2026 17:11:26 +0100 Subject: [PATCH 39/66] The setup speaks Vietnamese, picked from a Vietnamese Windows or locale, launcher message included Co-Authored-By: Claude Opus 5.5 --- docs/installer.md | 4 +- installer/guilogic.py | 6 +- installer/launcher/launcher.c | 1 + installer/text/vi.json | 227 ++++++++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+), 5 deletions(-) create mode 100644 installer/text/vi.json diff --git a/docs/installer.md b/docs/installer.md index e76c5365..3de7db75 100644 --- a/docs/installer.md +++ b/docs/installer.md @@ -181,8 +181,8 @@ python -m installer --base FILE --update FILE --keys FILE --lang CODE --dest DIR install sections, the explanations under More details, the share notice next to Start) in the Sun Valley ttk theme (`installer/vendor/sv_ttk/`, the platform theme when it does not load), step list with progress, space line, collapsible log, Cancel (Ctrl+Break to the CLI's process group, then it waits for the exit), finish screen with Open - folder. English, Russian, Brazilian Portuguese, Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese - or Korean (`guilogic.UI_LANGUAGES`), chosen from the Windows display language (every Chinese, zh-TW and zh-HK + folder. English, Russian, Brazilian Portuguese, Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese, + Korean or Vietnamese (`guilogic.UI_LANGUAGES`), chosen from the Windows display language (every Chinese, zh-TW and zh-HK included, gives Simplified Chinese; pt-PT and languages without a catalog give English), switchable in the window; every sentence is an id in `installer/text/.json`. The game language starts as the window's when the game has it; a Chinese or Korean window still starts with English, because that game text needs the Switch shared fonts, diff --git a/installer/guilogic.py b/installer/guilogic.py index b91e892f..656bca4c 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -24,11 +24,11 @@ from . import state as statefile from .events import render TEXT = Path(__file__).resolve().parent / 'text' -UI_LANGUAGES = ('en', 'ru', 'pt-BR', 'zh-Hans', 'de', 'fr', 'es', 'it', 'nl', 'ja', 'ko') +UI_LANGUAGES = ('en', 'ru', 'pt-BR', 'zh-Hans', 'de', 'fr', 'es', 'it', 'nl', 'ja', 'ko', 'vi') # what the language switch in the window's corner shows for each UI_LANGUAGE_LABELS = {'en': 'English', 'ru': 'Русский', 'pt-BR': 'Português (Brasil)', 'zh-Hans': '简体中文', 'de': 'Deutsch', 'fr': 'Français', 'es': 'Español', 'it': 'Italiano', 'nl': 'Nederlands', - 'ja': '日本語', 'ko': '한국어'} + 'ja': '日本語', 'ko': '한국어', 'vi': 'Tiếng Việt'} STEP_ORDER = ('check', 'kit', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'pc_prompts', 'shapes', 'dlss', 'cleanup') # message parameter -> catalog id prefix of the names that replace its raw values @@ -37,7 +37,7 @@ LANG_PT_BR = 0x0416 # Portuguese (Brazil), the whole LANGID: Portugal's Portug # primary language id in a Windows LANGID -> window language, for the languages whose every region gets the same text. # Every Chinese gets Simplified Chinese: the setup has no Traditional Chinese text, as the in-game menu has none. PRIMARY_LANGS = {0x04: 'zh-Hans', 0x19: 'ru', 0x07: 'de', 0x0c: 'fr', 0x0a: 'es', 0x10: 'it', 0x13: 'nl', 0x11: 'ja', - 0x12: 'ko'} + 0x12: 'ko', 0x2a: 'vi'} # window language -> the game language the form starts with (default_game_language) GAME_LANGUAGE_FOR_UI = {'ru': 'ru', 'de': 'de', 'fr': 'fr', 'es': 'es', 'it': 'it', 'nl': 'nl', 'ja': 'ja'} diff --git a/installer/launcher/launcher.c b/installer/launcher/launcher.c index b993c214..5ba7eaaa 100644 --- a/installer/launcher/launcher.c +++ b/installer/launcher/launcher.c @@ -28,6 +28,7 @@ static void fail(void) { LANG_DUTCH, LAUNCHER_TITLE_NL, LAUNCHER_PYTHON_MISSING_NL }, { LANG_JAPANESE, LAUNCHER_TITLE_JA, LAUNCHER_PYTHON_MISSING_JA }, { LANG_KOREAN, LAUNCHER_TITLE_KO, LAUNCHER_PYTHON_MISSING_KO }, + { LANG_VIETNAMESE, LAUNCHER_TITLE_VI, LAUNCHER_PYTHON_MISSING_VI }, { LANG_CHINESE, LAUNCHER_TITLE_ZH_HANS, LAUNCHER_PYTHON_MISSING_ZH_HANS }, }; LANGID ui = GetUserDefaultUILanguage(); diff --git a/installer/text/vi.json b/installer/text/vi.json new file mode 100644 index 00000000..e6153f63 --- /dev/null +++ b/installer/text/vi.json @@ -0,0 +1,227 @@ +{ + "step.check": "Kiểm tra máy tính và các tệp trò chơi", + "step.kit": "Sao chép bộ công cụ biên dịch vào thư mục trò chơi", + "step.fonts": "Trích xuất phông chữ hệ thống", + "step.extract": "Trích xuất trò chơi", + "step.lift": "Chuyển mã trò chơi sang C", + "step.compile": "Biên dịch {game_exe}", + "step.prepare": "Chuẩn bị shader", + "step.pc_prompts": "Vẽ biểu tượng nút bàn phím và chuột", + "step.shapes": "Bố trí giao diện trò chơi theo màn hình của bạn", + "step.dlss": "Tải xuống NVIDIA DLSS", + "step.cleanup": "Dọn dẹp", + + "phase.check.host": "Kiểm tra bộ xử lý và card đồ họa", + "phase.check.verify": "Kiểm tra các tệp đã cài đặt", + "phase.check.verify_romfs": "Kiểm tra dữ liệu trò chơi đã cài đặt", + "phase.check.inputs": "Mở các tệp trò chơi bằng khóa", + "phase.check.unpack_base": "Giải nén trò chơi gốc đã nén", + "phase.check.unpack_update": "Giải nén bản cập nhật đã nén", + "phase.check.versions": "Kiểm tra phiên bản trò chơi", + "phase.kit.copy": "Sao chép các công cụ mà trò chơi dùng để tự biên dịch lại cho mod mã", + "phase.fonts.extract": "Trích xuất phông chữ dùng chung từ firmware", + "phase.fonts.copy": "Sao chép phông chữ dùng chung vào thư mục cài đặt", + "phase.extract.hash_base": "Tính tổng kiểm tra của trò chơi gốc", + "phase.extract.hash_update": "Tính tổng kiểm tra của bản cập nhật", + "phase.extract.exefs": "Trích xuất mã trò chơi", + "phase.extract.copy": "Sao chép dữ liệu trò chơi", + "phase.extract.merge": "Áp dụng bản cập nhật vào dữ liệu trò chơi", + "phase.extract.diagnose": "Tìm tệp trò chơi bị hỏng", + "phase.extract.index": "Xác minh dữ liệu trò chơi", + "phase.lift.discover": "Tìm các hàm", + "phase.lift.emit": "Ghi mã C", + "phase.compile.compile": "Biên dịch", + "phase.compile.link": "Liên kết {game_exe}", + "phase.prepare.romfs_patches": "Ghi các bản vá dữ liệu trò chơi cho 60 fps", + "phase.pc_prompts.draw": "Vẽ biểu tượng phím và nút chuột theo các phím gán trong totk.ini", + "phase.prepare.seed": "Đọc shader từ dữ liệu trò chơi", + "phase.prepare.translate": "Chuyển đổi shader", + "phase.prepare.libraries": "Biên dịch shader cho trình điều khiển đồ họa", + "phase.prepare.pack": "Đóng gói bộ nhớ đệm shader thành một tệp", + "phase.shapes.layouts": "Ghi bố cục màn hình và biểu tượng nút cho từng tỷ lệ màn hình", + "phase.dlss.download": "Tải xuống nvngx_dlss.dll từ DLSS SDK của NVIDIA", + "phase.cleanup.ini": "Ghi totk.ini", + "phase.cleanup.temp": "Xóa các tệp tạm", + + "cli.usage": "Dòng lệnh không hợp lệ: {detail}", + "internal": "Lỗi không mong muốn ({exception}): {detail}", + "state.unreadable": "Không thể đọc {path}. Hãy chọn thư mục khác hoặc xóa tệp đó.", + "state.newer_format": "{path} được ghi bởi một trình cài đặt mới hơn. Hãy dùng trình cài đặt đó hoặc chọn thư mục khác.", + "state.output_changed": "Các tệp đã cài đặt của bước '{step}' đã thay đổi kể từ khi được tạo; bước đó sẽ chạy lại.", + + "check.release_incomplete": "Thư mục trình cài đặt không đầy đủ; còn thiếu: {paths}. Hãy giải nén lại bản phát hành.", + "check.dest_not_folder": "Vị trí cài đặt {path} là một tệp, không phải thư mục.", + "check.dest_not_empty": "Thư mục cài đặt {path} không trống và không chứa bản cài đặt nào trước đó. Hãy chọn một thư mục trống.", + "check.lang_missing": "Hãy chọn ngôn ngữ trò chơi.", + "check.lang_unknown": "Ngôn ngữ không xác định '{lang}'. Các ngôn ngữ đã biết: {known}.", + "check.toolchain_broken": "Trình biên dịch đi kèm không hoạt động: {detail}", + "check.glibc_old": "Thư viện C của hệ thống này là glibc {version}; trình biên dịch của trình cài đặt cần {need} trở lên (Ubuntu 22.04, Debian 12, Fedora 35, SteamOS 3 và mới hơn đều có). Cập nhật hệ thống sẽ khắc phục lỗi này.", + "check.host_probe_failed": "Không chạy được bước kiểm tra máy tính (mã thoát {code}).", + "check.host_blocked": "Windows đã chặn một chương trình mà trình cài đặt biên dịch trên máy tính này ({path}): {detail}. Smart App Control (Kiểm soát ứng dụng thông minh), một chính sách App Control hoặc phần mềm diệt virus chặn các chương trình không có chữ ký; bản thân trò chơi cũng được biên dịch trên máy tính này theo cách tương tự nên cũng sẽ bị chặn. Hãy cho phép thư mục trình cài đặt trong phần mềm diệt virus, hoặc tắt Smart App Control trong Bảo mật Windows (Kiểm soát ứng dụng và trình duyệt), rồi chạy lại trình cài đặt.", + "check.vulkan_crash": "Trình điều khiển đồ họa bị lỗi khi trình cài đặt yêu cầu danh sách card đồ họa (mã thoát {code}), kể cả khi đã tắt các lớp Vulkan của chương trình khác. Hãy cài đặt trình điều khiển mới nhất cho card đồ họa của bạn.", + "check.vulkan_layer_crash": "Một lớp Vulkan do chương trình khác cài đặt làm các chương trình Vulkan trên máy tính này bị lỗi (mã thoát {code}), và trò chơi cũng sẽ bị lỗi khi khởi động theo cách tương tự. Lớp đó: {layers}. Hãy cập nhật hoặc gỡ cài đặt chương trình sở hữu lớp này (đường dẫn cho biết thư mục của chương trình), hoặc tắt lớp đó: đặt biến môi trường VK_LOADER_LAYERS_DISABLE thành {disable} cho tài khoản người dùng của bạn. Sau đó chạy lại trình cài đặt.", + "check.vulkan_layers_crash": "Một lớp Vulkan do chương trình khác cài đặt làm các chương trình Vulkan trên máy tính này bị lỗi (mã thoát {code}): khi tắt tất cả các lớp như vậy thì bước kiểm tra thành công, còn khi bật chúng thì trò chơi cũng sẽ bị lỗi khi khởi động theo cách tương tự. Tắt lần lượt từng lớp đã cài đặt không xác định được lớp gây lỗi. Các lớp đã cài đặt: {layers}. Hãy cập nhật hoặc gỡ cài đặt các chương trình lớp phủ (overlay), quay màn hình hoặc tinh chỉnh trong số đó, hoặc tắt tất cả các lớp như vậy: đặt biến môi trường VK_LOADER_LAYERS_DISABLE thành ~implicit~ cho tài khoản người dùng của bạn (thao tác này cũng tắt các lớp phủ như của Steam trong mọi trò chơi Vulkan). Sau đó chạy lại trình cài đặt.", + "check.cpu_too_old": "Bộ xử lý này không hỗ trợ x86-64-v2 (SSE4.2, POPCNT và CMPXCHG16B), mức thấp nhất mà trò chơi được biên dịch cho. Intel Nehalem (2008) hoặc AMD Bulldozer (2011) trở lên đều hỗ trợ.", + "check.vulkan_missing": "Chưa cài đặt trình điều khiển Vulkan nào. Hãy cài đặt trình điều khiển mới nhất cho card đồ họa của bạn.", + "check.vulkan_no_device": "Vulkan không tìm thấy card đồ họa nào. Hãy cài đặt trình điều khiển mới nhất cho card đồ họa của bạn.", + "check.vulkan_too_old": "Trò chơi cần card đồ họa hỗ trợ Vulkan 1.3; tìm thấy: {devices}. Hãy cập nhật trình điều khiển đồ họa.", + "check.no_display": "Cần có màn hình hiển thị để chuẩn bị shader. Hãy chạy trình cài đặt từ phiên làm việc trên màn hình nền (desktop), hoặc export DISPLAY=:0 (trên Steam Deck ở Game Mode thì thêm XDG_RUNTIME_DIR=/run/user/1000).", + "check.inputs_needed": "Cần có các tệp trò chơi: hãy chọn trò chơi gốc, bản cập nhật 1.1.0 hoặc 1.2.1 hoặc 1.4.3 và prod.keys.", + "check.input_missing": "Không tìm thấy tệp ({input}): {path}", + "check.keys_unreadable": "Không thể đọc tệp khóa. Hãy chọn một tệp prod.keys.", + "check.keys_no_header_key": "Tệp khóa không có header_key. Hãy trích xuất lại prod.keys từ máy console của bạn.", + "check.keys_wrong": "Các khóa này không mở được tệp {input}. Hãy dùng prod.keys của chính máy console của bạn.", + "check.keys_too_old": "Tệp khóa quá cũ đối với tệp {input} (cần thế hệ khóa {generation}). Hãy trích xuất prod.keys từ máy console có firmware mới hơn.", + "check.not_game_file": "Tệp {input} không phải là tệp trò chơi XCI, NSP, XCZ hoặc NSZ.", + "check.file_unreadable": "Không thể đọc tệp {input}: {detail}", + "check.unpack_failed": "Không thể giải nén tệp nén {input}: {detail}", + "check.ticket_personalized": "Tệp {input} chứa ticket cá nhân hóa (personalized); cần có ticket chung (common).", + "check.ticket_missing": "Tệp {input} thiếu ticket mà nội dung của nó cần.", + "check.base_not_totk": "Tệp trò chơi gốc không phải là The Legend of Zelda: Tears of the Kingdom ({detail}).", + "check.base_is_update": "Tệp trò chơi gốc là một bản cập nhật. Hãy chọn NSP hoặc XCI của trò chơi gốc (phiên bản 1.0.0) ở đây và chọn tệp này làm bản cập nhật.", + "check.base_combined": "Tệp trò chơi gốc chứa nhiều gói (trò chơi gốc, bản cập nhật hoặc DLC trong cùng một tệp). Hãy chọn bản dump trò chơi gốc chỉ chứa trò chơi.", + "check.update_not_nsp": "Bản cập nhật phải là tệp NSP hoặc NSZ.", + "check.update_is_base": "Tệp cập nhật chứa trò chơi gốc. Hãy chọn tệp NSP của bản cập nhật 1.1.0 hoặc 1.2.1 hoặc 1.4.3.", + "check.update_not_totk": "Tệp cập nhật không phải là bản cập nhật của Tears of the Kingdom ({detail}).", + "check.exefs_failed": "Mã trò chơi trong tệp {input} không vượt qua bước kiểm tra; xem {log}.", + "check.input_damaged": "Tệp {input} bị hỏng hoặc không đầy đủ: {path} ({detail}). Hãy sao chép lại tệp đó từ nguồn của nó hoặc dump lại, rồi chạy lại trình cài đặt.", + "check.base_wrong_version": "Trò chơi gốc không phải phiên bản 1.0.0 ({modules} khác biệt).", + "check.update_wrong_version": "Bản cập nhật là phiên bản {found}; bản phát hành này yêu cầu {wanted}.", + "check.disk_space": "Không đủ dung lượng trống cho {path}: cần {need_gb} GB, còn trống {free_gb} GB.", + "check.firmware_missing": "Thư mục firmware {path} không tồn tại. Hãy chọn thư mục Contents/registered của firmware.", + "check.firmware_empty": "Thư mục firmware {path} không chứa tệp NCA nào. Hãy chọn thư mục Contents/registered của firmware.", + "check.fonts_keys_needed": "Phông chữ dùng chung cho ngôn ngữ này chưa được cài đặt; hãy chọn prod.keys để trình cài đặt trích xuất chúng từ firmware.", + + "extract.exefs_mismatch": "Mã trò chơi đã trích xuất không khớp với phiên bản {version} ({modules}).", + "extract.romfs_merge_failed": "Áp dụng bản cập nhật vào dữ liệu trò chơi không thành công: {detail}. Chi tiết: {log}", + "extract.romfs_mismatch": "Dữ liệu trò chơi đã trích xuất không khớp với phiên bản {version} (kích thước {size}, tổng kiểm tra {sha256}...).", + "fonts.failed": "Trích xuất phông chữ dùng chung không thành công (mã thoát {code}): {detail}. Chi tiết: {log}", + "fonts.incomplete": "Quá trình trích xuất phông chữ dùng chung không ghi đủ mọi tệp ({files}).", + "fonts.copy_failed": "Không thể sao chép phông chữ dùng chung vào {path}: {detail}", + "lift.failed": "Chuyển mã trò chơi không thành công (mã thoát {code}). Chi tiết: {log}", + "compile.failed": "Biên dịch {game_exe} không thành công (mã thoát {code}). Chi tiết: {log}", + "compile.exe_in_use": "{path} đang được sử dụng. Hãy đóng trò chơi rồi chạy lại trình cài đặt.", + "kit.in_use": "{path} đang được sử dụng. Hãy đóng trò chơi và mọi cửa sổ cài đặt hoặc biên dịch lại đang mở, rồi chạy lại trình cài đặt.", + "kit.copy_failed": "Không thể sao chép bộ công cụ biên dịch vào {path}: {detail}", + "compile.exe_locked": "Không thể ghi {path}: một chương trình khác đang giữ tệp này, có thể là trò chơi được khởi động từ thư mục đó hoặc phần mềm diệt virus đã gắn cờ tệp. Hãy đóng trò chơi, thêm thư mục trình cài đặt và thư mục cài đặt vào danh sách loại trừ của phần mềm diệt virus, khởi động lại Windows, rồi chạy lại trình cài đặt. Chi tiết: {log}", + "prepare.xlate_in_use": "{path} đang được sử dụng. Hãy đóng trò chơi, kết thúc mọi tiến trình totk_xlate còn sót lại từ lần chạy trước, rồi chạy lại trình cài đặt.", + "prepare.shader_list_missing": "Thiếu danh sách shader.", + "prepare.romfs_patches_failed": "Ghi các bản vá dữ liệu trò chơi không thành công (mã thoát {code}). Chi tiết: {log}", + "prepare.shaders_failed": "Chuẩn bị shader không thành công (mã thoát {code}). Chi tiết: {log}", + "cleanup.romfs_unreadable": "Dữ liệu trò chơi trong {path} bị thiếu hoặc không đọc được sau khi cài đặt. Hãy khởi động lại Windows, rồi chạy lại trình cài đặt trên cùng thư mục đó: trình cài đặt sẽ trích xuất lại dữ liệu trò chơi và giữ nguyên phần còn lại.", + "prepare.pack_failed": "Đóng gói bộ nhớ đệm shader không thành công (mã thoát {code}). Chi tiết: {log}", + "cleanup.ini_failed": "Không thể ghi totk.ini: {detail}", + + "warn.lang_needs_fonts": "Văn bản bằng {lang} cần phông chữ hệ thống của Switch, nhưng chưa có phông chữ nào được cung cấp. Trò chơi sẽ không khởi động bằng ngôn ngữ này cho đến khi chúng được thêm vào. Hãy chọn thư mục firmware (Contents/registered), hoặc xem mục \"Switch system fonts\" trong docs/installer.md.", + "warn.npdm_differs": "main.npdm khác với bản dump tham chiếu {version}; chỉ các mô-đun mã được sử dụng.", + "warn.cheats_skipped": "Không thể biên dịch các cheat trong thư mục mods có thay đổi mã của trò chơi; trò chơi sẽ được cài đặt mà không có chúng. Chi tiết: {log}", + "warn.exefs_skipped": "Không thể biên dịch các bản vá ExeFS của mod (.ips, .pchtxt); trò chơi sẽ được cài đặt mà không có chúng. Chi tiết: {log}", + "warn.plugins_skipped": "Không thể biên dịch các plugin mã của mod (exefs subsdk); trò chơi sẽ được cài đặt mà không có chúng. Chi tiết: {log}", + "warn.xbox_prompts_failed": "Không thể chuẩn bị biểu tượng nút Xbox, PlayStation hoặc PC (mã thoát {code}); trò chơi giữ biểu tượng nút của Switch. Chi tiết: {log}", + "warn.shaders_skipped": "Trình điều khiển đồ họa bị lỗi khi biên dịch một số shader, nên {count} shader đã bị bỏ qua khi chuẩn bị. Trò chơi sẽ biên dịch chúng khi cần đến lần đầu, và trình điều khiển cũng có thể bị lỗi ở đó; cập nhật trình điều khiển có thể khắc phục điều này. Chi tiết: {log}", + "warn.kernel_old": "Linux {version} thiếu tính năng theo dõi ghi (write tracking) mà trò chơi cần (6.7 trở lên); trò chơi có thể chạy rất chậm. Cập nhật hệ thống sẽ khắc phục điều này.", + "warn.dlss_kept": "Thư mục cài đặt đã có một thư viện DLSS ({path}); trình cài đặt giữ nguyên thư viện đó.", + "warn.dlss_download_failed": "Không thể tải xuống NVIDIA DLSS từ {url}: {detail}. Trò chơi vẫn chạy mà không có DLSS; lần chạy trình cài đặt tiếp theo sẽ thử lại.", + + "ui.title": "Cài đặt TotK", + "ui.rebuild_title": "Biên dịch lại trò chơi cho các mod của bạn", + "ui.start_game": "Khởi động trò chơi", + "ui.version": "phiên bản {version}", + "ui.intro": "Tạo một thư mục Tears of the Kingdom có thể chơi được từ chính các tệp trò chơi của bạn. Quá trình này mất khá nhiều thời gian và chỉ chạy một lần.", + "ui.notice": "Thư mục do trình cài đặt này tạo ra có chứa trò chơi. Thư mục này chỉ dành cho mục đích sử dụng cá nhân; không chia sẻ hoặc tải lên.", + "ui.keys_private": "Tệp khóa được đọc tại chỗ. Nội dung của tệp không bao giờ được hiển thị, sao chép hoặc lưu trữ.", + "ui.base": "Trò chơi gốc", + "ui.update": "Bản cập nhật", + "ui.keys": "prod.keys", + "ui.firmware": "Firmware (tùy chọn)", + "ui.game_language": "Ngôn ngữ trò chơi", + "ui.dest": "Thư mục cài đặt", + "ui.browse": "Duyệt...", + "ui.pick_game": "Chọn tệp trò chơi gốc", + "ui.pick_update": "Chọn tệp cập nhật 1.1.0 hoặc 1.2.1 hoặc 1.4.3", + "ui.pick_keys": "Chọn prod.keys", + "ui.pick_firmware": "Chọn thư mục firmware của Switch (Contents/registered)", + "ui.pick_dest": "Chọn thư mục cài đặt", + "ui.firmware_help": "Dành cho văn bản tiếng Trung Giản thể, tiếng Hàn và tiếng Trung Phồn thể: thư mục Contents/registered của firmware, ví dụ từ Ryujinx hoặc Yuzu. Trình cài đặt sẽ sao chép phông chữ hệ thống của Switch từ đó vào thư mục cài đặt.", + "ui.dlss": "Tải xuống NVIDIA DLSS (nvngx_dlss.dll) cho card đồ họa NVIDIA RTX", + "ui.dlss_help": "Từ DLSS SDK của NVIDIA trên GitHub, theo giấy phép RTX SDK của NVIDIA (github.com/NVIDIA/DLSS). Thư viện này giúp các tùy chọn dlaa và DLSS hoạt động; nếu không có, các tùy chọn đó không có tác dụng.", + "ui.compressed_help": "Các tệp nén NSZ và XCZ dùng được ngay: trình cài đặt tự giải nén chúng (cho đến khi dữ liệu trò chơi được trích xuất xong, cần dung lượng trống bằng dung lượng của các tệp sau khi giải nén).", + "ui.section_files": "Tệp trò chơi", + "ui.section_install": "Cài đặt", + "ui.more_details": "▸ Xem thêm chi tiết", + "ui.fewer_details": "▾ Ẩn chi tiết", + "ui.formats_help": "Trò chơi gốc: NSP, XCI, NSZ hoặc XCZ. Bản cập nhật: 1.1.0, 1.2.1 hoặc 1.4.3, dạng NSP hoặc NSZ.", + "ui.type_game": "Tệp trò chơi (NSP, XCI, NSZ, XCZ)", + "ui.type_keys": "Tệp khóa (*.keys)", + "ui.type_all": "Tất cả các tệp", + "ui.start": "Bắt đầu", + "ui.cancel": "Hủy", + "ui.cancelling": "Đang hủy...", + "ui.show_log": "Hiện nhật ký", + "ui.hide_log": "Ẩn nhật ký", + "ui.close": "Đóng", + "ui.back": "Quay lại", + "ui.open_folder": "Mở thư mục", + "ui.update_mode": "Thư mục này có một bản cài đặt trước đó. Trình cài đặt sẽ tiếp tục hoặc cập nhật bản cài đặt đó; các tệp trò chơi chỉ được yêu cầu nếu cần dùng lại.", + "ui.need_dest": "Hãy chọn thư mục cài đặt.", + "ui.need_base": "Hãy chọn tệp trò chơi gốc.", + "ui.need_update": "Hãy chọn tệp cập nhật 1.1.0 hoặc 1.2.1 hoặc 1.4.3.", + "ui.need_keys": "Hãy chọn tệp prod.keys.", + "ui.need_lang": "Hãy chọn ngôn ngữ trò chơi.", + "ui.missing_base": "Tệp trò chơi gốc không tồn tại.", + "ui.missing_update": "Tệp cập nhật không tồn tại.", + "ui.missing_keys": "Tệp khóa không tồn tại.", + "ui.missing_firmware": "Thư mục firmware không tồn tại.", + "ui.running_install": "Đang cài đặt", + "ui.running_resume": "Đang tiếp tục lần cài đặt trước", + "ui.running_update": "Đang cập nhật bản cài đặt", + "ui.state_started": "đã bắt đầu", + "ui.state_done": "xong", + "ui.state_skipped": "đã bỏ qua", + "ui.state_pending": "đang chờ", + "ui.state_running": "đang chạy", + "ui.state_failed": "thất bại", + "ui.log_warning": "Cảnh báo", + "ui.log_error": "Lỗi", + "ui.log_space": "Dung lượng cần: {need} GB, còn trống: {free} GB", + "ui.log_end": "Đã hoàn tất", + "ui.result_ok": "Trò chơi đã sẵn sàng", + "ui.result_failed": "Cài đặt không thành công", + "ui.result_cancelled": "Đã hủy cài đặt", + "ui.done_text": "Hãy khởi động {game_exe} từ {dest}. Chương trình cài đặt và các tệp trò chơi bạn đã chọn không còn cần thiết nữa.", + "ui.cancelled_text": "Các bước đã hoàn tất được giữ lại. Hãy chạy lại trình cài đặt với cùng thư mục để tiếp tục.", + "ui.log_file": "Tệp nhật ký: {path}", + "ui.process_died": "Trình cài đặt đã dừng đột ngột (mã thoát {code}).", + "ui.confirm_cancel": "Trình cài đặt đang chạy. Hủy cài đặt và đóng cửa sổ?", + "ui.space_one": "Dung lượng trống cần có trên {path}: {need} GB (còn trống: {free} GB).", + "ui.space_two": "Dung lượng trống cần có trên {path}: {need} GB (còn trống: {free} GB); trên {temp}: {temp_need} GB (còn trống: {temp_free} GB).", + "ui.amount_bytes": "{done} / {total} GB", + "ui.amount_chunks": "{done} / {total} phần", + "ui.amount_objects": "{done} / {total} tệp", + "ui.amount_shaders": "{done} / {total} shader", + "ui.amount_other": "{done} / {total} {unit}", + "ui.seconds": "{n} giây", + "param.input.base": "trò chơi gốc", + "param.input.update": "cập nhật", + "param.input.keys": "khóa", + + "launcher.title": "Cài đặt TotK", + "launcher.python_missing": "Các tệp cài đặt không đầy đủ: thiếu thư mục python bên cạnh TotK-Setup.exe. Hãy giải nén lại toàn bộ tệp lưu trữ và khởi động TotK-Setup.exe từ thư mục đã giải nén.", + + "lang.ja": "Tiếng Nhật", + "lang.en-US": "Tiếng Anh (Mỹ)", + "lang.en-GB": "Tiếng Anh (Anh)", + "lang.fr": "Tiếng Pháp", + "lang.fr-CA": "Tiếng Pháp (Canada)", + "lang.de": "Tiếng Đức", + "lang.it": "Tiếng Ý", + "lang.es": "Tiếng Tây Ban Nha", + "lang.es-419": "Tiếng Tây Ban Nha (Mỹ Latinh)", + "lang.nl": "Tiếng Hà Lan", + "lang.pt": "Tiếng Bồ Đào Nha", + "lang.pt-BR": "Tiếng Bồ Đào Nha (Brazil)", + "lang.ru": "Tiếng Nga", + "lang.ko": "Tiếng Hàn", + "lang.zh-Hans": "Tiếng Trung (Giản thể)", + "lang.zh-Hant": "Tiếng Trung (Phồn thể)" +} From 4c95df372aa2ef3615c25dd1c6acc8a62aa2b874 Mon Sep 17 00:00:00 2001 From: mattheuspaivadini Date: Sun, 22 Nov 2026 13:45:13 -0300 Subject: [PATCH 40/66] On Mesa's ANV, put a by-region barrier before a draw in a pass whose vertex shader reads a storage buffer (#927) On an Iris Xe with ANV the half-resolution particle pass drew campfire smoke and clouds as white or dark blobs and turned the sky white for single frames. Such draws read stale data inside the pass unless the sampler cache is invalidated first; a stall alone or the attachment flush alone does not help. The barrier is feedback_barrier, which the feedback loops already record inside passes. TOTK_ANV_VS_BARRIER (anv_vs_barrier) turns it off or on elsewhere. Co-Authored-By: Claude Opus 5.5 --- docs/settings.md | 1 + runtime/cfg.c | 2 +- runtime/vk_exec_draw.c | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/settings.md b/docs/settings.md index 5258f39c..181f9d49 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -138,6 +138,7 @@ Many rows below are developer tools that only act together with another setting | Setting | What it does | Effect of changing it | Safety | | --- | --- | --- | --- | +| `anv_vs_barrier` | A by-region barrier before each draw in a pass whose vertex shader reads a storage buffer. On by default on Intel GPUs with Mesa's ANV driver only, where such reads otherwise see stale data (campfire smoke and clouds drawn as white or dark blobs, a white sky for single frames, #927); `0` or `1` forces it off or on. | `0` on ANV brings the one-frame glitches back; `1` elsewhere adds barriers for nothing (about 5% of the frame rate on an Iris Xe). | Safe | | `bind_inc` (default `0`) | `1` (or `on`) prepares a draw from what changed since the draw before (the bind ops mark the slots whose bytes they changed) instead of from the whole bound state; `check` prepares every draw as before, takes every decision of `on` beside it, logs each kind of difference once and counts them in a `bind_inc:` line every 300 frames; `0` or `off`: as before. `check` also counts what changed between draws in that line. | Less work per draw on the render thread; a change the marks missed would leave a stale descriptor, a wrong picture or a lost device, which `check` would show first. Off by default: with it on, a GTX 1050 Ti lost the device at one place, after the validation layer reported a descriptor pool reset while a command buffer still used its sets; the cause is not found yet. | Caution | | `block_views_3d` (default `0`) | `1` gives 3D block-compressed images block views too. | On some AMD cards a GPU write past the end of the image's memory loses the Vulkan device, and the game stops. | Risky | | `deswizzle` (default `auto`) | Where block-linear textures are deswizzled: `auto` or `gpu` uses a compute pass where the texture's storage is an imported pool and the CPU elsewhere, `cpu` always uses the CPU, `check` uses the GPU and also deswizzles every upload on the CPU and compares the two. | `cpu` brings back the long frames on entering new areas (the replay thread deswizzles every texture); `check` waits for the GPU at every upload and is for testing only. The log names the mode in use. | Caution | diff --git a/runtime/cfg.c b/runtime/cfg.c index b3dcbb2b..5a1146b9 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -33,7 +33,7 @@ static int save_ok = 1; // the last cfg_save_to wrote (o // logged as unknown. A new variable goes here too, or its ini key logs a harmless "unknown key" line, and gets a // description in totk.ini.example or docs/settings.md (tests/settings_doc_check.py checks both). static const char *const known[] = { - "AB", "ABILITY_GUARD", "ADDR_REPORT", "AMIIBO_DIR", "ANISO", "APP_POOL", "ASPECT", "ASPECT_PATCH", "ASSUME_FOCUS", "ASTC", "ASTC_BC", "ASTC_TIME", "ASYNC_PREEMPT", "AUDIO", "AUDIO_CHANNELS", "AUDIO_DEVICE", "AUDIO_DRAIN_FIX", "AUDIO_OFF", "AUDIO_PREFILL_MS", + "AB", "ABILITY_GUARD", "ADDR_REPORT", "AMIIBO_DIR", "ANISO", "ANV_VS_BARRIER", "APP_POOL", "ASPECT", "ASPECT_PATCH", "ASSUME_FOCUS", "ASTC", "ASTC_BC", "ASTC_TIME", "ASYNC_PREEMPT", "AUDIO", "AUDIO_CHANNELS", "AUDIO_DEVICE", "AUDIO_DRAIN_FIX", "AUDIO_OFF", "AUDIO_PREFILL_MS", "BACKGROUND_WINDOW", "BIND_A", "BIND_B", "BIND_DOWN", "BIND_L", "BIND_LCLICK", "BIND_LEFT", "BIND_LSTICK_DOWN", "BIND_LSTICK_LEFT", "BIND_LSTICK_RIGHT", "BIND_LSTICK_UP", "BIND_MINUS", "BIND_PLUS", "BIND_R", "BIND_RCLICK", "BIND_RIGHT", "BIND_RSTICK_DOWN", "BIND_RSTICK_LEFT", "BIND_RSTICK_RIGHT", "BIND_RSTICK_UP", diff --git a/runtime/vk_exec_draw.c b/runtime/vk_exec_draw.c index 64603975..fd8790c9 100644 --- a/runtime/vk_exec_draw.c +++ b/runtime/vk_exec_draw.c @@ -3328,6 +3328,21 @@ static void bi_done(VkExec *ex, const VkPipeInfo *info, const VkPipeState *s, co D->B.bi_valid = 1; } +// Mesa ANV (Intel iGPU, Linux): a draw whose vertex shader reads a storage buffer reads stale data inside a pass unless +// the sampler cache is invalidated first: the half-resolution particle pass drew campfire smoke and clouds as white or +// dark blobs and turned the sky white for single frames (#927). A by-region barrier before such a draw removes it +// (0 of 1460 frames broken against 57 of 779, about 2 fps of 40 on an Iris Xe); a stall alone or the attachment flush +// alone does not. TOTK_ANV_VS_BARRIER=0/1 forces it off or on. +static int anv_vs_barrier(void) { + static int on = -1; + if (on < 0) { + const char *e = cfg_get("TOTK_ANV_VS_BARRIER"); + on = e && *e ? strcmp(e, "0") != 0 : vk_caps.mesa && vk_ctx()->props.vendorID == 0x8086; + rt_log("vk_exec: barrier before vertex-stage storage reads in a pass %s", on ? "on" : "off"); + } + return on; +} + // Pass, shaders, pipeline, fixed state and resources for a draw. 0: the draw is skipped. static int prepare_draw(VkExec *ex, int prim, int32_t count, int restart) { VkExecDraw *D = ex->draw; @@ -3540,6 +3555,8 @@ static int prepare_draw(VkExec *ex, int prim, int32_t count, int restart) { if (bim == 2) bi_census(ex, info, sp, bgt, bgb, bsg, sm_hit); // on counts nothing: it is what gets timed bind_resources(ex, info, bim ? bgt : NULL, bgb); if (fbl & ex->fb_dirty) feedback_barrier(ex); + else if (ex->in_pass && anv_vs_barrier() && gfx_shader_resources(vs, GFX_RES_SSBO, &(const GfxShaderRes *){0})) + feedback_barrier(ex); feedback_written(ex, sp); bind_vertex_buffers(ex); if (vk_dump_armed) vk_dump_draw(ex, sp, p, info); From ab9dcc9bcb86fb46ab094801b56e9aa74419d0a9 Mon Sep 17 00:00:00 2001 From: PC Date: Sun, 22 Nov 2026 23:59:50 +0700 Subject: [PATCH 41/66] =?UTF-8?q?The=20in-game=20menu=20comes=20in=20Vietn?= =?UTF-8?q?amese:=20a=20full=20text=5Fvi=20row=20(every=20menu=20id,=20che?= =?UTF-8?q?cked=20against=20the=20English=20printf=20specifiers),=20a=20Ti?= =?UTF-8?q?=E1=BA=BFng=20Vi=E1=BB=87t=20choice=20on=20the=20Menu=20tab,=20?= =?UTF-8?q?vi=20among=20the=20values=20of=20menu=5Flang,=20and=20the=20Lat?= =?UTF-8?q?in=20Extended=20and=20Vietnamese=20ranges=20in=20the=20menu=20f?= =?UTF-8?q?ont=20atlas,=20which=20Roboto=20already=20covers.=20The=20text?= =?UTF-8?q?=20inside=20the=20performance=20overlay=20and=20the=20DLSS=20mo?= =?UTF-8?q?del=20row=20keep=20their=20English=20names,=20and=20the=20graph?= =?UTF-8?q?ics=20terms=20follow=20common=20Vietnamese=20usage=20(h?= =?UTF-8?q?=E1=BB=8Da=20ti=E1=BA=BFt,=20b=E1=BB=99=20=C4=91=E1=BB=95=20b?= =?UTF-8?q?=C3=B3ng,=20=C4=91=C6=B0=E1=BB=9Dng=20=E1=BB=91ng,=20l=E1=BB=87?= =?UTF-8?q?nh=20v=E1=BA=BD,=20t=E1=BB=87p)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 (cherry picked from commit 408c1badfcdad3d85bf06ab09505a6d2669a2427) --- README.md | 4 +- docs/architecture.md | 3 +- runtime/cfg.c | 2 +- runtime/ov_probe.c | 18 +- runtime/ui/menu.cpp | 20 +- runtime/ui_text.c | 626 ++++++++++++++++++++++++++++++++++++++++++- runtime/ui_text.h | 4 +- totk.ini.example | 4 +- 8 files changed, 653 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index b28043e6..7b1e50e2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - In-game settings menu (F1) and performance overlay (F10) - Play time across runs on the Game tab of the settings menu, kept in `playtime.txt` next to the saves - Discord Rich Presence ("Playing TotK Recomp" with the play time), off by default, own application id supported -- Setup in 12 languages, in-game menu in 11 ([Languages](#languages)) +- Setup in 12 languages, in-game menu in 12 ([Languages](#languages)) - Keyboard, mouse and gamepad with remapping, rumble and gyro - Stereo or 5.1 surround sound output - Xbox and PlayStation button prompts: Xbox's LB, RB, LT, RT, Menu, View and A, B, X, Y, or PlayStation's ○ × △ □, L1, R1, L2, R2, Options and Share, as labelled on the button to press, with either button layout @@ -58,7 +58,7 @@ Chinese Windows gets the Simplified Chinese setup and menu. | Nederlands | ✅ | ✅ | | 日本語 | ✅ | ✅ | | 한국어 | ✅ | ✅ | -| Tiếng Việt | ✅ | English | +| Tiếng Việt | ✅ | ✅ | Spotted a clumsy phrase, or want your language added? The setup texts are in `installer/text/.json`, the menu texts in `runtime/ui_text.c`; open an issue or a pull request ([CONTRIBUTING.md](CONTRIBUTING.md)). Fixes from diff --git a/docs/architecture.md b/docs/architecture.md index b401e25a..d28870dd 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -59,7 +59,8 @@ MacNativeGames cannot run on x86-64 as is: its CPU path executes ARM64 code nati - Settings and menu: every key with its default is in one table (`cfg.c`), read from `totk.ini` and `TOTK_*` variables and written back when the in-game menu changes it. The menu and the performance overlay are Dear ImGui, drawn into the swapchain image (`runtime/ui/`); their text is in `ui_text.c` (English, Russian, Brazilian Portuguese, - Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese, Korean). The Chinese, Japanese and Korean glyphs + Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese, Korean, + Vietnamese). The Chinese, Japanese and Korean glyphs come from a system font (`plat_font_path`) merged into the font atlas. - OS calls the host makes go through `runtime/platform/` (`platform.h`, `win32.c`), so a Linux or macOS host adds one file instead of touching the rest. The split is not finished: `tools/check_platform.py` lists the Win32 uses left in the other files. diff --git a/runtime/cfg.c b/runtime/cfg.c index 71c41051..680afdfa 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -204,7 +204,7 @@ static const CfgMeta metas[] = { {"GAMEPLAY_MAP_ZOOM_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_ROTATION_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_DISTANCE_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_ITEM_SENSITIVITY", "1", "0.25..4", LIVE}, {"GAMEPLAY_WEAPON_WHEEL", "1", "0|1", LIVE}, {"GAMEPLAY_WEAPON_SENSITIVITY", "1", "0.25..4", LIVE}, - {"MENU_LANG", "", "en|ru|pt-BR|zh-Hans|de|fr|es|it|nl|ja|ko", LIVE}, + {"MENU_LANG", "", "en|ru|pt-BR|zh-Hans|de|fr|es|it|nl|ja|ko|vi", LIVE}, // plat_font_path on Linux: 1 asks fontconfig which file draws the language, 0 keeps the fixed distribution // paths. A rebuild of the atlas reads it, so a change shows on the next window size or language switch. {"MENU_FONT_FONTCONFIG", "1", "0|1", LIVE}, diff --git a/runtime/ov_probe.c b/runtime/ov_probe.c index bbf8eb21..9ed14a33 100644 --- a/runtime/ov_probe.c +++ b/runtime/ov_probe.c @@ -1012,23 +1012,25 @@ static void probe_fonts(void) { (unsigned long long)addr, (unsigned long long)size, path); } -// The host catalog (ui_text.c): every menu id has its own English, Russian, Brazilian Portuguese and Simplified -// Chinese text, every menu language's text fits the description pane and keeps the English conversions of the overlay -// formats, the software keyboard keeps its game-language rows, and menu_text follows TOTK_MENU_LANG. +// The host catalog (ui_text.c): every menu id has its own English, Russian, Brazilian Portuguese, Simplified Chinese +// and Vietnamese text, every menu language's text fits the description pane and keeps the English conversions of the +// overlay formats, the software keyboard keeps its game-language rows, and menu_text follows TOTK_MENU_LANG. static void probe_menu_text(void) { static const char *const langs[] = {"en", "ja", "fr", "de", "it", "es", "nl", "pt", "ru", "zh-Hans", "zh-Hant", "ko", - "pt-BR"}; - static const char *const menu_langs[] = {"de", "fr", "es", "it", "nl", "ja", "ko"}; + "pt-BR", "vi"}; + static const char *const menu_langs[] = {"de", "fr", "es", "it", "nl", "ja", "ko", "vi"}; for (int id = UI_MENU_FIRST; id <= UI_MENU_LAST_ID; id++) { CHECK(ui_text_defined("en", (UiTextId)id) && ui_text_defined("ru", (UiTextId)id) && - ui_text_defined("pt-BR", (UiTextId)id), "menu text id %d lacks en, ru or pt-BR", id); + ui_text_defined("pt-BR", (UiTextId)id) && ui_text_defined("vi", (UiTextId)id), + "menu text id %d lacks en, ru, pt-BR or vi", id); CHECK(*ui_text_in("en", (UiTextId)id) && *ui_text_in("ru", (UiTextId)id) && *ui_text_in("pt-BR", (UiTextId)id), "menu text id %d is empty", id); // the description pane keeps the whole text and a note after it (option_rows.cpp desc_set) CHECK(strlen(ui_text_in("en", (UiTextId)id)) + 256 < UI_DESC_BYTES && strlen(ui_text_in("ru", (UiTextId)id)) + 256 < UI_DESC_BYTES && strlen(ui_text_in("pt-BR", (UiTextId)id)) + 256 < UI_DESC_BYTES && - strlen(ui_text_in("zh-Hans", (UiTextId)id)) + 256 < UI_DESC_BYTES, + strlen(ui_text_in("zh-Hans", (UiTextId)id)) + 256 < UI_DESC_BYTES && + strlen(ui_text_in("vi", (UiTextId)id)) + 256 < UI_DESC_BYTES, "menu text id %d is too long for the description pane", id); for (size_t i = 0; i < sizeof menu_langs / sizeof *menu_langs; i++) CHECK(strlen(ui_text_in(menu_langs[i], (UiTextId)id)) + 256 < UI_DESC_BYTES, @@ -1048,7 +1050,7 @@ static void probe_menu_text(void) { CHECK(!strcmp(ui_text_in("ru", UI_SWKBD_OK), "ОК") && !strcmp(ui_text_in("de", UI_SWKBD_CANCEL), "Abbrechen") && !strcmp(ui_text_in("en", UI_SWKBD_OK), "OK"), "keyboard texts changed"); // language names: the same string in every row - for (int id = UI_MENU_LANGNAME_EN; id <= UI_MENU_LANGNAME_ES_419; id++) + for (int id = UI_MENU_LANGNAME_EN; id <= UI_MENU_LANGNAME_VI; id++) for (size_t i = 1; i < sizeof langs / sizeof *langs; i++) CHECK(!strcmp(ui_text_in(langs[i], (UiTextId)id), ui_text_in("en", (UiTextId)id)), "language name %d differs in %s", id, langs[i]); CHECK(!strcmp(ui_text_in("en", UI_MENU_LANGNAME_RU), "Русский"), "Russian is not shown as Russian"); diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 4a7e01a4..3da167f0 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -67,7 +67,7 @@ int playtime_get(uint64_t *total_s, uint64_t *session_s); // playtime.c bool amiibo_check_font_rebuild(void); // ui/amiibo_page.cpp; check and clear font rebuild request } -// Roboto Medium (Apache-2.0, ui/fonts/LICENSE-Roboto.txt) with Latin and Cyrillic glyphs. +// Roboto Medium (Apache-2.0, ui/fonts/LICENSE-Roboto.txt) with Latin, Vietnamese and Cyrillic glyphs. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc23-extensions" // #embed in C++ static const unsigned char roboto_ttf[] = { @@ -276,13 +276,14 @@ static int vk_up(const MenuTarget *t) { return 1; } -// Roboto Medium (Latin with Latin Extended-A for the French oe, Cyrillic, dashes and quotes) at 26 px per 1080 lines, -// with the glyphs of the Japanese, Korean and Chinese language names merged in from a system font when there is one -// (each language is named in its own script). A catalog row also holds menu text (Japanese, Korean, Simplified -// Chinese), so every string of the row goes into the builder: the merged font must cover the whole menu of that -// language, not only its name. Made again when the window height changes; the old texture goes after the queue is idle -// (CreateFontsTexture). -static const ImWchar kRanges[] = {0x0020, 0x017F, 0x0400, 0x052F, 0x2010, 0x2027, 0}; +// Roboto Medium (Latin with Latin Extended-A for the French oe and the Vietnamese letters Latin-1 lacks: +// 0x0100-0x01B0, the combining marks 0x0300-0x0323 and 0x1EA0-0x1EF9; Cyrillic, dashes and quotes) at 26 px per +// 1080 lines, with the glyphs of the Japanese, Korean and Chinese language names merged in from a system font when +// there is one (each language is named in its own script). A catalog row also holds menu text (Japanese, Korean, +// Simplified Chinese), so every string of the row goes into the builder: the merged font must cover the whole menu +// of that language, not only its name. Made again when the window height changes; the old texture goes after the +// queue is idle (CreateFontsTexture). +static const ImWchar kRanges[] = {0x0020, 0x01B0, 0x0300, 0x0323, 0x0400, 0x052F, 0x1EA0, 0x1EF9, 0x2010, 0x2027, 0}; static const struct { const char *lang; UiTextId name; } kCjk[] = { {"ja", UI_MENU_LANGNAME_JA}, {"ko", UI_MENU_LANGNAME_KO}, {"zh-Hans", UI_MENU_LANGNAME_ZH_HANS}, {"zh-Hant", UI_MENU_LANGNAME_ZH_HANT}, @@ -1182,7 +1183,8 @@ static void tab_menu(float scale) { static const UiTextId langs[] = {UI_MENU_MENU_LANG_AUTO, UI_MENU_LANGNAME_EN, UI_MENU_LANGNAME_RU, UI_MENU_LANGNAME_PT_BR, UI_MENU_LANGNAME_ZH_HANS, UI_MENU_LANGNAME_DE, UI_MENU_LANGNAME_FR, UI_MENU_LANGNAME_ES, UI_MENU_LANGNAME_IT, - UI_MENU_LANGNAME_NL, UI_MENU_LANGNAME_JA, UI_MENU_LANGNAME_KO}; + UI_MENU_LANGNAME_NL, UI_MENU_LANGNAME_JA, UI_MENU_LANGNAME_KO, + UI_MENU_LANGNAME_VI}; opt_choice("TOTK_MENU_LANG", UI_MENU_MENU_LANG, langs, sizeof langs / sizeof *langs, UI_MENU_MENU_LANG_DESC); opt_toggle("TOTK_DISCORD_RPC", UI_MENU_DISCORD_RPC, UI_MENU_DISCORD_RPC_DESC); opt_end(); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index ee35cd49..3b6dcea9 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -2,7 +2,7 @@ // string gets an id in ui_text.h and an entry in every language that has one (a missing entry falls back to English). // The software keyboard has every language; the menu has every game language except Portugal's Portuguese and // Traditional Chinese (English, Russian, Brazilian Portuguese, Simplified Chinese, German, French, Spanish, Italian, -// Dutch, Japanese, Korean). +// Dutch, Japanese, Korean), and Vietnamese. #include #include @@ -19,7 +19,7 @@ typedef struct { const char *lang; const char *const *text; } Row; [UI_MENU_LANGNAME_DE] = "Deutsch", [UI_MENU_LANGNAME_IT] = "Italiano", [UI_MENU_LANGNAME_ES] = "Español", \ [UI_MENU_LANGNAME_NL] = "Nederlands", [UI_MENU_LANGNAME_RU] = "Русский", \ [UI_MENU_LANGNAME_ZH_HANS] = "简体中文", [UI_MENU_LANGNAME_ZH_HANT] = "繁體中文", [UI_MENU_LANGNAME_KO] = "한국어", \ - [UI_MENU_LANGNAME_PT_BR] = "Português (Brasil)", [UI_MENU_LANGNAME_EN_GB] = "English (UK)", \ + [UI_MENU_LANGNAME_PT_BR] = "Português (Brasil)", [UI_MENU_LANGNAME_VI] = "Tiếng Việt", [UI_MENU_LANGNAME_EN_GB] = "English (UK)", \ [UI_MENU_LANGNAME_FR_CA] = "Français (Canada)", [UI_MENU_LANGNAME_ES_419] = "Español (Latinoamérica)" // SWKBD: TITLE, PROMPT, DEFAULT_NAME (at most 9 UTF-16 units, no '@' '%' '\'), OK, CANCEL, PAD_HINT. @@ -8755,6 +8755,626 @@ static const char *const text_ko[UI_TEXT_COUNT] = { [UI_MENU_MODS_OVERRIDES_CODE] = "코드 패치 위치 %u곳에서 목록에서 더 아래에 있는 %s의 패치보다 우선합니다.", }; +// Vietnamese: the software keyboard and the whole menu, so the menu and the overlay read Vietnamese when the menu +// language is vi (ui_text.h menu_text). An id without a Vietnamese entry falls back to English. +static const char *const text_vi[UI_TEXT_COUNT] = { + SWKBD("Nhập văn bản", "Nhập một cái tên", "Ngựa", "OK", "Hủy", "Tay cầm: A = OK, B = Hủy"), + + [UI_MENU_TITLE] = "Cài đặt", + [UI_MENU_TAB_SCREEN] = "Màn hình", [UI_MENU_TAB_GAME] = "Trò chơi", [UI_MENU_TAB_MODS] = "Mod", [UI_MENU_TAB_SOUND] = "Âm thanh", + [UI_MENU_TAB_CONTROLS] = "Điều khiển", [UI_MENU_TAB_AMIIBO] = "Amiibo", [UI_MENU_TAB_MENU] = "Menu", [UI_MENU_TAB_ADVANCED] = "Nâng cao", + [UI_MENU_CONTINUE] = "Tiếp tục", [UI_MENU_QUIT] = "Thoát game", + [UI_MENU_ON] = "Bật", [UI_MENU_OFF] = "Tắt", [UI_MENU_AUTO] = "Tự động", [UI_MENU_DEFAULT_MARK] = "mặc định", + [UI_MENU_AFTER_RESTART] = "sau khi khởi động lại", [UI_MENU_SET_BY_ENV] = "đặt bởi biến môi trường", + [UI_MENU_SAVE_FAILED] = "không lưu được cài đặt", + [UI_MENU_VERSION] = "TotK Recomp %s, game %s", + + [UI_MENU_FULLSCREEN] = "Toàn màn hình", [UI_MENU_FULLSCREEN_DESC] = "Game chiếm toàn màn hình; F11 để bật hoặc tắt.", + [UI_MENU_WINDOW_SIZE] = "Kích thước cửa sổ", [UI_MENU_WINDOW_SIZE_DESC] = "Kích thước cửa sổ game khi không ở toàn màn hình.", + [UI_MENU_WINDOW_SIZE_CUSTOM] = "Tùy chỉnh", + [UI_MENU_PRESENT] = "Chế độ hiển thị", [UI_MENU_PRESENT_DESC] = "Cách các khung hình hoàn chỉnh được đưa lên màn hình.", + [UI_MENU_PRESENT_MAILBOX] = "Mailbox", [UI_MENU_PRESENT_VSYNC] = "VSync", [UI_MENU_PRESENT_IMMEDIATE] = "Tức thì", + [UI_MENU_PRESENT_IN_USE] = "đang dùng: %s", + [UI_MENU_GPU] = "Card đồ họa", [UI_MENU_GPU_DESC] = "Thiết bị Vulkan dùng để vẽ game.", + [UI_MENU_GPU_AUTO] = "Tự động", + [UI_MENU_PERF_OVERLAY] = "Giám sát hiệu năng", + [UI_MENU_PERF_OVERLAY_DESC] = "Hiện tốc độ khung hình ở góc trên bên phải. Chế độ Đầy đủ thêm thời gian mỗi khung hình kèm " + "biểu đồ, tải CPU, GPU và bộ nhớ, nhiệt độ và thời gian chờ của luồng kết xuất. F10 đổi " + "chế độ.", + [UI_MENU_PERF_OFF] = "Tắt", [UI_MENU_PERF_FPS] = "FPS", [UI_MENU_PERF_FULL] = "Đầy đủ", + [UI_PERF_LINE_FPS] = "%.0f fps", + [UI_PERF_LINE_FPS_GEN] = "%.0f fps drawn, %.0f shown", + [UI_MENU_GRAPHICS] = "Hình ảnh", + [UI_MENU_OUTPUT_RES] = "Độ phân giải game", + [UI_MENU_OUTPUT_RES_DESC] = "Kích thước game dùng để vẽ hình ảnh và giao diện. Trên 1920 x 1080 game cần nhiều bộ nhớ " + "video và thời gian GPU hơn. Kích thước rộng hơn (21:9) mở rộng tầm nhìn của camera và đưa " + "HUD ra các góc màn hình; kích thước cao hơn (16:10, 3:2) đưa HUD lên mép trên và mép dưới.", + [UI_MENU_HUD_WIDTH] = "Chiều rộng HUD", + [UI_MENU_HUD_WIDTH_DESC] = "Trên màn hình rộng hơn 16:9, khoảng cách giữa bên trái và bên phải của HUD. Toàn màn hình " + "đặt chúng sát mép màn hình; 21:9 hoặc 16:9 giữ HUD trong phần giữa màn hình có tỷ lệ đó. " + "Bố cục còn thiếu sẽ được tạo ở nền và dùng sau khi khởi động lại.", + [UI_MENU_HUD_WIDTH_FULL] = "Toàn màn hình", + [UI_MENU_RENDER_SCALE] = "Tỷ lệ kết xuất 3D", + [UI_MENU_RENDER_SCALE_DESC] = "Kích thước cảnh 3D so với độ phân giải game; FSR của game phóng nó lên kích thước đó. " + "Trên 100 % sẽ làm mịn răng cưa (supersampling) nhưng tốn nhiều GPU.", + [UI_MENU_RENDER_SCALE_GAME] = "Theo game (83 %)", + [UI_MENU_DYNAMIC_RES] = "Độ phân giải động", + [UI_MENU_DYNAMIC_RES_DESC] = "Cho phép game hạ cảnh 3D xuống 90 hoặc 80 %. Game đánh giá theo ước tính dành cho Switch và bỏ qua GPU của bạn, nên cảnh rộng vẫn bị hạ ngay cả trên PC mạnh. Tắt thì giữ nguyên tỷ lệ kết xuất.", + [UI_MENU_UPSCALER] = "Phóng to theo cửa sổ", + [UI_MENU_UPSCALER_DESC] = "Cách phóng hình ảnh khi cửa sổ lớn hơn độ phân giải game. FSR giữ cạnh và chi tiết sắc nét " + "hơn bilinear.", + [UI_MENU_UPSCALER_FSR] = "AMD FSR 1", [UI_MENU_UPSCALER_BILINEAR] = "Bilinear", + [UI_MENU_ASPECT] = "Tỷ lệ hình ảnh", + [UI_MENU_ASPECT_DESC] = "Khi tỷ lệ cửa sổ khác tỷ lệ độ phân giải game (hình 16:9 trên màn 21:9): giữ nguyên tỷ lệ hình " + "với các dải đen, hoặc kéo giãn ra cả cửa sổ.", + [UI_MENU_ASPECT_FIT] = "Dải đen", [UI_MENU_ASPECT_STRETCH] = "Kéo giãn", + [UI_MENU_MOVIE_ASPECT] = "Tỷ lệ video", + [UI_MENU_MOVIE_ASPECT_DESC] = "Khi độ phân giải game không phải 16:9: giữ tỷ lệ gốc của các video cắt cảnh với các dải " + "đen, hoặc kéo giãn ra toàn bộ hình ảnh. Áp dụng từ video kế tiếp.", + [UI_MENU_MOVIE_ASPECT_KEEP] = "Dải đen", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Kéo giãn", + [UI_MENU_FOV] = "Góc nhìn", + [UI_MENU_FOV_DESC] = "Camera cho thấy bao nhiêu thế giới, tính theo phần trăm của game gốc. Game phiên bản 1.1.0, 1.2.1 và 1.4.3.", + [UI_MENU_SHADOW_RES] = "Kích thước bản đồ bóng", + [UI_MENU_SHADOW_RES_DESC] = "Kích thước bản đồ bóng của mặt trời. Kích thước của game đổi theo tầm nhìn, xuống còn khoảng " + "400 khi gần mặt đất, nên bóng lá trông bị vỡ ô và nhảy; kích thước cố định giữ chúng đứng " + "yên và sắc nét hơn. Trên 1024 bóng tốn thêm thời gian GPU và bộ nhớ video; 256 thô hơn của " + "game và dành cho GPU tích hợp thiếu băng thông bộ nhớ.", + [UI_MENU_SHADOW_RES_GAME] = "Theo game (thay đổi)", + [UI_MENU_ANISO] = "Lọc họa tiết", + [UI_MENU_ANISO_DESC] = "Lọc dị hướng cho họa tiết bề mặt: nền đất, đường và tường nhìn ở góc thấp vẫn sắc nét ở xa thay vì bị nhòe. Theo game: mức game yêu cầu, như trên Switch.", + [UI_MENU_ANISO_GAME] = "Theo game", + [UI_MENU_LOD_STEADY] = "Giữ chi tiết ổn định khi tải nặng", + [UI_MENU_LOD_STEADY_DESC] = "Bỏ qua cơ chế của game hạ chi tiết mô hình và họa tiết khi tốc độ khung hình tụt, giống mod giả lập Disable LOD Quality Reduction. Game phiên bản 1.2.1 và 1.4.3. Nên tắt trên PC yếu: ở đó việc hạ này giữ tốc độ khung hình.", + [UI_MENU_SHARPNESS] = "Độ sắc nét FSR", + [UI_MENU_SHARPNESS_DESC] = "Làm nét sau khi FSR phóng to; 0 là tắt.", + [UI_MENU_COLOR] = "Màu sắc", + [UI_MENU_COLOR_PRESET] = "Hồ sơ màu", + [UI_MENU_COLOR_PRESET_DESC] = "Đặt bốn giá trị bên dưới. Sống động: tương phản và độ bão hòa cao hơn, vùng tối được mở " + "nhẹ (dành cho màn hình OLED). Rõ nét: tăng nhẹ tương phản, độ bão hòa và độ sáng. Kéo " + "một giá trị sẽ chuyển hồ sơ sang Tùy chỉnh. HUD đổi theo hình ảnh; menu này thì không.", + [UI_MENU_COLOR_DEFAULT] = "Của game", [UI_MENU_COLOR_VIVID] = "Sống động (OLED)", [UI_MENU_COLOR_CLARITY] = "Rõ nét", + [UI_MENU_COLOR_CUSTOM] = "Tùy chỉnh", + [UI_MENU_COLOR_BRIGHTNESS] = "Độ sáng", [UI_MENU_COLOR_BRIGHTNESS_DESC] = "Cộng vào mọi màu; 0 là giữ nguyên.", + [UI_MENU_COLOR_CONTRAST] = "Độ tương phản", + [UI_MENU_COLOR_CONTRAST_DESC] = "Đẩy màu ra xa xám trung bình (trên 100 %) hoặc kéo lại gần; 100 % là giữ nguyên.", + [UI_MENU_COLOR_SATURATION] = "Độ bão hòa", + [UI_MENU_COLOR_SATURATION_DESC] = "Độ đậm của màu so với xám; 100 % là giữ nguyên.", + [UI_MENU_COLOR_GAMMA] = "Gamma", + [UI_MENU_COLOR_GAMMA_DESC] = "Dưới 1 làm sáng vùng tối và vùng giữa, trên 1 làm tối chúng; 1 là giữ nguyên.", + [UI_MENU_HDR_GROUP] = "HDR", + [UI_MENU_HDR] = "Xuất HDR", + [UI_MENU_HDR_DESC] = "Vùng sáng chói trên màn hình HDR. Cần bật HDR trong Windows (\"Use HDR\") hoặc trong compositor " + "Wayland có quản lý màu; nếu không hình ảnh vẫn là SDR. Áp dụng sau khi khởi động lại. Hồ sơ màu " + "ở trên dành cho SDR và không được dùng trong HDR.", + [UI_MENU_HDR_PEAK] = "Độ sáng đỉnh", + [UI_MENU_HDR_PEAK_DESC] = "Độ sáng đỉnh của màn hình bạn tính bằng nit; các vùng sáng nhất dừng ở đó.", + [UI_MENU_HDR_GAME] = "Độ sáng game", + [UI_MENU_HDR_GAME_DESC] = "Nit của màu trắng trong hình (paper white). 203 là chuẩn tham chiếu HDR; hãy tăng lên trong " + "phòng sáng.", + [UI_MENU_HDR_UI] = "Độ sáng HUD và menu", + [UI_MENU_HDR_UI_DESC] = "Nit của màu trắng trong HUD và menu này.", + [UI_MENU_HDR_HUE] = "Hiệu chỉnh sắc độ vùng sáng", + [UI_MENU_HDR_HUE_DESC] = "Màu sáng như lửa và tia lửa chuyển dần sang trắng như trong hình SDR của game, khớp với ánh sáng " + "chúng phát ra; 0 giữ chúng bão hòa hoàn toàn.", + [UI_MENU_SHADOW_SCALE] = "Độ phân giải bóng", + [UI_MENU_SHADOW_SCALE_DESC] = "Vẽ bản đồ bóng mặt trời lớn hơn mức 960x960 của game theo số lần này ở mỗi cạnh: cạnh bóng " + "và bóng lá sắc nét hơn. Có hiệu lực từ lần khởi động kế tiếp.", + [UI_MENU_PCSS] = "Bóng mềm", + [UI_MENU_PCSS_DESC] = "Bóng mặt trời sắc nét ở chỗ vật thể chạm đất và mềm dần theo độ xa của bóng (PCSS). 0 giữ bộ lọc " + "của game. Có hiệu lực từ lần khởi động kế tiếp.", + [UI_MENU_CONTACT_SHADOWS] = "Bóng tiếp xúc", + [UI_MENU_CONTACT_SHADOWS_DESC] = "Các bóng mặt trời nhỏ mà bản đồ bóng bỏ sót: ở chân, dưới đá, trong cỏ và các khe. " + "Được dò trên màn hình sau khi chiếu sáng. Có hiệu lực từ lần khởi động kế tiếp.", + [UI_MENU_SHADOW_RANGE] = "Tầm cascade bóng", + [UI_MENU_SHADOW_RANGE_DESC] = "Dời các bậc mà bóng chuyển sang mềm hơn (20, 40, 80 và 160 m của game) ra xa hơn. Bản đồ " + "bóng trải trên vùng đất rộng hơn: hãy tăng Độ phân giải bóng cùng lúc. Có hiệu lực từ " + "lần khởi động kế tiếp.", + [UI_MENU_GRASS_RANGE] = "Tầm cỏ", + [UI_MENU_GRASS_RANGE_DESC] = "Cỏ mọc xa đến đâu quanh camera (của game: 62,5 m). Cao hơn thì cỏ ở đồng cỏ xa vẫn còn thay " + "vì chỉ mọc ngay trước mặt bạn; thấp hơn thì vẽ ít cỏ hơn. Có hiệu lực từ lần khởi động kế " + "tiếp.", + [UI_MENU_DLSS_PRESET] = "DLSS model", + [UI_MENU_DLSS_PRESET_DESC] = "Model DLSS nào được chạy. Tự động theo khuyến nghị của NVIDIA cho từng chế độ: K cho DLAA, " + "Chất lượng và Cân bằng, M cho Hiệu năng, L cho Siêu hiệu năng. J: bớt bóng mờ phía sau " + "nhân vật di chuyển, nhấp nháy nhiều hơn một chút. K: model sắc nét nhất ở mọi chế độ. Áp " + "dụng ngay.", + [UI_MENU_DLSS_PRESET_DEFAULT] = "Automatic", [UI_MENU_DLSS_PRESET_K] = "K (sharpest)", + [UI_MENU_DLSS_PRESET_J] = "J (less ghosting)", + [UI_MENU_DLSS_CHARS] = "Vệt mờ nhân vật DLSS", + [UI_MENU_DLSS_CHARS_DESC] = "Giảm các vệt mờ nhạt phía sau nhân vật, động vật đang di chuyển và vật chúng cầm: DLSS lấy " + "ít hơn từ các khung hình trước ở đó. Mạnh hơn xóa được nhiều vệt hơn nhưng làm các cạnh đó " + "kém mịn hơn một chút. Áp dụng ngay.", + [UI_MENU_DLSS_CHARS_OFF] = "Tắt", [UI_MENU_DLSS_CHARS_LIGHT] = "Nhẹ", [UI_MENU_DLSS_CHARS_MEDIUM] = "Vừa", + [UI_MENU_DLSS_CHARS_FULL] = "Tối đa", + [UI_MENU_DLSS] = "Chế độ phóng to", + [UI_MENU_DLSS_DESC] = "Gốc: khử răng cưa cảnh 3D ở độ phân giải đầy đủ. Chất lượng, Cân bằng, Hiệu năng và Siêu hiệu năng " + "vẽ cảnh ở 67, 58, 50 và 33 % rồi để bộ phóng to (DLSS hoặc FSR 3.1) phóng lên, giúp tiết kiệm " + "thời gian GPU; chúng thay thế Tỷ lệ kết xuất 3D. Có hiệu lực ngay.", + [UI_MENU_DLSS_DLAA] = "Gốc", [UI_MENU_DLSS_QUALITY] = "Chất lượng", [UI_MENU_DLSS_BALANCED] = "Cân bằng", + [UI_MENU_DLSS_PERFORMANCE] = "Hiệu năng", [UI_MENU_DLSS_ULTRA] = "Siêu hiệu năng", + [UI_MENU_FXAA] = "Khử răng cưa của game (FXAA)", + [UI_MENU_FXAA_DESC] = "FXAA làm mịn cạnh của chính game. Nó làm nhòe chi tiết nhỏ một chút; khi bật DLAA thì không cần.", + [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", + [UI_MENU_REFLEX_DESC] = "Giảm độ trễ hệ thống trên GPU NVIDIA bằng VK_NV_low_latency2. Bật + Boost giữ xung GPU cao trong các cảnh bị CPU giới hạn.", + [UI_MENU_REFLEX_OFF] = "Tắt", + [UI_MENU_REFLEX_ON] = "Bật", + [UI_MENU_REFLEX_BOOST] = "Bật + Boost", + [UI_MENU_SCENE_UPSCALER] = "Bộ phóng to cảnh 3D", + [UI_MENU_SCENE_UPSCALER_DESC] = "Bộ phóng to theo thời gian cho cảnh 3D: cạnh mịn hơn và ít nhấp nháy hơn, và ở chế độ " + "thấp hơn Gốc nó vẽ cảnh nhỏ hơn rồi phóng lên, giúp tiết kiệm thời gian GPU. NVIDIA " + "DLSS cần GPU NVIDIA RTX và " DLSS_FILE " cạnh " EXE_FILE "; AMD FSR 3.1 chạy trên mọi " + "GPU. Tắt thì giữ cách phóng to và FXAA của chính game. HUD không bị ảnh hưởng; bộ phóng " + "to và độ sắc nét ở trên vẫn đưa hình game vừa với cửa sổ. Có hiệu lực sau khi khởi động " + "lại.", + [UI_MENU_SCENE_UPSCALER_OFF] = "Tắt", [UI_MENU_SCENE_UPSCALER_DLSS] = "NVIDIA DLSS", + [UI_MENU_SCENE_UPSCALER_FSR3] = "AMD FSR 3.1", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU] = "DLSS: cần GPU NVIDIA RTX", + [UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL] = "DLSS: thiếu " DLSS_FILE, + [UI_MENU_FSR3_SHARPNESS] = "Độ sắc nét FSR 3.1", + [UI_MENU_FSR3_SHARPNESS_DESC] = "Làm nét cảnh 3D sau FSR 3.1; 0 là tắt.", + + [UI_MENU_FPS_LIMIT] = "Giới hạn tốc độ khung hình", + [UI_MENU_FPS_LIMIT_DESC] = "Số khung hình tối đa mỗi giây game vẽ. Trên 60 là thử nghiệm và cần bật Tốc độ game theo " + "đồng hồ.", + [UI_MENU_FPS_30] = "30 FPS", [UI_MENU_FPS_40] = "40 FPS", [UI_MENU_FPS_45] = "45 FPS", + [UI_MENU_FPS_60] = "60 FPS", [UI_MENU_FPS_90] = "90 FPS", [UI_MENU_FPS_120] = "120 FPS", [UI_MENU_FPS_144] = "144 FPS", + [UI_MENU_FPS_DISPLAY] = "Theo màn hình", [UI_MENU_FPS_DISPLAY_HZ] = "Theo màn hình (%.0f Hz)", + [UI_MENU_FRAME_QUEUE] = "Hàng đợi khung hình", + [UI_MENU_FRAME_QUEUE_DESC] = "Game bắt đầu một khung hình trong lúc khung trước đang chờ đến lượt lên màn hình: ít rớt " + "khung hơn hẳn ở mức giới hạn, đổi lại trễ điều khiển thêm tối đa một khung hình. Áp dụng ngay.", + [UI_MENU_FRAME_GEN] = "Tạo khung hình", [UI_MENU_FRAME_GEN_OFF] = "Tắt", [UI_MENU_FRAME_GEN_FSR3] = "AMD FSR 3", + [UI_MENU_FRAME_GEN_DESC] = "Một hình được tạo ra giữa mỗi hai hình game vẽ: số hình trên màn hình gấp đôi, game chạy ở " + "một nửa giới hạn khung hình và điều khiển trễ thêm khoảng nửa khung hình. Dành cho màn hình " + "từ 120 Hz trở lên. Không dùng cùng DLSS hoặc HDR. Áp dụng ngay.", + [UI_MENU_REALTIME] = "Tốc độ game theo đồng hồ", + [UI_MENU_REALTIME_DESC] = "Chạy game theo thời gian thực, để một khung hình chậm không làm game chậm theo.", + [UI_MENU_CLOTH_REALTIME] = "Vải theo đồng hồ", + [UI_MENU_CLOTH_REALTIME_DESC] = "Chạy cả vải và tóc theo thời gian thực.", + [UI_MENU_HIGHFPS_FIX] = "Sửa lỗi tốc độ khung hình cao", + [UI_MENU_HIGHFPS_FIX_DESC] = "Sửa vật lý hoạt động sai trên 30 khung hình mỗi giây, và các vật thể vẫn trong suốt hoặc vô hình trên 60.", + [UI_MENU_CLIMB_FIX] = "Sửa tốc độ leo trèo", + [UI_MENU_CLIMB_FIX_DESC] = "Giữ tốc độ leo tường và thang đầy đủ trên 60 khung hình mỗi giây, để Link lên được tới đỉnh.", + [UI_MENU_GAME_LANG] = "Ngôn ngữ game", [UI_MENU_GAME_LANG_DESC] = "Ngôn ngữ của văn bản và giọng nói trong game.", + [UI_MENU_GAME_LANG_AUTO] = "Tự động", + [UI_MENU_OPERATION_MODE] = "Chế độ máy", + [UI_MENU_OPERATION_MODE_DESC] = "Game nghĩ nó đang chạy ở chế độ cắm đế hay cầm tay.", + [UI_MENU_MODE_DOCKED] = "Cắm đế", [UI_MENU_MODE_HANDHELD] = "Cầm tay", + [UI_MENU_ASSUME_FOCUS] = "Tiếp tục chạy khi mất focus", + [UI_MENU_ASSUME_FOCUS_DESC] = "Bật (mặc định): game vẫn chạy khi bạn ở cửa sổ khác, và bàn phím im lặng cho đến khi cửa " + "sổ game lên trước lại. Tắt: game tạm dừng khi cửa sổ mất focus, như trên Switch khi nhấn " + "Home; lần tải bị ngắt theo cách đó có thể dừng hẳn.", + + [UI_MENU_PLAY_TIME] = "Thời gian chơi", + [UI_MENU_PLAY_TIME_DESC] = "Thời gian trong game qua mọi lần chạy, chỉ tính khi cửa sổ game có focus và game đang vẽ " + "khung hình. Lưu trong playtime.txt ở thư mục hồ sơ, cạnh các tệp save.", + [UI_MENU_PLAY_TIME_HM] = "%llu giờ %02u phút", [UI_MENU_PLAY_TIME_SESSION] = "lần chạy này: %s", + [UI_MENU_MODS_BUILTIN] = "Tích hợp sẵn trong bản port", [UI_MENU_MODS_INSTALLED] = "Mod đã cài", + [UI_MENU_MODS_NONE] = "Chưa có mod nào. Giải nén mod vào thư mục mods, mỗi mod một thư mục chứa thư mục romfs bên trong, " + "rồi khởi động lại game. TKMM cũng có thể xuất các mod đã gộp vào một thư mục ở đó.", + [UI_MENU_MODS_OPEN] = "Mở thư mục mod", + [UI_MENU_MODS_OPEN_DESC] = "Hiện thư mục game tải mod từ đó. Nếu chưa có, thư mục sẽ được tạo.", + [UI_MENU_MODS_ROW_DESC] = "Tệp game nó thay thế: %u. Tệp mới nó thêm vào: %u.", + [UI_MENU_MODS_OVERRIDDEN] = "%u tệp của nó lấy từ %s, mod cao hơn trong danh sách.", + [UI_MENU_MODS_MOVE_HINT] = "Nút mặt trên hoặc Ctrl+Lên đẩy nó lên, nút mặt trái hoặc Ctrl+Xuống đẩy nó xuống. Khi hai mod " + "đổi cùng một tệp, dữ liệu game hay mã, mod cao hơn thắng. Thay đổi áp dụng sau khi khởi " + "động lại.", + [UI_MENU_MODS_EMPTY] = "Thư mục này không có tệp romfs, exefs hoặc cheats.", + [UI_MENU_MODS_SUBSDK] = "Mod này mang theo mã game riêng (plugin subsdk hoặc main bị thay). Bản port không tải được " + "module mã, nên cả mod vẫn tắt. Công tắc \"Dùng ... không kèm mã\" bên dưới sẽ dùng phần còn lại.", + [UI_MENU_MODS_EXEFS_LATER] = "Mod này vá mã game (exefs). Game sẽ tích hợp các bản vá khi khởi động lần sau (dựng lại vài " + "phút); đến lúc đó cả mod vẫn tắt.", + [UI_MENU_MODS_CHEATS] = "Cheat: %d. Bật chúng ở tab Cheat.", + [UI_MENU_MODS_CHEATS_FILE] = "Cheat cho phiên bản game này được đọc khi khởi động từ cheats\\%s trong mod này.", + [UI_MENU_MODS_BAD_NAME] = "Tên thư mục chứa ký tự |, mà danh sách mod dùng để ngăn cách các tên. Hãy đổi tên thư mục.", + [UI_MENU_MODS_OTHER_VERSION] = "%u tệp của nó mang phiên bản game khác trong tên. Game chỉ đọc chúng khi có gì đó yêu cầu " + "đúng các tên ấy. Nếu mod không có tác dụng, hãy tìm bản của nó dành cho phiên bản game " + "của bạn.", + [UI_MENU_MODS_UNUSED] = "không dùng", + [UI_MENU_MODS_FPS60] = "Bản vá 60 FPS", + [UI_MENU_MODS_FPS60_DESC] = "Bản vá riêng của bản port cho 60 khung hình mỗi giây. Đặt cùng Giới hạn tốc độ khung hình ở " + "tab Trò chơi.", + [UI_MENU_MODS_RES] = "Bản vá độ phân giải", + [UI_MENU_MODS_RES_DESC] = "Bản vá riêng của bản port cho độ phân giải trên 1080p. Đặt cùng Độ phân giải game ở tab Màn hình.", + [UI_MENU_MODS_QUICKMENU] = "Sửa menu nhanh", + [UI_MENU_MODS_QUICKMENU_DESC] = "Bản sửa của bản port cho nền đen của các menu vũ khí, khiên và nguyên liệu ở 60 FPS.", + + [UI_MENU_VOLUME] = "Âm lượng", [UI_MENU_VOLUME_DESC] = "Âm lượng tổng của game.", + [UI_MENU_VOLUME_MUSIC] = "Âm lượng nhạc", [UI_MENU_VOLUME_MUSIC_DESC] = "Âm lượng nhạc nền.", + [UI_MENU_VOLUME_SFX] = "Âm lượng hiệu ứng", [UI_MENU_VOLUME_SFX_DESC] = "Âm lượng hiệu ứng âm thanh.", + [UI_MENU_VOLUME_VOICE] = "Âm lượng giọng nói", [UI_MENU_VOLUME_VOICE_DESC] = "Âm lượng giọng nói nhân vật.", + [UI_MENU_AUDIO_CHANNELS] = "Loa", + [UI_MENU_AUDIO_CHANNELS_DESC] = "Đầu ra stereo hoặc surround 5.1. Tự động chọn 5.1 khi cấu hình loa của Windows có từ sáu " + "kênh trở lên. Áp dụng sau khi khởi động lại.", + [UI_MENU_CHANNELS_AUTO] = "Tự động", [UI_MENU_CHANNELS_STEREO] = "Stereo", [UI_MENU_CHANNELS_51] = "Surround 5.1", + [UI_MENU_AUDIO_DEVICE] = "Thiết bị đầu ra", + [UI_MENU_AUDIO_DEVICE_DESC] = "Nơi phát âm thanh. Mặc định hệ thống theo thiết bị mặc định của Windows. Thiết bị đã chọn " + "mà bị rút ra sẽ quay về mặc định hệ thống cho đến khi nó trở lại. Áp dụng ngay.", + [UI_MENU_AUDIO_DEVICE_DEFAULT] = "Mặc định hệ thống", + + [UI_MENU_MOTION] = "Điều khiển chuyển động", [UI_MENU_MOTION_DESC] = "Ngắm bằng con quay hồi chuyển của tay cầm.", + [UI_MENU_GYRO_CALIBRATION] = "Hiệu chỉnh độ lệch con quay", + [UI_MENU_GYRO_CALIBRATION_DESC] = "Trừ độ trôi lúc nghỉ của tay cầm, đo bằng dòng hiệu chỉnh bên dưới. Các giá trị đã đo " + "vẫn được lưu khi tắt mục này.", + [UI_MENU_GYRO_CALIBRATE] = "Hiệu chỉnh con quay", + [UI_MENU_GYRO_CALIBRATE_DESC] = "Đo độ trôi lúc nghỉ của con quay và loại bỏ nó. Đặt tay cầm xuống hoặc giữ yên trong hai " + "giây.", + [UI_MENU_GYRO_CALIBRATE_WAIT] = "Đang hiệu chỉnh...", + [UI_MENU_GYRO_CALIBRATED] = "%s, đã hiệu chỉnh", + [UI_MENU_GYRO_CALIBRATE_FAILED] = "Hiệu chỉnh thất bại", + [UI_MENU_GYRO_CALIBRATE_MOVED] = "Tay cầm đã di chuyển: hãy giữ yên và thử lại", + [UI_MENU_GYRO_AUTO_BIAS] = "Tự học độ trôi con quay khi nghỉ", + [UI_MENU_GYRO_AUTO_BIAS_DESC] = "Học độ trôi còn lại trong con quay mỗi khi tay cầm nằm yên trên bàn, rồi trừ nó đi. Dành " + "cho cú ngắm cung từ từ trượt dù đã hiệu chỉnh. Tay cầm đang cầm trên tay thì không được " + "học. Thử nghiệm.", + [UI_MENU_RUMBLE_STRENGTH] = "Cường độ rung", + [UI_MENU_RUMBLE_STRENGTH_DESC] = "Tay cầm rung mạnh đến mức nào.", + [UI_MENU_RUMBLE_CURVE] = "Đường cong rung", + [UI_MENU_RUMBLE_CURVE_DESC] = "Giá trị thấp hơn làm rung yếu mạnh lên.", + [UI_MENU_RUMBLE_TRIGGERS] = "Rung cò (Xbox)", + [UI_MENU_RUMBLE_TRIGGERS_DESC] = "Rung cả các cò của tay cầm Xbox.", + [UI_MENU_PAD_LAYOUT] = "Bố cục nút", + [UI_MENU_PAD_LAYOUT_DESC] = "Nút nào là A. Nintendo: nút bên phải, như trên Switch. Xbox: nút phía dưới, như ghi trên tay " + "cầm Xbox (dấu X trên tay cầm PlayStation). Tự động chọn Nintendo cho tay cầm có nhãn " + "Nintendo và Xbox cho các tay cầm khác. Biểu tượng tay cầm nào hiện trong game được đặt ở " + "Biểu tượng nút.", + [UI_MENU_PAD_LAYOUT_AUTO] = "Tự động", [UI_MENU_PAD_LAYOUT_NINTENDO] = "Nintendo (A bên phải)", + [UI_MENU_PAD_LAYOUT_XBOX] = "Xbox (A phía dưới)", + [UI_MENU_PAD_LAYOUT_IN_USE] = "đang dùng: %s", + [UI_MENU_PROMPTS] = "Biểu tượng nút", + [UI_MENU_PROMPTS_DESC] = "Biểu tượng nút của tay cầm nào hiện trong game. Nintendo: của chính game. Xbox: LB, RB, LT, RT, " + "Menu, View và chữ thập, cùng A, B, X, Y như ghi trên nút mà bố cục ở trên nhấn (với Nintendo " + "(A bên phải), nút bên phải mang nhãn B, nên biểu tượng cho A hiện B). PlayStation: các hình " + "trên tay cầm PlayStation (○ × △ □, L1, R1, L2, R2, Options và Share), trên nút mà bố cục ở " + "trên nhấn. PC: các phím và nút chuột của bố cục bàn phím mặc định (E, Shift, Space, nhấp " + "trái...) và chuột cho camera. Game đọc biểu tượng khi khởi động, nên chúng đổi sau khi khởi " + "động lại. Chúng nằm trong tệp của game, nên nút bạn gán lại trong Điều khiển vẫn giữ biểu " + "tượng cũ trên màn hình.", + [UI_MENU_PROMPTS_NINTENDO] = "Nintendo", [UI_MENU_PROMPTS_XBOX] = "Xbox", + [UI_MENU_PROMPTS_PLAYSTATION] = "PlayStation", [UI_MENU_PROMPTS_PC] = "PC", + [UI_MENU_PROMPTS_MISSING] = "thiếu tệp biểu tượng: hãy chạy lại trình cài đặt", + [UI_MENU_PROMPTS_FAILED] = "tệp biểu tượng bị hỏng: hãy chạy lại trình cài đặt", + [UI_MENU_PROMPTS_RESTART] = "biểu tượng đổi sau khi khởi động lại", + [UI_MENU_PROMPTS_OFF_SHAPE] = "tắt ở độ phân giải game này (chưa có bố cục cho nó)", + [UI_MENU_OUTPUT_RES_NO_LAYOUT] = "chưa có bố cục cho tỷ lệ này: hãy chạy lại trình cài đặt", + [UI_MENU_OUTPUT_RES_PREPARING] = "bố cục đang được tạo ở nền; dùng từ lần khởi động kế tiếp", + [UI_MENU_PROMPTS_PREPARING] = "tệp biểu tượng đang được tạo ở nền; dùng từ lần khởi động kế tiếp", + [UI_MENU_PREPARE_RETRY] = "Thử lại", + [UI_MENU_PREPARE_RETRY_DESC] = "Chạy lại các công cụ của trình cài đặt để tạo ở nền các tệp bố cục giao diện hoặc biểu tượng nút còn thiếu. Game vẫn chạy; nó dùng chúng từ lần khởi động kế tiếp.", + [UI_MENU_SHAPE_PREPARE_FAILED] = "các công cụ của trình cài đặt không khởi chạy: hãy chạy lại trình cài đặt", + [UI_MENU_PROMPTS_OFF_MODS] = "tắt: một mod RomFS thay các tệp của chúng", + [UI_MENU_PROMPTS_OFF_PATCHES] = "tắt khi TOTK_ROMFS_PATCHES được đặt", + [UI_MENU_RESTART] = "Khởi động lại ngay", + [UI_MENU_RESTART_DESC] = "Đóng game và chạy lại với biểu tượng mới. Tiến trình từ lần lưu gần nhất sẽ mất.", + [UI_MENU_RESTART_CONFIRM] = "Khởi động lại game ngay? Tiến trình từ lần lưu gần nhất sẽ mất.", + [UI_MENU_RESTART_YES] = "Khởi động lại", + [UI_MENU_RESTART_SAVING] = "Game đang lưu: sẽ khởi động lại được sau giây lát.", + [UI_MENU_GROUP_STICKS] = "Cần analog", + [UI_MENU_LSTICK_DEADZONE] = "Vùng chết cần trái", [UI_MENU_RSTICK_DEADZONE] = "Vùng chết cần phải", + [UI_MENU_STICK_DEADZONE_DESC] = "Cần của tay cầm phải nghiêng bao xa thì game mới nhận. Hãy tăng nếu nhân vật hoặc camera tự di chuyển: thả cần ra, đọc \"cần lúc này\" và đặt vùng chết cao hơn vài phần trăm.", + [UI_MENU_STICK_DEADZONE_NOW] = "cần lúc này: %.0f %%", + [UI_MENU_MOUSE_MODE] = "Camera chuột", + [UI_MENU_MOUSE_MODE_DESC] = "Trực tiếp: camera xoay theo quãng chuột di chuyển, như game PC, không có vùng chết hay đường cong của cần (game 1.4.3 và 1.2.1; 1.1.0 dùng giả lập cần). Giả lập cần: chuột đóng vai cần phải.", + [UI_MENU_MOUSE_STICK] = "Giả lập cần", + [UI_MENU_MOUSE_DIRECT] = "Trực tiếp", + [UI_MENU_MENU_CURSOR] = "Chuột trong menu của game", + [UI_MENU_MENU_CURSOR_DESC] = "Trong menu riêng của game (tiêu đề, túi đồ, cửa hàng, lựa chọn hội thoại) con trỏ hiện ra: mục dưới nó được chọn, nhấp trái để xác nhận, nhấp phải để quay lại. Chỉ khi chuột hoặc phím được dùng gần nhất, nên tay cầm thấy menu không đổi (game 1.4.3).", + [UI_MENU_MAP_CLICK] = "Nhấp trái trên bản đồ", + [UI_MENU_MAP_CLICK_DESC] = "Trên bản đồ của Purah Pad, nút chuột trái nhấn A tại con trỏ bản đồ thay cho nút nó được gán (mặc định là Y). Cần bật Chuột trong menu của game (game 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Nhấp chuột trong hội thoại", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Khi hộp hội thoại đang mở, nhấp trái nhấn B (tiếp tục văn bản và bỏ qua cuộn chữ) và nhấp phải nhấn A, thay cho các nút chúng được gán (mặc định là Y, mở nhật ký hội thoại, và ZL). Lựa chọn hội thoại giữ con trỏ: nhấp trái để chọn (game 1.4.3).", + [UI_MENU_POINTER_IMAGE] = "Con trỏ game", + [UI_MENU_POINTER_IMAGE_DESC] = "Khi con trỏ không bị bắt (menu của game, menu này, sau khi nhấn Esc), cửa sổ hiện một mũi tên vàng riêng thay cho mũi tên hệ thống, cỡ theo tỷ lệ màn hình.", + [UI_MENU_QUICKSAVE] = "Lưu nhanh và tải nhanh", + [UI_MENU_QUICKSAVE_DESC] = "Một phím lưu game ngay và một phím khác tải bản lưu đó (hai dòng bên dưới: mặc định F6 và F7, như Half-Life), không hiện menu trên màn hình. Chỉ phím bàn phím và nút chuột, chỉ game 1.4.3. Lưu nhanh nhờ game tạo một bản lưu tự động của chính nó, nên nó thay bản lưu tự động cũ nhất (bản lưu thủ công vẫn giữ), giữ một bản sao làm bản lưu nhanh (thư mục quicksave của hồ sơ) và hiện \"Đã lưu game\" ở đầu hình. Tải nhanh giữ hình ở dòng \"Đang tải bản lưu nhanh\" trong lúc nó đi qua danh sách tải của game khuất tầm nhìn, rồi game tải bản lưu nhanh (khoảng 5 giây). Ở chỗ game không tự tạo bản lưu tự động (cảnh cắt, hội thoại), sẽ không lưu gì và dòng chữ cho biết điều đó.", + [UI_MENU_QUICKSAVE_KEY] = "Phím lưu nhanh", + [UI_MENU_QUICKLOAD_KEY] = "Phím tải nhanh", + [UI_MENU_QUICKSAVE_KEY_DESC] = "Phím bắt đầu lưu nhanh hoặc tải nhanh; mặc định F6 và F7, như Half-Life. Chọn ô rồi nhấn phím hoặc nút chuột bất kỳ; Delete để ô đó không có phím. Khi lưu nhanh đang bật, hai phím này không làm gì khác (có ghi chú khi một phím gán cũng dùng phím đó). totk.ini nhận mọi tên phím của phần gán phím (quicksave_key, quickload_key).", + [UI_QS_SAVED] = "Đã lưu game", + [UI_QS_LOADING] = "Đang tải bản lưu nhanh", + [UI_QS_NOT_NOW] = "Hiện chưa thể lưu nhanh", + [UI_QS_NONE] = "Chưa có bản lưu nhanh (phím lưu nhanh sẽ tạo một bản)", + [UI_QS_FAILED] = "Lưu nhanh thất bại: xem totk.log", + [UI_QS_LOAD_FAILED] = "Tải nhanh thất bại: xem totk.log", + [UI_MENU_MOUSE_SENS] = "Độ nhạy camera chuột", + [UI_MENU_MOUSE_SENS_DESC] = "Chuột xoay camera nhanh đến đâu.", + [UI_MENU_WALK_KEY] = "Phím đi bộ", + [UI_MENU_WALK_KEY_DESC] = "Giữ nó để nghiêng các cần của bàn phím một phần, để bàn phím đi bộ thay vì chạy. Tỷ lệ đi bộ " + "đặt độ nghiêng. Tay cầm và chuột không bị ảnh hưởng.", + [UI_MENU_WALK_KEY_TAKEN] = "cũng là %s", + [UI_MENU_WALK_SCALE] = "Tỷ lệ đi bộ", + [UI_MENU_WALK_SCALE_DESC] = "Độ nghiêng của các cần bàn phím khi giữ phím đi bộ. Một nửa là đi bộ, nghiêng hết là chạy.", + [UI_MENU_FREECAM] = "Camera tự do", + [UI_MENU_FREECAM_DESC] = "Cho phép một tổ hợp hoặc một phím bên dưới tách góc nhìn khỏi Link và bay đi. Mặc định tắt: khi " + "tắt, mã camera của game chạy nguyên bản. Có hiệu lực sau khi khởi động lại. Game phiên bản 1.4.3.", + [UI_MENU_FREECAM_OFF_NOTE] = "Hãy bật Camera tự do ở trên rồi khởi động lại", + [UI_MENU_FREECAM_PAD] = "Tổ hợp camera tự do", + [UI_MENU_FREECAM_PAD_DESC] = "Các nút tay cầm nhấn cùng lúc để chuyển góc nhìn qua ba giai đoạn: rời Link và bay, đứng yên " + "tại chỗ vừa để trong khi Link chơi tiếp, và quay lại. Khi đang bay game không nhận điều khiển: cần trái bay theo " + "hướng nhìn và sang ngang, các cò lên và xuống, cần phải xoay, và mỗi lần nhấn L hoặc R giảm một nửa hoặc tăng gấp " + "đôi tốc độ. Khi khóa, Link đi theo hướng cần trái chỉ trên màn hình. Game phiên bản 1.4.3.", + [UI_MENU_FREECAM_PAD_V143] = "Chỉ game phiên bản 1.4.3", + [UI_MENU_FREECAM_KEY] = "Phím camera tự do", + [UI_MENU_FREECAM_KEY_DESC] = "Một phím chuyển góc nhìn qua cùng các giai đoạn: rời Link và bay, đứng yên trong khi Link " + "chơi tiếp, và quay lại. Khi đang bay: W A S D bay theo hướng nhìn và sang ngang, các phím gán cho ZR và ZL (mặc định " + "X và Z) lên và xuống, chuột và phím mũi tên xoay, và các phím gán cho L và R (Q và R) giảm một nửa hoặc tăng gấp đôi " + "tốc độ. Game phiên bản 1.4.3.", + [UI_MENU_GROUP_GAMEPLAY_TWEAKS] = "Tinh chỉnh lối chơi", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED] = "Tinh chỉnh lối chơi", + [UI_MENU_GAMEPLAY_TWEAKS_ENABLED_DESC] = "Điều khiển bằng con lăn chuột cho xoay và khoảng cách của Ultrahand, đổi vật phẩm và vũ khí, và thu phóng bản đồ mượt.", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE] = "Xoay Ultrahand bằng con lăn", + [UI_MENU_GAMEPLAY_ULTRAHAND_ROTATE_DESC] = "Xoay vật đang giữ bằng Ultrahand trực tiếp bằng con lăn chuột.", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS] = "Trục xoay C của Ultrahand", + [UI_MENU_GAMEPLAY_ULTRAHAND_C_AXIS_DESC] = "Giữ C khi cuộn để xoay vật đang giữ quanh trục còn lại.", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY] = "Độ nhạy xoay Ultrahand", + [UI_MENU_GAMEPLAY_ROTATION_SENSITIVITY_DESC] = "Con lăn chuột xoay vật đang giữ nhanh đến đâu.", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE] = "Khoảng cách Ultrahand bằng con lăn", + [UI_MENU_GAMEPLAY_ULTRAHAND_DISTANCE_DESC] = "Nhấp phải + con lăn chuột đẩy ra hoặc kéo vào vật đang giữ.", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY] = "Độ nhạy khoảng cách Ultrahand", + [UI_MENU_GAMEPLAY_DISTANCE_SENSITIVITY_DESC] = "Con lăn chuột đổi khoảng cách vật nhanh đến đâu.", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL] = "Chọn vũ khí bằng con lăn", + [UI_MENU_GAMEPLAY_WEAPON_WHEEL_DESC] = "Cuộn con lăn chuột khi di chuyển tự do để đổi vũ khí. Xác nhận bằng E.", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY] = "Độ nhạy con lăn vũ khí", + [UI_MENU_GAMEPLAY_WEAPON_SENSITIVITY_DESC] = "Số nấc cuộn cần để chuyển sang vũ khí kế tiếp.", + [UI_MENU_GAMEPLAY_ITEM_WHEEL] = "Chọn menu nhanh bằng con lăn", + [UI_MENU_GAMEPLAY_ITEM_WHEEL_DESC] = "Cuộn con lăn chuột để duyệt vật phẩm khi menu chọn nhanh đang mở.", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY] = "Độ nhạy con lăn menu nhanh", + [UI_MENU_GAMEPLAY_ITEM_SENSITIVITY_DESC] = "Số nấc cuộn cần để chuyển qua các vật phẩm trong menu chọn nhanh.", + [UI_MENU_GAMEPLAY_ITEM_AD] = "Điều hướng menu nhanh bằng A / D", + [UI_MENU_GAMEPLAY_ITEM_AD_DESC] = "Nhấn A / D để di chuyển trái và phải trong menu chọn nhanh.", + [UI_MENU_GAMEPLAY_MAP_ZOOM] = "Thu phóng bản đồ mượt", + [UI_MENU_GAMEPLAY_MAP_ZOOM_DESC] = "Thu phóng có quán tính mượt trên bản đồ Purah Pad bằng con lăn chuột.", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY] = "Độ nhạy thu phóng bản đồ", + [UI_MENU_GAMEPLAY_MAP_ZOOM_SENSITIVITY_DESC] = "Con lăn chuột thu phóng bản đồ nhanh đến đâu.", + [UI_MENU_STICK_SENS] = "Tốc độ camera bằng cần", + [UI_MENU_STICK_SENS_DESC] = "Nhân tốc độ camera của cần phải trong game, kể cả tốc độ tối đa, ở mỗi mức trong năm mức độ " + "nhạy camera của game. Chuột giữ cài đặt riêng của nó.", + + [UI_BINDS_HELP] = "Chọn một ô và nhấn A hoặc Enter, rồi nhấn phím, nút chuột hoặc nút tay cầm. Delete hoặc X xóa một ô. " + "Phím đang được dùng sẽ chuyển sang đây; nút tay cầm đổi chỗ với nút mà nó thay.", + [UI_BINDS_COL_KEY1] = "Phím 1", [UI_BINDS_COL_KEY2] = "Phím 2", [UI_BINDS_COL_PAD] = "Tay cầm", + [UI_BINDS_GROUP_BUTTONS] = "Nút", [UI_BINDS_GROUP_MOVE] = "Di chuyển", [UI_BINDS_GROUP_CAMERA] = "Camera", + [UI_BINDS_PRESS_KEY] = "Nhấn một phím hoặc nút chuột cho %s", + [UI_BINDS_PRESS_PAD] = "Nhấn một nút tay cầm cho %s", + [UI_BINDS_CANCEL_HINT] = "Esc để hủy, hoặc chờ %d giây", + [UI_BINDS_TAKEN] = "%s đã bị lấy từ %s", [UI_BINDS_SWAPPED] = "%s đã đổi chỗ với %s", + [UI_BINDS_RESET] = "Đặt lại mọi nút", + [UI_BINDS_RESET_DESC] = "Về phím và nút tay cầm mặc định. Bố cục nút ở trên áp dụng lại: các nút tay cầm đã gán lại vẫn ở nơi bạn đặt cho đến lần đặt lại này.", + [UI_BIND_A] = "A", [UI_BIND_B] = "B", [UI_BIND_X] = "X", [UI_BIND_Y] = "Y", + [UI_BIND_LCLICK] = "Nhấn cần trái", [UI_BIND_RCLICK] = "Nhấn cần phải", [UI_BIND_L] = "L", + [UI_BIND_R] = "R", [UI_BIND_ZL] = "ZL", [UI_BIND_ZR] = "ZR", [UI_BIND_PLUS] = "Cộng", [UI_BIND_MINUS] = "Trừ", + [UI_BIND_LEFT] = "D-pad trái", [UI_BIND_UP] = "D-pad lên", [UI_BIND_RIGHT] = "D-pad phải", + [UI_BIND_DOWN] = "D-pad xuống", + [UI_BIND_LSTICK_LEFT] = "Đi sang trái", [UI_BIND_LSTICK_UP] = "Đi tới", [UI_BIND_LSTICK_RIGHT] = "Đi sang phải", + [UI_BIND_LSTICK_DOWN] = "Đi lùi", + [UI_BIND_RSTICK_LEFT] = "Camera trái", [UI_BIND_RSTICK_UP] = "Camera lên", [UI_BIND_RSTICK_RIGHT] = "Camera phải", + [UI_BIND_RSTICK_DOWN] = "Camera xuống", + [UI_BIND_DESC_A] = "Tương tác, nhặt, nói chuyện.", [UI_BIND_DESC_B] = "Chạy, hủy, quay lại.", + [UI_BIND_DESC_X] = "Nhảy.", [UI_BIND_DESC_Y] = "Tấn công.", [UI_BIND_DESC_LCLICK] = "Cúi người.", + [UI_BIND_DESC_RCLICK] = "Góc nhìn thứ nhất.", [UI_BIND_DESC_L] = "Khả năng.", + [UI_BIND_DESC_R] = "Ném vũ khí.", [UI_BIND_DESC_ZL] = "Khiên, khóa mục tiêu.", [UI_BIND_DESC_ZR] = "Cung.", + [UI_BIND_DESC_PLUS] = "Menu, túi đồ.", [UI_BIND_DESC_MINUS] = "Bản đồ.", + [UI_BIND_DESC_DPAD] = "Chọn nhanh.", + [UI_BIND_DESC_MOVE] = "Di chuyển Link như cần trái. Cần trái của tay cầm luôn hoạt động.", + [UI_BIND_DESC_CAMERA] = "Xoay camera như cần phải. Chuột và cần phải của tay cầm luôn hoạt động.", + [UI_BIND_SHAKE] = "Lắc cần camera", + [UI_BIND_DESC_SHAKE] = "Gạt cần phải qua trái và phải thay cho game: tách bộ phận đã dính ra khỏi vật Ultrahand đang giữ. " + "Giữ phím thì tiếp tục lắc.", + [UI_KEY_SPACE] = "Space", [UI_KEY_TAB] = "Tab", [UI_KEY_LSHIFT] = "Shift trái", [UI_KEY_LCTRL] = "Ctrl trái", + [UI_KEY_UP] = "Mũi tên lên", [UI_KEY_DOWN] = "Mũi tên xuống", [UI_KEY_LEFT] = "Mũi tên trái", + [UI_KEY_RIGHT] = "Mũi tên phải", + [UI_KEY_MOUSE_L] = "Chuột trái", [UI_KEY_MOUSE_R] = "Chuột phải", [UI_KEY_MOUSE_M] = "Chuột giữa", + [UI_KEY_MOUSE_X1] = "Chuột 4", [UI_KEY_MOUSE_X2] = "Chuột 5", + [UI_KEY_ENTER] = "Enter", [UI_KEY_BACKSPACE] = "Backspace", [UI_KEY_RSHIFT] = "Shift phải", + [UI_KEY_RCTRL] = "Ctrl phải", [UI_KEY_LALT] = "Alt", [UI_KEY_CAPSLOCK] = "Caps Lock", [UI_KEY_INSERT] = "Insert", + [UI_KEY_DELETE] = "Delete", [UI_KEY_HOME] = "Home", [UI_KEY_END] = "End", [UI_KEY_PAGEUP] = "Page Up", + [UI_KEY_PAGEDOWN] = "Page Down", [UI_KEY_NUM_FMT] = "Num %s", + [UI_PAD_SOUTH] = "Nút dưới", [UI_PAD_EAST] = "Nút phải", [UI_PAD_WEST] = "Nút trái", + [UI_PAD_NORTH] = "Nút trên", [UI_PAD_LSTICK] = "Cần trái", [UI_PAD_RSTICK] = "Cần phải", + [UI_PAD_L] = "Nút vai trái", [UI_PAD_R] = "Nút vai phải", [UI_PAD_START] = "Start", [UI_PAD_BACK] = "Back", + [UI_PAD_DPAD_LEFT] = "D-pad trái", [UI_PAD_DPAD_UP] = "D-pad lên", [UI_PAD_DPAD_RIGHT] = "D-pad phải", + [UI_PAD_DPAD_DOWN] = "D-pad xuống", [UI_PAD_ZL] = "Cò trái", [UI_PAD_ZR] = "Cò phải", + [UI_PAD_LPADDLE1] = "Nút lưng trái", [UI_PAD_RPADDLE1] = "Nút lưng phải", + [UI_PAD_LPADDLE2] = "Nút lưng trái 2", [UI_PAD_RPADDLE2] = "Nút lưng phải 2", + [UI_PAD_TOUCHPAD] = "Nhấn touchpad", + [UI_PAD_CROSS] = "Chữ X", [UI_PAD_CIRCLE] = "Tròn", [UI_PAD_SQUARE] = "Vuông", [UI_PAD_TRIANGLE] = "Tam giác", + + [UI_MENU_AMIIBO_DIR] = "Thư mục amiibo", + [UI_MENU_AMIIBO_OPEN] = "Mở", + [UI_MENU_AMIIBO_DEFAULT_DIR] = "Thư mục mặc định", + [UI_MENU_AMIIBO_REFRESH] = "Làm mới", + [UI_MENU_AMIIBO_PICK] = "Tệp dump amiibo (.bin hoặc .nfc 540 byte):", + [UI_MENU_AMIIBO_NO_DIR] = "Không mở được thư mục %s", + [UI_MENU_AMIIBO_READER] = "Đầu đọc NFC", + [UI_MENU_AMIIBO_STATE] = "Đầu đọc:", + [UI_MENU_AMIIBO_STATE_IDLE] = "sẵn sàng", + [UI_MENU_AMIIBO_STATE_SEARCHING] = "game đang chờ một amiibo", + [UI_MENU_AMIIBO_STATE_FOUND] = "amiibo trên đầu đọc", + [UI_MENU_AMIIBO_STATE_MOUNTED] = "game đang đọc amiibo", + [UI_MENU_AMIIBO_STATE_OFF] = "tắt", + [UI_MENU_AMIIBO_FILE] = "Tệp đã chọn:", + [UI_MENU_AMIIBO_NO_FILE] = "(chưa chọn tệp)", + [UI_MENU_AMIIBO_TAP] = "Chạm amiibo", + [UI_MENU_AMIIBO_REMOVE] = "Nhấc amiibo ra", + [UI_MENU_AMIIBO_AUTO_REMOVE] = "Tự nhấc amiibo ra sau khi chạm", + [UI_MENU_AMIIBO_HOLD] = "Thời gian trên đầu đọc", + [UI_MENU_AMIIBO_SECONDS] = "%.1f giây", + [UI_MENU_AMIIBO_TAG] = "Amiibo trên đầu đọc:", + [UI_MENU_AMIIBO_NO_TAG] = "Không có amiibo trên đầu đọc.", + [UI_MENU_AMIIBO_TAG_FILE] = "Tệp: %s", + [UI_MENU_AMIIBO_TAG_ID] = "Nhân vật %s, series %02x, số %04x, loại %02x", + [UI_MENU_AMIIBO_TAG_UID] = "UID: %s", + [UI_MENU_AMIIBO_READY] = "Sẵn sàng", + [UI_MENU_AMIIBO_TAPPED] = "Đã chạm: %s", + [UI_MENU_AMIIBO_LOAD_FAILED] = "Không phải tệp dump amiibo (NTAG215 540 byte): %s", + [UI_MENU_AMIIBO_REMOVED] = "Đã nhấc amiibo ra", + [UI_MENU_AMIIBO_STATUS] = "Trạng thái: %s", + [UI_MENU_MENU_LANG] = "Ngôn ngữ menu", [UI_MENU_MENU_LANG_DESC] = "Ngôn ngữ của menu này và lớp phủ hiệu năng.", + [UI_MENU_MENU_LANG_AUTO] = "Tự động (theo Windows)", + [UI_MENU_DISCORD_RPC] = "Trạng thái Discord (Rich Presence)", + [UI_MENU_DISCORD_RPC_DESC] = "Hiện \"Playing TotK Recomp\" cùng thời gian chơi trong trạng thái Discord của bạn khi game " + "chạy. discord_app_id và discord_image trong totk.ini chọn ứng dụng.", + + [UI_MENU_ADV_WARNING] = "Các cài đặt này dành cho kiểm thử và khắc phục sự cố. Chỉ đổi khi bạn biết lý do.", + [UI_MENU_GROUP_SCHED] = "Lập lịch", [UI_MENU_GROUP_SHADERS] = "Bộ đổ bóng và đường ống đồ họa", + [UI_MENU_GROUP_TEXMEM] = "Họa tiết và bộ nhớ", [UI_MENU_GROUP_FIXES] = "Sửa lỗi kết xuất", + [UI_MENU_GROUP_VULKAN] = "Vulkan", [UI_MENU_GROUP_DIAG] = "Chẩn đoán", + [UI_MENU_ASYNC_PREEMPT] = "Chiếm quyền trên lõi ảo", + [UI_MENU_ASYNC_PREEMPT_DESC] = "Cho phép một luồng game chiếm quyền của luồng khác trên cùng lõi ảo.", + [UI_MENU_PREEMPT_OFF] = "Tắt", [UI_MENU_PREEMPT_ON] = "Bật", [UI_MENU_PREEMPT_INHERIT] = "Chỉ kế thừa", + [UI_MENU_REPLAY_ASYNC] = "Chuẩn bị khung GPU ở luồng riêng", + [UI_MENU_REPLAY_ASYNC_DESC] = "Chuẩn bị khung hình cho GPU ở một luồng riêng thay vì luồng game. Thêm tối đa một khung hình độ trễ.", + [UI_MENU_REPLAY_WORKERS] = "Số luồng chuẩn bị khung GPU", + [UI_MENU_REPLAY_WORKERS_DESC] = "Ghi các khung hình lớn cho GPU trên nhiều luồng cùng lúc. Hữu ích khi CPU giới hạn tốc độ khung hình; cần từ 8 bộ xử lý logic trở lên. Tắt thì ghi trên một luồng.", + [UI_MENU_REPLAY_WORKERS_NOW] = "hiện tại: %s", + [UI_MENU_TIMER_1MS] = "Bộ hẹn giờ Windows 1 ms", + [UI_MENU_TIMER_1MS_DESC] = "Nâng độ phân giải bộ hẹn giờ hệ thống lên 1 ms để nhịp khung hình đều hơn.", + [UI_MENU_PIPE_WAIT] = "Xử lý lệnh vẽ đang chờ", + [UI_MENU_PIPE_WAIT_DESC] = "Mặc định giữ cách lập lịch hiện tại, có một luồng xử lý dành riêng cho các lệnh vẽ đang chờ; Cũ (lệnh vẽ) dùng cách lập lịch trước đó.", + [UI_MENU_PIPE_WAIT_DEFAULT] = "Mặc định", [UI_MENU_PIPE_WAIT_DRAW] = "Cũ (lệnh vẽ)", + [UI_MENU_PIPE_SKIP] = "Lệnh vẽ bị bỏ qua khi đường ống đang dựng", + [UI_MENU_PIPE_SKIP_DESC] = "Những lệnh vẽ nào bị bỏ thay vì chờ đường ống của chúng.", + [UI_MENU_PIPE_SKIP_STRICT] = "Nghiêm ngặt", [UI_MENU_PIPE_SKIP_ANY] = "Bất kỳ", + [UI_MENU_PIPE_SKIP_FULLSCREEN] = "Lượt vẽ toàn màn hình", + [UI_MENU_LIB_PREBUILD] = "Dựng trước thư viện công đoạn", + [UI_MENU_LIB_PREBUILD_DESC] = "Dựng trước các thư viện công đoạn của bộ đổ bóng ở nền.", + [UI_MENU_LIB_PREBUILD_THREADS] = "Số luồng dựng trước thư viện công đoạn", + [UI_MENU_LIB_PREBUILD_THREADS_DESC] = "Số luồng dùng để dựng trước; Tự động chọn con số theo CPU của bạn.", + [UI_MENU_PIPE_PREBUILD] = "Dựng trước đường ống", + [UI_MENU_PIPE_PREBUILD_DESC] = "Dựng trước các đường ống đã biết.", + [UI_MENU_PREWARM_XLATE] = "Làm nóng bộ dịch", + [UI_MENU_PREWARM_XLATE_DESC] = "Số luồng dịch các bộ đổ bóng đã biết khi khởi động; Tự động lấy một nửa số luồng CPU, tối đa 16.", + [UI_MENU_GPL] = "Thư viện đường ống đồ họa", + [UI_MENU_GPL_DESC] = "Dùng phần mở rộng thư viện đường ống của Vulkan; hãy tắt nếu trình điều khiển của bạn hoạt động sai với nó.", + [UI_MENU_ASTC] = "Giải mã họa tiết ASTC", [UI_MENU_ASTC_DESC] = "Nơi giải mã họa tiết ASTC đã nén.", + [UI_MENU_ASTC_AUTO] = "Tự động", [UI_MENU_ASTC_GPU] = "Bộ đổ bóng GPU", [UI_MENU_ASTC_NATIVE] = "Gốc", + [UI_MENU_ASTC_CPU] = "CPU", + [UI_MENU_MEMORY] = "Chế độ bộ nhớ GPU", [UI_MENU_MEMORY_DESC] = "Cách bộ nhớ game được chia sẻ với GPU.", + [UI_MENU_MEMORY_AUTO] = "Tự động", [UI_MENU_MEMORY_IMPORT] = "Nhập", [UI_MENU_MEMORY_MIRROR] = "Phản chiếu", + [UI_MENU_MEMORY_VERIFY] = "Kiểm tra", + [UI_MENU_TEX_ALIAS] = "Chồng họa tiết", [UI_MENU_TEX_ALIAS_DESC] = "Một họa tiết mới tạo đè lên bộ nhớ của họa tiết đang dùng sẽ bắt đầu với nội dung đó thay vì trống.", + [UI_MENU_TEX_VRAM_PRESSURE] = "Giới hạn bộ nhớ họa tiết", [UI_MENU_TEX_VRAM_PRESSURE_DESC] = "Phần trăm bộ nhớ video mà trên mức đó các họa tiết game đã giải phóng bị bỏ (chúng được nạp lại từ ổ lưu trữ khi dùng lần nữa). 0 là giữ lại.", + [UI_MENU_ASTC_BC] = "Nén ASTC sang BC3", [UI_MENU_ASTC_BC_DESC] = "Với bộ giải mã GPU: mã hóa lại họa tiết ASTC đã giải mã sang BC3, chỉ tốn một phần tư bộ nhớ video. Họa tiết trông hơi vỡ khối hơn. Tự động: bật cho GPU có 4 GB bộ nhớ video trở xuống.", + [UI_MENU_LOD_GUARD] = "Bảo vệ LOD", [UI_MENU_LOD_GUARD_DESC] = "Ngăn vật thể nhấp nháy sai chỗ hoặc vùng xa bị phẳng trong một khung hình, bằng cách chờ game ghi xong dữ liệu mức chi tiết trước khi GPU đọc.", + [UI_MENU_FIX_C0] = "Sửa bộ đệm hằng số", + [UI_MENU_FIX_C0_DESC] = "Điền bảng hằng số c0 mà trình điều khiển dành riêng (kích thước vùng lưu trữ, kích thước điều phối, kích thước điểm, thực thể gốc) thay vì đọc ra số không.", + [UI_MENU_FIX_ZERO] = "Xóa sạch bộ nhớ GPU mới", + [UI_MENU_FIX_ZERO_DESC] = "Các vùng nhớ GPU mới bắt đầu với toàn số không, như bộ nhớ Switch.", + [UI_MENU_DLAA_EFFECTS_AFTER] = "Sương mù và hạt sau DLAA", + [UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Với DLAA, sương mù, bụi và các hạt khác được vẽ đè lên hình DLSS đã làm mịn, như game " + "vẽ chúng khi không có DLSS: các hạt nhỏ trong sương mù (đền thờ) không còn biến mất " + "hay để lại vệt. Tắt: DLSS cũng xử lý các hiệu ứng này, như trước. Chỉ ở chế độ " + "DLAA; các chế độ phóng to DLSS luôn xử lý chúng. Áp dụng ngay.", + [UI_MENU_DLSS_FIXED_EXPOSURE] = "Phơi sáng DLSS cố định", + [UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS lấy độ sáng của hình game như nó vốn có thay vì ước lượng phơi sáng từ từng " + "khung hình: trong cảnh tối (Depths) các vùng sương lớn không còn tối hoặc sáng đi " + "một khung hình khi camera di chuyển. Tắt: DLSS tự ước lượng phơi sáng, như trước. " + "Áp dụng ngay.", + [UI_MENU_BIND_SKIP] = "Bỏ qua liên kết lặp lại", + [UI_MENU_BIND_SKIP_DESC] = "Tối ưu hóa: bỏ qua các liên kết không đổi.", + [UI_MENU_SHADER_MEMO] = "Ghi nhớ bộ đổ bóng", [UI_MENU_SHADER_MEMO_DESC] = "Tối ưu hóa: ghi nhớ các lần tra cứu bộ đổ bóng.", + [UI_MENU_PIPE_MEMO] = "Ghi nhớ đường ống", [UI_MENU_PIPE_MEMO_DESC] = "Tối ưu hóa: dùng lại đường ống của lệnh vẽ trước khi trạng thái lặp lại.", + [UI_MENU_TEX_MEMO] = "Ghi nhớ liên kết họa tiết", [UI_MENU_TEX_MEMO_DESC] = "Tối ưu hóa: ghi nhớ bộ mô tả họa tiết giữa các lệnh vẽ.", + [UI_MENU_DESC_TEMPLATE] = "Mẫu bộ mô tả", + [UI_MENU_DESC_TEMPLATE_DESC] = "Tối ưu hóa: cập nhật bộ mô tả hàng loạt.", + [UI_MENU_PUSH_SKIP] = "Bỏ qua hằng số đẩy lặp lại", + [UI_MENU_PUSH_SKIP_DESC] = "Tối ưu hóa: bỏ qua các hằng số đẩy không đổi.", + [UI_MENU_SPLIT_DRAWS] = "Gửi GPU sớm", + [UI_MENU_SPLIT_DRAWS_DESC] = "Gửi công việc GPU theo từng phần sau mỗi N lệnh vẽ giữa các lượt vẽ để GPU bắt đầu sớm hơn; 0 là tắt.", + [UI_MENU_VK_VALIDATION] = "Lớp kiểm tra", + [UI_MENU_VK_VALIDATION_DESC] = "Kiểm tra mọi lệnh gọi Vulkan và làm game chậm đi rất nhiều.", + [UI_MENU_VK_VALIDATION_MISSING] = "Lớp kiểm tra chưa được cài.", + [UI_MENU_VK_DYN_VERTEX] = "Trạng thái đỉnh động", + [UI_MENU_VK_DYN_VERTEX_DESC] = "Buộc bật hoặc tắt đầu vào đỉnh động; mặc định phụ thuộc GPU.", + [UI_MENU_VK_DYN_A2C] = "Alpha sang độ phủ động", + [UI_MENU_VK_DYN_A2C_DESC] = "Buộc bật hoặc tắt alpha sang độ phủ động. Mặc định: tắt trên trình điều khiển của AMD cho RDNA 2 trở xuống, nơi nhân vật bị vẽ đen khi bật, và trên trình điều khiển Windows của Intel cho GPU tích hợp, nơi tán lá bị nhiễu màu; bật ở các nơi khác.", + [UI_MENU_VK_SUBGROUP_PIN] = "Ghim kích thước nhóm con", [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Cố định kích thước nhóm con của bộ đổ bóng.", + [UI_MENU_TRACE] = "Nhật ký hiệu năng", [UI_MENU_TRACE_DESC] = "Ghi thời gian khung hình ra tệp.", + [UI_MENU_FLIGHT] = "Hộp đen", + [UI_MENU_FLIGHT_DESC] = "Giữ một lịch sử ngắn và lưu lại khi một khung hình bị đứng.", + [UI_MENU_FLIGHT_SPIKE_MS] = "Ngưỡng đứng hình (ms)", + [UI_MENU_FLIGHT_SPIKE_MS_DESC] = "Thời gian khung hình được tính là đứng hình.", + [UI_MENU_PASS_CRUMBS] = "Dấu lượt vẽ GPU", + [UI_MENU_PASS_CRUMBS_DESC] = "Sau khi GPU gặp sự cố, nhật ký ghi tên lượt kết xuất đang chạy. Tự động: chỉ AMD. Bật: cả NVIDIA, tốn thêm một chút.", + [UI_MENU_INPUT_RECORD] = "Ghi đầu vào", + [UI_MENU_INPUT_RECORD_DESC] = "Ghi các thao tác nhập của bạn ra tệp để báo lỗi.", + [UI_MENU_OPEN_LOG] = "Mở thư mục nhật ký", [UI_MENU_OPEN_LOG_DESC] = "Hiện thư mục chứa các tệp nhật ký.", + [UI_MENU_COPY_INFO] = "Sao chép thông tin hệ thống", + [UI_MENU_COPY_INFO_DESC] = "Sao chép GPU, trình điều khiển, CPU, RAM và các cài đặt đã đổi vào bộ nhớ tạm.", + [UI_MENU_COPY_INFO_DONE] = "Đã sao chép", [UI_MENU_ACTION_FAILED] = "không thành công", + [UI_MENU_RESET] = "Đặt lại mọi cài đặt về mặc định", [UI_MENU_RESET_DESC] = "Áp dụng cho mọi tab.", + [UI_MENU_RESET_CONFIRM] = "Đặt lại mọi cài đặt về mặc định?", [UI_MENU_RESET_YES] = "Đặt lại", + [UI_MENU_RESET_NO] = "Hủy", + + [UI_MENU_OV_FPS] = "%.0f FPS", [UI_MENU_OV_FRAME_MS] = "%.1f ms", [UI_MENU_OV_GAME_PCT] = "game %.0f%%", + [UI_MENU_OV_MAX_MS] = "max %.1f ms", + [UI_MENU_OV_FPS_LABEL] = "FPS", [UI_MENU_OV_FRAME_LABEL] = "Frame", [UI_MENU_OV_FMT_FPS] = "%.0f", + [UI_MENU_OV_LOW1] = "1%% low %.0f", [UI_MENU_OV_LOW01] = "0.1%% low %.0f", + [UI_MENU_OV_GPU] = "GPU", [UI_MENU_OV_CPU] = "CPU", [UI_MENU_OV_RAM] = "RAM", [UI_MENU_OV_VRAM] = "VRAM", + [UI_MENU_OV_TEMP] = "Temperature", [UI_MENU_OV_POWER] = "Power", [UI_MENU_OV_CLOCK] = "Clock", + [UI_MENU_OV_NONE] = "-", + [UI_MENU_OV_REPLAY] = "GPU frame prep", [UI_MENU_OV_GPU_TIME] = "GPU busy per frame", + [UI_MENU_OV_PIPE_WAIT] = "Pipeline waits", + [UI_MENU_OV_SHADER_WAIT] = "Shader waits", [UI_MENU_OV_TEX_UPLOADS] = "Texture uploads", + [UI_MENU_OV_FMT_PCT] = "%.0f%%", [UI_MENU_OV_FMT_TEMP] = "%.0f °C", [UI_MENU_OV_FMT_POWER] = "%.0f W", + [UI_MENU_OV_FMT_MHZ] = "%.0f MHz", [UI_MENU_OV_FMT_GB] = "%.1f GB", [UI_MENU_OV_FMT_GB_OF] = "/ %.1f GB", + [UI_MENU_OV_GAME_GB] = "game %.1f GB", [UI_MENU_OV_FMT_MS] = "%.2f ms", [UI_MENU_OV_PER_FRAME] = "%.1f per frame", + [UI_MENU_OV_WINDOW] = "Window", [UI_MENU_OV_OUTPUT] = "Game image", [UI_MENU_OV_SCENE] = "3D scene", + [UI_MENU_OV_UPSCALER] = "3D upscaler", + [UI_MENU_OV_SCALING] = "Scaling", [UI_MENU_OV_LIMIT] = "Frame limit", [UI_MENU_OV_PRESENT] = "Presentation", [UI_MENU_OV_SHOWN] = "Shown", + [UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%", + [UI_MENU_OV_FMT_FSR] = "AMD FSR 1, sharpness %d%%", [UI_MENU_OV_SCALE_NONE] = "none (1:1)", + [UI_MENU_OV_SCALE_BILINEAR] = "bilinear", + [UI_MENU_OV_SCALE_DOWN] = "bilinear (FSR only enlarges)", + [UI_MENU_TAB_CHEATS] = "Cheat", + [UI_MENU_CHEATS_NONE] = "Không có cheat cho phiên bản game này. Cheat của mod là tệp cheat Atmosphere trong thư mục " + "cheats của nó, đặt theo bản dựng của game: mods\\\\cheats\\%s. Hãy khởi động lại game để " + "đọc chúng. Với cheat thay đổi mã game, game tự dựng lại khi khởi động (vài phút).", + [UI_MENU_CHEATS_MOD] = "%s: %d cheat", + [UI_MENU_CHEAT_CODE_DESC] = "Thay đổi mã của game. Bật tắt ngay.", + [UI_MENU_CHEAT_KEY_DESC] = "Thay đổi mã của game trong lúc bạn giữ %s. Bật tắt ngay.", + [UI_MENU_CHEAT_DATA_DESC] = "Ghi vào bộ nhớ game mỗi khung hình khi đang bật.", + [UI_MENU_CHEAT_MASTER] = "luôn bật", + [UI_MENU_CHEAT_MASTER_DESC] = "Mã chủ của tệp: luôn bật.", + [UI_MENU_CHEAT_RESTORE] = "không cần", + [UI_MENU_CHEAT_RESTORE_DESC] = "Nó chỉ ghi lại mã gốc của game. Tắt một cheat đã làm việc đó rồi.", + [UI_MENU_CHEAT_REBUILD] = "sau khi dựng lại", + [UI_MENU_CHEAT_REBUILD_DESC] = "Cheat này thay đổi mã game và là mới hoặc đã sửa kể từ khi game được dựng. Game tích hợp " + "nó khi khởi động lần sau (vài phút), hoặc dùng Dựng lại game ngay.", + [UI_MENU_CHEAT_UNSUPPORTED] = "không hỗ trợ", + [UI_MENU_CHEAT_UNSUPPORTED_DESC] = "Cheat này không dùng được với phiên bản game này:", + [UI_MENU_CHEATS_REBUILD] = "Dựng lại game ngay", + [UI_MENU_CHEATS_REBUILD_DESC] = "Một số cheat thay đổi mã game và chưa được tích hợp vào nó: chúng mới hoặc đã sửa, hoặc " + "lần dựng lại gần nhất thất bại hay bị hủy. Đóng game; trình cài đặt tích hợp chúng (vài " + "phút) rồi chạy lại game. Tiến trình từ lần lưu gần nhất sẽ mất.", + [UI_MENU_MODS_EXEFS_UNSUPPORTED] = "Mod này vá mã game (exefs) theo cách bản port không áp dụng được, nên cả mod vẫn " + "tắt. Công tắc \"Dùng ... không kèm mã\" bên dưới sẽ dùng phần còn lại. %s", + [UI_MENU_MODS_EXEFS_OTHER] = "Các bản vá mã (exefs) của nó được làm cho phiên bản game khác.", + [UI_MENU_MODS_EXEFS_ON] = "Bản vá mã đang dùng: %d tệp.", + [UI_MENU_MODS_REPLACES_BUILTIN] = "Bản vá mã đang dùng: %d tệp. Chúng thay bản vá riêng %s của bản port, bản vá đó vẫn " + "tắt khi mod này bật.", + [UI_MENU_MODS_CODE_SKIPPED] = "Mã game riêng của nó (%s) không được tải: phần còn lại của mod vẫn dùng. Hãy tắt mod nếu " + "game hoạt động sai với nó.", + [UI_MENU_MODS_PLUGIN_ON] = "Plugin của nó đang chạy: %d hook vào mã game.", + [UI_MENU_MODS_PLUGIN_REFUSED] = "Plugin %s của nó không chạy được trong bản port: %s.", + [UI_MENU_MODS_PLUGIN_STAYS_OFF] = "Cả mod vẫn tắt. Công tắc \"Dùng ... không kèm mã\" bên dưới sẽ dùng phần còn lại.", + [UI_MENU_MODS_PLUGIN_OFF] = "Plugin của nó lần này vẫn tắt: nó khởi động khác với bản dựng (%s). Game sẽ dựng lại ở lần " + "khởi động kế tiếp.", + [UI_MENU_MODS_WITHOUT_CODE] = "Dùng %s không kèm mã", + [UI_MENU_MODS_WITHOUT_CODE_DESC] = "Mod ở trên mang theo mã mà bản port không chạy được: mã game riêng (plugin subsdk hoặc " + "main bị thay) hoặc bản vá mã (exefs) bản port không áp dụng được. Tắt: cả mod vẫn " + "tắt. Bật: phần mã đó bị bỏ và dùng phần còn lại của mod: tệp RomFS, cheat và các " + "bản vá mã chạy được. Tệp của nó có thể cần phần mã bị thiếu; hãy tắt lại nếu game " + "hoạt động sai. Áp dụng từ lần khởi động kế tiếp.", + [UI_MENU_MODS_WITHOUT_CODE_ALL] = "Bật cho mọi mod: mods_without_code = 1 trong totk.ini.", + [UI_MENU_MODS_EXEFS_SKIPPED] = "%u tệp bản vá mã (exefs) của nó không áp dụng được và bị bỏ: phần còn lại của mod vẫn " + "dùng. %s", + [UI_MENU_MODS_OVERRIDES_FILES] = "%u tệp của nó thay tệp của %s, mod thấp hơn trong danh sách.", + [UI_MENU_MODS_DATA_OVERRIDDEN] = "%u byte thay đổi dữ liệu game của nó lấy từ %s, mod cao hơn trong danh sách.", + [UI_MENU_MODS_OVERRIDES_DATA] = "%u byte thay đổi dữ liệu game của nó thay của %s, mod thấp hơn trong danh sách.", + [UI_MENU_MODS_CODE_OVERRIDDEN] = "%u vị trí vá mã của nó bị %s ghi đè, mod cao hơn trong danh sách.", + [UI_MENU_MODS_OVERRIDES_CODE] = "Nó ghi đè %u vị trí vá mã của %s, mod thấp hơn trong danh sách.", +}; + #define SWKBD_ONLY(name, ...) static const char *const name[UI_TEXT_COUNT] = {SWKBD(__VA_ARGS__)} SWKBD_ONLY(text_pt, "Inserir texto", "Introduz um nome", "Cavalo", "OK", "Cancelar", "Comando: A = OK, B = Cancelar"); SWKBD_ONLY(text_zh_hant, "文字輸入", "請輸入名字", "馬兒", "確定", "取消", "手把:A 確定,B 取消"); @@ -8762,7 +9382,7 @@ SWKBD_ONLY(text_zh_hant, "文字輸入", "請輸入名字", "馬兒", "確定", static const Row rows[] = { {"en", text_en}, {"ja", text_ja}, {"fr", text_fr}, {"de", text_de}, {"it", text_it}, {"es", text_es}, {"nl", text_nl}, {"pt", text_pt}, {"ru", text_ru}, {"zh-Hans", text_zh_hans}, {"zh-Hant", text_zh_hant}, - {"ko", text_ko}, {"pt-BR", text_pt_br}, + {"ko", text_ko}, {"pt-BR", text_pt_br}, {"vi", text_vi}, }; const char *ui_text_lang(const char *code) { diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 0321f8e7..051c6683 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -12,7 +12,7 @@ typedef enum { UI_SWKBD_PAD_HINT, // how a controller answers // Menu: window, tabs, bottom row. UI_MENU_FIRST..UI_MENU_LAST_ID carry English, Russian, Brazilian Portuguese, - // Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese and Korean texts. + // Simplified Chinese, German, French, Spanish, Italian, Dutch, Japanese, Korean and Vietnamese texts. UI_MENU_FIRST, UI_MENU_TITLE = UI_MENU_FIRST, UI_MENU_TAB_SCREEN, UI_MENU_TAB_GAME, UI_MENU_TAB_MODS, UI_MENU_TAB_SOUND, UI_MENU_TAB_CONTROLS, UI_MENU_TAB_AMIIBO, @@ -228,7 +228,7 @@ typedef enum { UI_MENU_LANGNAME_EN, UI_MENU_LANGNAME_JA, UI_MENU_LANGNAME_FR, UI_MENU_LANGNAME_DE, UI_MENU_LANGNAME_IT, UI_MENU_LANGNAME_ES, UI_MENU_LANGNAME_NL, UI_MENU_LANGNAME_RU, UI_MENU_LANGNAME_ZH_HANS, UI_MENU_LANGNAME_ZH_HANT, UI_MENU_LANGNAME_KO, UI_MENU_LANGNAME_PT_BR, UI_MENU_LANGNAME_EN_GB, - UI_MENU_LANGNAME_FR_CA, UI_MENU_LANGNAME_ES_419, + UI_MENU_LANGNAME_FR_CA, UI_MENU_LANGNAME_ES_419, UI_MENU_LANGNAME_VI, // Advanced UI_MENU_ADV_WARNING, diff --git a/totk.ini.example b/totk.ini.example index de8d3f07..b1901465 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -367,8 +367,8 @@ # lang = en-US # System mode reported to the game: docked or handheld. # operation_mode = docked -# Language of the settings menu and the overlay: en, ru, pt-BR, zh-Hans, de, fr, es, it, nl, ja or ko. Default: the Windows -# display language (Simplified Chinese for any Chinese), English if it is none of them. +# Language of the settings menu and the overlay: en, ru, pt-BR, zh-Hans, de, fr, es, it, nl, ja, ko or vi. Default: the +# Windows display language (Simplified Chinese for any Chinese), English if it is none of them. # menu_lang = en [discord] From 9e732f00963945182166e7953c88e36345f273f4 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 19:17:05 +0000 Subject: [PATCH 42/66] Quote Unix build arguments before Ninja escaping --- tests/build_command_test.py | 85 +++++++++++++++++++++++++++++++++++++ tests/run_all.py | 9 +++- tools/build_game.py | 11 +++-- 3 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 tests/build_command_test.py diff --git a/tests/build_command_test.py b/tests/build_command_test.py new file mode 100644 index 00000000..616481e7 --- /dev/null +++ b/tests/build_command_test.py @@ -0,0 +1,85 @@ +"""Build command arguments through real Ninja and a POSIX shell, using only synthetic paths and source files.""" +import json +import os +from pathlib import Path +import shlex +import shutil +import subprocess +import sys +import tempfile +import unittest +from unittest.mock import patch + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'tools')) +import build_game as build # noqa: E402 + +NINJA, SHELL = shutil.which('ninja'), shutil.which('sh') + + +@unittest.skipUnless(NINJA, 'no Ninja on PATH') +class CommandTest(unittest.TestCase): + def setUp(self): + tmp = tempfile.TemporaryDirectory(prefix='build command ') + self.addCleanup(tmp.cleanup) + self.folder = Path(tmp.name) + self.probe = self.folder / 'arguments.py' + self.probe.write_text('import json, pathlib, sys\n' + 'pathlib.Path(sys.argv[1]).write_text(json.dumps(sys.argv[2:]))\n') + + def ninja(self, target, command, posix=False): + if posix: + # Ninja on Unix uses sh -c. An expanded response file lets Windows exercise those same shell bytes too. + shell = subprocess.list2cmdline([SHELL]) if os.name == 'nt' else shlex.quote(SHELL) + text = (f'rule probe\n command = {shell.replace("$", "$$")} $out.rsp\n' + f' rspfile = $out.rsp\n rspfile_content = {command}\n') + else: + text = f'rule probe\n command = {command}\n' + (self.folder / 'build.ninja').write_text(text + f'build {target}: probe\n', encoding='utf-8') + env = dict(os.environ, BUILD_QUOTE_TEST='expanded', MSYS2_ARG_CONV_EXCL='*') + run = subprocess.run([NINJA, '-f', 'build.ninja', target], cwd=self.folder, env=env, + capture_output=True, text=True, timeout=30) + self.assertEqual(run.returncode, 0, run.stdout + run.stderr) + + @unittest.skipUnless(SHELL, 'no POSIX shell on PATH') + def test_posix_arguments_survive_ninja_and_the_shell(self): + values = ('ordinary/path', 'path with spaces', 'path/$BUILD_QUOTE_TEST/include', + 'path with spaces/$BUILD_QUOTE_TEST/include', "path/O'Reilly/include", + 'path/(parentheses)/include', 'path/double"quote/include', + 'path/$(printf expanded)/include') + for index, value in enumerate(values): + with self.subTest(value=value), patch.object(build, 'WIN', False): + target = f'posix-{index}.json' + command = ' '.join(build.cmd_arg(arg) for arg in + (Path(sys.executable).as_posix(), self.probe.as_posix(), target, value)) + self.ninja(target, command, posix=True) + self.assertEqual(json.loads((self.folder / target).read_text()), [value]) + + @unittest.skipUnless(os.name == 'nt', 'native Windows command parsing') + def test_windows_paths_still_survive_native_ninja_commands(self): + values = ['ordinary/path', 'path with spaces', 'path/$BUILD_QUOTE_TEST/include', "path/O'Reilly/include"] + with patch.object(build, 'WIN', True): + command = ' '.join(build.cmd_arg(arg) for arg in + (Path(sys.executable).as_posix(), self.probe.as_posix(), 'windows.json', *values)) + self.ninja('windows.json', command) + self.assertEqual(json.loads((self.folder / 'windows.json').read_text()), values) + + @unittest.skipUnless(SHELL and (os.environ.get('CC') or shutil.which('clang')), 'needs a POSIX shell and clang') + def test_compiler_finds_headers_in_a_path_with_shell_metacharacters(self): + include = self.folder / "O'Reilly $BUILD_QUOTE_TEST (headers)" + include.mkdir() + (include / 'synthetic.h').write_text('#define SYNTHETIC_VALUE 42\n') + source = self.folder / 'probe.c' + source.write_text('#include \nint main(void) { return SYNTHETIC_VALUE != 42; }\n') + compiler = os.environ.get('CC') or shutil.which('clang') + target = 'probe.exe' if os.name == 'nt' else 'probe' + with patch.object(build, 'WIN', False): + command = f'{build.cmd_arg(Path(compiler).as_posix())} -I {build.cmd_path(include)} ' + command += f'{build.cmd_path(source)} -o {build.cmd_arg(target)}' + self.ninja(target, command, posix=True) + run = subprocess.run([str(self.folder / target)], timeout=10) + self.assertEqual(run.returncode, 0) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/tests/run_all.py b/tests/run_all.py index fc74a277..ab171c4c 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -45,7 +45,7 @@ def interp(venv): # name: (venv, needs, args, why the need is there) # venv: .venv | .venv-py314 | system (the standalone base interpreter) -# needs: None | needs joined by '+' (exefs | exe | romfs | embed | gui | cc) +# needs: None | needs joined by '+' (exefs | exe | romfs | embed | gui | cc | ninja) # name: the script below tests/, without .py (diff/simd is tests/diff/simd.py) TESTS = { # ---- no game files, no build ---- @@ -54,6 +54,7 @@ TESTS = { 'check_isa_test': ('.venv', None, [], ''), 'compile_budget_test': ('.venv', None, [], ''), 'pack_shader_cache_test': ('.venv', None, [], ''), + 'build_command_test': ('.venv', 'ninja', [], 'checks command arguments through Ninja'), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), 'installer_test': ('.venv-py314', None, [], ''), @@ -185,6 +186,12 @@ def resolve(needs): p = find_cc() if p is None: missing.append('no clang (MSYS2 UCRT64 on Windows)') else: vals[''] = str(p) + elif need == 'ninja': + p = MSYS_BIN / 'ninja.exe' + if not (WIN and p.is_file()): + found = shutil.which('ninja') + p = Path(found) if found else None + if p is None: missing.append('no Ninja on PATH or in MSYS2 UCRT64') elif need == 'gui': missing.append('drives a window; run it by hand on a desktop session') else: diff --git a/tools/build_game.py b/tools/build_game.py index d660f4cd..8fe09243 100644 --- a/tools/build_game.py +++ b/tools/build_game.py @@ -70,6 +70,7 @@ import hashlib import json import os import re +import shlex import shutil import subprocess import sys @@ -269,10 +270,12 @@ def flag_path(p): def cmd_arg(s): - """s for a Ninja command line: Ninja-escaped, and quoted when it holds a space (a user or folder name), as clang and - lld split their Windows command line at unquoted spaces.""" - s = s.replace('$', '$$') - return f'"{s}"' if ' ' in s else s + """One command argument: quote for the host's command parser, then escape Ninja's dollar signs.""" + if not WIN: # Ninja runs Unix commands through sh: double quotes alone still expand $ and command substitutions + s = shlex.quote(s) + elif ' ' in s: + s = f'"{s}"' + return s.replace('$', '$$') def cmd_path(p): From 2acefbe473a1c3a2f35e58b759dba0ff2f9b16fd Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 19:25:14 +0000 Subject: [PATCH 43/66] Place command tests beside the other build checks --- tests/run_all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_all.py b/tests/run_all.py index ab171c4c..eaa193c6 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -52,9 +52,9 @@ TESTS = { 'flags_check': ('.venv', 'cc', [], 'compiles the CPU flag helpers with clang'), 'excl_mt': ('.venv', 'cc', [], 'compiles the threaded exclusive-monitor harness with clang'), 'check_isa_test': ('.venv', None, [], ''), + 'build_command_test': ('.venv', 'ninja', [], 'checks command arguments through Ninja'), 'compile_budget_test': ('.venv', None, [], ''), 'pack_shader_cache_test': ('.venv', None, [], ''), - 'build_command_test': ('.venv', 'ninja', [], 'checks command arguments through Ninja'), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), 'installer_test': ('.venv-py314', None, [], ''), From 767f2f66633df42465ad0af4eb43f4bda7735b20 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 19:37:46 +0000 Subject: [PATCH 44/66] Protect the original profile during scripted runs --- tests/run_all.py | 1 + tests/run_game_test.py | 83 ++++++++++++++++++++++++++++++++++++++++++ tools/run_game.py | 21 ++++++++++- 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 tests/run_game_test.py diff --git a/tests/run_all.py b/tests/run_all.py index fc74a277..3761cf6a 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -56,6 +56,7 @@ TESTS = { 'pack_shader_cache_test': ('.venv', None, [], ''), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), + 'run_game_test': ('.venv', None, [], ''), 'installer_test': ('.venv-py314', None, [], ''), 'ncz_test': ('.venv-py314', None, [], ''), 'romfs_prompts_test': ('.venv-py314', None, [], ''), diff --git a/tests/run_game_test.py b/tests/run_game_test.py new file mode 100644 index 00000000..814a97b8 --- /dev/null +++ b/tests/run_game_test.py @@ -0,0 +1,83 @@ +"""Run-profile copying and CLI rejection with disposable marker files; never launches a game.""" +import contextlib +import io +from pathlib import Path +import sys +import tempfile +import unittest +from unittest.mock import patch + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'tools')) +import run_game as run # noqa: E402 + + +class ProfileTest(unittest.TestCase): + def setUp(self): + tmp = tempfile.TemporaryDirectory() + self.addCleanup(tmp.cleanup) + self.folder = Path(tmp.name) + self.profile = self.folder / 'profile' + self.profile.mkdir() + (self.profile / 'marker').write_text('original profile') + source = patch.object(run, 'PROFILE', self.profile) + source.start() + self.addCleanup(source.stop) + + def test_overlapping_copies_fail_before_cleanup_or_copying(self): + for target in (self.profile, self.profile.parent, self.profile / 'nested'): + with self.subTest(target=target), \ + patch.object(run.shutil, 'rmtree', side_effect=AssertionError('cleanup ran before overlap check')), \ + patch.object(run.shutil, 'copytree', side_effect=AssertionError('copy ran before overlap check')): + with self.assertRaisesRegex(ValueError, 'profile'): + run.profile_copy(target, None) + self.assertEqual((self.profile / 'marker').read_text(), 'original profile') + + def test_separate_copy_refreshes_only_the_disposable_destination(self): + target = self.folder / 'build' / 'prof-run' + target.mkdir(parents=True) + (target / 'stale').write_text('old copy') + run.profile_copy(target, None) + self.assertEqual((self.profile / 'marker').read_text(), 'original profile') + self.assertEqual((target / 'marker').read_text(), 'original profile') + self.assertFalse((target / 'stale').exists()) + + def test_path_like_tags_are_rejected_before_files_or_locks_are_touched(self): + for tag in ('../escape', '../../profile', '../../../profile', '..\\escape', 'nested/run', '/absolute'): + with self.subTest(tag=tag), \ + patch.object(sys, 'argv', ['run_game.py', str(self.folder / 'build'), '--seconds', '1', '--tag', tag]), \ + patch.object(Path, 'mkdir', side_effect=AssertionError('created a folder before checking tag')), \ + patch.object(run, 'take_slot', side_effect=AssertionError('took a slot before checking tag')), \ + contextlib.redirect_stderr(io.StringIO()): + with self.assertRaises(SystemExit) as error: + run.main() + self.assertEqual(error.exception.code, 2) + + def test_build_inside_the_original_profile_is_rejected_before_writes(self): + with patch.object(sys, 'argv', ['run_game.py', str(self.profile), '--seconds', '1']), \ + patch.object(Path, 'mkdir', side_effect=AssertionError('created a folder before overlap check')), \ + contextlib.redirect_stderr(io.StringIO()): + with self.assertRaises(SystemExit) as error: + run.main() + self.assertEqual(error.exception.code, 2) + self.assertEqual((self.profile / 'marker').read_text(), 'original profile') + + def test_normal_run_cleans_its_copy_and_keeps_the_source(self): + build = self.folder / 'build' + proc = unittest.mock.Mock() + proc.wait.return_value = 0 + with patch.object(sys, 'argv', ['run_game.py', str(build), '--seconds', '1', '--tag', 'bench-1', '--show']), \ + patch.object(run, 'take_slot', return_value=None), patch.object(run, 'count', return_value=0), \ + patch.object(run.subprocess, 'Popen', return_value=proc) as launch, \ + contextlib.redirect_stdout(io.StringIO()): + with self.assertRaises(SystemExit) as error: + run.main() + self.assertEqual(error.exception.code, 0) + self.assertEqual((self.profile / 'marker').read_text(), 'original profile') + self.assertFalse((build / 'prof-bench-1').exists()) + self.assertIn('rc=0', (build / 'logs' / 'bench-1.log').read_text()) + launch.assert_called_once() + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/tools/run_game.py b/tools/run_game.py index f0062b48..cd0a2383 100644 --- a/tools/run_game.py +++ b/tools/run_game.py @@ -137,7 +137,20 @@ def release_gpu_lock(f): f.close() +def tag_name(value): + if '/' in value or '\\' in value: + raise argparse.ArgumentTypeError('run tag must be a name without path separators') + return value + + +def check_profile_destination(dest): + source, target = PROFILE.resolve(), Path(dest).resolve() + if source.is_relative_to(target) or target.is_relative_to(source): + raise ValueError('profile copy must not overlap the original profile') + + def profile_copy(dest, save): + check_profile_destination(dest) if dest.exists(): shutil.rmtree(dest) shutil.copytree(PROFILE, dest) @@ -157,7 +170,7 @@ def main(): ap.add_argument('--seconds', type=float, required=True, help='game time to run: the run ends once the world clock (game time since the save loaded) passed ' 'this many seconds (shot is taken of that frame)') - ap.add_argument('--tag', default='run', help='names the profile copy and the log') + ap.add_argument('--tag', type=tag_name, default='run', help='names the profile copy and the log (no path separators)') ap.add_argument('--shot', type=Path, help='PNG of the last frame; turns async pipeline builds off (boot.c)') ap.add_argument('--log', type=Path, help='default: /logs/.log') ap.add_argument('--env', action='append', default=[], metavar='KEY=VALUE', help='extra environment, repeatable') @@ -166,6 +179,11 @@ def main(): a = ap.parse_args() exe_dir = a.exe_dir.resolve() + prof = exe_dir / f'prof-{a.tag}' + try: + check_profile_destination(prof) + except ValueError as e: + ap.error(str(e)) log = (a.log or exe_dir / 'logs' / f'{a.tag}.log').resolve() log.parent.mkdir(parents=True, exist_ok=True) gpu = take_gpu_lock(exe_dir) if a.quiet else None @@ -174,7 +192,6 @@ def main(): if a.quiet: while busy(): time.sleep(10) - prof = exe_dir / f'prof-{a.tag}' profile_copy(prof, a.save) env = dict(os.environ, TOTK_ASSUME_FOCUS='1', TOTK_INPUT='none', TOTK_INPUT_SCRIPT=str(a.script.resolve())) From d7c408c4d7f75a9c233434d4819b07c322508616 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 19:43:19 +0000 Subject: [PATCH 45/66] Stop interrupted runs before removing their profile copy --- tests/run_game_test.py | 47 ++++++++++++++++++++++++++++++++++++++++++ tools/run_game.py | 21 ++++++++++++++++--- 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/tests/run_game_test.py b/tests/run_game_test.py index 814a97b8..0953113b 100644 --- a/tests/run_game_test.py +++ b/tests/run_game_test.py @@ -2,6 +2,7 @@ import contextlib import io from pathlib import Path +import subprocess import sys import tempfile import unittest @@ -66,6 +67,7 @@ class ProfileTest(unittest.TestCase): build = self.folder / 'build' proc = unittest.mock.Mock() proc.wait.return_value = 0 + proc.poll.return_value = 0 with patch.object(sys, 'argv', ['run_game.py', str(build), '--seconds', '1', '--tag', 'bench-1', '--show']), \ patch.object(run, 'take_slot', return_value=None), patch.object(run, 'count', return_value=0), \ patch.object(run.subprocess, 'Popen', return_value=proc) as launch, \ @@ -77,6 +79,51 @@ class ProfileTest(unittest.TestCase): self.assertFalse((build / 'prof-bench-1').exists()) self.assertIn('rc=0', (build / 'logs' / 'bench-1.log').read_text()) launch.assert_called_once() + proc.terminate.assert_not_called() + + def test_interrupted_wait_stops_the_owned_child_before_cleanup(self): + child = subprocess.Popen([sys.executable, '-c', 'import time; time.sleep(60)'], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + proxy = unittest.mock.Mock(wraps=child) + interrupted = False + + def wait(*args, **kwargs): + nonlocal interrupted + if not interrupted: + interrupted = True + raise KeyboardInterrupt + return child.wait(*args, **kwargs) + proxy.wait.side_effect = wait + build = self.folder / 'build' + remove = run.shutil.rmtree + + def remove_after_exit(path, *args, **kwargs): + if Path(path) == build / 'prof-run': + self.assertIsNotNone(child.poll(), 'profile cleanup ran while the child was alive') + return remove(path, *args, **kwargs) + try: + with patch.object(sys, 'argv', ['run_game.py', str(build), '--seconds', '1', '--show']), \ + patch.object(run, 'take_slot', return_value=None), patch.object(run, 'count', return_value=0), \ + patch.object(run.shutil, 'rmtree', side_effect=remove_after_exit), \ + patch.object(run.subprocess, 'Popen', return_value=proxy): + with self.assertRaises(KeyboardInterrupt): + run.main() + self.assertIsNotNone(child.poll(), 'interrupted run left its child alive') + self.assertFalse((build / 'prof-run').exists()) + self.assertEqual((self.profile / 'marker').read_text(), 'original profile') + finally: + if child.poll() is None: + child.kill() + child.wait(timeout=5) + + def test_unresponsive_child_is_killed_after_termination_timeout(self): + proc = unittest.mock.Mock() + proc.poll.return_value = None + proc.wait.side_effect = [subprocess.TimeoutExpired('owned child', 5), 0] + run.stop_process(proc) + proc.terminate.assert_called_once() + proc.kill.assert_called_once() + self.assertEqual(proc.wait.call_args_list, [unittest.mock.call(timeout=5), unittest.mock.call()]) if __name__ == '__main__': diff --git a/tools/run_game.py b/tools/run_game.py index cd0a2383..e4984bf3 100644 --- a/tools/run_game.py +++ b/tools/run_game.py @@ -162,6 +162,18 @@ def profile_copy(dest, save): shutil.copytree(SAVES / save, users[0]) +def stop_process(proc): + """Stop this run's child before its disposable profile is removed, including an interrupted wait.""" + if proc.poll() is not None: + return + proc.terminate() + try: + proc.wait(timeout=5) + except subprocess.TimeoutExpired: + proc.kill() + proc.wait() + + def main(): ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) ap.add_argument('exe_dir', type=Path, help='build directory holding totk.exe') @@ -209,9 +221,12 @@ def main(): f.flush() start = time.time() proc = subprocess.Popen(args, cwd=exe_dir, env=env, stdout=f, stderr=subprocess.STDOUT) - if not a.show: - threading.Thread(target=keep_in_background, args=(proc,), daemon=True).start() - rc = proc.wait() + try: + if not a.show: + threading.Thread(target=keep_in_background, args=(proc,), daemon=True).start() + rc = proc.wait() + finally: + stop_process(proc) f.write(f'run_game: rc={rc} wall={time.time() - start:.0f}s; others running after: ' f'totk.exe {count("totk.exe")}, ninja.exe {count("ninja.exe")}\n') finally: From a37f7d8f15394b899ca20561866dd6af87b99f9c Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 20:46:59 +0000 Subject: [PATCH 46/66] Compute benchmark FPS from the combined window duration --- tests/perf_summary_test.py | 61 ++++++++++++++++++++++++++++++++++++++ tests/run_all.py | 1 + tools/perf_summary.py | 8 ++++- 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 tests/perf_summary_test.py diff --git a/tests/perf_summary_test.py b/tests/perf_summary_test.py new file mode 100644 index 00000000..61fbbd5f --- /dev/null +++ b/tests/perf_summary_test.py @@ -0,0 +1,61 @@ +"""The performance log summary reports total frames divided by elapsed time. + + python tests/perf_summary_test.py +""" +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] + + +def window(frame, fps, count=60): + # Synthetic text in runtime/perf.c perf_present's format; no game log is read. + line = (f'perf: frame {frame}: interval avg {1000 / fps:.2f} ms max 50.00 ms ({fps:.1f} fps); ' + 'render thread blocked: pacing 0% fence 0% drain 0% pipeline build 0% shader xlate 0% texture 0%') + return line + (f'; replay avg 1.00 ms; ab 0/{count}; world 20.0 s' if count is not None else '') + '\n' + + +class PerfSummaryTest(unittest.TestCase): + def summarize(self, text, lo=0, hi=1000): + with tempfile.TemporaryDirectory() as tmp: + log = Path(tmp) / 'perf.log' + log.write_text(text, encoding='utf-8') + result = subprocess.run([sys.executable, str(ROOT / 'tools' / 'perf_summary.py'), + str(log), str(lo), str(hi)], capture_output=True, text=True) + self.assertEqual(result.returncode, 0, result.stderr) + return result.stdout + + def test_equal_frame_windows_use_their_combined_duration(self): + # 120 frames in 0.6 + 2.4 seconds = 40 fps, not (100 + 25) / 2. + out = self.summarize(window(60, 100) + window(120, 25)) + self.assertIn('mean fps 40.0, min window fps 25.0, max frame 50.0 ms', out) + + def test_partial_window_uses_its_logged_frame_count(self): + # 30 frames in 0.3 seconds and 60 in 2.4 seconds = 33.3 fps. + out = self.summarize(window(60, 100, 30) + window(120, 25)) + self.assertIn('mean fps 33.3,', out) + + def test_older_logs_without_counts_keep_equal_window_weights(self): + out = self.summarize(window(60, 100, None) + window(120, 25, None)) + self.assertIn('mean fps 40.0,', out) + + def test_frame_bounds_only_include_the_selected_windows(self): + text = window(60, 100) + window(120, 50) + window(180, 25) + window(240, 200) + out = self.summarize(text, lo=60, hi=180) + self.assertIn('SUMMARY frames 60-180: mean fps 33.3, min window fps 25.0,', out) + self.assertNotIn('perf 60:', out) + self.assertNotIn('perf 240:', out) + + def test_constant_rate_is_unchanged(self): + out = self.summarize(window(60, 60) + window(120, 60)) + self.assertIn('mean fps 60.0, min window fps 60.0,', out) + + def test_no_perf_windows_does_not_print_a_frame_summary(self): + self.assertNotIn('SUMMARY frames', self.summarize('unrelated diagnostic\n')) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/run_all.py b/tests/run_all.py index fc74a277..f489d8c0 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -53,6 +53,7 @@ TESTS = { 'excl_mt': ('.venv', 'cc', [], 'compiles the threaded exclusive-monitor harness with clang'), 'check_isa_test': ('.venv', None, [], ''), 'compile_budget_test': ('.venv', None, [], ''), + 'perf_summary_test': ('.venv', None, [], ''), 'pack_shader_cache_test': ('.venv', None, [], ''), 'spin_waits_test': ('.venv', None, [], ''), 'worktree_test': ('.venv', None, [], ''), diff --git a/tools/perf_summary.py b/tools/perf_summary.py index 68725a7e..60289185 100644 --- a/tools/perf_summary.py +++ b/tools/perf_summary.py @@ -11,6 +11,7 @@ import sys PERF = re.compile(r'perf: frame (\d+): interval avg ([\d.]+) ms max ([\d.]+) ms \(([\d.]+) fps\); render thread blocked: ' r'pacing (\d+)%.*?pipeline build (\d+)%.*?texture (\d+)%') +FRAME_COUNT = re.compile(r'; ab \d+/(\d+);') GPU = re.compile(r'perf: frame (\d+): gpu avg (?:([\d.]+) ms|n/a).*?fence wait per frame: render thread ([\d.]+) ms, ' r'other threads ([\d.]+) ms; vram (?:([\d.]+) of ([\d.]+) MiB|n/a).*?ram working set ([\d.]+) MiB, ' r'private ([\d.]+) MiB; bound: (\w+)') @@ -69,6 +70,7 @@ def main(): lo = int(sys.argv[2]) if len(sys.argv) > 2 else 1560 hi = int(sys.argv[3]) if len(sys.argv) > 3 else 10**9 fr, fps, mx, gpu, vram, ram, bound = None, [], [], [], [], [], {} + frame_counts = [] dirty, dframes, dlast = [], [], None for line in open(sys.argv[1], encoding='utf-8', errors='replace'): if line.startswith('run_game:'): @@ -86,6 +88,8 @@ def main(): f = int(m[1]) if lo < f <= hi: fps.append(float(m[4])) + count = FRAME_COUNT.search(line) + frame_counts.append(int(count[1]) if count else 60) # assume full windows when older logs omit the count mx.append(float(m[3])) print(f'perf {f}: {m[4]} fps max {m[3]} pacing {m[5]}% pipe {m[6]}% tex {m[7]}%') elif m := GPU.search(line): @@ -109,7 +113,9 @@ def main(): elif (m := RWAIT.search(line)) and fr and lo < fr <= hi: print(f' rw{m[1]}: {m[2]}') if fps: - print(f'SUMMARY frames {lo}-{hi}: mean fps {statistics.mean(fps):.1f}, min window fps {min(fps):.1f}, ' + # Windows contain frames, not equal durations: total frames / total time is the weighted harmonic mean. + mean_fps = statistics.harmonic_mean(fps, weights=frame_counts) + print(f'SUMMARY frames {lo}-{hi}: mean fps {mean_fps:.1f}, min window fps {min(fps):.1f}, ' f'max frame {max(mx):.1f} ms') if ram: g = f'gpu mean {statistics.mean(gpu):.2f} ms' if gpu else 'gpu n/a' From 7d740a00831ef37e70b469135580c65ef0b9a2f5 Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 20:50:31 +0000 Subject: [PATCH 47/66] Quote the literal linker map path on both platforms --- tests/build_command_test.py | 31 +++++++++++++++++++++++++++++-- tools/build_game.py | 10 +++++----- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/tests/build_command_test.py b/tests/build_command_test.py index 616481e7..84f61c59 100644 --- a/tests/build_command_test.py +++ b/tests/build_command_test.py @@ -27,7 +27,7 @@ class CommandTest(unittest.TestCase): self.probe.write_text('import json, pathlib, sys\n' 'pathlib.Path(sys.argv[1]).write_text(json.dumps(sys.argv[2:]))\n') - def ninja(self, target, command, posix=False): + def ninja(self, target, command, posix=False, bindings=''): if posix: # Ninja on Unix uses sh -c. An expanded response file lets Windows exercise those same shell bytes too. shell = subprocess.list2cmdline([SHELL]) if os.name == 'nt' else shlex.quote(SHELL) @@ -35,7 +35,7 @@ class CommandTest(unittest.TestCase): f' rspfile = $out.rsp\n rspfile_content = {command}\n') else: text = f'rule probe\n command = {command}\n' - (self.folder / 'build.ninja').write_text(text + f'build {target}: probe\n', encoding='utf-8') + (self.folder / 'build.ninja').write_text(bindings + text + f'build {target}: probe\n', encoding='utf-8') env = dict(os.environ, BUILD_QUOTE_TEST='expanded', MSYS2_ARG_CONV_EXCL='*') run = subprocess.run([NINJA, '-f', 'build.ninja', target], cwd=self.folder, env=env, capture_output=True, text=True, timeout=30) @@ -80,6 +80,33 @@ class CommandTest(unittest.TestCase): run = subprocess.run([str(self.folder / target)], timeout=10) self.assertEqual(run.returncode, 0) + @unittest.skipUnless(SHELL and (os.environ.get('CC') or shutil.which('clang')), 'needs a POSIX shell and clang') + def test_linker_writes_the_map_in_the_literal_build_directory(self): + self.link_map(posix=True) + + @unittest.skipUnless(os.name == 'nt' and (os.environ.get('CC') or shutil.which('clang')), 'native Windows linker') + def test_windows_linker_keeps_the_map_path_as_one_argument(self): + self.link_map(posix=False) + + def link_map(self, posix): + output = self.folder / "O'Reilly $BUILD_QUOTE_TEST (output), comma" + output.mkdir() + source = self.folder / 'link.c' + source.write_text('int main(void) { return 0; }\n') + compiler = os.environ.get('CC') or shutil.which('clang') + target = 'link.exe' if os.name == 'nt' else 'link' + with patch.object(build, 'WIN', not posix), patch.object(build, 'vma_include', return_value=self.folder), \ + patch.object(build, 'runtime_sources', return_value=[]): + # Use production Ninja bindings, but link only our own tiny program, without runtime or game inputs. + ninja, _, _ = build.ninja_file(self.folder, output, {}, 1) + bindings = '\n'.join(line for line in ninja.splitlines() + if line.startswith(('builddir = ', 'ldflags = '))) + '\n' + command = (f'{build.cmd_arg(Path(compiler).as_posix())} {build.cmd_path(source)} ' + f'$ldflags -o {build.cmd_arg(target)}') + self.ninja(target, command, posix=posix, bindings=bindings) + self.assertTrue((output / 'totk.map').is_file(), 'the linker must write the map at the requested path') + self.assertIn('main', (output / 'totk.map').read_text()) + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/tools/build_game.py b/tools/build_game.py index 8fe09243..6200e22c 100644 --- a/tools/build_game.py +++ b/tools/build_game.py @@ -161,15 +161,13 @@ if WIN: # _WIN32_WINNT: Windows 10, the port's minimum. MSYS2's headers default to it, llvm-mingw's (the release toolchain) # to Windows 7, which hides the per-monitor DPI functions gfx_window_win.c and dpi_probe_win.c call. RT_FLAGS.append('-D_WIN32_WINNT=0x0A00') - # -Xlinker passes the map path as one argument; -Wl, would split it at any comma in the build dir path - LINK_FLAGS = ['-fuse-ld=lld', '-Wl,--stack,16777216', '-Xlinker', '"--Map=$builddir/totk.map"'] # the map feeds tools/prof_report.py + LINK_FLAGS = ['-fuse-ld=lld', '-Wl,--stack,16777216'] LINK_LIBS = ['-lpsapi', '-lbcrypt', '-lvulkan-1', '-luser32', '-lgdi32', '-ldwmapi', '-limm32', '-lwinmm', '-lole32', '-lshell32', '-luuid', '-lSDL3', '-lopus', '-l:libvpx.a', '-l:libzstd.a', '-l:libstdc++.a', '-l:libwinpthread.a'] # Vulkan back end; libvpx static (movies); libzstd static (resolution.c) VMA_INCLUDE = UCRT.parent / 'include' / 'vma' # vk_mem_alloc.h; MSYS2 package vulkan-memory-allocator else: # -no-pie: the lifted modules' function tables (hundreds of thousands of pointers) need no load-time relocation. # $ORIGIN: a libSDL3.so.0 next to totk comes before the system's (the release's portable folder). - LINK_FLAGS = ['-fuse-ld=lld', '-no-pie', '-Wl,-z,noexecstack', "'-Wl,-rpath,$$ORIGIN'", - '"-Wl,-Map=$builddir/totk.map"'] + LINK_FLAGS = ['-fuse-ld=lld', '-no-pie', '-Wl,-z,noexecstack', "'-Wl,-rpath,$$ORIGIN'"] LINK_LIBS = ['-lvulkan', '-lSDL3', '-lopus', '-lvpx', '-lzstd', '-l:libstdc++.a', '-lm', '-lpthread', '-ldl'] VMA_INCLUDE = Path('/usr/include') # vk_mem_alloc.h; Arch (AUR) vulkan-memory-allocator, Debian libvulkan-memory-allocator-dev # Without a system vk_mem_alloc.h, the header the Windows release pins (tools/make_release.py, VMA 3.4.0) is fetched once @@ -508,6 +506,8 @@ def ninja_file(gen, out, mods, pool_depth, skip=(), prebuilt=(), runtime_lib=Non ffx / 'spirv')) # FidelityFX/host headers, ffx_shader_blobs.h, ffx_shaders_vk.h rt_inc = f'{inc} -I {cmd_path(out)} -I {vma} -I {imgui} {ffx_inc}' # romfs_config.h, vk_mem_alloc.h (+ deps headers), imgui.h libs = [f'-L {cmd_path(DEPS / "lib")}'] + (LLVM_LINK_LIBS if WIN else LINK_LIBS) if DEPS else LINK_LIBS + # The map feeds tools/prof_report.py. Quote its literal path before Ninja expansion; -Xlinker preserves commas. + map_arg = cmd_arg('--Map=' + flag_path(out / 'totk.map')) lines = [ '# Written by tools/build_game.py; do not edit.', 'ninja_required_version = 1.10', @@ -515,7 +515,7 @@ def ninja_file(gen, out, mods, pool_depth, skip=(), prebuilt=(), runtime_lib=Non cc_line(), genflags_line(RUNTIME, gen), f'rtflags = {" ".join(RT_FLAGS)} {rt_inc}', - f'ldflags = {" ".join(LINK_FLAGS)}', + f'ldflags = {" ".join(LINK_FLAGS)} -Xlinker {map_arg}', f'libs = {" ".join(libs)}', '', 'pool gen', From 1b573e00bf5b86e57e3333f702f20eabc883b38d Mon Sep 17 00:00:00 2001 From: ICUMADETHIS Date: Sun, 22 Nov 2026 20:58:26 +0000 Subject: [PATCH 48/66] Handle zero replay baselines in A/B reports --- tests/ab_summary_test.py | 61 ++++++++++++++++++++++++++++++++++++++++ tests/run_all.py | 1 + tools/ab_summary.py | 3 +- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 tests/ab_summary_test.py diff --git a/tests/ab_summary_test.py b/tests/ab_summary_test.py new file mode 100644 index 00000000..867757f4 --- /dev/null +++ b/tests/ab_summary_test.py @@ -0,0 +1,61 @@ +"""A/B log reports keep absolute timings when a percentage has a zero baseline.""" +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] + + +def window(frame, interval, replay, b, n=60, world=20): + return (f'perf: frame {frame}: interval avg {interval:.2f} ms max 100.00 ms ({1000 / interval:.1f} fps); ' + f'replay avg {replay:.2f} ms; ab {b}/{n}; world {world:.1f} s\n') + + +class AbSummaryTest(unittest.TestCase): + def summarize(self, text): + with tempfile.TemporaryDirectory() as tmp: + log = Path(tmp) / 'synthetic.log' + log.write_text(text, encoding='utf-8') + return subprocess.run([sys.executable, str(ROOT / 'tools' / 'ab_summary.py'), str(log)], + capture_output=True, text=True) + + def test_no_replay_on_either_side_keeps_the_interval_comparison(self): + run = self.summarize(window(60, 20, 0, 0) + window(120, 10, 0, 60)) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertIn('B - A: interval -10.00 ms (-50.0%), replay +0.00 ms (n/a: A is zero)', run.stdout) + + def test_replay_appearing_in_b_reports_its_absolute_cost(self): + run = self.summarize(window(60, 10, 0, 0) + window(120, 12, 2, 60)) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertIn('replay +2.00 ms (n/a: A is zero)', run.stdout) + + def test_replay_disappearing_in_b_still_has_a_defined_percentage(self): + run = self.summarize(window(60, 12, 2, 0) + window(120, 10, 0, 60)) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertIn('replay -2.00 ms (-100.0%)', run.stdout) + + def test_nonzero_means_remain_weighted_by_each_windows_frames(self): + text = window(60, 10, 2, 0, n=30) + window(120, 20, 4, 0) + text += window(180, 10, 2, 60) + run = self.summarize(text) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertIn('interval -6.67 ms (-40.0%), replay -1.33 ms (-40.0%)', run.stdout) + + def test_load_and_mixed_windows_stay_excluded(self): + text = window(60, 100, 100, 0, world=5) + window(120, 100, 100, 30) + text += window(180, 10, 2, 0) + window(240, 12, 3, 60) + run = self.summarize(text) + self.assertEqual(run.returncode, 0, run.stderr) + self.assertIn('interval +2.00 ms (+20.0%), replay +1.00 ms (+50.0%)', run.stdout) + + def test_missing_side_keeps_the_diagnostic_and_failure_exit(self): + run = self.summarize(window(60, 10, 2, 0)) + self.assertEqual(run.returncode, 1) + self.assertIn('no whole A and B windows', run.stdout) + self.assertEqual(run.stderr, '') + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/run_all.py b/tests/run_all.py index fc74a277..00bf5944 100644 --- a/tests/run_all.py +++ b/tests/run_all.py @@ -64,6 +64,7 @@ TESTS = { 'exefs_patches_test': ('.venv', None, [], ''), 'exefs_plugins_test': ('.venv', None, [], ''), 'lift_cache_test': ('.venv', None, [], ''), + 'ab_summary_test': ('.venv', None, [], ''), 'settings_doc_check': ('.venv', None, [], ''), 'mouse_direct_check': ('.venv', 'cc', ['--cc', ''], 'compiles its checks with clang'), 'cheats_vm_check': ('.venv', 'cc', ['--cc', ''], 'compiles runtime/cheats.c into a harness with clang'), diff --git a/tools/ab_summary.py b/tools/ab_summary.py index 12f7b819..ce6e6fc2 100644 --- a/tools/ab_summary.py +++ b/tools/ab_summary.py @@ -34,7 +34,8 @@ def main(): iv, rp, secs = means(side[k]) print(f'{name}: {len(side[k]):3d} windows ({secs:5.1f} s), interval {iv:6.2f} ms ({1000 / iv:5.1f} fps), replay {rp:5.2f} ms') (ia, ra, _), (ib, rb, _) = means(side[0]), means(side[1]) - print(f'B - A: interval {ib - ia:+.2f} ms ({100 * (ib - ia) / ia:+.1f}%), replay {rb - ra:+.2f} ms ({100 * (rb - ra) / ra:+.1f}%)') + replay_change = f'{100 * (rb - ra) / ra:+.1f}%' if ra else 'n/a: A is zero' + print(f'B - A: interval {ib - ia:+.2f} ms ({100 * (ib - ia) / ia:+.1f}%), replay {rb - ra:+.2f} ms ({replay_change})') return 0 From 5b15fc0df6a457d87163c404b7694c24fb0b48be Mon Sep 17 00:00:00 2001 From: mattheuspaivadini Date: Sun, 22 Nov 2026 21:05:13 -0300 Subject: [PATCH 49/66] Keep fb_dirty across the ANV vertex-storage barrier, so feedback_prepare still learns the feedback targets (#927) feedback_barrier clears fb_dirty, and feedback_prepare learns which targets go into the feedback layout from m & fb_dirty. A barrier recorded only for a vertex shader's storage read could hide a later attachment read from it. Co-Authored-By: Claude Sonnet 5.5 --- runtime/vk_exec_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/vk_exec_draw.c b/runtime/vk_exec_draw.c index fd8790c9..08911b28 100644 --- a/runtime/vk_exec_draw.c +++ b/runtime/vk_exec_draw.c @@ -3556,7 +3556,7 @@ static int prepare_draw(VkExec *ex, int prim, int32_t count, int restart) { bind_resources(ex, info, bim ? bgt : NULL, bgb); if (fbl & ex->fb_dirty) feedback_barrier(ex); else if (ex->in_pass && anv_vs_barrier() && gfx_shader_resources(vs, GFX_RES_SSBO, &(const GfxShaderRes *){0})) - feedback_barrier(ex); + { uint32_t keep = ex->fb_dirty; feedback_barrier(ex); ex->fb_dirty = keep; } // keep fb_dirty: feedback_prepare learns from it feedback_written(ex, sp); bind_vertex_buffers(ex); if (vk_dump_armed) vk_dump_draw(ex, sp, p, info); From f278e91a7c07d8e790b5038032c3d9160f01a312 Mon Sep 17 00:00:00 2001 From: Ruan Shannon Date: Sun, 22 Nov 2026 16:49:02 -0800 Subject: [PATCH 50/66] null_attach = 1 gives empty colour slots a dummy attachment instead of a null view (Intel legacy driver crash, #1343) On an HD 520 with Intel's legacy Windows driver (101.2125, Vulkan 1.3.215) the game faults inside vkCmdBeginRendering (igvk64.dll+0x5cfab2/+0x5cfab9, frames +0x5c42dd and +0x548235) right after the logo, with the recorder on or off and with import or mirror memory. The driver reads an attachment entry of the pass that is null. vk_exec_pass_begin leaves imageView VK_NULL_HANDLE in every colour slot without a target, which Vulkan allows, and the first pass of a boot that has one is the 1600x896 scene G-buffer pass (slots 2 and 4 empty), the render area of the reported crash. With TOTK_NULL_ATTACH=1 such a slot gets a view of a dummy R8_UNORM image of the pass's size, layer and sample count (one per shape, made once, GENERAL, DONT_CARE load and store), and the pipelines name that format for it with the writes masked off (vk_pipeline.c gkey_fill, target_wmask), so views and pipelines agree. Off by default: nothing changes, and pipeline keys stay as they were. Untested on the affected driver; Iris Xe (101.7092) plays the same with it on. --- docs/settings.md | 1 + runtime/cfg.c | 2 +- runtime/vk.h | 4 +++ runtime/vk_exec.c | 80 ++++++++++++++++++++++++++++++++++++++++++- runtime/vk_pipeline.c | 4 +++ 5 files changed, 89 insertions(+), 2 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 14f8207b..4a61749e 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -170,6 +170,7 @@ Many rows below are developer tools that only act together with another setting | `ub_overlay` (default `1`) | `0` copies each uniform update inside a pass into its buffer at once, ending the pass with a full barrier; `ab` alternates with the `ab` blocks. | With `0` scenes with many updated blocks (the terrain, the sky islands) take longer on the GPU; `TOTK_TRACE=perf` prints how many updates stayed in their pass. | Caution | | `ub_overlay_out` (default `1`) | `0` copies each uniform update between passes into its buffer at once, behind a full barrier of its own; `ab` alternates with the `ab` blocks. Needs `ub_overlay`. | With `0` a run of updates before a pass costs a full GPU barrier each; `TOTK_TRACE=perf` prints how many updates between passes were overlaid. | Caution | | `ubo_snapshot` (default `1`) | `0` binds live memory for uniform blocks; `ab` alternates with the `ab` blocks. | Without snapshots late draws read another object's matrix, so objects can be drawn in the wrong place. | Risky | +| `null_attach` (default `0`) | `1` gives the colour slots of a render pass that hold no target a dummy attachment (an `R8_UNORM` image of the pass's size, writes masked off) instead of a null image view. A workaround to try on Intel's legacy Windows driver for 6th-10th generation graphics (HD 520, UHD 620, driver 101.21xx), which crashed inside `vkCmdBeginRendering` at the first pass with an empty slot (#1343). | A little memory per pass size (1.4 MiB at 1600x896); pipelines with empty slots are built again once. | Caution | | `vk_no_float64` (default `0`) | `1` clears the 64-bit float feature, so the translator lowers FP64 to FP32. | Shaders change, so the shader cache entries for it are made again; precision of FP64 shaders drops. | Caution | | `vk_ssbo_align` (default unset) | Power of two that storage buffer offsets are treated as needing, to test the unaligned path. | The translator and the draw code round storage offsets down to it; shaders are translated again. | Caution | | `vk_subgroup` (default `32`) | Subgroup size to pin where the driver allows it. | A value other than 32 changes what the translator is told about the GPU, and shaders are translated again. | Caution | diff --git a/runtime/cfg.c b/runtime/cfg.c index 4345978a..bf780810 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -66,7 +66,7 @@ static const char *const known[] = { "SHADER_MEMO", "SHADOW", "SHADOW_DEFER", "SHADOW_RANGE", "SHADOW_RES", "SHADOW_SCALE", "SHADOW_SNAP", "SHARED_FONTS", "SHARPNESS", "SHOTS", "SHOTS_DIR", "SHUTTER_FIX", "SHOTS_FULL", "SPEED_PROBE", "SPIN", "SPIN_HANDOFF_US", "SPLIT_DRAWS", "SPLIT_US", "STICK_DEADZONE", "STICK_SENS", "SWKBD_ANSWER", "SYNC_AHEAD", - "SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", + "SWKBD_TEST", "TEST_OOM", "TEST_PAD", "TEST_PAD_RUMBLE_MS", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_BLOCK_MIB", "TEX_HEAP_EXTRA_MB", "TEX_MEMO", "TEX_RELEASED_MIB", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "TXD_TRANSPOSE", "UBO_SNAPSHOT", "UB_OVERLAY", "UB_OVERLAY_OUT", "UPSCALER", "VB_USED", "VK_DYN_A2C", "VK_DYN_VERTEX", "NULL_ATTACH", "VK_NO_FLOAT64", "VK_PRESENT", "VK_RECORDER", "VK_SSBO_ALIGN", "VK_SUBGROUP", "VK_SUBGROUP_PIN", "VK_VALIDATION", "VMA_BLOCK_MIB", "VOLUME", "VOLUME_MASK_BIAS", "VOLUME_MUSIC", "VOLUME_SFX", "VOLUME_VOICE", "VRAM_HEADROOM", "VRAM_LIMIT_MIB", "VS_OUTS", "WALK_KEY", "WALK_SCALE", "WB_EAGER", "WB_EXACT", "WB_FENCE_LIMIT", "WB_MERGE", "WINDOW_SIZE", "XLATE", "XLATE_ID", "XLATE_KEEP", "XLATE_PROCS", "ZSTD_CHECK", "ZSTD_NATIVE", diff --git a/runtime/vk.h b/runtime/vk.h index 9833a213..ab7f3ad0 100644 --- a/runtime/vk.h +++ b/runtime/vk.h @@ -502,6 +502,10 @@ typedef struct { // into it, when the last draw into it was that copy and the swapchain is HDR10. void vk_hdr_present_source(const VkTexImage *win, VkImage *image, VkFormat *format); void vk_hdr_image_gone(VkImage image); +// TOTK_NULL_ATTACH=1: empty colour slots of a pass get a dummy VK_EXEC_NULL_ATTACH_FMT attachment, and the pipelines name +// that format for them with writes masked off (vk_exec.c vk_exec_null_attach, vk_pipeline.c gkey_fill). +#define VK_EXEC_NULL_ATTACH_FMT VK_FORMAT_R8_UNORM +int vk_exec_null_attach(void); const VkTexImage *vk_texture_get(const tex_t *t); // created and made current; NULL for BUFFER or unmapped formats const VkTexImage *vk_texture_revive(const tex_t *t, uint32_t pos); // the entry vk_texture_get would return if it exists, made live at op pos // A texture slot; a slot whose texture was finalized follows the live texture at the same storage (hle_nvn.c). diff --git a/runtime/vk_exec.c b/runtime/vk_exec.c index c16812cb..830015b4 100644 --- a/runtime/vk_exec.c +++ b/runtime/vk_exec.c @@ -674,6 +674,76 @@ static void barrier_to(VkExec *ex, const VkImage *want, const VkImageAspectFlags void vk_exec_barrier(VkExec *ex) { barrier_to(ex, NULL, NULL, 0); } +// TOTK_NULL_ATTACH=1 (null_attach, default 0): colour slots of a pass that hold no target get a view of a dummy image +// instead of VK_NULL_HANDLE. Leaving a slot's imageView null is valid Vulkan, but Intel's legacy Windows driver for +// 6th-10th generation graphics (HD 520, UHD 620; driver 101.21xx, Vulkan 1.3.215) faulted inside vkCmdBeginRendering at +// the game's first pass with an empty slot, the 1600x896 scene G-buffer pass with slots 2 and 4 empty (issue #1343). +// The pipelines then name NULL_ATTACH_FMT for those slots, with their writes masked off (vk_pipeline.c gkey_fill, +// target_wmask), so the views match the pipelines' formats. One image per pass size, layer count and sample count, +// in GENERAL from the start (moved there in the upload batch) and kept to the end; loads and stores are DONT_CARE. +#define NULL_ATTACH_MAX 24 +typedef struct { uint32_t w, h, layers, samples; VkImage img; VmaAllocation alloc; VkImageView view; } NullAttach; +static NullAttach null_att[NULL_ATTACH_MAX]; +static int nnull_att; +static PlatMutex null_att_lock = PLAT_MUTEX_INIT; + +int vk_exec_null_attach(void) { + static int on = -1; + if (on < 0) { + on = rt_knob("NULL_ATTACH", "0") == 1; + if (on) rt_log("vk_exec: empty colour slots get a dummy attachment (TOTK_NULL_ATTACH=1)"); + } + return on; +} + +static VkImageView null_attach_view(uint32_t w, uint32_t h, uint32_t layers, uint32_t samples) { + plat_mutex_lock(&null_att_lock); + for (int i = 0; i < nnull_att; i++) { + const NullAttach *a = &null_att[i]; + if (a->w == w && a->h == h && a->layers == layers && a->samples == samples) { + VkImageView v = a->view; + plat_mutex_unlock(&null_att_lock); + return v; + } + } + static int warned; + if (nnull_att == NULL_ATTACH_MAX) { + if (!warned++) rt_log("vk_exec: more than %d dummy attachment shapes: further empty slots stay empty", NULL_ATTACH_MAX); + plat_mutex_unlock(&null_att_lock); + return VK_NULL_HANDLE; + } + VkCtx *c = vk_ctx(); + NullAttach a = {w, h, layers, samples, VK_NULL_HANDLE, NULL, VK_NULL_HANDLE}; + VkImageCreateInfo ci = {.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .imageType = VK_IMAGE_TYPE_2D, + .format = VK_EXEC_NULL_ATTACH_FMT, .extent = {w, h, 1}, .mipLevels = 1, .arrayLayers = layers, + .samples = (VkSampleCountFlagBits)samples, .tiling = VK_IMAGE_TILING_OPTIMAL, + .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED}; + VmaAllocationCreateInfo ai = {.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE}; + if (vmaCreateImage(c->vma, &ci, &ai, &a.img, &a.alloc, NULL) != VK_SUCCESS) { + if (!warned++) rt_log("vk_exec: a %ux%u x %u dummy attachment could not be created: the slot stays empty", w, h, layers); + plat_mutex_unlock(&null_att_lock); + return VK_NULL_HANDLE; + } + VkImageViewCreateInfo vi = {.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, .image = a.img, + .viewType = layers > 1 ? VK_IMAGE_VIEW_TYPE_2D_ARRAY : VK_IMAGE_VIEW_TYPE_2D, + .format = VK_EXEC_NULL_ATTACH_FMT, + .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, layers}}; + if (vkCreateImageView(c->device, &vi, NULL, &a.view) != VK_SUCCESS) { + vmaDestroyImage(c->vma, a.img, a.alloc); + if (!warned++) rt_log("vk_exec: a dummy attachment view could not be created: the slot stays empty"); + plat_mutex_unlock(&null_att_lock); + return VK_NULL_HANDLE; + } + // In the upload batch, which goes to the queue before the part that records this pass (as the BC stand-ins) + VkCommandBuffer cb = vk_upload_begin(); + image_barrier(cb, a.img, VK_IMAGE_LAYOUT_UNDEFINED, layers); + vk_upload_end(); + null_att[nnull_att++] = a; + plat_mutex_unlock(&null_att_lock); + rt_log("vk_exec: dummy attachment %ux%u x %u, %u samples, for empty colour slots", w, h, layers, samples); + return a.view; +} + void vk_exec_pass_begin(VkExec *ex) { if (ex->in_pass) return; resolve_rt(ex); @@ -699,7 +769,15 @@ void vk_exec_pass_begin(VkExec *ex) { for (uint32_t i = 0; i < ex->pass_ncolor; i++) { const VkExecTarget *t = &ex->color[i]; ca[i] = (VkRenderingAttachmentInfo){.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO}; - if (!t->image) continue; + if (!t->image) { + if (vk_exec_null_attach()) { // a dummy for the empty slot, which the pipelines name too (see above) + ca[i].imageView = null_attach_view(ex->pass_w, ex->pass_h, ex->pass_layers, ex->pass_samples); + ca[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL; + ca[i].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + ca[i].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + } + continue; + } ca[i].imageView = view_of(ex, t); ca[i].imageLayout = fbl >> i & 1 ? VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT : VK_IMAGE_LAYOUT_GENERAL; ca[i].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index b144140c..e7df13de 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -1345,6 +1345,7 @@ static uint32_t target_wmask(const VkPipeState *s, int i) { uint32_t m = s->chmask.mask >> (4 * i) & 0xf; if (s->fs && !(gfx_shader_outputs(s->fs, NULL) >> i & 1)) m = 0; if (i == 1 && s->fs && P.f_dual_src && uses_src1(s)) m = 0; // output 1 is the second blend source (spirv_dual_source) + if (!s->color_fmt[i] && vk_exec_null_attach()) m = 0; // an empty slot's dummy attachment (vk_exec.c) takes no writes return m; } @@ -1380,6 +1381,9 @@ static void gkey_fill(const VkPipeState *s, GKey *k) { o[3] = (uint8_t)blend_factor(b->src_a), o[4] = (uint8_t)blend_factor(b->dst_a), o[5] = (uint8_t)blend_op(b->eq_a); } } + if (vk_exec_null_attach()) // empty slots get the dummy attachment's format (vk_exec.c vk_exec_null_attach) + for (int i = 0; i < k->n_color; i++) + if (k->color[i] == VK_FORMAT_UNDEFINED) k->color[i] = VK_EXEC_NULL_ATTACH_FMT; if (!P.dyn_vi) { VtxInput v; vertex_input(s, &v); From 84e44f3aedc948714ec4e9925c969c68a55338e2 Mon Sep 17 00:00:00 2001 From: ripps818 Date: Sun, 22 Nov 2026 23:24:48 -0600 Subject: [PATCH 51/66] Add AMD Anti-Lag 2 to the low latency setting, with an auto value that picks Reflex or Anti-Lag for the GPU The reflex setting gains an auto value. With auto, on or boost the device uses NVIDIA Reflex when the driver has VK_NV_low_latency2, otherwise AMD Anti-Lag 2 when it has VK_AMD_anti_lag (Mesa RADV, AMD's Windows driver); with neither it does nothing. Anti-Lag marks the INPUT stage where the window texture is acquired and the PRESENT stage just before vkQueuePresentKHR, with the pacer's frame limit as maxFPS. The default stays off. The menu row is renamed Low Latency in all four languages. Co-Authored-By: Claude Sonnet 5.5 --- docs/settings.md | 2 +- runtime/cfg.c | 2 +- runtime/gfx.h | 4 ++++ runtime/gfx_present.c | 29 ++++++++++++++++++++++++++--- runtime/nvn_api_obj.c | 4 +++- runtime/ui/menu.cpp | 4 ++-- runtime/ui_text.c | 20 ++++++++++++-------- runtime/ui_text.h | 2 +- runtime/vk.h | 3 ++- runtime/vk_device.c | 17 ++++++++++++++--- totk.ini.example | 6 ++++-- 11 files changed, 70 insertions(+), 23 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 5258f39c..974f6f0c 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -208,7 +208,7 @@ Many rows below are developer tools that only act together with another setting | `mvprev_grow` (default `1`) | `0` keeps only three banks in the previous-frame tables. | Object motion that depends on the other banks is no longer tracked. | Caution | | `mvprev_skip` | Hex bank mask of banks left out of the previous-frame copy, replacing the default. | Different banks are tracked, which changes object motion. | Caution | | `mvprev_trust` | Hex bank mask of banks whose found previous-frame copy is taken without the check. | A copy that does not match is used anyway, which can give wrong motion. | Caution | -| `reflex` (default `off`) | `off`, `on`, or `boost`; enables NVIDIA Reflex Low Latency (`VK_NV_low_latency2`) to reduce system input latency. Read at start. | On NVIDIA GPUs supporting the extension, coordinates simulation and presentation cadence to lower latency, holding frames to the frame limit the pacer uses (`fps_limit`, the monitor's rate for `display`); `boost` keeps GPU clocks high in CPU-bound scenes. Has no effect on non-NVIDIA GPUs. | Safe | +| `reflex` (default `off`) | `off`, `auto`, `on`, or `boost`; reduces system input latency with what the GPU supports: NVIDIA Reflex Low Latency (`VK_NV_low_latency2`) or AMD Anti-Lag 2 (`VK_AMD_anti_lag`, Mesa RADV and AMD's Windows driver). Read at start. | `auto` and `on` pick the extension the GPU has and do nothing when it has neither. Both coordinate simulation and presentation so input reaches the screen sooner when the GPU is the limit, holding frames to the frame limit the pacer uses (`fps_limit`, the monitor's rate for `display`). `boost` also keeps NVIDIA GPU clocks high in CPU-bound scenes. | Safe | ## Scheduling and host diff --git a/runtime/cfg.c b/runtime/cfg.c index b3dcbb2b..77d2152d 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -146,7 +146,7 @@ static const CfgMeta metas[] = { {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, {"FSR_SHARPNESS", "80", "0..100", LIVE}, // vk_dlaa.c fsr_evaluate {"DLSS_PRESET", "default", "default|k|j", LIVE}, {"DLSS_FIXED_EXPOSURE", "0", "0|1", LIVE}, {"DLAA_EFFECTS_AFTER", "0", "0|1", LIVE}, - {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE}, + {"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"REFLEX", "off", "off|auto|on|boost", RESTART}, {"FXAA", "1", "0|1", LIVE}, {"LOD_STEADY", "0", "0|1", RESTART}, // sets steady {"ASPECT", "fit", "fit|stretch", LIVE}, {"MOVIE_ASPECT", "keep", "keep|stretch", LIVE}, {"FOV", "100", "70..140", LIVE}, {"ANISO", "game", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features diff --git a/runtime/gfx.h b/runtime/gfx.h index c3dedfc8..43abcb00 100644 --- a/runtime/gfx.h +++ b/runtime/gfx.h @@ -33,6 +33,10 @@ void vk_reflex_marker(int marker, uint64_t present_id); // present_id: the fra uint64_t vk_reflex_frame_begin(void); // SIMULATION_START: the new frame's present ID uint64_t vk_reflex_frame(void); // the ID of the frame the game simulates now void vk_reflex_sleep(void); // before SIMULATION_START: the driver's latency sleep +// AMD Anti-Lag 2 (gfx_present.c, VK_AMD_anti_lag): the driver paces the CPU from the INPUT call to the PRESENT call of a +// frame. Both return at once with low latency off or the GPU lacking the extension. +void vk_antilag_input(uint64_t frame); // before the frame's input and simulation; may sleep +void vk_antilag_present(uint64_t frame); // right before the frame's vkQueuePresentKHR // ---- shader service client (gfx_shader.c) enum { GFX_STAGE_VS, GFX_STAGE_TCS, GFX_STAGE_TES, GFX_STAGE_GS, GFX_STAGE_FS, GFX_STAGE_CS }; diff --git a/runtime/gfx_present.c b/runtime/gfx_present.c index fc1ca561..6b3f9796 100644 --- a/runtime/gfx_present.c +++ b/runtime/gfx_present.c @@ -390,8 +390,9 @@ static void latency_note(VkCtx *c, uint64_t pid) { "end %.2f ms", full, gi.timingCount, full ? sum / full / 1000.0 : 0.0); } } - rt_log("reflex: frame start to present %.2f ms over %llu frames (reflex %s)%s", g_lat.n ? g_lat.ns / 1e6 / g_lat.n : 0.0, - (unsigned long long)g_lat.n, g_reflex_mode == 2 ? "boost" : g_reflex_mode == 1 ? "on" : "off", drv); + rt_log("reflex: frame start to present %.2f ms over %llu frames (reflex %s, anti-lag %s)%s", g_lat.n ? g_lat.ns / 1e6 / g_lat.n : 0.0, + (unsigned long long)g_lat.n, g_reflex_mode == 2 ? "boost" : g_reflex_mode == 1 ? "on" : "off", + c->has_amd_antilag ? "on" : "off", drv); g_lat.n = g_lat.ns = 0; } @@ -405,7 +406,8 @@ uint64_t vk_reflex_submit_id(void) { return t_reflex_submit ? t_reflex_submit : void vk_reflex_present_frame(uint64_t id) { // g_blit_pid feeds flip_locked's VkPresentIdKHR (Reflex) and latency_note (TOTK_TRACE=perf); with neither, the // present skips the lock - if (!vk_has_reflex() && !(rt_trace & RT_TRACE_PERF)) return; + VkCtx *c = vk_ctx(); + if (!vk_has_reflex() && !(c && c->has_amd_antilag) && !(rt_trace & RT_TRACE_PERF)) return; plat_rmutex_lock(&g_pl); g_blit_pid = id; plat_rmutex_unlock(&g_pl); @@ -452,6 +454,26 @@ void vk_reflex_sleep(void) { } } +// ---- AMD Anti-Lag 2 (VK_AMD_anti_lag) +static PFN_vkAntiLagUpdateAMD g_antilag_update; + +static void antilag_update(VkAntiLagStageAMD stage, uint64_t frame) { + VkCtx *c = vk_ctx(); + if (!c || !c->has_amd_antilag || !frame) return; + if (!g_antilag_update) g_antilag_update = (PFN_vkAntiLagUpdateAMD)vkGetDeviceProcAddr(c->device, "vkAntiLagUpdateAMD"); + if (!g_antilag_update) return; + // the driver holds frames to the pacer's frame limit, as Reflex's minimum interval does (0: no limit known) + double hz = frame_step_limit_hz(); + VkAntiLagPresentationInfoAMD pi = { + .sType = VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD, .stage = stage, .frameIndex = frame}; + VkAntiLagDataAMD d = {.sType = VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD, .mode = VK_ANTI_LAG_MODE_ON_AMD, + .maxFPS = hz > 0 ? (uint32_t)(hz + 0.5) : 0, .pPresentationInfo = &pi}; + g_antilag_update(c->device, &d); +} + +void vk_antilag_input(uint64_t frame) { antilag_update(VK_ANTI_LAG_STAGE_INPUT_AMD, frame); } +void vk_antilag_present(uint64_t frame) { antilag_update(VK_ANTI_LAG_STAGE_PRESENT_AMD, frame); } + // ---- swapchain static const char *g_present_got = ""; // the TOTK_VK_PRESENT value of the mode the swapchain got; "" before one @@ -503,6 +525,7 @@ static void flip_one(void) { pid_info.pPresentIds = &pid; vk_reflex_marker(4, pid); // VK_LATENCY_MARKER_PRESENT_START_NV } + if (!generated) vk_antilag_present(frame_pid); VkPresentInfoKHR pi = {.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, .pNext = with_id ? &pid_info : NULL, .waitSemaphoreCount = 1, diff --git a/runtime/nvn_api_obj.c b/runtime/nvn_api_obj.c index 8500a70b..d2017718 100644 --- a/runtime/nvn_api_obj.c +++ b/runtime/nvn_api_obj.c @@ -688,7 +688,9 @@ NVN_API(nvnWindowAcquireTexture) { perf_end(PERF_PACE, p0); } vk_reflex_sleep(); - vk_reflex_marker(0, vk_reflex_frame_begin()); // VK_LATENCY_MARKER_SIMULATION_START_NV: a new frame and its ID + uint64_t fid = vk_reflex_frame_begin(); + vk_reflex_marker(0, fid); // VK_LATENCY_MARKER_SIMULATION_START_NV: a new frame and its ID + vk_antilag_input(fid); // The sync means "the display no longer reads this image". Presents are copies queued in submit order, so it is // already satisfied: fenced = 3 with fence 0. if (s) { diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 60684572..520b088b 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -838,8 +838,8 @@ static void tab_screen(float scale) { opt_toggle("TOTK_DLSS_FIXED_EXPOSURE", UI_MENU_DLSS_FIXED_EXPOSURE, UI_MENU_DLSS_FIXED_EXPOSURE_DESC); opt_toggle("TOTK_DLAA_EFFECTS_AFTER", UI_MENU_DLAA_EFFECTS_AFTER, UI_MENU_DLAA_EFFECTS_AFTER_DESC); } - static const UiTextId reflex[] = {UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST}; - opt_choice("TOTK_REFLEX", UI_MENU_REFLEX, reflex, 3, UI_MENU_REFLEX_DESC); + static const UiTextId reflex[] = {UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_AUTO, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST}; + opt_choice("TOTK_REFLEX", UI_MENU_REFLEX, reflex, 4, UI_MENU_REFLEX_DESC); opt_toggle("TOTK_FXAA", UI_MENU_FXAA, UI_MENU_FXAA_DESC); rows_color(); opt_group(UI_MENU_HDR_GROUP); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 5d2a1a8f..3eb91d44 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -174,8 +174,9 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_DLSS_PERFORMANCE] = "Performance", [UI_MENU_DLSS_ULTRA] = "Ultra Performance", [UI_MENU_FXAA] = "Game anti-aliasing (FXAA)", [UI_MENU_FXAA_DESC] = "The game's own FXAA edge smoothing. It blurs fine detail a little; with DLAA on it is not needed.", - [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", - [UI_MENU_REFLEX_DESC] = "Reduces system latency on NVIDIA GPUs using VK_NV_low_latency2. On + Boost keeps GPU clocks high in CPU-bound scenes.", + [UI_MENU_REFLEX] = "Low Latency", + [UI_MENU_REFLEX_DESC] = "Reduces system latency. Auto picks NVIDIA Reflex or AMD Anti-Lag 2 for the GPU (VK_NV_low_latency2, VK_AMD_anti_lag); On + Boost keeps NVIDIA GPU clocks high in CPU-bound scenes. Applies after a restart.", + [UI_MENU_REFLEX_AUTO] = "Auto", [UI_MENU_REFLEX_OFF] = "Off", [UI_MENU_REFLEX_ON] = "On", [UI_MENU_REFLEX_BOOST] = "On + Boost", @@ -819,8 +820,9 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_DLSS_PERFORMANCE] = "Производительность", [UI_MENU_DLSS_ULTRA] = "Макс. производительность", [UI_MENU_FXAA] = "Сглаживание игры (FXAA)", [UI_MENU_FXAA_DESC] = "Собственное сглаживание FXAA. Слегка размывает мелкие детали; с DLAA оно не нужно.", - [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", - [UI_MENU_REFLEX_DESC] = "Снижает задержку системы на видеокартах NVIDIA с помощью VK_NV_low_latency2. «Вкл + Ускорение» удерживает высокие частоты GPU при упоре в процессор.", + [UI_MENU_REFLEX] = "Низкая задержка", + [UI_MENU_REFLEX_DESC] = "Снижает задержку системы. «Авто» выбирает NVIDIA Reflex или AMD Anti-Lag 2 под видеокарту (VK_NV_low_latency2, VK_AMD_anti_lag); «Вкл + Ускорение» удерживает высокие частоты GPU NVIDIA при упоре в процессор. Применяется после перезапуска.", + [UI_MENU_REFLEX_AUTO] = "Авто", [UI_MENU_REFLEX_OFF] = "Выкл", [UI_MENU_REFLEX_ON] = "Вкл", [UI_MENU_REFLEX_BOOST] = "Вкл + Ускорение", @@ -1932,8 +1934,9 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_FXAA] = "Antisserrilhado do jogo (FXAA)", [UI_MENU_FXAA_DESC] = "A suavização de bordas FXAA do próprio jogo. Borra um pouco os detalhes finos; com o DLAA " "ligado não é necessária.", - [UI_MENU_REFLEX] = "NVIDIA Reflex Low Latency", - [UI_MENU_REFLEX_DESC] = "Reduz a latência do sistema em GPUs NVIDIA usando VK_NV_low_latency2. Ligado + Boost mantém os clocks da GPU altos quando limitado pela CPU.", + [UI_MENU_REFLEX] = "Baixa latência", + [UI_MENU_REFLEX_DESC] = "Reduz a latência do sistema. Automático escolhe NVIDIA Reflex ou AMD Anti-Lag 2 conforme a GPU (VK_NV_low_latency2, VK_AMD_anti_lag); Ligado + Boost mantém os clocks da GPU NVIDIA altos quando limitado pela CPU. Aplica após reiniciar.", + [UI_MENU_REFLEX_AUTO] = "Automático", [UI_MENU_REFLEX_OFF] = "Desligado", [UI_MENU_REFLEX_ON] = "Ligado", [UI_MENU_REFLEX_BOOST] = "Ligado + Boost", @@ -2689,8 +2692,9 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_DLSS_CHARS_FULL] = "强", [UI_MENU_FXAA] = "游戏抗锯齿(FXAA)", [UI_MENU_FXAA_DESC] = "游戏自身的 FXAA 边缘平滑。会让细节略微模糊;开启 DLAA 时不需要。", - [UI_MENU_REFLEX] = "NVIDIA Reflex 低延迟", - [UI_MENU_REFLEX_DESC] = "在支持 VK_NV_low_latency2 的 NVIDIA 显卡上降低系统延迟。开 + 增强 (On + Boost) 会在 CPU 瓶颈时保持 GPU 高频率。", + [UI_MENU_REFLEX] = "低延迟", + [UI_MENU_REFLEX_DESC] = "降低系统延迟。自动会按显卡选择 NVIDIA Reflex 或 AMD Anti-Lag 2 (VK_NV_low_latency2、VK_AMD_anti_lag);开 + 增强 (On + Boost) 会在 CPU 瓶颈时保持 NVIDIA 显卡高频率。重启后生效。", + [UI_MENU_REFLEX_AUTO] = "自动", [UI_MENU_REFLEX_OFF] = "关", [UI_MENU_REFLEX_ON] = "开", [UI_MENU_REFLEX_BOOST] = "开 + 增强", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 3cdb2ff4..1247dab5 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -63,7 +63,7 @@ typedef enum { UI_MENU_DLSS_BALANCED, UI_MENU_DLSS_PERFORMANCE, UI_MENU_DLSS_ULTRA, UI_MENU_DLSS_PRESET, UI_MENU_DLSS_PRESET_DESC, UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J, UI_MENU_DLSS_CHARS, UI_MENU_DLSS_CHARS_DESC, UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, UI_MENU_DLSS_CHARS_FULL, UI_MENU_FXAA, UI_MENU_FXAA_DESC, - UI_MENU_REFLEX, UI_MENU_REFLEX_DESC, UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST, + UI_MENU_REFLEX, UI_MENU_REFLEX_DESC, UI_MENU_REFLEX_AUTO, UI_MENU_REFLEX_OFF, UI_MENU_REFLEX_ON, UI_MENU_REFLEX_BOOST, UI_MENU_SCENE_UPSCALER, UI_MENU_SCENE_UPSCALER_DESC, UI_MENU_SCENE_UPSCALER_OFF, UI_MENU_SCENE_UPSCALER_DLSS, UI_MENU_SCENE_UPSCALER_FSR3, UI_MENU_SCENE_UPSCALER_NO_DLSS_GPU, UI_MENU_SCENE_UPSCALER_NO_DLSS_DLL, UI_MENU_FSR3_SHARPNESS, UI_MENU_FSR3_SHARPNESS_DESC, diff --git a/runtime/vk.h b/runtime/vk.h index 9833a213..690be668 100644 --- a/runtime/vk.h +++ b/runtime/vk.h @@ -38,7 +38,8 @@ typedef struct VkCtx { has_astc_ldr, // textureCompressionASTC_LDR (enabled when reported) has_calibrated, // VK_KHR/EXT_calibrated_timestamps (GPU idle split in the perf line) has_hdr_metadata, // VK_EXT_hdr_metadata (vk_hdr.c vk_hdr_metadata) - has_nv_reflex; // VK_NV_low_latency2 (NVIDIA Reflex Low Latency) + has_nv_reflex, // VK_NV_low_latency2 (NVIDIA Reflex Low Latency) + has_amd_antilag; // VK_AMD_anti_lag (AMD Anti-Lag 2) // Feedback loops (maxwell.md 1.9, vk_exec_draw.c feedback_prepare): a draw samples a target of its open pass that // an earlier draw of the pass wrote. TOTK_FEEDBACK=0: VK_FEEDBACK_OFF (sampled in GENERAL without a barrier, the // old behaviour); VK_FEEDBACK_LAYOUT with VK_EXT_attachment_feedback_loop_layout and dynamicRenderingLocalRead diff --git a/runtime/vk_device.c b/runtime/vk_device.c index 07f128f7..31f522df 100644 --- a/runtime/vk_device.c +++ b/runtime/vk_device.c @@ -289,6 +289,7 @@ typedef struct { VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR lr; VkPhysicalDeviceAddressBindingReportFeaturesEXT abr; VkPhysicalDevicePresentIdFeaturesKHR pid; + VkPhysicalDeviceAntiLagFeaturesAMD al; } FeatureChain; static int create_device(void) { @@ -357,16 +358,21 @@ static int create_device(void) { g_vk.has_nv_checkpoints = 1; ext[n_ext++] = VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME; } - // NVIDIA Reflex Low Latency (VK_NV_low_latency2 requires VK_KHR_present_id) + // Low latency (the reflex setting): auto, on and boost use what the GPU has, NVIDIA Reflex (VK_NV_low_latency2, + // which requires VK_KHR_present_id) or AMD Anti-Lag 2 (VK_AMD_anti_lag: RADV and AMD's Windows driver). const char *rv = cfg_value("TOTK_REFLEX"); - if (rv && strcmp(rv, "off") != 0 && strcmp(rv, "0") != 0) { + if (strcmp(rv, "off") != 0 && strcmp(rv, "0") != 0) { if (has_ext(ep, ne, VK_KHR_PRESENT_ID_EXTENSION_NAME) && has_ext(ep, ne, "VK_NV_low_latency2")) { g_vk.has_nv_reflex = 1; ext[n_ext++] = VK_KHR_PRESENT_ID_EXTENSION_NAME; ext[n_ext++] = "VK_NV_low_latency2"; CHAIN(pid, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR); + } else if (has_ext(ep, ne, VK_AMD_ANTI_LAG_EXTENSION_NAME)) { + g_vk.has_amd_antilag = 1; + ext[n_ext++] = VK_AMD_ANTI_LAG_EXTENSION_NAME; + CHAIN(al, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); } else { - rt_log("Reflex: VK_NV_low_latency2 not available"); + rt_log("Low latency: neither VK_NV_low_latency2 nor VK_AMD_anti_lag is available"); } } // Graphics pipeline library: chained last so it can be dropped again when vk_caps_gpl declines it. @@ -418,6 +424,11 @@ static int create_device(void) { g_vk.has_nv_reflex = 0; rt_log("Reflex: VK_NV_low_latency2 not available (no presentId feature)"); } + if (g_vk.has_amd_antilag && !c->al.antiLag) { + g_vk.has_amd_antilag = 0; + rt_log("Anti-Lag: VK_AMD_anti_lag not available (no antiLag feature)"); + } + if (g_vk.has_amd_antilag) rt_log("Anti-Lag: AMD Anti-Lag 2 on (VK_AMD_anti_lag)"); g_vk.has_astc_ldr = h->textureCompressionASTC_LDR; { const char *e = cfg_get("TOTK_FEEDBACK"); diff --git a/totk.ini.example b/totk.ini.example index d773f1df..0a1c263c 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -342,8 +342,10 @@ # processes these effects too, as before (the default until the inventory preview, the scope and water edges are # checked on NVIDIA). The upscaling DLSS modes always process them. Changes while the game runs take effect at once. # dlaa_effects_after = 0 -# NVIDIA Reflex Low Latency (NVIDIA GPUs supporting VK_NV_low_latency2): off, on, or boost. -# Reduces system input latency; boost keeps GPU clocks high in CPU-bound scenes. Read at start. +# Low latency: off, auto, on or boost. Reduces system input latency with what the GPU has: NVIDIA Reflex +# (VK_NV_low_latency2) or AMD Anti-Lag 2 (VK_AMD_anti_lag: Mesa RADV, AMD's Windows driver). auto and on pick the +# one the GPU supports and do nothing on a GPU with neither; boost also keeps NVIDIA GPU clocks high in CPU-bound +# scenes. Frames are held to the frame limit the pacer uses. Read at start. # reflex = off # The game's own FXAA after the post effects; with DLAA on it is not needed. Changes while the game runs take effect at # once. From c603112fcaba898b4dce74ee56d2e60a65d77857 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 23 Nov 2026 08:40:59 +0300 Subject: [PATCH 52/66] The plugin check accepts exlaunch's exl_inline_hook_with_fp_impl, the inline-hook entry that saves d0..d15 next to x0..x29. Magic of the Kingdom's hook stub calls it and was refused for it (#1388) Co-Authored-By: Claude Opus 5.5 --- tests/exefs_plugins_test.py | 6 ++++++ tools/exefs_plugins.py | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/exefs_plugins_test.py b/tests/exefs_plugins_test.py index 4f5a39ce..00c060c7 100644 --- a/tests/exefs_plugins_test.py +++ b/tests/exefs_plugins_test.py @@ -182,6 +182,12 @@ class Check(unittest.TestCase): self.assertEqual(hooks[0]['callback'], f'plugin0+{CB_OFF:#x}') self.assertEqual(hooks[0]['trampoline'], f'plugin0+{TRAMP_OFF:#x}') + def test_good_with_fp_impl(self): # Magic of the Kingdom: the impl that saves d0..d15 as well + self.assertIn('exl_inline_hook_with_fp_impl', xp.HOOK_IMPLS) + hooks, reasons = xp.check_record(record(), {PLUGIN + IMPL_OFF: 'exl_inline_hook_with_fp_impl'}) + self.assertEqual(reasons, []) + self.assertEqual(hooks[0]['impl'], 'exl_inline_hook_with_fp_impl') + def test_good_plain_original(self): self.assertEqual(self.reasons(record(original=0xAA0003F3)), []) # mov x19, x0, copied as it is diff --git a/tools/exefs_plugins.py b/tools/exefs_plugins.py index ec584a30..7fd98069 100644 --- a/tools/exefs_plugins.py +++ b/tools/exefs_plugins.py @@ -37,7 +37,7 @@ The check (check_record) accepts a record only when every rule holds; each broke - the init called only the svcs ALLOWED_SVCS, GetInfo with ALLOWED_INFO, and the imports ALLOWED_IMPORTS; - every write into a game module is a word of main's .text whose original is no br, blr or ret, and it is one of: - an inline hook (MSFix, Full Inventory Expansion): `b ` into a plugin's .text, the stub in exlaunch's - shape (stur x30, [sp, #-0x10]; bl exl_inline_hook_impl or the float one; ldur x30, [sp, #-0x10]; + shape (stur x30, [sp, #-0x10]; bl one of exlaunch's hook impls, HOOK_IMPLS; ldur x30, [sp, #-0x10]; b ; .quad ), the trampoline the site's original relocated (the same word, the same PC-relative target, or exlaunch's long form of it, relocation_end) and its jump back to the site + 4 (returns_to); @@ -86,7 +86,10 @@ ALLOWED_IMPORTS = SAFE_LIBC | {SNPRINTF, '_ZN2nn2oe17GetDisplayVersionEPNS0_14Di # talks to a service or changes memory mappings. REACH_IMPORTS = SAFE_LIBC | {SNPRINTF} SVC_OUTPUT_DEBUG_STRING = 0x27 -HOOK_IMPLS = ('exl_inline_hook_impl', 'exl_inline_float_hook_impl') +# exlaunch's inline-hook entry points. Each saves the registers its context holds, calls the callback with that context +# and restores them; none saves NZCV (recomp/flags.py). exl_inline_hook_with_fp_impl (Magic of the Kingdom) saves +# d0..d15 next to x0..x29. +HOOK_IMPLS = ('exl_inline_hook_impl', 'exl_inline_float_hook_impl', 'exl_inline_hook_with_fp_impl') STUR_X30 = 0xF81F03FE # stur x30, [sp, #-0x10] LDUR_X30 = 0xF85F03FE # ldur x30, [sp, #-0x10] STUB_WORDS = 6 # 4 instructions and the callback's .quad From 3fe8d7a1d96dd2f5d0c6d7587fdf12ac4f2ad0a2 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 23 Nov 2026 10:35:59 +0300 Subject: [PATCH 53/66] Mod plugins that hook the middle of game functions, swap pointers in the game's data, use the SD card or switch their hooks during play build in, and may call what the game itself calls; Zonai Fieldworks starts (#1388) Zonai Fieldworks was refused at several steps; each is now handled: 1. The start-up asked GetInfo 6, 7, 16 and 17 and SetHeapSize; runtime/plugin_init.c serves them. 2. Its start-up calls main where the lift has no function start. The tool names those addresses (--entries-out) and the installer lifts again with them as `entry` lines, up to four rounds (installer/steps.py PLUGIN_ENTRY_ROUNDS). 3. Branch hooks into the middle of game functions (far-jump veneers) and pointer swaps in main's data are accepted hook kinds; the veneer targets seed the plugin's lift, and an Orig trampoline counts as a seed. 4. Code the start-up writes into the plugin's own .text (hook pads it switches to during play) is found by comparing the image before and after the init, and seeds the lift (init_code). Without it the game stopped with "no function at guest pc" when a feature switched on. 5. recomp/gen.py: a branch-out alternative on a flag-writing site leaves with the flags from before the site; an inline hook may sit on a blr. 6. nn::fs::MountSdCard mounts /sdcard (runtime/fs_host.c), and nn::settings language codes are answered (runtime/ov_system.c). The import check now also allows what the game's main imports (--exefs, game_imports): the game runs on those paths, so the runtime serves them. Left out: nn::ro, the C runtime start, the thread-local allocator hook and the shader compiler. Break in code the hooks reach is allowed (an abort ends the game with the reason, as on the Switch), and RenameFile, DeleteDirectoryRecursively, Commit and Unmount join the SD card calls. Checked: Zonai Fieldworks, The Second Quest, Challenge Mode and Material Columns on 1.4.3, Full Inventory Expansion, Quick Weapon Durability and Magic of the Kingdom on 1.2.1 accepted; UltraCam's init still crashes its service run. Plain lift unchanged; probes 4/4 on both versions. Co-Authored-By: Claude Opus 5.5 --- docs/mods.md | 20 ++- installer/steps.py | 48 +++++-- recomp/gen.py | 99 +++++++++---- recomp/patches.py | 20 ++- runtime/fs_host.c | 16 ++- runtime/ov_system.c | 13 ++ runtime/plugin_init.c | 45 ++++-- tests/exefs_plugins_test.py | 153 ++++++++++++++++++-- tools/exefs_plugins.py | 274 ++++++++++++++++++++++++++++-------- 9 files changed, 552 insertions(+), 136 deletions(-) diff --git a/docs/mods.md b/docs/mods.md index 1fd24061..040d7cf6 100644 --- a/docs/mods.md +++ b/docs/mods.md @@ -123,14 +123,22 @@ The Mods tab order decides between a plugin and another mod's patch on the same plugin site over one of the port's own patches turns that built-in patch off while the mod is on. The rebuild refuses a plugin when its start-up or the code its redirects reach needs what the port does not give it: -system calls other than the few its start-up needs (memory queries and maps, the clock, debug output), library calls -outside a reviewed list (memory and string functions, the heap, text formatting), threads, services or input; a -redirect that is not one of exlaunch's hook shapes (inline hook, replace hook, call-site rewrite); or two runs of its -start-up that differ in code; or a start-up that crashes the service run or does not return within two minutes. The -row then says **Its plugin ... cannot run in the port** with the reason, and the mod stays off; **Use without its -code** uses the rest of it, including its other plugins that were built in. UltraCam stays refused: it hooks the graphics API, +system calls other than the few its start-up needs (memory queries and maps, the heap size, the clock, debug output), +or a library call the game itself never makes and a reviewed list does not hold (memory and string functions, the heap, +text formatting, mutexes, the clock, the system language, the SD card's files), such as network sockets or the module +loader. A library call the game makes (threads, input, time, its files) runs on the path the game runs on. A start-up +still gets only the system calls above, so it cannot start a thread or open a service; a redirect that is not one of exlaunch's hook shapes +(inline hook, replace hook, call-site rewrite, a branch into its code from inside a game function, a pointer in the +game's data swapped for one into its code); a write into the game's read-only data or into another module; two runs of +its start-up that differ in code; or a start-up that crashes the service run or does not return within two minutes. +The row then says **Its plugin ... cannot run in the port** with the reason, and the mod stays off; **Use without +its code** uses the rest of it, including its other plugins that were built in. UltraCam stays refused: it hooks the graphics API, reads input and opens sockets. +When a start-up calls into the middle of a game function, the rebuild lifts the game again with that address as a +function start and reruns the start-up, up to four times. A plugin that reads or writes files on the SD card gets +the folder `sdcard` in the game's profile folder in its place. + `plugin_trace = 1` in `totk.ini` logs the first call into each of a plugin's hooks (`plugins: hook entry ... reached`). ## Cheats diff --git a/installer/steps.py b/installer/steps.py index f231eec5..2686db46 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -64,6 +64,7 @@ TEMP_NEED = 3 * GiB # generated C (about 0.9 GB) and objects KIT_NEED = 1 * GiB # the build kit (Kit), about 0.65 GB HOSTCHECK = Path(__file__).resolve().parent / 'hostcheck.c' STAMP = '.install-key' +PLUGIN_ENTRY_ROUNDS = 4 # plugin lifts at most: each finds where an init called into main past a function start # ---- helpers @@ -1246,20 +1247,39 @@ class Lift(Step): lift_plugins = [] if plugins: listed = ['--plugins', ','.join(str(f) for f in plugins)] - code, log = run_tool(ctx, 'lift', layout.recomp / 'gen.py', args + ['--patches', patches] + listed, parse) - if not code: - code, log = run_tool(ctx, 'lift', layout.tools / 'build_game.py', build_args(ctx, gen)) - if not code: - # the service run's totk.exe loads its DLLs from its own folder, as the installed one does - for dll in layout.dlls: - replace_file(dll, ctx.temp / 'build' / dll.name) - code, log = run_tool(ctx, 'lift', layout.tools / 'exefs_plugins.py', [ - '--exe', ctx.temp / 'build' / ('totk' + EXE), '--out', ctx.temp / 'plugins', '--mods', - ctx.dest / 'mods', '--patches', patches, '--patches-out', ctx.temp / 'patches-plugins.txt', - '--status', plugins_status(ctx)]) - # exit 1 with a status file: refused plugins, their reasons in it; the rest goes on - if plugins_status(ctx).is_file() and (ctx.temp / 'patches-plugins.txt').is_file(): - code = 0 + # An init that calls into main where the lift has no function start crashes its service run; the tool + # names those addresses (--entries-out), and one more lift with them as `entry` lines lets the init go on + # (Zonai Fieldworks calls the second word of a 1.4.3 function). Each round adds what the last one found. + lift_patches, found = patches, [] + for _ in range(PLUGIN_ENTRY_ROUNDS): + code, log = run_tool(ctx, 'lift', layout.recomp / 'gen.py', args + ['--patches', lift_patches] + listed, + parse) + if not code: + code, log = run_tool(ctx, 'lift', layout.tools / 'build_game.py', build_args(ctx, gen)) + if not code: + # the service run's totk.exe loads its DLLs from its own folder, as the installed one does + for dll in layout.dlls: + replace_file(dll, ctx.temp / 'build' / dll.name) + entries_file = ctx.temp / 'plugin-entries.txt' + entries_file.unlink(missing_ok=True) + code, log = run_tool(ctx, 'lift', layout.tools / 'exefs_plugins.py', [ + '--exe', ctx.temp / 'build' / ('totk' + EXE), '--out', ctx.temp / 'plugins', '--mods', + ctx.dest / 'mods', '--exefs', ctx.dest / 'exefs', '--patches', lift_patches, + '--patches-out', ctx.temp / 'patches-plugins.txt', '--status', plugins_status(ctx), + '--entries-out', entries_file]) + # exit 1 with a status file: refused plugins, their reasons in it; the rest goes on + if plugins_status(ctx).is_file() and (ctx.temp / 'patches-plugins.txt').is_file(): + code = 0 + if code: + break + new = [line for line in (entries_file.read_text(encoding='utf-8').splitlines() + if entries_file.is_file() else []) if line and line not in found] + if not new: + break + found += new + lift_patches = ctx.temp / 'patches-entries.txt' + lift_patches.write_text(Path(patches).read_text(encoding='utf-8') + '\n' + '\n'.join(found) + '\n', + encoding='utf-8') if code: drop([plugins_status(ctx)]) skipped['warn.plugins_skipped'] = log diff --git a/recomp/gen.py b/recomp/gen.py index 8bf0e24b..9e48416f 100644 --- a/recomp/gen.py +++ b/recomp/gen.py @@ -96,10 +96,13 @@ def orig_name(a): def open_module(name, path, base, table, plugin=False): """Module name for lifting: a plugin with a `plugin` line of the patch table (recomp/patches.py) is lifted from its - image after the init, its inline-hook stubs returning where they would branch to their trampolines.""" + image after the init, its inline-hook stubs returning where they would branch to their trampolines. A game module's + `entry` lines are function starts of its lift.""" p = table.plugins.get(name) if not p: - return Module(name, path, base, 'c', plugin=plugin) + mod = Module(name, path, base, 'c', plugin=plugin) + mod.entries = sorted(base + o for o in table.entries.get(name, ())) + return mod image = Path(p['image']).read_bytes() mod = Module(name, path, base, 'c', plugin=True, image=image, rets=[o + 12 for o in p['stubs']], seeds=sorted(p['stubs'] | p['seeds'])) @@ -195,24 +198,58 @@ def discover(mod): stats = {'seeds': int(len(seeds)), 'bl_targets': int(len(np.unique(bl_tgt))), 'materialised_targets': int(len(np.unique(mat))), 'initial_starts': int(len(starts))} - rounds = 0 - while True: - rounds += 1 - f = np.searchsorted(starts, br_src, side='right') - 1 - live = f >= 0 - f = np.where(live, f, 0) - lo = starts[f] - hi = np.where(f + 1 < len(starts), starts[np.minimum(f + 1, len(starts) - 1)], n) - out = live & ((br_tgt < lo) | (br_tgt >= hi)) - new = np.setdiff1d(br_tgt[out], starts, assume_unique=False) - if not len(new): - break - starts = np.union1d(starts, new) - stats['rounds'] = rounds + def close(starts): + rounds = 0 + while True: + rounds += 1 + f = np.searchsorted(starts, br_src, side='right') - 1 + live = f >= 0 + f = np.where(live, f, 0) + lo = starts[f] + hi = np.where(f + 1 < len(starts), starts[np.minimum(f + 1, len(starts) - 1)], n) + out = live & ((br_tgt < lo) | (br_tgt >= hi)) + new = np.setdiff1d(br_tgt[out], starts, assume_unique=False) + if not len(new): + return starts, rounds + starts = np.union1d(starts, new) + + starts, stats['rounds'] = close(starts) + entries = getattr(mod, 'entries', ()) + if entries: + extra = entry_starts(mod, starts, entries, br) + stats['entries'] = len(entries) + starts, more = close(np.union1d(starts, (np.asarray(sorted(extra), dtype=np.int64) - pc0) >> 2)) + stats['rounds'] += more stats['functions'] = int(len(starts)) return starts, stats +def entry_starts(mod, starts, entries, br): + """The function starts mod's `entry` addresses add (recomp/patches.py): each entry, and every target of the jump + tables of the function that held it. A table whose cases fell on both sides of the new boundary would reach the + cases outside its function through rt_dispatch, which only enters function starts; with every case a start, the + table's br dispatches to them (the all-label fallback). An unresolved computed br there gets a warning: its targets + are not known, so a case past the entry would stop the game with a named fatal.""" + out, pc0 = set(), mod.lo + for e in entries: + if not mod.in_text(e): + raise SystemExit(f'{mod.name}: the entry {e:#x} is outside its .text') + k = int(np.searchsorted(starts, (e - pc0) >> 2, side='right')) - 1 + lo = pc0 + int(starts[k]) * 4 + hi = pc0 + int(starts[k + 1]) * 4 if k + 1 < len(starts) else mod.hi + out.add(e) + if e == lo: + continue + for i in br[(br >= (lo - pc0) >> 2) & (br < (hi - pc0) >> 2)].tolist(): + jt = jumptables.resolve(mod, pc0 + 4 * i, lo, hi) + if jt: + out.update(jt) + elif jumptables.is_computed(mod, pc0 + 4 * i, lo): + print(f'{mod.name}: warning: the entry {e:#x} lies in the function {lo:#x} with an unresolved table ' + f'jump at {pc0 + 4 * i:#x}', flush=True) + return out + + def estimate_sizes(mod, starts): """Estimated bytes of C per function (for chunking only; the manifest records the real sizes).""" w = mod.words @@ -316,7 +353,8 @@ class Emitter: def replacements(self, a): """The lifted words of each alternative of the patched site a, in set order. Only the last word of an - alternative may branch (bl, b, b.cond / cbz / tbz, ret).""" + alternative may branch (bl, blr, b, b.cond / cbz / tbz, ret); a blr is a site's own word kept after an inline + hook.""" out = [] for _, words in self.patched[a]: # ('call', target): a plugin's inline hook (recomp/patches.py @call), before the site's own instruction @@ -325,7 +363,7 @@ class Emitter: last = j == len(lifted) - 1 if r.kind == 'hook' and not last: continue - if r.kind != 'op' and not (last and r.kind in ('bl', 'b', 'bcond', 'ret')): + if r.kind != 'op' and not (last and r.kind in ('bl', 'blr', 'b', 'bcond', 'ret')): raise patches.PatchError(f'{a:#x}: replacement word {words[j]:08x} is a {r.kind}') out.append(lifted) return out @@ -378,7 +416,7 @@ class Emitter: effects.append(self.patched_effect(ins, a)) for words in self.replacements(a): r = words[-1] - if r.kind == 'bl': + if r.kind in ('bl', 'blr'): calls.add(i) elif r.kind in ('b', 'bcond') and not entry <= r.target < end: exits.add(i) @@ -391,19 +429,26 @@ class Emitter: def patched_effect(self, ins, a): """Flag effect of a patched site: every alternative (the original and each replacement) must write the same - flags, in at most one word each; the site reads flags when any alternative does (a b.cond reads them).""" + flags, in at most one word each; the site reads flags when any alternative does (a b.cond reads them). + An alternative that only branches out of the module (a plugin's branch hook, whose trampoline runs the + original word) counts for none: it leaves with the flags from before the site, which its tail exit publishes + (flags.plan), and nothing after the site in this function sees it.""" alts = [] - for words in [[ins]] + self.replacements(a): + for k, words in enumerate([[ins]] + self.replacements(a)): fx = [flags.effect(w.code or '') if w.kind == 'op' else flags.effect(w.cond) for w in words if w.kind in ('op', 'bcond')] fx = [e for e in fx if e[0] or e[1]] if len(fx) > 1: raise patches.PatchError(f'{a:#x}: several flag-using words in one alternative') + last = words[-1] + if k and not fx and last.kind == 'b' and not self.mod.lo <= last.target < self.mod.hi: + continue alts.append(fx[0] if fx else (False, None)) if any(e[1] != alts[0][1] for e in alts): raise patches.PatchError(f'{a:#x}: the alternatives write different flags ({[e[1] for e in alts]})') reads = any(e[0] for e in alts) - if (alts[0][1] or reads) and (ins.kind == 'bl' or any(w[-1].kind == 'bl' for w in self.replacements(a))): + if (alts[0][1] or reads) and (ins.kind in ('bl', 'blr') or + any(w[-1].kind in ('bl', 'blr') for w in self.replacements(a))): raise patches.PatchError(f'{a:#x}: a patched call that uses flags') return reads, alts[0][1] @@ -511,6 +556,9 @@ class Emitter: return f'if ({fx(i, r.cond)}) {{ {jump(r.target, i)} }}' if r.kind == 'ret': return f'{spill}return;' + if r.kind == 'blr': # an original call through a register (a plugin hooks Zonai Fieldworks' blr x8 sites) + return (f'{give(i)}c->pc = {r.target}; c->x[30] = {hx(a + 4)}; {spill}rt_dispatch(c);{reload_call}' + f'{take(i)}') if r.kind == 'hook': # a call that writes no x30, the whole Cpu current before it and read back after it: the stub saves and # restores x30 itself, and the callback may change any register through exlaunch's hook context @@ -523,7 +571,7 @@ class Emitter: def patch(i, ins, a): """if (switch) { replacement } else if ... else { original } for a patched site (recomp/patches.py); an ordered set of a contested site tests the site's pick byte instead of its switch.""" - if ins.kind not in ('op', 'bl', 'b', 'bcond'): + if ins.kind not in ('op', 'bl', 'blr', 'b', 'bcond'): raise patches.PatchError(f'{a:#x}: patched instruction is a {ins.kind}') line = ' ' n, values = self.picks.get(a, (None, {})) @@ -1004,8 +1052,9 @@ def main(): n = len(starts) if not args.limit else min(args.limit, len(starts)) ends = np.append(abs_starts[1:], mod.hi) chunks = partition(est[:n], args.chunk_fns, args.chunk_bytes, args.big_fn) - missing = sorted(base + o for o in (table.plugins.get(name) or {}).get('seeds', ()) - if base + o not in set(abs_starts.tolist())) + # a seed that is an `orig` trampoline counts as found: dispatch takes its address to the function's copy + missing = sorted(base + o for o in set((table.plugins.get(name) or {}).get('seeds', ())) | + table.entries.get(name, set()) if base + o not in set(abs_starts.tolist()) | set(extra)) if missing: raise SystemExit(f'{name}: the seeds {", ".join(hex(a) for a in missing)} are no function starts') mkey = module_key(gen_key, name, path, base, abs_starts) diff --git a/recomp/patches.py b/recomp/patches.py index ad738a68..03ebc018 100644 --- a/recomp/patches.py +++ b/recomp/patches.py @@ -16,6 +16,7 @@ path may be a JSON double-quoted string to preserve spaces, `#` and escaped char stub seed [ ...] orig + entry [ ...]
is a module offset (hex), the instruction word the module has there (checked; a mismatch stops the generator), each an instruction word (hex) or `@page:x`, which is `adrp x, ` @@ -41,7 +42,7 @@ wins, a tie goes to the set later in the file). The other alternatives of a cont their rt_patch_on test, so a cheat before the mods' sets still wins while it is on. A site with at most one ordered set, and a table without contested sites, is emitted exactly as without the keyword. -The original may be any instruction but br, blr and ret; a replacement's last word may be +The original may be any instruction but br and ret; a replacement's last word may be a bl (lifted with the site's return address), a b or b.cond / cbz / tbz (its target joins the function's labels when inside it) or a ret; earlier words must not branch. Every alternative of a site writes the same flags. The generator writes patches.h (set names, switches, the page address, the contested sites) next to layout.h for the runtime. @@ -68,6 +69,12 @@ run's record; the design follows #845 by itaskaev2): lifts the function at + a second time without its patched sites (fo_
) and lists that copy at the trampoline's address in 's function table, so the call reaches the original code and not the hook again. +An `entry` line names addresses of a game module that a plugin calls by pointer although they are no function start +of the game's code (Zonai Fieldworks calls main+0x481918 of 1.4.3, the second word of a function, skipping its first +test). gen.py makes each one a function start of the module's lift: the function that held it ends there and runs on +into it by a tail jump, as at any function boundary, so the game's own path through the code does not change. +tools/exefs_plugins.py writes them when a service run calls such an address (installer/steps.py lifts again). + A replacement word `@call:+` is a call of the function there that writes no x30: every register in the Cpu at the call and all read back after it (the callback may change any of them, as exlaunch's hook context allows); the flags are published before it and taken back after it, since exlaunch's hook impl saves no NZCV and the @@ -104,8 +111,9 @@ class Table: from here (for_module, picks_for, spins_for, hooks_for) is in the lift cache's key (recomp/gen.py chunk_key); a new kind of line the Emitter reads must go there too.""" - def __init__(self, sets=(), sites=None, page=0, spins=None, hooks=None, ordered=(), plugins=None): + def __init__(self, sets=(), sites=None, page=0, spins=None, hooks=None, ordered=(), plugins=None, entries=None): self.sets = list(sets) + self.entries = entries or {} # {module: {offset}}: `entry` lines self.sites = sites or {} self.page = page self.spins = spins or {} # {module: {back-edge offset: head offset}} @@ -187,7 +195,7 @@ class Table: def load(path, mods): """Table from a patch file; mods is layout() output [(name, base, size)].""" - sets, index, sites, spins, hooks, ordered, plugins = [], {}, {}, {}, {}, set(), {} + sets, index, sites, spins, hooks, ordered, plugins, entries = [], {}, {}, {}, {}, set(), {}, {} bases = {n: (b, s) for n, b, s in mods} for no, raw in enumerate(Path(path).read_text(encoding='utf-8').splitlines(), 1): where = f'{path}:{no}' @@ -255,6 +263,10 @@ def load(path, mods): 'seeds': set(), 'origs': {}} elif f[0] in ('expect', 'stub', 'seed', 'orig'): plugin_line(f, where, index, bases, plugins) + elif f[0] == 'entry' and len(f) >= 3: + if f[1] not in bases: + raise PatchError(f'{where}: module {f[1]} not in the layout') + entries.setdefault(f[1], set()).update(int(o, 16) for o in f[2:]) elif f[0] == 'hook' and len(f) >= 3: if f[1] not in bases: raise PatchError(f'{where}: module {f[1]} not in the layout') @@ -266,7 +278,7 @@ def load(path, mods): nxt = min((b for _, b, _ in mods if b > base), default=None) if nxt is not None and page + PAGE > nxt: raise PatchError(f'no room for the patch page after main ({page:#x})') - table = Table(sets, sites, page, spins, hooks, ordered, plugins) + table = Table(sets, sites, page, spins, hooks, ordered, plugins, entries) table.bases = {n: b for n, (b, _) in bases.items()} return table diff --git a/runtime/fs_host.c b/runtime/fs_host.c index 9391c5b5..5379ea69 100644 --- a/runtime/fs_host.c +++ b/runtime/fs_host.c @@ -11,6 +11,8 @@ // /save-backup/
.key holds the key, what the build gave (a table or none) and the -// SHA-256 of the written table, so a copied profile keeps it; anything else there is a miss and the table is built -// again. TOTK_RESTBL_CACHE=0 builds it at every start. -#define RESTBL_CACHE_VERSION 2 +// ---- the merged table across starts (TOTK_RESTBL_CACHE=1, off by default). Building it opens every mod file and +// unpacks the mods' packs. A start whose inputs are the same as the last one's serves the table that start wrote. +// The key is a SHA-256 over every input restbl_overlay reads: +// - the running totk.exe's path and identity: a new build may merge differently, and it carries the port version, the +// game version and the RomFS index's SHA-256 (romfs_config.h); +// - the RomFS image's path and identity and the game table's index entry: the base table, the game's copies of the +// mods' packs and Pack/ZsDic.pack.zs come from the image; +// - every shipped table (restbl_collect, mod_walk_cb; also the ones overlay_contest drops) with its owner and identity; +// - every overlay overlay_contest kept (player mods, the TOTK_ROMFS_MODS manifest, the port's folders) with its RomFS +// path, file path, place in the order (index, prio, mod) and identity. +// Identity is the volume, file id, size, last write and creation time. A file's bytes are not hashed: identity is +// what the overlay layer already trusts (romfs_open stops the game on a file whose identity changed after the start +// check), and hashing a texture pack would cost more than the merge does. /mods/
.key holds the key, +// what the build gave (a table or none) and the SHA-256 of the table it wrote; it is replaced atomically after the +// table is written. A key file of another size, magic or version, another key, or a table of another SHA-256 is a +// miss: the table is built again and both files are replaced, so the cache stays two files. +#define RESTBL_CACHE_VERSION 3 typedef struct { char magic[8]; uint32_t version, outcome; uint8_t key[32], table[32]; } RestblCache; enum { RESTBL_NONE = 1, RESTBL_TABLE = 2 }; @@ -778,15 +788,23 @@ static void restbl_cache_paths(char *key, size_t key_cap, char *table, size_t ta need(snprintf(key, key_cap, "%s.key", table) < (int)key_cap, "table key path"); } -static void hash_file_id(Sha256 *h, const char *path) { +static void hash_identity(Sha256 *h, const char *path, const Identity *id) { + sha256_update(h, path, strlen(path) + 1); + sha256_update(h, id, sizeof *id); +} + +// 0 when path cannot be opened. +static int hash_file_id(Sha256 *h, const char *path) { PlatFile *f = open_read(path); Identity id = {0}; if (f) id = identity_of(f), plat_file_close(f); - sha256_update(h, path, strlen(path) + 1); - sha256_update(h, &id, sizeof id); + hash_identity(h, path, &id); + return f != NULL; } -static void restbl_cache_key(uint64_t gi, uint8_t out[32]) { +// The key of this start's inputs into out; 0 when the running exe cannot be opened (no key: the table is built). +static int restbl_cache_key(uint64_t gi, uint8_t out[32]) { + char exe[2100]; Sha256 h; sha256_init(&h); static const char tag[] = "totk restbl cache"; @@ -794,67 +812,75 @@ static void restbl_cache_key(uint64_t gi, uint8_t out[32]) { sha256_update(&h, tag, sizeof tag); sha256_update(&h, &v, sizeof v); sha256_update(&h, rt_port_version, strlen(rt_port_version) + 1); + if (!plat_exe_path(exe, sizeof exe) || !hash_file_id(&h, exe)) return 0; + Identity img = identity_of(image); + hash_identity(&h, image_file, &img); Entry ge = entry(gi); sha256_update(&h, &ge, sizeof ge); + uint64_t n = nshipped; + sha256_update(&h, &n, sizeof n); for (size_t s = 0; s < nshipped; s++) { int32_t m[2] = {shipped[s].mod, shipped[s].other}; sha256_update(&h, m, sizeof m); hash_file_id(&h, shipped[s].file); } - uint64_t n = noverlay; + n = noverlay; sha256_update(&h, &n, sizeof n); for (size_t k = 0; k < noverlay; k++) { const Overlay *o = &overlays[k]; - if (!o->mod && o->prio != 1 && o->index != gi) continue; int64_t place[3] = {o->index == ADDED ? -1 : (int64_t)o->index, o->prio, o->mod}; sha256_update(&h, o->name, strlen(o->name) + 1); - sha256_update(&h, o->path, strlen(o->path) + 1); sha256_update(&h, place, sizeof place); - sha256_update(&h, &o->id, sizeof o->id); + hash_identity(&h, o->path, &o->id); } sha256_final(&h, out); + return 1; } -static void restbl_cache_store(const uint8_t key[32], int outcome) { +// Records the build's result for key: RESTBL_NONE, or RESTBL_TABLE with the SHA-256 of the table it wrote. +static void restbl_cache_store(const uint8_t key[32], int outcome, const uint8_t table[32]) { char kp[2300], tp[2300]; restbl_cache_paths(kp, sizeof kp, tp, sizeof tp); - RestblCache c = {.magic = "TOTKRSZ", .version = RESTBL_CACHE_VERSION, .outcome = (uint32_t)outcome}; - c.magic[7] = 'C'; + RestblCache c = {.magic = {'T', 'O', 'T', 'K', 'R', 'S', 'Z', 'C'}, .version = RESTBL_CACHE_VERSION, + .outcome = (uint32_t)outcome}; memcpy(c.key, key, 32); - if (outcome == RESTBL_TABLE) { - uint64_t n = 0; - uint8_t *z = plat_file_read(tp, &n); - if (!z) return; - sha256(z, (size_t)n, c.table); - free(z); - } + if (table) memcpy(c.table, table, 32); if (!plat_file_write_atomic(kp, &c, sizeof c)) - rt_log("RomFS: cannot write %s; the table is built at every start", kp); + rt_log("RomFS: cannot write %s; the resource size table is built at every start", kp); } -// 1 when the last start's result fits: its table is served again (or none, as then). +// 1 when the last start's result fits: its table is served again (or none, as then). A miss logs why. static int restbl_cache_use(const uint8_t key[32], Overlay *served, const char *keeps, double t0) { char kp[2300], tp[2300]; restbl_cache_paths(kp, sizeof kp, tp, sizeof tp); uint64_t n = 0; RestblCache *c = (RestblCache *)plat_file_read(kp, &n); - int hit = c && n == sizeof *c && !memcmp(c->magic, "TOTKRSZC", 8) && c->version == RESTBL_CACHE_VERSION && - !memcmp(c->key, key, 32) && (c->outcome == RESTBL_NONE || c->outcome == RESTBL_TABLE); - if (hit && c->outcome == RESTBL_TABLE) { + const char *miss = NULL; + if (!c || n != sizeof *c || memcmp(c->magic, "TOTKRSZC", 8) || c->version != RESTBL_CACHE_VERSION || + (c->outcome != RESTBL_NONE && c->outcome != RESTBL_TABLE)) + miss = "no usable key from an earlier start"; + else if (memcmp(c->key, key, 32)) + miss = "the mods, the game files or the build changed since the last start"; + if (!miss && c->outcome == RESTBL_TABLE) { uint64_t zn = 0; uint8_t *z = plat_file_read(tp, &zn), sum[32]; if (z) sha256(z, (size_t)zn, sum); - hit = z && !memcmp(sum, c->table, 32); - if (!hit) free(z); - hit = hit && serve_generated(restbl_rel, served, z, (size_t)zn, "mods", "merged resource sizes, kept from the " - "last start", keeps); + if (!z || memcmp(sum, c->table, 32)) { + free(z); + miss = "the kept table is missing or damaged"; + } else if (!serve_generated(restbl_rel, served, z, (size_t)zn, "mods", // frees z + "merged resource sizes, kept from the last start", keeps)) { + miss = "the kept table cannot be served"; + } } - if (hit) + if (miss) + rt_log("RomFS: resource size table: built again: %s", miss); + else rt_log("RomFS: resource size table: the mods' files are the ones of the last start: %s (%.0f ms)", c->outcome == RESTBL_TABLE ? "its merged table is used" : "they fit the game's entries", (now_s() - t0) * 1000); free(c); - return hit; + return !miss; } // With a player mod (or the TOTK_ROMFS_MODS manifest) serving files: the game's table with every shipped table of this @@ -873,11 +899,8 @@ static void restbl_overlay(void) { Overlay *served_now = NULL; for (size_t k = 0; k < noverlay; k++) if (overlays[k].index == gi) served_now = &overlays[k]; - int cached = rt_knob("RESTBL_CACHE", "1"); - if (cached) { - restbl_cache_key(gi, cache_key); - if (restbl_cache_use(cache_key, served_now, keeps, t0)) return; - } + int cached = rt_knob("RESTBL_CACHE", "0") && restbl_cache_key(gi, cache_key); + if (cached && restbl_cache_use(cache_key, served_now, keeps, t0)) return; Entry ge = entry(gi); void *gz = ge.size < (64u << 20) ? malloc((size_t)ge.size) : NULL; Restbl *base = NULL, *out = NULL; @@ -943,7 +966,7 @@ static void restbl_overlay(void) { if (!merged && !raised && !members && !served) { restbl_free(out); rt_log("RomFS: resource size table: the mods' files fit the game's entries (%.0f ms)", (now_s() - t0) * 1000); - if (cached) restbl_cache_store(cache_key, RESTBL_NONE); + if (cached) restbl_cache_store(cache_key, RESTBL_NONE, NULL); return; } size_t rn = 0, zn = 0; @@ -958,11 +981,13 @@ static void restbl_overlay(void) { rt_log("RomFS: cannot pack the merged resource size table; %s", keeps); return; } + uint8_t sum[32]; + if (cached) sha256(z, zn, sum); // before serve_generated frees z if (serve_generated(restbl_rel, served, z, zn, "mods", "merged resource sizes", keeps)) { rt_log("RomFS: resource size table: %d tables merged (%d entries), %d entries raised for mod files (%d " "added files estimated), %d for members of %d mod packs, %.0f ms", tables, merged, raised, estimated, members, packs, (now_s() - t0) * 1000); - if (cached) restbl_cache_store(cache_key, RESTBL_TABLE); + if (cached) restbl_cache_store(cache_key, RESTBL_TABLE, sum); } } diff --git a/totk.ini.example b/totk.ini.example index 458967c5..2e36e22b 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -571,6 +571,11 @@ # cheats and the other patch files load. Its files may expect the missing code. 0: only the mods mods_no_code names. # Read at start. Default: 0. # mods_without_code = 0 +# 1: the resource size table merged from the mods' files at start is kept in /mods/ and served again at the +# next start when no mod file, shipped table, the mod list or order, the game files or totk.exe changed (a file counts +# as changed when its size, write time or file id did). It saves the merge at start. A tool that rewrites a mod file +# with the same size and write time is not seen: set 0 while editing mod files that way. Read at start. Default: 0. +# restbl_cache = 0 # Extra room in MiB (0 to 4096) for the heap the world's textures stream into, for HD texture packs. Packs made for # emulators with 8 GB of DRAM grow it in their own HeapDef table (System/HeapSize/Product.Nin_NX_NVN.HeapDef.byml.zs): # the port reads that growth at start and applies it itself (about 3339 MiB for the HDPacks 4K pack), so such a pack From 0deeb914cf6b476b2b8529fe147aeaff966f9a26 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 23 Nov 2026 18:51:02 +0300 Subject: [PATCH 65/66] mods_romfs_check tests the kept resource size table across starts With restbl_cache = 1 on the restbl mods: built on the first start, served on the second with the same bytes, built again after a rewritten mod file, an added or removed mod, another order and a new totk.exe, and after a torn or random key file and a damaged or missing table. With the default 0 the key is neither read nor written. Co-Authored-By: Claude Opus 5.5 --- tests/mods_romfs_check.py | 76 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/tests/mods_romfs_check.py b/tests/mods_romfs_check.py index 3434ad71..1aad37ee 100644 --- a/tests/mods_romfs_check.py +++ b/tests/mods_romfs_check.py @@ -6,12 +6,15 @@ Builds a mods folder in a temp directory with files of its own bytes at real Rom build/extracted//romfs/index.json unless --romfs says otherwise), runs `totk.exe --probe-fs` on it and reads the `mods:` lines of the log. --probe-fs compares the bytes it reads through the RomFS with every overlay file, so a wrong winner fails it too. A second folder checks the merged resource size table the start writes to the profile (runtime/romfs.c -restbl_overlay): a grown file's entry, an added file's, a shipped table's and another version's table's. +restbl_overlay): a grown file's entry, an added file's, a shipped table's and another version's table's. Then the +table kept across starts (restbl_cache = 1, runtime/romfs.c restbl_cache_key): served again when nothing changed, built +again after a changed mod file, an added or removed mod, another order, a new totk.exe, a damaged key or table. Needs the extracted RomFS of the version. """ import argparse import json import os +import shutil import struct import subprocess import sys @@ -43,9 +46,10 @@ def put(root, mod, rel, data, part='romfs', times=64): f.write_bytes(data * times) -def run(exe, mods, order, disabled=''): +def run(exe, mods, order, disabled='', cache='0'): """--probe-fs with a profile of its own beside mods (the merged resource size table is written there).""" - env = dict(os.environ, TOTK_MODS_DIR=str(mods), TOTK_MODS_ORDER=order, TOTK_MODS_DISABLED=disabled) + env = dict(os.environ, TOTK_MODS_DIR=str(mods), TOTK_MODS_ORDER=order, TOTK_MODS_DISABLED=disabled, + TOTK_RESTBL_CACHE=cache, TOTK_BACKGROUND_WINDOW='1', TOTK_ASSUME_FOCUS='1') profile = Path(mods).parent / 'profile' r = subprocess.run([str(exe), '--profile', str(profile), '--probe-fs'], env=env, capture_output=True, timeout=600) log = (r.stdout + r.stderr).decode('utf-8', 'replace') @@ -122,6 +126,72 @@ def restbl_case(exe, version, romfs, check, tmp): check(merged[key(old_other)] == game[key(old_other)], 'another version\'s table leaves other files alone') lower = [h for h, s in game.items() if merged.get(h, 0) < s] check(not lower, f'no entry of the game\'s table is lowered ({len(lower)})') + restbl_cache_case(exe, mods, merged_file, grown, check) + + +HIT = 'the mods\' files are the ones of the last start' +BUILT = 'RomFS: resource size table: built again: ' + + +def restbl_cache_case(exe, mods, table, grown, check): + """restbl_cache = 1 across starts on the mods restbl_case made (order Grow|Ships|Old).""" + keyf = table.with_name(table.name + '.key') + order = 'Grow|Ships|Old' + + def start(what, hit, why=None, order=order): + code, log = run(exe, mods, order, cache='1') + ok = code == 0 and (HIT in log) == hit and (why is None or BUILT + why in log) + check(ok, f'restbl_cache: {what}: ' + ('served from the last start' if hit else f'built again ({why})'), log) + + start('first start', False, 'no usable key') + check(keyf.is_file() and keyf.stat().st_size == 80, 'restbl_cache: the key file is written beside the table') + good = table.read_bytes() + start('same mods', True) + check(table.read_bytes() == good, 'restbl_cache: the served table is the built one') + + changed = 'the mods, the game files or the build changed' + f = mods / 'Grow' / 'romfs' / grown + data = f.read_bytes() + f.write_bytes(data[:-1] + bytes([data[-1] ^ 1])) # same size, new bytes and write time + start('a mod file rewritten', False, changed) + start('the rewritten file again', True) + f.write_bytes(data) + start('the file restored', False, changed) + + put(mods, 'Extra', 'Pack/Actor/ModTest_Extra.pack.zs', + zstandard.ZstdCompressor(write_content_size=True).compress(bytes(40000)), times=1) + start('a mod added', False, changed, order=order + '|Extra') + shutil.rmtree(mods / 'Extra') + start('the mod removed', False, changed) + start('another order', False, changed, order='Ships|Grow|Old') + start('the first order again', False, changed) + check(table.read_bytes() == good, 'restbl_cache: the table built again equals the first one') + + st = os.stat(exe) + try: + os.utime(exe, ns=(st.st_atime_ns, st.st_mtime_ns + 2_000_000_000)) # what a new build changes + start('a new totk.exe', False, changed) + finally: + os.utime(exe, ns=(st.st_atime_ns, st.st_mtime_ns)) + start('the old totk.exe again', False, changed) + + keyf.write_bytes(keyf.read_bytes()[:40]) + start('a torn key file', False, 'no usable key') + keyf.write_bytes(os.urandom(80)) + start('a key file of random bytes', False, 'no usable key') + start('after the damaged key', True) + t = bytearray(table.read_bytes()) + t[len(t) // 2] ^= 0xff + table.write_bytes(bytes(t)) + start('a damaged table', False, 'the kept table is missing or damaged') + check(table.read_bytes() == good, 'restbl_cache: the damaged table is replaced by the built one') + table.unlink() + start('a missing table', False, 'the kept table is missing or damaged') + + key_before = keyf.read_bytes() + code, log = run(exe, mods, order) + check(code == 0 and HIT not in log and BUILT not in log and keyf.read_bytes() == key_before, + 'restbl_cache = 0 (the default): the table is built, the key is neither read nor written', log) def main(): From b5b9cc2be8401b94d78e668094051f920383828e Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 23 Nov 2026 19:01:26 +0300 Subject: [PATCH 66/66] null_attach reads its switch once at device creation and gives a pass one dummy that covers it, freed with the device (#1343) With the switch off, the draw path now pays one load of vk_caps.null_attach per gkey_fill and per empty slot in target_wmask instead of a call into vk_exec.c, and vk_exec_pass_begin one flag test per pass. The switch is read in vk_caps_init, before the pipeline prewarm makes the first key. With it on, only empty slots below the pass's last target get a dummy, which is where the pipelines' colorAttachmentCount ends (vk_pipeline.c target_count); a pass without colour targets keeps none, so a depth-only or attachment-free pass never gets a 16384-wide image. All empty slots of a pass share one view, and an image serves every pass it covers with its sample count: 1.4.3 at 1600x896 makes one image of 1.75 MiB instead of three. The images are destroyed in destroy_all before the allocator goes, and the log line gives each one's size. The settings row no longer states that empty slots caused #1343: the dumps do not show it. totk.ini.example gets the player entry. Co-Authored-By: Claude Opus 5.5 --- docs/settings.md | 2 +- runtime/vk.h | 7 +++--- runtime/vk_caps.c | 3 +++ runtime/vk_device.c | 1 + runtime/vk_exec.c | 53 +++++++++++++++++++++++++++---------------- runtime/vk_pipeline.c | 4 ++-- totk.ini.example | 4 ++++ 7 files changed, 49 insertions(+), 25 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index e20f0f9b..83b774b5 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -172,7 +172,7 @@ Many rows below are developer tools that only act together with another setting | `ub_overlay` (default `1`) | `0` copies each uniform update inside a pass into its buffer at once, ending the pass with a full barrier; `ab` alternates with the `ab` blocks. | With `0` scenes with many updated blocks (the terrain, the sky islands) take longer on the GPU; `TOTK_TRACE=perf` prints how many updates stayed in their pass. | Caution | | `ub_overlay_out` (default `1`) | `0` copies each uniform update between passes into its buffer at once, behind a full barrier of its own; `ab` alternates with the `ab` blocks. Needs `ub_overlay`. | With `0` a run of updates before a pass costs a full GPU barrier each; `TOTK_TRACE=perf` prints how many updates between passes were overlaid. | Caution | | `ubo_snapshot` (default `1`) | `0` binds live memory for uniform blocks; `ab` alternates with the `ab` blocks. | Without snapshots late draws read another object's matrix, so objects can be drawn in the wrong place. | Risky | -| `null_attach` (default `0`) | `1` gives the colour slots of a render pass that hold no target a dummy attachment (an `R8_UNORM` image of the pass's size, writes masked off) instead of a null image view. A workaround to try on Intel's legacy Windows driver for 6th-10th generation graphics (HD 520, UHD 620, driver 101.21xx), which crashed inside `vkCmdBeginRendering` at the first pass with an empty slot (#1343). | A little memory per pass size (1.4 MiB at 1600x896); pipelines with empty slots are built again once. | Caution | +| `null_attach` (default `0`) | `1` gives the colour slots of a render pass that hold no target, below its last target, a dummy attachment (an `R8_UNORM` image covering the pass, writes masked off, loads and stores `DONT_CARE`) instead of a null image view; the pipelines name that format for those slots. A workaround to try on Intel's legacy Windows driver for 6th-10th generation graphics (HD 520, UHD 620, driver 101.21xx), which crashes inside `vkCmdBeginRendering` after the logo (#1343); untested there, and the crash dumps do not show that the empty slots are the cause. Also in `totk.ini.example`. | One or two dummy images per scene resolution (1.4 MiB at 1600x896, at most 24, freed when the device goes); pipelines with empty slots are built again once. | Caution | | `vk_no_float64` (default `0`) | `1` clears the 64-bit float feature, so the translator lowers FP64 to FP32. | Shaders change, so the shader cache entries for it are made again; precision of FP64 shaders drops. | Caution | | `vk_no_host_import` (default `0`) | `1` leaves `VK_EXT_external_memory_host` off even when the GPU has it, so the game takes the path of a GPU without it: every CPU-visible pool gets shadow storage, as under Wine. For testing that path. | Shadow storage costs CPU copies before each submission and more memory than imports. | Caution | | `vk_ssbo_align` (default unset) | Power of two that storage buffer offsets are treated as needing, to test the unaligned path. | The translator and the draw code round storage offsets down to it; shaders are translated again. | Caution | diff --git a/runtime/vk.h b/runtime/vk.h index 51ea8ecf..690e87f6 100644 --- a/runtime/vk.h +++ b/runtime/vk.h @@ -66,6 +66,7 @@ typedef struct { int mesa; // a Mesa driver the game runs on: RADV, ANV or NVK int intel_igpu_win; // Intel's Windows driver on an integrated GPU (UHD, Iris Xe, Core Ultra graphics) int demote; // shaderDemoteToHelperInvocation enabled: modules may use OpDemoteToHelperInvocation + int null_attach; // TOTK_NULL_ATTACH=1: empty colour slots get a dummy attachment (vk_exec.c null_attach_view) } VkCaps; extern VkCaps vk_caps; void vk_caps_driver(VkPhysicalDevice p); // first, before vkCreateDevice: vk_caps.amd, amd_sc, mesa, intel_igpu_win @@ -507,10 +508,10 @@ typedef struct { // into it, when the last draw into it was that copy and the swapchain is HDR10. void vk_hdr_present_source(const VkTexImage *win, VkImage *image, VkFormat *format); void vk_hdr_image_gone(VkImage image); -// TOTK_NULL_ATTACH=1: empty colour slots of a pass get a dummy VK_EXEC_NULL_ATTACH_FMT attachment, and the pipelines name -// that format for them with writes masked off (vk_exec.c vk_exec_null_attach, vk_pipeline.c gkey_fill). +// vk_caps.null_attach: empty colour slots of a pass get a dummy VK_EXEC_NULL_ATTACH_FMT attachment, and the pipelines +// name that format for them with writes masked off (vk_exec.c null_attach_view, vk_pipeline.c gkey_fill). #define VK_EXEC_NULL_ATTACH_FMT VK_FORMAT_R8_UNORM -int vk_exec_null_attach(void); +void vk_exec_null_attach_release(void); // vk_device.c, before the device goes: frees the dummy attachments const VkTexImage *vk_texture_get(const tex_t *t); // created and made current; NULL for BUFFER or unmapped formats const VkTexImage *vk_texture_revive(const tex_t *t, uint32_t pos); // the entry vk_texture_get would return if it exists, made live at op pos // A texture slot; a slot whose texture was finalized follows the live texture at the same storage (hle_nvn.c). diff --git a/runtime/vk_caps.c b/runtime/vk_caps.c index bc99712e..2cf17362 100644 --- a/runtime/vk_caps.c +++ b/runtime/vk_caps.c @@ -123,6 +123,9 @@ void vk_caps_init(VkCtx *c) { uint32_t zero_locals = env_u32("TOTK_ZERO_LOCALS", (uint32_t)vk_caps.mesa); gfx_shader_set_host(vk_caps.float64, vk_caps.sbuf_align, told, gather, zero_locals != 0); if (gather) rt_log("vk caps: gather coordinates biased for %u sub-texel bits (TOTK_GATHER_BIAS)", gather); + // Read here, before any pipeline key is made: the pipelines' colour formats depend on it (vk_pipeline.c gkey_fill) + vk_caps.null_attach = rt_knob("NULL_ATTACH", "0") == 1; + if (vk_caps.null_attach) rt_log("vk caps: empty colour slots get a dummy attachment (TOTK_NULL_ATTACH=1)"); char dv[32]; driver_version(dv, sizeof dv, c->props.vendorID, c->props.driverVersion); diff --git a/runtime/vk_device.c b/runtime/vk_device.c index 5d54d8bf..9d458925 100644 --- a/runtime/vk_device.c +++ b/runtime/vk_device.c @@ -526,6 +526,7 @@ static void destroy_all(void) { if (g_vk.device) vk_astc_release(); if (g_vk.device) vk_deswz_release(); if (g_vk.device) vk_crumbs_release(); + if (g_vk.device) vk_exec_null_attach_release(); if (g_vk.timeline) vkDestroySemaphore(g_vk.device, g_vk.timeline, NULL); vk_headroom_stop(); if (g_vk.vma) vmaDestroyAllocator(g_vk.vma); diff --git a/runtime/vk_exec.c b/runtime/vk_exec.c index 830015b4..be372f99 100644 --- a/runtime/vk_exec.c +++ b/runtime/vk_exec.c @@ -674,33 +674,39 @@ static void barrier_to(VkExec *ex, const VkImage *want, const VkImageAspectFlags void vk_exec_barrier(VkExec *ex) { barrier_to(ex, NULL, NULL, 0); } -// TOTK_NULL_ATTACH=1 (null_attach, default 0): colour slots of a pass that hold no target get a view of a dummy image -// instead of VK_NULL_HANDLE. Leaving a slot's imageView null is valid Vulkan, but Intel's legacy Windows driver for -// 6th-10th generation graphics (HD 520, UHD 620; driver 101.21xx, Vulkan 1.3.215) faulted inside vkCmdBeginRendering at -// the game's first pass with an empty slot, the 1600x896 scene G-buffer pass with slots 2 and 4 empty (issue #1343). -// The pipelines then name NULL_ATTACH_FMT for those slots, with their writes masked off (vk_pipeline.c gkey_fill, -// target_wmask), so the views match the pipelines' formats. One image per pass size, layer count and sample count, -// in GENERAL from the start (moved there in the upload batch) and kept to the end; loads and stores are DONT_CARE. +// TOTK_NULL_ATTACH=1 (null_attach, default 0; vk_caps.null_attach): colour slots of a pass that hold no target get a +// view of a dummy image instead of VK_NULL_HANDLE. Leaving a slot's imageView null is valid Vulkan, but Intel's legacy +// Windows driver for 6th-10th generation graphics (HD 520, UHD 620; driver 101.21xx, Vulkan 1.3.215) faulted inside +// vkCmdBeginRendering reading an attachment entry of the pass, at the first scene passes after the logo (issue #1343); +// whether the empty slots are the cause is untested on that driver. The pipelines then name NULL_ATTACH_FMT for those +// slots, with their writes masked off (vk_pipeline.c gkey_fill, target_wmask), so the views match the pipelines' +// formats. Only slots below the last one with a target get a dummy: the pipelines' colorAttachmentCount ends there +// (vk_pipeline.c target_count), and a pass without colour targets keeps none. All empty slots of a pass share one +// view; an image serves every pass it covers (size, layers) with its sample count, so TotK makes one or two per scene +// resolution. Each is moved to GENERAL in the upload batch and kept until the device goes (vk_exec_null_attach_release); +// loads and stores are DONT_CARE, so the slots cost no bandwidth. #define NULL_ATTACH_MAX 24 typedef struct { uint32_t w, h, layers, samples; VkImage img; VmaAllocation alloc; VkImageView view; } NullAttach; static NullAttach null_att[NULL_ATTACH_MAX]; static int nnull_att; static PlatMutex null_att_lock = PLAT_MUTEX_INIT; -int vk_exec_null_attach(void) { - static int on = -1; - if (on < 0) { - on = rt_knob("NULL_ATTACH", "0") == 1; - if (on) rt_log("vk_exec: empty colour slots get a dummy attachment (TOTK_NULL_ATTACH=1)"); +void vk_exec_null_attach_release(void) { + VkCtx *c = vk_ctx(); + plat_mutex_lock(&null_att_lock); + for (int i = 0; c && i < nnull_att; i++) { + vkDestroyImageView(c->device, null_att[i].view, NULL); + vmaDestroyImage(c->vma, null_att[i].img, null_att[i].alloc); } - return on; + nnull_att = 0; + plat_mutex_unlock(&null_att_lock); } static VkImageView null_attach_view(uint32_t w, uint32_t h, uint32_t layers, uint32_t samples) { plat_mutex_lock(&null_att_lock); - for (int i = 0; i < nnull_att; i++) { + for (int i = 0; i < nnull_att; i++) { // a view may be larger than the render area (VkRenderingInfo needs it to cover it) const NullAttach *a = &null_att[i]; - if (a->w == w && a->h == h && a->layers == layers && a->samples == samples) { + if (a->w >= w && a->h >= h && a->layers >= layers && a->samples == samples) { VkImageView v = a->view; plat_mutex_unlock(&null_att_lock); return v; @@ -719,7 +725,8 @@ static VkImageView null_attach_view(uint32_t w, uint32_t h, uint32_t layers, uin .samples = (VkSampleCountFlagBits)samples, .tiling = VK_IMAGE_TILING_OPTIMAL, .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED}; VmaAllocationCreateInfo ai = {.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE}; - if (vmaCreateImage(c->vma, &ci, &ai, &a.img, &a.alloc, NULL) != VK_SUCCESS) { + VmaAllocationInfo info = {0}; + if (vmaCreateImage(c->vma, &ci, &ai, &a.img, &a.alloc, &info) != VK_SUCCESS) { if (!warned++) rt_log("vk_exec: a %ux%u x %u dummy attachment could not be created: the slot stays empty", w, h, layers); plat_mutex_unlock(&null_att_lock); return VK_NULL_HANDLE; @@ -739,8 +746,10 @@ static VkImageView null_attach_view(uint32_t w, uint32_t h, uint32_t layers, uin image_barrier(cb, a.img, VK_IMAGE_LAYOUT_UNDEFINED, layers); vk_upload_end(); null_att[nnull_att++] = a; + int n = nnull_att; plat_mutex_unlock(&null_att_lock); - rt_log("vk_exec: dummy attachment %ux%u x %u, %u samples, for empty colour slots", w, h, layers, samples); + rt_log("vk_exec: dummy attachment %ux%u x %u, %u samples, for empty colour slots: %.2f MiB (%d of %d)", w, h, layers, + samples, info.size / 1048576.0, n, NULL_ATTACH_MAX); return a.view; } @@ -766,12 +775,18 @@ void vk_exec_pass_begin(VkExec *ex) { ex->fb_dirty = 0; ex->pass_serial++; VkRenderingAttachmentInfo ca[8], da = {0}, sa = {0}; + uint32_t dummies = 0; // null_attach: empty slots below this get a dummy (the pipelines' colorAttachmentCount) + VkImageView dummy = VK_NULL_HANDLE; + if (vk_caps.null_attach) + for (uint32_t i = 0; i < ex->pass_ncolor; i++) + if (ex->color[i].image) dummies = i + 1; for (uint32_t i = 0; i < ex->pass_ncolor; i++) { const VkExecTarget *t = &ex->color[i]; ca[i] = (VkRenderingAttachmentInfo){.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO}; if (!t->image) { - if (vk_exec_null_attach()) { // a dummy for the empty slot, which the pipelines name too (see above) - ca[i].imageView = null_attach_view(ex->pass_w, ex->pass_h, ex->pass_layers, ex->pass_samples); + if (i < dummies) { // a dummy for the empty slot, which the pipelines name too (null_attach_view) + if (!dummy) dummy = null_attach_view(ex->pass_w, ex->pass_h, ex->pass_layers, ex->pass_samples); + ca[i].imageView = dummy; ca[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL; ca[i].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; ca[i].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index e7df13de..4e53487a 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -1345,7 +1345,7 @@ static uint32_t target_wmask(const VkPipeState *s, int i) { uint32_t m = s->chmask.mask >> (4 * i) & 0xf; if (s->fs && !(gfx_shader_outputs(s->fs, NULL) >> i & 1)) m = 0; if (i == 1 && s->fs && P.f_dual_src && uses_src1(s)) m = 0; // output 1 is the second blend source (spirv_dual_source) - if (!s->color_fmt[i] && vk_exec_null_attach()) m = 0; // an empty slot's dummy attachment (vk_exec.c) takes no writes + if (!s->color_fmt[i] && vk_caps.null_attach) m = 0; // an empty slot's dummy attachment (vk_exec.c) takes no writes return m; } @@ -1381,7 +1381,7 @@ static void gkey_fill(const VkPipeState *s, GKey *k) { o[3] = (uint8_t)blend_factor(b->src_a), o[4] = (uint8_t)blend_factor(b->dst_a), o[5] = (uint8_t)blend_op(b->eq_a); } } - if (vk_exec_null_attach()) // empty slots get the dummy attachment's format (vk_exec.c vk_exec_null_attach) + if (vk_caps.null_attach) // empty slots get the dummy attachment's format (vk_exec.c null_attach_view) for (int i = 0; i < k->n_color; i++) if (k->color[i] == VK_FORMAT_UNDEFINED) k->color[i] = VK_EXEC_NULL_ATTACH_FMT; if (!P.dyn_vi) { diff --git a/totk.ini.example b/totk.ini.example index 9aa2252f..3756bd4b 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -184,6 +184,10 @@ # vk_dyn_a2c = 1 # Pin the shader subgroup size to 32 when the GPU allows it. # vk_subgroup_pin = 1 +# 1 gives empty colour slots of a render pass a dummy image instead of none. Default: 0. A workaround to try if the +# game crashes right after the Nintendo logo on an Intel HD or UHD graphics chip (6th to 10th generation, such as +# HD 520 or UHD 620) with Intel's older driver (101.21xx); it costs a few MB of video memory. +# null_attach = 0 [display] # Device profile: auto (the Steam Deck when this is one), desktop or deck. On a Steam Deck the keys this file does not