mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
Merge branch 'dev' into task/plugself
This commit is contained in:
commit
d4794238d4
43 files changed
+722
-159
No files matched your search
@@ -26,7 +26,12 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
modes as DLSS: for FSR 4 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
|
||||
- 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
|
||||
- Ultrawide monitors, 21:9 and 32:9 (2560x1080, 3440x1440, 3840x1600, 5120x2160, 3840x1080, 5120x1440, 7680x2160):
|
||||
the camera sees the whole width, the map and the loading screen fill it without bars or stretching, and the HUD sits
|
||||
at the screen's edges or in the middle 21:9 or 16:9 (`hud_width`)
|
||||
- Other screen shapes from 4:3 to 32:9, each with the camera and the interface in that shape: 16:10 (Steam Deck,
|
||||
handhelds), 3:2 (Surface, Framework), 4:3 (iPads, CRT monitors) and phones (19.5:9, 20:9) for streaming; on shapes
|
||||
narrower than 16:9 the view can keep the 16:9 width (`vert_plus`, off by default)
|
||||
- Anisotropic texture filtering up to 16x, for sharp ground into the distance
|
||||
- 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
|
||||
|
||||
@@ -32,7 +32,8 @@ GPU semantics behind the graphics rows: [maxwell.md](../maxwell.md). The method
|
||||
| with DLAA on, the world behind the inventory smears into horizontal streaks on the right half, from the second time the inventory is opened (when Link's model is drawn there) | the camera jitter's read-back took the inventory camera's own off-centre projection (P[0][2] about -0.6) for a jitter and gave DLSS an offset of about 1152 pixels (fixed: `vk_dlaa.c` `cam_offset` takes only an offset it gave that block) | `TOTK_DLAA_CAM_JITTER=0` makes it go; a `--capture` run over the opened inventory: the background's horizontal gradient against its vertical one |
|
||||
| with DLAA/DLSS on, large distant blocks behind the fog (the Depths) turn darker or lighter for a frame while the camera moves | DLSS created with AutoExposure estimated the exposure of the dark scene itself, and the estimate moved from frame to frame (fixed with `dlss_fixed_exposure = 1`: `vk_dlaa.c` evaluate creates the feature without it) | a flat fogged patch in `capture.py` frames: one value without DLAA, jumps with it |
|
||||
| flicker or a texture swapped with a similar one | the newest texture picked at shared storage instead of the one with the matching view | texture lookup by id in the dump |
|
||||
| with DLAA on, dust and small particles in fog (shrines) vanish, smear or behave oddly; the fog looks processed | DLSS ran at the bloom, after the fog and the particles, which have no motion vectors or jitter of their own (fixed: `vk_dlaa.c` effects_point runs DLSS at the first pass into the light target after the lighting, and the effects go over its picture) | `dlaa_effects_after = 0` (Screen tab) brings the old point back; the count "before the effects" in the `dlaa:` log line against the frames anti-aliased |
|
||||
| with DLAA on, dust and small particles in fog (shrines) vanish, smear or behave oddly; the fog looks processed | DLSS ran at the bloom, after the fog and the particles, which have no motion vectors or jitter of their own (fixed: `vk_dlaa.c` effects_point runs DLSS after the lighting, before the particles, and they go over its picture) | `dlaa_effects_after = 0` (Screen tab) brings the old point back; the count "before the effects" in the `dlaa:` log line against the frames anti-aliased |
|
||||
| with FSR or DLSS on and "Particles after DLAA" (formerly "Fog and particles after DLAA") on (`dlaa_effects_after = 1`), a white or bright dotted outline along distant mountains and other silhouettes against the sky, most visible at night and at dawn against clouds; gone with that option off; `TOTK_DEMOTE` makes no difference | the upscaler ran at the first pass after the lighting, and the fog layer and the half-size clouds' composite that follow it decide per pixel from the scene depth, still jittered, whether it is sky: over the upscaler's steady picture a sky pixel on a ridge took the mountain's side in some frames and got no clouds (fixed: `vk_dlaa.c` `effects_point` waits for the first composite without depth and runs the upscaler before the particles) | `TOTK_DLAA_JITTER=0` or `dlaa_effects_after = 0` make it go; frame dump: ridge pixels brighter than the sky and the mountain in the composite pass into the light target |
|
||||
| with DLAA on, the picture flickers from frame to frame: a little outdoors; the whole scene in a fogged shrine with an ability's targeting view (Ultrahand) open, where the fog also goes back under DLSS | DLSS ran before some effects in one frame and after them in the next: their order changes from frame to frame (the yard's half-size effects pass is in some frames only; the ability highlight, drawn into the light target with a D16 depth of its own, comes before or after the fog layer), and a rule that waited for one of them or took any D16 pass for the lighting followed it (fixed: `vk_dlaa.c` effects_point knows the lighting by its depth and runs DLSS right after it) | the `dlaa:` log line: "before the effects" must equal the frames anti-aliased in the world; a log of the passes into the light target per frame |
|
||||
|
||||
## Timing and frame pacing
|
||||
|
||||
@@ -91,7 +91,7 @@ Every guest thread is a host thread. TotK assumes Horizon's scheduler: three app
|
||||
- Memory pools. Apple's unified memory let MacNativeGames use the game's pools zero-copy. The back end imports the pools as host memory (`VK_EXT_external_memory_host`); under Wine, or on a GPU without the extension, CPU-visible pools get shadow storage instead (host-visible copies, `vk_memory.c` `mirror_mode`). On a discrete GPU, pools bound as buffers are mirrored in device-local memory and the pages the CPU wrote (write watch, above) are uploaded before a replay; idle pool regions are made read-only so the write-watch queries skip them (`vk_memory.c`). GPU-rendered textures are written back when the CPU reads them: on a pool invalidate, on a CPU copy, and for small targets once the CPU waits for a fence (`vk_texture.c`).
|
||||
- Replay thread. `TOTK_REPLAY_ASYNC=1` moves the replay off the submitting thread onto a queue at most one frame behind the game; reads of GPU results wait for the newest writer instead of draining the queue (`vk_backend.c`). It is off by default. Where the game waits for the GPU it overlaps the replay with the game threads (a GTX 1650 in the Depths, issue #88), a gain measured only there; while it was the default, a GTX 1660 Ti at the 60 fps cap with the GPU at 26 % reported uneven motion (#659). It adds up to a frame of latency; `replay_async = 1` turns it on.
|
||||
- Chunked replay. A large submission is recorded in chunks by several threads (`TOTK_REPLAY_WORKERS`, 0 by default: the sequential replay; 4 is a good value from 8 logical processors) and the chunks go to the queue in order (`vk_exec.c`). A sequential scan keeps a copy of the queue state where each chunk starts and lists what a chunk would otherwise learn from the chunks before it: inline uniform updates, conditions, contact shadow marches, uniform drops. It also makes render targets live in replay order and notes the op, since a chunk can sample a storage before the chunk that renders it got there or after the scan went past a later target there: a chunk's texture slots resolve as of its own op, and the chunks after a texture with no entry yet wait for the chunk that makes it. DLSS's decisions (the G-buffer, the light target, the end of the scene, the scaling pass) are the scan's too, and its copy of the lit scene and its evaluation are records of the chunk that holds the op; a chunk's draws are jittered while they come before the scan's end of the scene. The evaluation waits until the chunks before it are recorded, as it reads what their draws noted (the camera block, the jitter, the per-object motion list, which chunks add to under one lock), and the chunks after it wait for it, as they sample its output. `TOTK_REPLAY_STATE_CHECK=1` compares the state after the last chunk with the scan's.
|
||||
- Frame ahead. `TOTK_SYNC_AHEAD=1` (`sync_ahead`, off by default) makes the one `nvnSyncWait` per frame that waits for the frame presented last wait for the frame before it, so the game builds the next frame while the GPU still runs the previous one (`nvn_api_core.c`, `nvnSyncWait`). The game then writes memory that in-flight work still reads. Two forms guard that. With shadow storage (`vk_memory.c`, the CPU-visible pools are host-visible copies of guest memory, on by default on Linux and Wine, `shadow = 1` (`TOTK_SHADOW=1`) on native Windows) a CPU write reaches the GPU only through the shadow copy made before each submit (`vk_mem_shadow_sync`), and a copy that would overwrite bytes an unfinished submission reads is queued as a GPU copy in the prologue command buffer of the part submitted next (`vk_mem_shadow_prologue`, `TOTK_SHADOW_DEFER=1`, the default with the feature) or, with `=0`, waited for on the replay thread (`shadow_reader_wait`). Only that one wait lags (identified by its call site, known for 1.1.0, 1.2.1 and 1.4.3). GPU writes into pool storage come back with their fence, so a buffer the game reads back every frame after that wait holds the result of the frame before; a buffer it has not read lately holds none, and its `nvnMemoryPoolInvalidateMappedRange` waits for the write (`vk_mem_shadow_read`): TotK reads single pixels through a buffer per request, and in the Depths zeros in one of them put Link in gloom. The exit line `mem: the game waited for a GPU write it reads` counts these waits and their time. On 1.4.3 the patch set `qstamp` (`recomp/patches-v143.txt`) lets the game take its depth query results one frame older; it follows the switch and is off when the switch is refused. The fence write-back of small render targets (`vk_texture.c`, `write_back_n`) does not wait for the GPU with `TOTK_WB_EAGER=1` (`wb_eager`, the default, but only while frame-ahead is in effect: with `sync_ahead` off or refused the setting does nothing and the write-back reads the image when it runs): `vk_sync_submit` has `vk_texture_eager_record` copy the targets that value rendered into staging buffers inside the same command buffer, so once the value has passed the write-back only copies from staging into the target's storage. Only a target that was written back within the last 64 timeline values is copied (the first write-back of a target takes the blocking path), and the staging of a target past that window, no longer wanted or released goes through the deferred free (`vk_defer_buffer_until`). A snapshot is used only when its value is the one that last rendered the target, nothing recorded a write to the image since (`wr_fence`) and the GPU has finished it; otherwise the write-back reads the image as before, and the exit line `vk: wb_eager:` counts the reasons. With frame-ahead in effect the exit line `vk: fence write-backs waited for the GPU` counts the write-backs that waited for a copy and the time they waited, for every value of the setting. `check` also reads the old way and compares.
|
||||
- Frame ahead. `TOTK_SYNC_AHEAD=1` (`sync_ahead`, on by default) makes the one `nvnSyncWait` per frame that waits for the frame presented last wait for the frame before it, so the game builds the next frame while the GPU still runs the previous one (`nvn_api_core.c`, `nvnSyncWait`). The game then writes memory that in-flight work still reads. Two forms guard that. With shadow storage (`vk_memory.c`, the CPU-visible pools are host-visible copies of guest memory, on by default on Linux and Wine, `shadow = 1` (`TOTK_SHADOW=1`) on native Windows) a CPU write reaches the GPU only through the shadow copy made before each submit (`vk_mem_shadow_sync`), and a copy that would overwrite bytes an unfinished submission reads is queued as a GPU copy in the prologue command buffer of the part submitted next (`vk_mem_shadow_prologue`, `TOTK_SHADOW_DEFER=1`, the default with the feature) or, with `=0`, waited for on the replay thread (`shadow_reader_wait`). Only that one wait lags (identified by its call site, known for 1.1.0, 1.2.1 and 1.4.3). GPU writes into pool storage come back with their fence, so a buffer the game reads back every frame after that wait holds the result of the frame before; a buffer it has not read lately holds none, and its `nvnMemoryPoolInvalidateMappedRange` waits for the write (`vk_mem_shadow_read`): TotK reads single pixels through a buffer per request, and in the Depths zeros in one of them put Link in gloom. The exit line `mem: the game waited for a GPU write it reads` counts these waits and their time. On 1.4.3 the patch set `qstamp` (`recomp/patches-v143.txt`) lets the game take its depth query results one frame older; it follows the switch and is off when the switch is refused. The fence write-back of small render targets (`vk_texture.c`, `write_back_n`) does not wait for the GPU with `TOTK_WB_EAGER=1` (`wb_eager`, the default, but only while frame-ahead is in effect: with `sync_ahead` off or refused the setting does nothing and the write-back reads the image when it runs): `vk_sync_submit` has `vk_texture_eager_record` copy the targets that value rendered into staging buffers inside the same command buffer, so once the value has passed the write-back only copies from staging into the target's storage. Only a target that was written back within the last 64 timeline values is copied (the first write-back of a target takes the blocking path), and the staging of a target past that window, no longer wanted or released goes through the deferred free (`vk_defer_buffer_until`). A snapshot is used only when its value is the one that last rendered the target, nothing recorded a write to the image since (`wr_fence`) and the GPU has finished it; otherwise the write-back reads the image as before, and the exit line `vk: wb_eager:` counts the reasons. With frame-ahead in effect the exit line `vk: fence write-backs waited for the GPU` counts the write-backs that waited for a copy and the time they waited, for every value of the setting. `check` also reads the old way and compares.
|
||||
- Frame ahead in place. Without shadow storage the GPU reads the game's own memory, as in Savage Wind's overlap, and `vk_ahead_init` (`runtime/vk_ahead.c`) turns on guards for what the GPU reads or writes there after the recording, each with a switch `TOTK_SYNC_AHEAD_<NAME>` (1 by default unless noted) for A/B runs. `MSYNC`: the VRAM mirrors' sync copies take the synced pages from a staging copy the replay thread makes at submit (`vk_memory.c` `stage_ranges`), not from guest memory when the GPU runs them; the frame wait returns only after the replay submitted the asked value, so those are that frame's bytes. A synced range that an earlier value still writes back into waits for that value first, or the copy would drop its GPU words. `WBMERGE`: every GPU write into a mirror goes back through the word merge (`wb_merge_record`), so a write-back that lands after the game wrote the range for the next frame puts back only the words the GPU changed. `DESWZ`: a texture the CPU rewrote after its last upload is deswizzled on the CPU (`upload_gpu`, reason `frame ahead`). `READS`: GPU writes into CPU-visible memory are listed with their value until it completes (bounded, `aw_add`), and an invalidate of a range not read lately waits for the writer's own value (`ahead_read`). `ONESHOT`: the frame wait waits up to the value that rendered a dirty small target not written back within the last 16 frames (Savage Wind's one-off rule, `vk_texture_oneshot`), so a photo or a pick reads its own frame, while targets read every frame or in turns get the frame before. `QUERIES` (0 by default): the same for samples-passed reports; TotK reads those two updates after it asks (1.2.1 `f_70010c3298`). With import memory (`TOTK_MEMORY=import`, the integrated-GPU mode) the GPU reads vertex, index and storage data in place, which no guard covers (a check run saw the game rewrite about 10 KiB of them a frame after the wait, particles mostly), so the switch is refused there without shadow storage. The exit lines `mem: sync-ahead in place` and `sync-ahead: frame waits made exact` give the guards' waits and copies. `TOTK_SYNC_AHEAD_CHECK=1` runs the detector below with the late wait itself.
|
||||
- Frame-ahead check. `TOTK_SYNC_AHEAD=check` keeps the frame wait exact and measures what a one-frame-late wait without shadow storage would race (`runtime/vk_ahead.c`). The replay notes, with each submission's value, every access of guest memory the GPU makes after the recording: in-place bindings of imported pools without a VRAM mirror (`VK_AHEAD_READ`), the mirror's sync copies (`vk_mem_mirror_prologue`), GPU deswizzle sources (`vk_texture.c` `upload_gpu`) and the mirror write-backs (`vk_mem_mirror_end`). At the frame wait for value A, whose late form would have waited for L, the notes of values in (L, A] form the frame's read set: merged per class, gap-joined into at most 512 write-watch queries that stamp the writes made so far into the shared page generations (`vk_mem_ahead_observe`). At the next frame-wait entry the queries run again, and every page of the set stamped since is a CPU write the late wait would have raced; memory without a write watch is compared by page hashes. GPU writes into CPU-visible memory and reports are listed with their value: an invalidate of a range written by a value in (L, A] of the last frame wait, and the fence write-back of a small target rendered by one, count as stale readbacks. One line `sync-ahead check:` per second of host time and a run summary with the largest offenders by pool at exit. `--probe-vkmem` checks the detector on a watched pool (`vk_ahead_selftest`); `tests/sync_ahead_check.py` checks that the wait stays exact.
|
||||
- Recorder thread. The Vulkan calls the replay makes into its command buffer are made by a thread of their own (`vk_rec.c`, after Savage Wind Recomp and LAS Recomp): each `vkCmd*` copies its arguments into a packet of a ring and the recorder makes the calls in order; calls into other command buffers are made at once; the recorder also ends the command buffer, and the submit waits until it has. In the town on an RX 9070 the replay takes 17% less time on the submitting thread. It is off by default on AMD GPUs, where the driver loses the device or hangs the GPU at startup with it (`TOTK_VK_RECORDER=1` forces it on, `=0` makes every call on the submitting thread).
|
||||
|
||||
+8
-1
@@ -294,7 +294,7 @@ With `gameplay_tweaks_enabled = 1` (`TOTK_GAMEPLAY_TWEAKS_ENABLED=1`, live; off
|
||||
- **Ultrahand distance**: holding the right mouse button while scrolling pushes or pulls the held object closer or farther (`gameplay_ultrahand_distance = 1`, sensitivity `gameplay_distance_sensitivity = 1`).
|
||||
- **Free-roam weapon switching**: scrolling the mouse wheel in free roam steps through equipped weapons (`gameplay_weapon_wheel = 1`, sensitivity `gameplay_weapon_sensitivity = 1`). Press E to confirm the chosen weapon; right click or pressing B cancels.
|
||||
- **Quick-selection menus**: scrolling the mouse wheel browses items while a quick-selection menu (weapons, bows, shields, materials) is open (`gameplay_item_wheel = 1`, sensitivity `gameplay_item_sensitivity = 1`). A and D keys step left and right through the strip (`gameplay_item_ad = 1`).
|
||||
- **Smooth map zoom**: the mouse wheel performs continuous inertial zooming on the Purah Pad map (`gameplay_map_zoom = 1`, sensitivity `gameplay_map_zoom_sensitivity = 1`).
|
||||
- **Smooth map zoom**: the mouse wheel performs continuous inertial zooming on the Purah Pad map (`gameplay_map_zoom = 1`, sensitivity `gameplay_map_zoom_sensitivity = 1`). It works with `menu_cursor = 0` too: the map is still found then, and the mouse moves the map's cursor there as with the menu cursor on, while the game's other menus stay without the pointer.
|
||||
|
||||
All sub-toggles default to 1 and sensitivities to 1 (range 0.25 to 4.0), so enabling `gameplay_tweaks_enabled` activates the full suite immediately while allowing individual features to be toggled or tuned.
|
||||
|
||||
@@ -324,6 +324,13 @@ gyro all the time. Pick an activation the game does not need (a back button), or
|
||||
of the game's own motion. Under Steam the Steam Controller's gyro arrives already corrected, so it keeps a bias of its
|
||||
own (`gyro_bias_pad` ends in "(under Steam)").
|
||||
|
||||
On Linux the gamepad keeps playing while the game window has no focus (#971), except in a game Steam started: the
|
||||
Steam overlay and Steam's menus (the Quick Access menu and the Steam menu in SteamOS's Game Mode) take the focus while
|
||||
they are open, and the presses meant for them must not reach the game too (#1462). Steam sets `SteamGameId` for its
|
||||
own games and for non-Steam shortcuts; the log then says `input: the gamepad pauses while the window has no focus`.
|
||||
`pad_background = 1` keeps the gamepad playing behind other windows under Steam too, `0` pauses it everywhere
|
||||
(`runtime/input.c`, `start`; read at start). On Windows the game window is not SDL's, and the gamepad always plays.
|
||||
|
||||
## Scripted input
|
||||
|
||||
`TOTK_INPUT_SCRIPT=<file>` replays presses. It is ORed with real input and still applies under `TOTK_INPUT=none`. One event per line, `#` starts a comment:
|
||||
|
||||
+3
-1
@@ -109,7 +109,9 @@ loads the saves 1.4.3 wrote.
|
||||
file but the UI archive; for `pc` with the same `--binds` as the PC prompts step, whose key the step follows). The shapes are those of every connected display (Windows: `EnumDisplayDevices`; Linux:
|
||||
`xrandr`, else the DRM connectors), of the `output_res` the game defaults to on each, and of the `totk.ini`
|
||||
`output_res` (`installer/screens.py`). One folder per shape, named after the shape's size in `ASPECT_SIZES` (the
|
||||
closest within 1%; `5120x2160` uses `2560x1080`); `runtime/romfs.c` `overlay_init` maps the game resolution the
|
||||
closest within 1%; `5120x2160` uses `2560x1080`), or for an unlisted shape from 4:3 to 32:9 its own size (a
|
||||
`totk.ini` `output_res` of `2560x1200`, say; a display of an unlisted shape gets none, as the game keeps 1920x1080
|
||||
there); `runtime/romfs.c` `overlay_init` maps the game resolution the
|
||||
same way, and a folder of the exact size from an older setup still wins. A 16:9 player gets none. The step runs
|
||||
again when the displays, the prompts or the patches change. At a game resolution whose shape has no folder the
|
||||
game draws 16:9 with bars and starts the generator itself, in the background, for the next start: at start and
|
||||
|
||||
+2
-2
@@ -147,7 +147,7 @@ Many rows below are developer tools that only act together with another setting
|
||||
| `dyn_delta` (default `1`) | Records only the pipeline dynamic states (cull mode, depth and stencil tests, vertex input, blend enables, equations and write masks, ...) whose values changed since the last draw in the command buffer, also across pipeline changes; `0` records the full set at every change of pipeline state, as before; `ab` alternates with the `ab` blocks. | Fewer commands per pipeline change on the render and recorder threads; a driver that loses dynamic state across pipeline binds would draw with stale state. `TOTK_TRACE=perf` prints the calls and commands per submission. | Caution |
|
||||
| `feedback` | `0` samples a target that an earlier draw of the same pass wrote with no barrier; `restart` ends and restarts the pass behind a full barrier; otherwise the feedback-loop layout is used when the GPU supports it. | `0` brings back the old behaviour that the barrier fixed, so the picture can break in passes that read a target they draw into; `restart` costs extra passes. | Risky |
|
||||
| `flush_span` (default `0`) | `1` copies one span from the lowest to the highest flushed address of a pool, as an older version did. | Copies far more data to the GPU in crowded towns: an estimated 30-50 ms of GPU time per large copy over PCIe 3.0 x8. | Caution |
|
||||
| `frame_gen` (default `off`) | The frame generator: `off`, or `fsr3`, which brings up AMD FSR 3 frame interpolation and optical flow (FidelityFX SDK 1.1.4) at start; with DLSS off the replay follows the scene and records the motion vectors (the camera's and the moving objects', `fg_objects`), the picture before the HUD and the interpolation of a frame between each two the game draws (`runtime/vk_fg.cpp`). Each frame then goes out as two presents: the generated picture once the GPU has drawn the frame (a timeline wait, not before the pacer's time), the game's half the smoothed interval later (`runtime/vk_backend.c` `present_pair`); `fps_limit` counts the pictures shown and the game draws half, 30 at least (`runtime/frame_rate.c` `frame_step_cap_ns`). Off with DLSS or FSR 3.1 (`scene_upscaler`), `replay_workers` above 0, `sync_ahead = 1` or HDR output, and while a menu background or a loading or event fade is open; the game then draws at the whole limit. The swapchain gets one image more. Applies at once: turned on in the menu, the contexts are made at the next frame (a hitch of about 0.1 s once); turned off, they stay until exit. | The controls answer at the drawn rate, about half a frame later. Costs about 1.5 ms of GPU and 0.6 ms of the replay thread per drawn frame at 1080p (RX 9070, 7900X on 4 cores: 94 drawn without it, 86 drawn and 169 shown with it, no limit). For displays of 120 Hz and more. | Caution |
|
||||
| `frame_gen` (default `off`) | The frame generator: `off`, or `fsr3`, which brings up AMD FSR 3 frame interpolation and optical flow (FidelityFX SDK 1.1.4) at start; with DLSS off the replay follows the scene and records the motion vectors (the camera's and the moving objects', `fg_objects`), the picture before the HUD and the interpolation of a frame between each two the game draws (`runtime/vk_fg.cpp`). Each frame then goes out as two presents: the generated picture once the GPU has drawn the frame (a timeline wait, not before the pacer's time), the game's half the smoothed interval later (`runtime/vk_backend.c` `present_pair`); `fps_limit` counts the pictures shown and the game draws half, 30 at least (`runtime/frame_rate.c` `frame_step_cap_ns`). Off with DLSS or FSR 3.1 (`scene_upscaler`), `replay_workers` above 0 or HDR output, and while a menu background or a loading or event fade is open; the game then draws at the whole limit. The swapchain gets one image more. Applies at once: turned on in the menu, the contexts are made at the next frame (a hitch of about 0.1 s once); turned off, they stay until exit. | The controls answer at the drawn rate, about half a frame later. Costs about 1.5 ms of GPU and 0.6 ms of the replay thread per drawn frame at 1080p (RX 9070, 7900X on 4 cores: 94 drawn without it, 86 drawn and 169 shown with it, no limit). For displays of 120 Hz and more. | Caution |
|
||||
| `fg_test` | Frame generation checks: `1` presents the generated frame in place of the game's, `2` the picture before the HUD. Read at start. | Shows the frames out of their order: for checks only. | Caution |
|
||||
| `fg_debug` | `1`: the generated frames hold the SDK's debug view (motion fields, optical flow, disocclusion). Read at start. | For checks only. | Caution |
|
||||
| `fg_objects` (default `1`) | Frame generation's motion vectors get the per-object pass DLSS uses over the camera's: the moving scene draws (characters, enemies, objects) are drawn again with last frame's blocks (`runtime/vk_exec_draw.c` `vk_mvobj_execute`, `runtime/vk_mvprev.c`). `0`: the camera's motion alone; Link, whom the camera follows, then carries the world's motion and the generated pictures show him twice. Read at start. `dlaa_objmv = 0` also turns the object pass off. | About 0.04 ms of GPU and 0.8 ms of the replay thread per drawn frame (RX 9070, 7900X on 4 cores, field, 1080p: 85.6 drawn with `0`, 80.0 with `1`), half of it the host copy of the uniform snapshot the object pass reads. | Safe |
|
||||
@@ -250,7 +250,7 @@ These names are code patch sets built into the generated game code (`recomp/patc
|
||||
| `audio_drain_fix` (default `1`) | Patch set that sends the game's audio thread back to its command ring after each list (1.2.1 main+0x883780, 1.4.3 main+0x149244), so it takes every queued list per 5 ms audio frame instead of one (#337). Game 1.1.0 has no site and keeps the game's code. | `0` runs the game's code as shipped: above about 200 game updates a second the ring fills, and the game's guard (1.2.1 main+0x9bcdc4) switches the sound commands off until the game is restarted once 300 updates in a row find it full. The guard starts over whenever two audio frames fall between two updates, so by the code it fires only while the audio frames come evenly, 5 ms apart: with `audio = none`, or while the audio device takes nothing and the mixer keeps time by its own timer. The guard's count and the switch have not been read in a run. With a device playing the game kept its sound in every run on Linux with PipeWire and 1024-frame device periods, where the frames come in bursts after each period; on Windows the bursts are read from the code (`gap_ns = 0` in `runtime/audren.c`), not measured; a device with periods of 240 frames or less was not tried and may pace as evenly as the timer. The set acts only when more than one list is queued, so below that rate it seldom changes anything. Measured at `fps_limit = 240` (Linux, PipeWire), seconds with sound with `0` and with `1`. On 1.2.1: without a device 6 of 119 and 111 of 119; with a device 111 of 119 and 112 of 119; with the game's stream paused for 5 s from outside (`pw-cli`, not a real device stalling) 4 of 120 (silent from the pause on, also after the device resumed) and 113 of 119; a pause of 2 s silenced the game with `0`, a pause of 1 s did not. On 1.4.3: without a device 3 of 119 and 113 of 120; with a device 111 of 119 with `0`; with the stream paused for 5 s, in 60 s runs, 3 of 59 and 51 of 59; a pause of 2 s with `0`, 4 of 59. | Safe |
|
||||
| `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 |
|
||||
| `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 or `vert_plus` widens the view; 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 |
|
||||
|
||||
+25
-9
@@ -16,22 +16,28 @@ from pathlib import Path
|
||||
|
||||
# The game resolutions of another shape than 16:9 that runtime/ui/menu.cpp row_output_res lists, in the order of
|
||||
# runtime/cfg.c SHAPED: 21:9 and 32:9 monitors, 16:10 screens (the Steam Deck's 1280x800, handhelds and laptops) and 3:2
|
||||
# screens (Surface and Framework laptops and tablets)
|
||||
ASPECT_SIZES = ('2560x1080', '3440x1440', '3840x1600', '5120x2160', '3840x1080', '5120x1440',
|
||||
# screens (Surface and Framework laptops and tablets), 4:3 screens (CRT monitors, iPads) and 19.5:9 and 20:9 phone screens
|
||||
# (streamed to a phone)
|
||||
ASPECT_SIZES = ('2560x1080', '3440x1440', '3840x1600', '5120x2160', '3840x1080', '5120x1440', '7680x2160',
|
||||
'1280x800', '1680x1050', '1920x1200', '2560x1600',
|
||||
'1920x1280', '2160x1440', '2256x1504', '2880x1920', '3000x2000')
|
||||
'1920x1280', '2160x1440', '2256x1504', '2880x1920', '3000x2000',
|
||||
'1440x1080', '1600x1200', '2048x1536', '2732x2048',
|
||||
'2340x1080', '3120x1440', '2400x1080', '3200x1440')
|
||||
SHAPED = tuple(tuple(int(v) for v in s.split('x')) for s in ASPECT_SIZES)
|
||||
TOLERANCE = 0.01 # cfg.c and resolution.c res_is_16x9: shapes within 1% are the same
|
||||
# cfg.c SHAPE_MIN / SHAPE_MAX: the aspect ratios a UI layout can be made for (tools/ultrawide_layout.py), 4:3 to 32:9
|
||||
SHAPE_MIN, SHAPE_MAX = 4 / 3 * 0.99, 32 / 9 * 1.01
|
||||
|
||||
|
||||
def is_16x9(w, h):
|
||||
return abs((w / h) / (16 / 9) - 1) <= TOLERANCE
|
||||
|
||||
|
||||
def shape_size(w, h):
|
||||
def shape_size(w, h, listed=False):
|
||||
"""The folder size of w x h's shape: of ASPECT_SIZES within 1% of its aspect ratio, the closest, the first of equal
|
||||
ones (5120x2160 is 2560x1080's shape). None for 16:9 and for a shape the setup has no layout for. The same rule as
|
||||
runtime/cfg.c cfg_shape_size."""
|
||||
ones (5120x2160 is 2560x1080's shape); another shape from 4:3 to 32:9 its own size (an output_res of a phone's
|
||||
3120x1440, say), unless listed. None for 16:9 and for a shape no layout can be made for (portrait, narrower than
|
||||
4:3, wider than 32:9). The same rule as runtime/cfg.c cfg_shape_size."""
|
||||
if not w or not h or is_16x9(w, h):
|
||||
return None
|
||||
r, best, err = w / h, None, None
|
||||
@@ -39,7 +45,15 @@ def shape_size(w, h):
|
||||
e = abs(sw / sh / r - 1)
|
||||
if e <= TOLERANCE and (err is None or e < err):
|
||||
best, err = f'{sw}x{sh}', e
|
||||
return best
|
||||
if best or listed or not SHAPE_MIN <= r <= SHAPE_MAX:
|
||||
return best
|
||||
return f'{w}x{h}'
|
||||
|
||||
|
||||
def size_order(size):
|
||||
"""Sort key: the ASPECT_SIZES order, then the sizes of unlisted shapes by width and height."""
|
||||
w, h = (int(v) for v in size.split('x'))
|
||||
return (ASPECT_SIZES.index(size), 0, 0) if size in ASPECT_SIZES else (len(ASPECT_SIZES), w, h)
|
||||
|
||||
|
||||
def default_size(w, h):
|
||||
@@ -199,8 +213,10 @@ def wanted(dest, screens=None):
|
||||
text = ''
|
||||
sizes = set()
|
||||
for w, h in screens:
|
||||
# A display of an unlisted shape keeps the 1920x1080 default (cfg.c screen_default): no folder for it unless
|
||||
# output_res asks for its size.
|
||||
w, h = max(w, h), min(w, h)
|
||||
sizes.add(shape_size(w, h))
|
||||
sizes.add(shape_size(w, h, listed=True))
|
||||
d = default_size(w, h)
|
||||
if d:
|
||||
sizes.add(shape_size(*(int(v) for v in d.split('x'))))
|
||||
@@ -208,4 +224,4 @@ def wanted(dest, screens=None):
|
||||
if m:
|
||||
sizes.add(shape_size(int(m.group(1)), int(m.group(2))))
|
||||
sizes.discard(None)
|
||||
return sorted(sizes, key=ASPECT_SIZES.index), prompts_style(text)
|
||||
return sorted(sizes, key=size_order), prompts_style(text)
|
||||
@@ -218,6 +218,60 @@ def linux_glibc():
|
||||
# GLIBC_FLOOR); on an older one they cannot start
|
||||
GLIBC_NEEDED = (2, 34)
|
||||
|
||||
# The libraries the release puts next to the game (libSDL3.so.0 from the Steam Runtime sysroot) link system libraries
|
||||
# that a minimal system may lack: libXss.so.1 on AnataseOS (#1315, #1428), libdecor-0.so.0 on Batocera (#1419). The
|
||||
# loader then stops the game before it runs, after the half hour of lift and compile, as `totk --prepare-shaders`
|
||||
# with exit code 127. The package that provides a common one, by distribution family.
|
||||
LIBRARY_PACKAGES = {
|
||||
'libXss.so.1': ('libXScrnSaver', 'libxss1', 'libxss'),
|
||||
'libdecor-0.so.0': ('libdecor', 'libdecor-0-0', 'libdecor'),
|
||||
'libXi.so.6': ('libXi', 'libxi6', 'libxi'),
|
||||
'libXrandr.so.2': ('libXrandr', 'libxrandr2', 'libxrandr'),
|
||||
'libXcursor.so.1': ('libXcursor', 'libxcursor1', 'libxcursor'),
|
||||
'libXinerama.so.1': ('libXinerama', 'libxinerama1', 'libxinerama'),
|
||||
'libXext.so.6': ('libXext', 'libxext6', 'libxext'),
|
||||
'libXfixes.so.3': ('libXfixes', 'libxfixes3', 'libxfixes'),
|
||||
'libX11.so.6': ('libX11', 'libx11-6', 'libx11'),
|
||||
'libxkbcommon.so.0': ('libxkbcommon', 'libxkbcommon0', 'libxkbcommon'),
|
||||
'libwayland-client.so.0': ('libwayland-client', 'libwayland-client0', 'wayland'),
|
||||
'libasound.so.2': ('alsa-lib', 'libasound2', 'alsa-lib'),
|
||||
}
|
||||
LDD_NOT_FOUND = re.compile(r'^\s*(\S+) => not found', re.M)
|
||||
LOADER_NOT_FOUND = re.compile(r'error while loading shared libraries: (\S+?): cannot open shared object file')
|
||||
|
||||
|
||||
def library_packages(libraries):
|
||||
"""The packages that provide the known ones of libraries, as " (Fedora: ..., Debian/Ubuntu: ..., Arch: ...)" for
|
||||
the message; "" when none is known."""
|
||||
known = [LIBRARY_PACKAGES[n] for n in libraries if n in LIBRARY_PACKAGES]
|
||||
if not known:
|
||||
return ''
|
||||
return ' (' + ', '.join(f'{family}: {" ".join(p[i] for p in known)}'
|
||||
for i, family in enumerate(('Fedora', 'Debian/Ubuntu', 'Arch'))) + ')'
|
||||
|
||||
|
||||
def loader_missing(log):
|
||||
"""The libraries the system's loader could not find in a tool's log ("error while loading shared libraries"), in
|
||||
order, each once."""
|
||||
log = Path(log)
|
||||
text = log.read_text(encoding='utf-8', errors='replace') if log.is_file() else ''
|
||||
return list(dict.fromkeys(LOADER_NOT_FOUND.findall(text)))
|
||||
|
||||
|
||||
def missing_libraries(paths):
|
||||
"""Linux: the shared libraries `ldd` reports as not found for paths, in order, each once; [] elsewhere, when ldd
|
||||
cannot run, or when nothing is missing."""
|
||||
if not sys.platform.startswith('linux'):
|
||||
return []
|
||||
found = []
|
||||
for p in paths:
|
||||
try:
|
||||
r = subprocess.run(['ldd', str(p)], capture_output=True, text=True, errors='replace', timeout=60)
|
||||
except (OSError, subprocess.SubprocessError):
|
||||
return []
|
||||
found += [n for n in LDD_NOT_FOUND.findall(r.stdout) if n not in found]
|
||||
return found
|
||||
|
||||
|
||||
def linux_kernel():
|
||||
"""(major, minor) of the running Linux kernel, None elsewhere."""
|
||||
@@ -537,6 +591,12 @@ class Check(Step):
|
||||
host = self.probe_host(ctx, exe)
|
||||
if not host['x86_64_v2']:
|
||||
raise InstallError('check.cpu_too_old')
|
||||
# Before lift and compile: the game would not start without these (LIBRARY_PACKAGES); a repository build links
|
||||
# the system's own libraries
|
||||
missing = [] if layout.dev else missing_libraries(layout.dlls)
|
||||
if missing:
|
||||
raise InstallError('check.libraries_missing', libraries=', '.join(missing),
|
||||
packages=library_packages(missing))
|
||||
# v3 is the faster build; v2 runs on CPUs without AVX2/FMA (runtime/fma.c supplies the fused multiply-add).
|
||||
ctx.cpu = 'v3' if host['x86_64_v3'] else 'v2'
|
||||
if not host['loader']:
|
||||
@@ -1519,6 +1579,11 @@ class Prepare(Step):
|
||||
[dest, '--version', version_tag(game_version(ctx)), '--romfs', dest / 'romfs', '--exefs',
|
||||
dest / 'exefs', '--list', shader_list], parse)
|
||||
if code or not (dest / 'shader-prepared.bin').is_file():
|
||||
# The loader stopped the game before it ran: name the library rather than exit code 127
|
||||
missing = loader_missing(log)
|
||||
if missing:
|
||||
raise InstallError('prepare.libraries_missing', libraries=', '.join(missing),
|
||||
packages=library_packages(missing), log=str(log))
|
||||
raise InstallError('prepare.shaders_failed', code=code, log=str(log))
|
||||
if skipped[0]:
|
||||
rep.warning('warn.shaders_skipped', count=skipped[0], log=str(log))
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "Das Spiel braucht eine Grafikkarte mit Vulkan 1.3; gefunden: {devices}. Aktualisiere den Grafiktreiber.",
|
||||
"check.libraries_missing": "Das Spiel kann auf diesem System nicht starten: Es braucht {libraries}, das dem System fehlt. Installiere das Paket, das es bereitstellt, mit dem Paketmanager des Systems{packages} und starte das Setup dann erneut.",
|
||||
"check.no_display": "Zum Vorbereiten der Shader wird ein Bildschirm gebraucht. Starte das Setup aus der Desktop-Sitzung oder setze DISPLAY=:0 (auf einem Steam Deck im Spielmodus zusätzlich XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Die Spieldateien werden gebraucht: wähle das Hauptspiel, das Update 1.1.0, 1.2.1 oder 1.4.3 und prod.keys.",
|
||||
"check.input_missing": "Datei nicht gefunden ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Die Shader-Liste fehlt.",
|
||||
"prepare.romfs_patches_failed": "Das Schreiben der Spieldaten-Patches ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Das Vorbereiten der Shader ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "Das Spiel wurde gebaut, kann aber nicht starten: Dem System fehlt {libraries}. Installiere das Paket, das es bereitstellt, mit dem Paketmanager des Systems{packages} und starte das Setup dann erneut. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "Die Spieldaten in {path} fehlen nach der Installation oder können nicht gelesen werden. Starte Windows neu und führe das Installationsprogramm erneut auf demselben Ordner aus: Es entpackt die Spieldaten erneut und behält den Rest.",
|
||||
"prepare.pack_failed": "Das Packen des Shader-Caches ist fehlgeschlagen (Exit-Code {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini kann nicht geschrieben werden: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "The game needs a graphics card with Vulkan 1.3; found: {devices}. Update the graphics driver.",
|
||||
"check.libraries_missing": "The game cannot start on this system: it needs {libraries}, which the system does not have. Install the package that provides it with the system's package manager{packages}, then run the setup again.",
|
||||
"check.no_display": "Preparing the shaders needs a display. Run the setup from the desktop session, or export DISPLAY=:0 (on a Steam Deck in Game Mode also XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "The game files are needed: choose the base game, the 1.1.0 or 1.2.1 or 1.4.3 update and prod.keys.",
|
||||
"check.input_missing": "File not found ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "The shader list is missing.",
|
||||
"prepare.romfs_patches_failed": "Writing the game data patches failed (exit code {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Preparing the shaders failed (exit code {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "The game was built but cannot start: the system does not have {libraries}. Install the package that provides it with the system's package manager{packages}, then run the setup again. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "The game data in {path} is missing or cannot be read after the install. Restart Windows, then run the installer again on the same folder: it extracts the game data again and keeps the rest.",
|
||||
"prepare.pack_failed": "Packing the shader cache failed (exit code {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini cannot be written: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "El juego necesita una tarjeta gráfica con Vulkan 1.3; encontrado: {devices}. Actualiza el controlador gráfico.",
|
||||
"check.libraries_missing": "El juego no puede iniciarse en este sistema: necesita {libraries}, que el sistema no tiene. Instala el paquete que lo proporciona con el gestor de paquetes del sistema{packages} y vuelve a ejecutar el instalador.",
|
||||
"check.no_display": "Preparar los shaders necesita una pantalla. Ejecuta el instalador desde la sesión de escritorio o exporta DISPLAY=:0 (en una Steam Deck en modo Juego, también XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Se necesitan los archivos del juego: elige el juego base, la actualización 1.1.0, 1.2.1 o 1.4.3 y prod.keys.",
|
||||
"check.input_missing": "Archivo no encontrado ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Falta la lista de shaders.",
|
||||
"prepare.romfs_patches_failed": "Falló la escritura de los parches de datos del juego (código de salida {code}). Detalles: {log}",
|
||||
"prepare.shaders_failed": "Falló la preparación de los shaders (código de salida {code}). Detalles: {log}",
|
||||
"prepare.libraries_missing": "El juego se compiló pero no puede iniciarse: el sistema no tiene {libraries}. Instala el paquete que lo proporciona con el gestor de paquetes del sistema{packages} y vuelve a ejecutar el instalador. Detalles: {log}",
|
||||
"cleanup.romfs_unreadable": "Los datos del juego en {path} faltan o no se pueden leer tras la instalación. Reinicia Windows y vuelve a ejecutar el instalador en la misma carpeta: extrae de nuevo los datos del juego y conserva el resto.",
|
||||
"prepare.pack_failed": "Falló el empaquetado de la caché de shaders (código de salida {code}). Detalles: {log}",
|
||||
"cleanup.ini_failed": "No se puede escribir totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "Le jeu demande une carte graphique avec Vulkan 1.3 ; trouvé : {devices}. Mettez à jour le pilote graphique.",
|
||||
"check.libraries_missing": "Le jeu ne peut pas démarrer sur ce système : il a besoin de {libraries}, absent du système. Installez le paquet qui le fournit avec le gestionnaire de paquets du système{packages}, puis relancez l'installation.",
|
||||
"check.no_display": "La préparation des shaders a besoin d'un écran. Lancez l'installation depuis la session de bureau, ou exportez DISPLAY=:0 (sur un Steam Deck en mode Jeu, aussi XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Les fichiers du jeu sont nécessaires : choisissez le jeu de base, la mise à jour 1.1.0, 1.2.1 ou 1.4.3 et prod.keys.",
|
||||
"check.input_missing": "Fichier introuvable ({input}) : {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "La liste des shaders est manquante.",
|
||||
"prepare.romfs_patches_failed": "L'écriture des correctifs de données du jeu a échoué (code de sortie {code}). Détails : {log}",
|
||||
"prepare.shaders_failed": "La préparation des shaders a échoué (code de sortie {code}). Détails : {log}",
|
||||
"prepare.libraries_missing": "Le jeu a été compilé mais ne peut pas démarrer : {libraries} est absent du système. Installez le paquet qui le fournit avec le gestionnaire de paquets du système{packages}, puis relancez l'installation. Détails : {log}",
|
||||
"cleanup.romfs_unreadable": "Les données du jeu dans {path} sont manquantes ou illisibles après l'installation. Redémarrez Windows, puis relancez l'installateur sur le même dossier : il extrait à nouveau les données du jeu et conserve le reste.",
|
||||
"prepare.pack_failed": "Le regroupement du cache de shaders a échoué (code de sortie {code}). Détails : {log}",
|
||||
"cleanup.ini_failed": "totk.ini ne peut pas être écrit : {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "Il gioco richiede una scheda grafica con Vulkan 1.3; trovato: {devices}. Aggiorna il driver grafico.",
|
||||
"check.libraries_missing": "Il gioco non può avviarsi su questo sistema: richiede {libraries}, che il sistema non ha. Installa il pacchetto che lo fornisce con il gestore di pacchetti del sistema{packages}, poi esegui di nuovo l'installazione.",
|
||||
"check.no_display": "La preparazione degli shader richiede uno schermo. Avvia l'installazione dalla sessione desktop oppure esporta DISPLAY=:0 (su uno Steam Deck in modalità Gioco anche XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Servono i file del gioco: scegli il gioco base, l'aggiornamento 1.1.0, 1.2.1 o 1.4.3 e prod.keys.",
|
||||
"check.input_missing": "File non trovato ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "Manca l'elenco degli shader.",
|
||||
"prepare.romfs_patches_failed": "La scrittura delle patch dei dati di gioco non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"prepare.shaders_failed": "La preparazione degli shader non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"prepare.libraries_missing": "Il gioco è stato compilato ma non può avviarsi: il sistema non ha {libraries}. Installa il pacchetto che lo fornisce con il gestore di pacchetti del sistema{packages}, poi esegui di nuovo l'installazione. Dettagli: {log}",
|
||||
"cleanup.romfs_unreadable": "I dati di gioco in {path} mancano o non sono leggibili dopo l'installazione. Riavvia Windows, poi esegui di nuovo il programma di installazione sulla stessa cartella: estrae di nuovo i dati di gioco e mantiene il resto.",
|
||||
"prepare.pack_failed": "La raccolta della cache degli shader non è riuscita (codice di uscita {code}). Dettagli: {log}",
|
||||
"cleanup.ini_failed": "Impossibile scrivere totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Vulkan ドライバーがインストールされていません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.vulkan_no_device": "Vulkan がグラフィックカードを見つけられません。グラフィックカードの最新ドライバーをインストールしてください。",
|
||||
"check.vulkan_too_old": "このゲームには Vulkan 1.3 対応のグラフィックカードが必要です。見つかったもの: {devices}。グラフィックドライバーを更新してください。",
|
||||
"check.libraries_missing": "このシステムではゲームを起動できません: {libraries} が必要ですが、システムにありません。システムのパッケージマネージャーでそれを含むパッケージをインストールし{packages}、セットアップをもう一度実行してください。",
|
||||
"check.no_display": "シェーダーの準備にはディスプレイが必要です。デスクトップのセッションからセットアップを実行するか、DISPLAY=:0 を export してください(Steam Deck のゲームモードでは XDG_RUNTIME_DIR=/run/user/1000 も)。",
|
||||
"check.inputs_needed": "ゲームファイルが必要です。本編、1.1.0・1.2.1・1.4.3 のいずれかのアップデート、prod.keys を選んでください。",
|
||||
"check.input_missing": "ファイルが見つかりません ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "シェーダーの一覧がありません。",
|
||||
"prepare.romfs_patches_failed": "ゲームデータパッチの書き出しに失敗しました (終了コード {code})。詳細: {log}",
|
||||
"prepare.shaders_failed": "シェーダーの準備に失敗しました (終了コード {code})。詳細: {log}",
|
||||
"prepare.libraries_missing": "ゲームはビルドされましたが起動できません: システムに {libraries} がありません。システムのパッケージマネージャーでそれを含むパッケージをインストールし{packages}、セットアップをもう一度実行してください。詳細: {log}",
|
||||
"cleanup.romfs_unreadable": "インストール後、{path} のゲームデータが見つからないか読み取れません。Windows を再起動し、同じフォルダーでインストーラーをもう一度実行してください。ゲームデータだけを再展開し、それ以外は保持します。",
|
||||
"prepare.pack_failed": "シェーダーキャッシュのまとめに失敗しました (終了コード {code})。詳細: {log}",
|
||||
"cleanup.ini_failed": "totk.ini を書き込めません: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"check.vulkan_missing": "Vulkan 드라이버가 설치되어 있지 않습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.vulkan_no_device": "Vulkan이 그래픽 카드를 찾지 못했습니다. 그래픽 카드의 최신 드라이버를 설치하세요.",
|
||||
"check.vulkan_too_old": "게임에는 Vulkan 1.3을 지원하는 그래픽 카드가 필요합니다. 발견된 장치: {devices}. 그래픽 드라이버를 업데이트하세요.",
|
||||
"check.libraries_missing": "이 시스템에서는 게임을 시작할 수 없습니다: {libraries}이(가) 필요하지만 시스템에 없습니다. 시스템의 패키지 관리자로 이를 제공하는 패키지를 설치한 뒤{packages} 설치 프로그램을 다시 실행하세요.",
|
||||
"check.no_display": "셰이더를 준비하려면 디스플레이가 필요합니다. 데스크톱 세션에서 설치 프로그램을 실행하거나 DISPLAY=:0 을 export 하세요(게임 모드의 Steam Deck에서는 XDG_RUNTIME_DIR=/run/user/1000 도).",
|
||||
"check.inputs_needed": "게임 파일이 필요합니다. 기본 게임, 1.1.0 또는 1.2.1 또는 1.4.3 업데이트, prod.keys를 선택하세요.",
|
||||
"check.input_missing": "파일을 찾을 수 없음({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "셰이더 목록이 없습니다.",
|
||||
"prepare.romfs_patches_failed": "게임 데이터 패치 작성에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"prepare.shaders_failed": "셰이더 준비에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"prepare.libraries_missing": "게임은 빌드되었지만 시작할 수 없습니다: 시스템에 {libraries}이(가) 없습니다. 시스템의 패키지 관리자로 이를 제공하는 패키지를 설치한 뒤{packages} 설치 프로그램을 다시 실행하세요. 자세히: {log}",
|
||||
"cleanup.romfs_unreadable": "설치 후 {path}의 게임 데이터가 없거나 읽을 수 없습니다. Windows를 다시 시작한 다음 같은 폴더로 설치 프로그램을 다시 실행하세요. 게임 데이터만 다시 추출하고 나머지는 유지합니다.",
|
||||
"prepare.pack_failed": "셰이더 캐시 묶기에 실패했습니다(종료 코드 {code}). 자세히: {log}",
|
||||
"cleanup.ini_failed": "totk.ini를 쓸 수 없습니다: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "Het spel heeft een videokaart met Vulkan 1.3 nodig; gevonden: {devices}. Werk het grafische stuurprogramma bij.",
|
||||
"check.libraries_missing": "Het spel kan op dit systeem niet starten: het heeft {libraries} nodig, dat het systeem niet heeft. Installeer het pakket dat het levert met de pakketbeheerder van het systeem{packages} en voer de installatie daarna opnieuw uit.",
|
||||
"check.no_display": "Voor het voorbereiden van de shaders is een scherm nodig. Start de installatie vanuit de bureaubladsessie of exporteer DISPLAY=:0 (op een Steam Deck in de Gamemodus ook XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "De spelbestanden zijn nodig: kies het basisspel, de update 1.1.0, 1.2.1 of 1.4.3 en prod.keys.",
|
||||
"check.input_missing": "Bestand niet gevonden ({input}): {path}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"prepare.shader_list_missing": "De shaderlijst ontbreekt.",
|
||||
"prepare.romfs_patches_failed": "Het schrijven van de spelgegevenspatches is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"prepare.shaders_failed": "Het voorbereiden van de shaders is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"prepare.libraries_missing": "Het spel is gebouwd maar kan niet starten: het systeem heeft {libraries} niet. Installeer het pakket dat het levert met de pakketbeheerder van het systeem{packages} en voer de installatie daarna opnieuw uit. Details: {log}",
|
||||
"cleanup.romfs_unreadable": "De spelgegevens in {path} ontbreken of kunnen na de installatie niet worden gelezen. Start Windows opnieuw en voer het installatieprogramma opnieuw uit op dezelfde map: het pakt de spelgegevens opnieuw uit en behoudt de rest.",
|
||||
"prepare.pack_failed": "Het verpakken van de shadercache is mislukt (afsluitcode {code}). Details: {log}",
|
||||
"cleanup.ini_failed": "totk.ini kan niet worden geschreven: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"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.",
|
||||
"check.vulkan_too_old": "O jogo precisa de uma placa de vídeo com Vulkan 1.3; encontrado: {devices}. Atualize o driver de vídeo.",
|
||||
"check.libraries_missing": "O jogo não pode iniciar neste sistema: ele precisa de {libraries}, que o sistema não tem. Instale o pacote que o fornece com o gerenciador de pacotes do sistema{packages} e execute o instalador de novo.",
|
||||
"check.no_display": "Preparar os shaders exige uma tela. Execute a instalação na sessão da área de trabalho ou use export DISPLAY=:0 (no Steam Deck em Game Mode, também XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Os arquivos do jogo são necessários: escolha o jogo base, a atualização 1.1.0, 1.2.1 ou 1.4.3 e o prod.keys.",
|
||||
"check.input_missing": "Arquivo não encontrado ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "A lista de shaders está faltando.",
|
||||
"prepare.romfs_patches_failed": "Falha ao gravar os patches nos dados do jogo (código de saída {code}). Detalhes: {log}",
|
||||
"prepare.shaders_failed": "Falha ao preparar os shaders (código de saída {code}). Detalhes: {log}",
|
||||
"prepare.libraries_missing": "O jogo foi compilado, mas não pode iniciar: o sistema não tem {libraries}. Instale o pacote que o fornece com o gerenciador de pacotes do sistema{packages} e execute o instalador de novo. Detalhes: {log}",
|
||||
"cleanup.romfs_unreadable": "Os dados do jogo em {path} estão faltando ou não podem ser lidos depois da instalação. Reinicie o Windows e execute o instalador de novo na mesma pasta: ele extrai os dados do jogo outra vez e mantém o resto.",
|
||||
"prepare.pack_failed": "Falha ao juntar o cache de shaders (código de saída {code}). Detalhes: {log}",
|
||||
"cleanup.ini_failed": "Não foi possível gravar o totk.ini: {detail}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "Драйвер Vulkan не установлен. Установите свежий драйвер видеокарты.",
|
||||
"check.vulkan_no_device": "Vulkan не находит видеокарту. Установите свежий драйвер видеокарты.",
|
||||
"check.vulkan_too_old": "Игре нужна видеокарта с Vulkan 1.3; найдено: {devices}. Обновите драйвер видеокарты.",
|
||||
"check.libraries_missing": "Игра не может запуститься в этой системе: ей нужна библиотека {libraries}, которой в системе нет. Установите пакет с ней через менеджер пакетов системы{packages} и запустите установку снова.",
|
||||
"check.no_display": "Для подготовки шейдеров нужен дисплей. Запустите установку из сеанса рабочего стола или выполните export DISPLAY=:0 (на Steam Deck в игровом режиме ещё XDG_RUNTIME_DIR=/run/user/1000).",
|
||||
"check.inputs_needed": "Нужны игровые файлы: выберите базовую игру, обновление 1.1.0 или 1.2.1 или 1.4.3 и prod.keys.",
|
||||
"check.input_missing": "Файл не найден ({input}): {path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "Нет списка шейдеров.",
|
||||
"prepare.romfs_patches_failed": "Не удалось записать патчи данных игры (код выхода {code}). Подробности: {log}",
|
||||
"prepare.shaders_failed": "Не удалось подготовить шейдеры (код выхода {code}). Подробности: {log}",
|
||||
"prepare.libraries_missing": "Игра собрана, но не может запуститься: в системе нет библиотеки {libraries}. Установите пакет с ней через менеджер пакетов системы{packages} и запустите установку снова. Подробности: {log}",
|
||||
"cleanup.romfs_unreadable": "Данные игры в {path} пропали или не читаются после установки. Перезагрузите Windows и запустите установщик снова на ту же папку: он заново распакует данные игры, остальное сохранится.",
|
||||
"prepare.pack_failed": "Не удалось упаковать кэш шейдеров (код выхода {code}). Подробности: {log}",
|
||||
"cleanup.ini_failed": "Не удаётся записать totk.ini: {detail}",
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"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.libraries_missing": "Trò chơi không thể khởi động trên hệ thống này: cần {libraries}, nhưng hệ thống không có. Hãy cài gói cung cấp thư viện đó bằng trình quản lý gói của hệ thống{packages}, rồi chạy lại trình cài đặt.",
|
||||
"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}",
|
||||
@@ -106,6 +107,7 @@
|
||||
"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}",
|
||||
"prepare.libraries_missing": "Trò chơi đã được biên dịch nhưng không thể khởi động: hệ thống không có {libraries}. Hãy cài gói cung cấp thư viện đó bằng trình quản lý gói của hệ thống{packages}, rồi chạy lại trình cài đặt. 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}",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
"check.vulkan_missing": "未安装 Vulkan 驱动。请为你的显卡安装最新的驱动程序。",
|
||||
"check.vulkan_no_device": "Vulkan 找不到显卡。请为你的显卡安装最新的驱动程序。",
|
||||
"check.vulkan_too_old": "游戏需要支持 Vulkan 1.3 的显卡;检测到:{devices}。请更新显卡驱动程序。",
|
||||
"check.libraries_missing": "游戏无法在此系统上启动:它需要 {libraries},但系统中没有。请用系统的软件包管理器安装提供它的软件包{packages},然后重新运行安装程序。",
|
||||
"check.no_display": "准备着色器需要显示器。请在桌面会话中运行安装程序,或执行 export DISPLAY=:0(Steam Deck 游戏模式下还需 XDG_RUNTIME_DIR=/run/user/1000)。",
|
||||
"check.inputs_needed": "需要游戏文件:请选择游戏本体、1.1.0、1.2.1 或 1.4.3 更新以及 prod.keys。",
|
||||
"check.input_missing": "找不到文件({input}):{path}",
|
||||
@@ -110,6 +111,7 @@
|
||||
"prepare.shader_list_missing": "缺少着色器列表。",
|
||||
"prepare.romfs_patches_failed": "写入游戏数据补丁失败(退出代码 {code})。详情:{log}",
|
||||
"prepare.shaders_failed": "准备着色器失败(退出代码 {code})。详情:{log}",
|
||||
"prepare.libraries_missing": "游戏已编译,但无法启动:系统中没有 {libraries}。请用系统的软件包管理器安装提供它的软件包{packages},然后重新运行安装程序。详情:{log}",
|
||||
"cleanup.romfs_unreadable": "安装完成后,{path} 中的游戏数据缺失或无法读取。请重启 Windows,然后对同一文件夹再次运行安装程序:它会重新提取游戏数据,其余内容保留。",
|
||||
"prepare.pack_failed": "打包着色器缓存失败(退出代码 {code})。详情:{log}",
|
||||
"cleanup.ini_failed": "无法写入 totk.ini:{detail}",
|
||||
|
||||
+24
-9
@@ -57,7 +57,7 @@ static const char *const known[] = {
|
||||
"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", "NULL_ATTACH",
|
||||
"ONE_PER_CORE", "OPERATION_MODE", "OPTREF_GUARD", "OUTPUT_RES", "PAD_LAYOUT", "PASS_CRUMBS", "PATCH_OUTPUT", "PATCH_SCENE", "PCORE", "PCSS", "PCSS_K", "PERF_CENSUS", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PLUGIN_TICK_OFFSET", "PLUGIN_TRACE", "POINTER_IMAGE",
|
||||
"ONE_PER_CORE", "OPERATION_MODE", "OPTREF_GUARD", "OUTPUT_RES", "PAD_BACKGROUND", "PAD_LAYOUT", "PASS_CRUMBS", "PATCH_OUTPUT", "PATCH_SCENE", "PCORE", "PCSS", "PCSS_K", "PERF_CENSUS", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PLUGIN_TICK_OFFSET", "PLUGIN_TRACE", "POINTER_IMAGE",
|
||||
"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",
|
||||
@@ -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", "SKIP_CS", "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", "VK_NO_HOST_IMPORT",
|
||||
"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", "VERT_PLUS", "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",
|
||||
@@ -81,7 +81,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"}, {"DYNAMIC_RES", "display"}, {"ASPECT", "display"}, {"MOVIE_ASPECT", "display"}, {"FOV", "display"}, {"VERT_PLUS", "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"},
|
||||
@@ -98,7 +98,7 @@ static const struct { const char *key, *section; } sections[] = {
|
||||
{"AUDIO_DEVICE", "audio"},
|
||||
{"MOTION", "input"}, {"GYRO_CALIBRATION", "input"}, {"GYRO_AUTO_BIAS", "input"}, {"RUMBLE_STRENGTH", "input"}, {"RUMBLE_CURVE", "input"}, {"RUMBLE_TRIGGERS", "input"},
|
||||
{"GYRO_BIAS_X", "input"}, {"GYRO_BIAS_Y", "input"}, {"GYRO_BIAS_Z", "input"}, {"GYRO_BIAS_PAD", "input"},
|
||||
{"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"},
|
||||
{"PAD_BACKGROUND", "input"}, {"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"},
|
||||
{"STICK_SENS", "input"},
|
||||
{"MENU_CURSOR", "input"}, {"MAP_CLICK", "input"}, {"DIALOGUE_CLICK", "input"}, {"POINTER_IMAGE", "input"}, {"QUICKSAVE", "input"}, {"QUICKSAVE_KEY", "input"}, {"QUICKLOAD_KEY", "input"}, {"MOUSE_MODE", "input"}, {"MOUSE_SENS", "input"}, {"MOUSE_AIM_SCALE", "input"}, {"WALK_KEY", "input"}, {"WALK_SCALE", "input"}, {"FREECAM_PATCH", "input"}, {"FREECAM_PAD", "input"}, {"FREECAM_KEY", "input"}, {"INPUT_RECORD", "input"},
|
||||
{"BIND_A", "input"}, {"BIND_B", "input"}, {"BIND_X", "input"}, {"BIND_Y", "input"}, {"BIND_LCLICK", "input"},
|
||||
@@ -149,6 +149,7 @@ static const CfgMeta metas[] = {
|
||||
{"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},
|
||||
{"VERT_PLUS", "0", "0|1", LIVE}, // resolution.c res_fov_live
|
||||
{"ANISO", "game", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features
|
||||
// colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses
|
||||
{"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE},
|
||||
@@ -183,6 +184,7 @@ static const CfgMeta metas[] = {
|
||||
{"GYRO_BIAS_X", "", NULL, RESTART}, {"GYRO_BIAS_Y", "", NULL, RESTART}, {"GYRO_BIAS_Z", "", NULL, RESTART},
|
||||
{"GYRO_BIAS_PAD", "", NULL, RESTART},
|
||||
{"RUMBLE_TRIGGERS", "0", "0|1", LIVE}, {"PAD_LAYOUT", "auto", "auto|nintendo|xbox", LIVE},
|
||||
{"PAD_BACKGROUND", "auto", "auto|0|1", RESTART}, // input.c start: SDL's background joystick events (#971, #1462)
|
||||
{"PROMPTS", "nintendo", "nintendo|xbox|playstation|pc", RESTART},
|
||||
{"STICK_DEADZONE", "8", "0..50", LIVE}, {"STICK_SENS", "1", "0.1..3", RESTART},
|
||||
{"LSTICK_DEADZONE", "", "0..50", LIVE}, {"RSTICK_DEADZONE", "", "0..50", LIVE},
|
||||
@@ -218,7 +220,7 @@ static const CfgMeta metas[] = {
|
||||
{"REPLAY_WORKERS", "0", "0..16", RESTART}, {"REPLAY_CHUNKS", "0", "0..64", RESTART},
|
||||
{"REPLAY_CHUNK_DRAWS", "128", "1..100000", RESTART}, {"REPLAY_STATE_CHECK", "0", "0|1", RESTART},
|
||||
{"REPLAY_SKEW_US", "0", "0..100000", RESTART},
|
||||
{"SYNC_AHEAD", "0", "0|1|check", RESTART}, {"SHADOW_DEFER", "1", "0|1", RESTART},
|
||||
{"SYNC_AHEAD", "1", "0|1|check", RESTART}, {"SHADOW_DEFER", "1", "0|1", RESTART},
|
||||
{"FREE_CORES", "0", "0|1", RESTART}, {"TIMER_1MS", "1", "0|1", RESTART},
|
||||
// shaders and pipelines
|
||||
{"PIPE_WAIT", "default", "default|draw", RESTART}, {"PIPE_SKIP", "fullscreen", "strict|any|fullscreen", RESTART},
|
||||
@@ -407,15 +409,24 @@ static const char *raw_get(const char *name) {
|
||||
// the Switch ones.
|
||||
static const unsigned SHAPED[][2] = {
|
||||
{2560, 1080}, {3440, 1440}, {3840, 1600}, {5120, 2160}, // 21:9
|
||||
{3840, 1080}, {5120, 1440}, // 32:9
|
||||
{3840, 1080}, {5120, 1440}, {7680, 2160}, // 32:9
|
||||
{1280, 800}, {1680, 1050}, {1920, 1200}, {2560, 1600}, // 16:10
|
||||
{1920, 1280}, {2160, 1440}, {2256, 1504}, {2880, 1920}, {3000, 2000}, // 3:2
|
||||
{1440, 1080}, {1600, 1200}, {2048, 1536}, {2732, 2048}, // 4:3 (CRT monitors, iPads)
|
||||
{2340, 1080}, {3120, 1440}, {2400, 1080}, {3200, 1440}, // 19.5:9 and 20:9 (phones, streamed)
|
||||
};
|
||||
|
||||
// The shapes a UI layout can be made for (tools/ultrawide_layout.py works on any aspect ratio between these): from 4:3
|
||||
// to 32:9, 1% either side. A shape between them that SHAPED does not list takes a folder of its own exact size.
|
||||
#define SHAPE_MIN (4.0 / 3.0 * 0.99)
|
||||
#define SHAPE_MAX (32.0 / 9.0 * 1.01)
|
||||
|
||||
// The folder size of w x h's shape: of SHAPED within 1% of its aspect ratio, the closest, the first of equal ones
|
||||
// (5120x2160 takes 2560x1080). The UI layout depends on the aspect ratio alone (tools/ultrawide_layout.py apply), so
|
||||
// the setup writes one romfs-patches-<w>x<h> per shape, named after this size (installer/screens.py shape_size, the
|
||||
// same rule), and romfs.c overlay_init looks for it. 0 for 16:9 and for a shape without a layout.
|
||||
// same rule), and romfs.c overlay_init looks for it. A shape SHAPED does not list but within SHAPE_MIN..SHAPE_MAX (a
|
||||
// phone's 13:6 screen streamed to, say) is its own folder, w x h itself, which the setup and the game's background
|
||||
// generator make as they make the listed ones. 0 for 16:9 and outside that range (portrait screens).
|
||||
int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]) {
|
||||
if (!w || !h) return 0;
|
||||
double r = (double)w / h, err = 0;
|
||||
@@ -425,8 +436,12 @@ int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]) {
|
||||
double e = fabs((double)SHAPED[i][0] / SHAPED[i][1] / r - 1);
|
||||
if (e <= 0.01 && (best < 0 || e < err)) best = i, err = e;
|
||||
}
|
||||
if (best < 0) return 0;
|
||||
out[0] = SHAPED[best][0], out[1] = SHAPED[best][1];
|
||||
if (best >= 0) {
|
||||
out[0] = SHAPED[best][0], out[1] = SHAPED[best][1];
|
||||
return 1;
|
||||
}
|
||||
if (r < SHAPE_MIN || r > SHAPE_MAX) return 0;
|
||||
out[0] = w, out[1] = h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -23,8 +23,9 @@ unsigned cfg_version(void);
|
||||
int cfg_from_env(const char *name);
|
||||
// 1 when the player set name (the environment or totk.ini), 0 when cfg_get gives a device profile's default or NULL.
|
||||
int cfg_is_set(const char *name);
|
||||
// The folder size of w x h's shape (cfg.c SHAPED: the closest aspect ratio within 1%, the first of equal ones), the
|
||||
// one romfs-patches-<w>x<h> the setup writes for it. 0 for 16:9 and for a shape without a UI layout.
|
||||
// The folder size of w x h's shape (cfg.c SHAPED: the closest aspect ratio within 1%, the first of equal ones; an
|
||||
// unlisted shape from 4:3 to 32:9 keeps w x h), the one romfs-patches-<w>x<h> the setup writes for it. 0 for 16:9 and
|
||||
// for a shape without a UI layout (portrait, narrower than 4:3, wider than 32:9).
|
||||
int cfg_shape_size(unsigned w, unsigned h, unsigned out[2]);
|
||||
// The size output_res defaults to on this display (its shape, cfg.c screen_default) while the player set no
|
||||
// output_res, also when the default stays 1920x1080 because that shape lacks the prompts' folder. The generator the game
|
||||
|
||||
+21
-4
@@ -146,6 +146,8 @@ int probe_cfg(void) {
|
||||
CHECK(m && EQ(m->def, "130") && EQ(m->values, "0..300"), "meta: rumble strength 130 in 0..300");
|
||||
m = cfg_meta("PERF_OVERLAY");
|
||||
CHECK(m && EQ(m->def, "off") && EQ(m->values, "off|fps|full") && m->live, "meta: perf_overlay is live, off by default");
|
||||
m = cfg_meta("VERT_PLUS");
|
||||
CHECK(m && EQ(m->def, "0") && m->live, "meta: vert_plus is live, off by default");
|
||||
CHECK(cfg_meta("BIND_A") == NULL && cfg_meta("FPS_COUNTER") == NULL && cfg_meta("NO_SUCH") == NULL,
|
||||
"meta: keys the menu does not show are NULL");
|
||||
|
||||
@@ -315,6 +317,12 @@ int probe_cfg(void) {
|
||||
CHECK(input_pad_layout_pick("xbox_prompts", 0) == PAD_LAYOUT_NINTENDO &&
|
||||
input_pad_layout_pick("Xbox_Prompts", 1) == PAD_LAYOUT_NINTENDO,
|
||||
"pad layout: 0.1.9's xbox_prompts keeps the Nintendo positions (only the prompts change, romfs.c overlay_init)");
|
||||
// Gamepad events behind other windows (input_map.c, input.c start)
|
||||
CHECK(input_pad_background_pick("auto", 0) && !input_pad_background_pick("auto", 1) &&
|
||||
input_pad_background_pick(NULL, 0) && !input_pad_background_pick(NULL, 1),
|
||||
"pad background: automatic is on, off when Steam started the game (its overlay takes the gamepad, #1462)");
|
||||
CHECK(input_pad_background_pick("1", 1) && !input_pad_background_pick("0", 0),
|
||||
"pad background: 1 and 0 win over the Steam check");
|
||||
// Button prompts (input_map.c)
|
||||
CHECK(input_prompts_pick(NULL, "auto") == PROMPTS_NINTENDO && input_prompts_pick("", "xbox") == PROMPTS_NINTENDO &&
|
||||
input_prompts_pick("Xbox", "nintendo") == PROMPTS_XBOX && input_prompts_pick("nintendo", "xbox") == PROMPTS_NINTENDO,
|
||||
@@ -357,16 +365,25 @@ int probe_cfg(void) {
|
||||
"prompts: the PlayStation folder puts A on the circle exactly when the layout puts A on the east button");
|
||||
}
|
||||
// One folder per screen shape (cfg.c cfg_shape_size, installer/screens.py shape_size): the closest aspect ratio of
|
||||
// SHAPED within 1%, the first of equal ones; 16:9 and unlisted shapes have none.
|
||||
// SHAPED within 1%, the first of equal ones; an unlisted shape from 4:3 to 32:9 its own size; 16:9, portrait and
|
||||
// shapes narrower than 4:3 none.
|
||||
unsigned sz[2] = {0, 0};
|
||||
CHECK(cfg_shape_size(5120, 2160, sz) && sz[0] == 2560 && sz[1] == 1080, "shape: 5120x2160 takes 2560x1080's folder");
|
||||
CHECK(cfg_shape_size(3440, 1440, sz) && sz[0] == 3440 && sz[1] == 1440, "shape: 3440x1440 keeps its own (0.8% off 2560x1080)");
|
||||
CHECK(cfg_shape_size(1920, 800, sz) && sz[0] == 3840 && sz[1] == 1600, "shape: 1920x800 takes 3840x1600's folder");
|
||||
CHECK(cfg_shape_size(2560, 1600, sz) && sz[0] == 1280 && sz[1] == 800 && cfg_shape_size(3000, 2000, sz) &&
|
||||
sz[0] == 1920 && sz[1] == 1280 && cfg_shape_size(5120, 1440, sz) && sz[0] == 3840 && sz[1] == 1080,
|
||||
sz[0] == 1920 && sz[1] == 1280 && cfg_shape_size(5120, 1440, sz) && sz[0] == 3840 && sz[1] == 1080 &&
|
||||
cfg_shape_size(7680, 2160, sz) && sz[0] == 3840 && sz[1] == 1080,
|
||||
"shape: 16:10, 3:2 and 32:9 take their first size");
|
||||
CHECK(!cfg_shape_size(1920, 1080, sz) && !cfg_shape_size(2560, 1440, sz) && !cfg_shape_size(1024, 768, sz),
|
||||
"shape: none for 16:9 and 4:3");
|
||||
CHECK(cfg_shape_size(1024, 768, sz) && sz[0] == 1440 && sz[1] == 1080 && cfg_shape_size(2048, 1536, sz) &&
|
||||
sz[0] == 1440 && sz[1] == 1080 && cfg_shape_size(3120, 1440, sz) && sz[0] == 2340 && sz[1] == 1080,
|
||||
"shape: 4:3 and 19.5:9 take their first size");
|
||||
CHECK(cfg_shape_size(2560, 1200, sz) && sz[0] == 2560 && sz[1] == 1200 && cfg_shape_size(2000, 1080, sz) &&
|
||||
sz[0] == 2000 && sz[1] == 1080,
|
||||
"shape: an unlisted shape between 4:3 and 32:9 keeps its own size");
|
||||
CHECK(!cfg_shape_size(1920, 1080, sz) && !cfg_shape_size(2560, 1440, sz) && !cfg_shape_size(1280, 1024, sz) &&
|
||||
!cfg_shape_size(1080, 1920, sz) && !cfg_shape_size(7680, 1440, sz),
|
||||
"shape: none for 16:9, narrower than 4:3, portrait and wider than 32:9");
|
||||
// romfs.c shaped_name: the exact size's folder (an older setup wrote every size) wins, else the shape's
|
||||
{
|
||||
char dir[1100], f[1200];
|
||||
|
||||
+17
-3
@@ -671,9 +671,23 @@ static void start(void) {
|
||||
// window lacks keyboard focus (SDL_PrivateJoystickShouldIgnoreEvent in SDL_joystick.c; centring and releases
|
||||
// pass). That applies where the window is SDL's (Linux); the Win32 window on Windows is not an SDL window. The
|
||||
// game keeps running out of focus by default (TOTK_ASSUME_FOCUS, ov_system.c oe_set_focus), so the gamepad has to
|
||||
// keep working there. With the setting off the game's main thread waits while unfocused and reads no input, so
|
||||
// the hint can stay on for the whole run.
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
// keep working there (#971). With the setting off the game's main thread waits while unfocused and reads no input,
|
||||
// so the hint can stay on for the whole run. A game Steam started is the exception (input_pad_background_pick):
|
||||
// Steam's overlay and menus take the focus while they are open, and the presses meant for them reached the game
|
||||
// too (#1462). Steam sets SteamGameId for its own games and for non-Steam shortcuts, SteamOverlayGameId with the
|
||||
// overlay. TOTK_PAD_BACKGROUND = 1 or 0 decides it either way. On Windows the game window is not SDL's, so SDL never
|
||||
// drops events for focus there and the Steam check is left out: the hint stays as it was.
|
||||
#ifdef _WIN32
|
||||
int under_steam = 0;
|
||||
#else
|
||||
const char *gid = getenv("SteamGameId"), *ogid = getenv("SteamOverlayGameId");
|
||||
int under_steam = (gid && *gid) || (ogid && *ogid);
|
||||
#endif
|
||||
const char *bg = cfg_value("TOTK_PAD_BACKGROUND");
|
||||
if (input_pad_background_pick(bg, under_steam)) SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
else
|
||||
rt_log("input: the gamepad pauses while the window has no focus (%s)",
|
||||
strcmp(bg, "0") ? "Steam started the game; pad_background = 1 keeps it" : "pad_background = 0");
|
||||
if (!SDL_Init(SDL_INIT_GAMEPAD)) { state = -1; rt_log("input: SDL gamepad init failed (%s), keyboard only", SDL_GetError()); }
|
||||
else state = 1;
|
||||
if (state == 1) test_pad_attach();
|
||||
|
||||
@@ -305,6 +305,12 @@ int input_pad_layout_pick(const char *setting, int east_labelled_a) {
|
||||
return east_labelled_a ? PAD_LAYOUT_NINTENDO : PAD_LAYOUT_XBOX;
|
||||
}
|
||||
|
||||
int input_pad_background_pick(const char *setting, int under_steam) {
|
||||
if (setting && !strcmp(setting, "1")) return 1;
|
||||
if (setting && !strcmp(setting, "0")) return 0;
|
||||
return !under_steam;
|
||||
}
|
||||
|
||||
int input_prompts_pick(const char *prompts, const char *pad_layout) {
|
||||
if (prompts && *prompts)
|
||||
return !strcasecmp(prompts, "xbox") ? PROMPTS_XBOX
|
||||
|
||||
@@ -91,6 +91,12 @@ void input_map_configure(void);
|
||||
// pad's east button is labelled A (a Switch Pro Controller, a GuliKit) and Xbox otherwise.
|
||||
int input_pad_layout_pick(const char *setting, int east_labelled_a);
|
||||
|
||||
// Whether SDL passes gamepad presses and stick movements to the game while its window has no focus (TOTK_PAD_BACKGROUND,
|
||||
// input.c start): "1" on, "0" off. Anything else ("auto", NULL) is on unless Steam started the game: then the focus
|
||||
// goes to Steam's overlay and menus (the Quick Access menu in SteamOS's Game Mode), whose gamepad it is while they are
|
||||
// open (#1462); elsewhere the gamepad keeps playing while another window has the focus (#971).
|
||||
int input_pad_background_pick(const char *setting, int under_steam);
|
||||
|
||||
// Button prompts (TOTK_PROMPTS): the controller whose buttons the game's prompts show. Nintendo: the game's own. Xbox:
|
||||
// LB RB LT RT, Menu, View and a d-pad cross for the other buttons, and the face buttons named by the label of the
|
||||
// button the pad layout presses (runtime/romfs.c overlay_init, tools/make_romfs_patches.py --prompts). PlayStation: the
|
||||
|
||||
+14
-4
@@ -22,7 +22,8 @@
|
||||
// TOTK_MENU_CURSOR (live, default 1): 0 leaves the menus to the keys and the pad.
|
||||
//
|
||||
// With TOTK_MAP_CLICK=1 (live, default 0: one key per controller button) input.c makes the left mouse button A on the
|
||||
// map (menu_cursor_map), so a click acts at the map's cursor. The map is found only while TOTK_MENU_CURSOR is on.
|
||||
// map (menu_cursor_map), so a click acts at the map's cursor. The map is found while TOTK_MENU_CURSOR is on, and with
|
||||
// it off while the gameplay tweaks' map zoom is on (TOTK_GAMEPLAY_MAP_ZOOM), which acts only on the map found here.
|
||||
//
|
||||
// The same read of the open screens tells input.c when a dialogue box is on screen (menu_cursor_dialogue), where the
|
||||
// left mouse button presses B (it advances the text and skips its scroll) and the right one A, instead of their
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "cfg.h"
|
||||
#include "gameplay_tweaks.h"
|
||||
#include "gfx.h"
|
||||
#include "host.h"
|
||||
#include "input.h"
|
||||
@@ -377,8 +379,11 @@ void menu_cursor_poll(uint64_t *buttons) {
|
||||
main_lo = MOD_MAIN_BASE, main_hi = MOD_MAIN_BASE + MAIN_SIZE;
|
||||
if (RT_V143) rt_log("menu_cursor: on for 1.4.3 (TOTK_MENU_CURSOR=0 turns it off)");
|
||||
}
|
||||
int cursor = enabled(), talk = dialogue_enabled();
|
||||
if (!cursor && !talk) {
|
||||
// The map zoom of the gameplay tweaks (gameplay_tweaks.c map_zoom_allowed) acts only on the map found here, so with
|
||||
// the menu cursor off and that zoom on, the map is still looked for, as the dialogue is for dialogue_click; the
|
||||
// pointer and the menus stay off (#1376).
|
||||
int cursor = enabled(), talk = dialogue_enabled(), zoom = !cursor && RT_V143 && gameplay_tweaks_map_zoom();
|
||||
if (!cursor && !talk && !zoom) {
|
||||
set_pointer(0);
|
||||
__atomic_store_n(&g_map, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_dialogue, 0, __ATOMIC_RELAXED);
|
||||
@@ -414,7 +419,12 @@ void menu_cursor_poll(uint64_t *buttons) {
|
||||
__atomic_store_n(&g_dialogue, dialogue, __ATOMIC_RELAXED);
|
||||
if (!cursor) {
|
||||
set_pointer(0);
|
||||
__atomic_store_n(&g_map, 0, __ATOMIC_RELAXED);
|
||||
if (zoom && map && !map_logged) {
|
||||
map_logged = 1;
|
||||
rt_log("menu_cursor: the map is open: the mouse moves its cursor and the scroll wheel zooms "
|
||||
"(gameplay_map_zoom; menu_cursor = 0 leaves the menus alone)");
|
||||
}
|
||||
__atomic_store_n(&g_map, zoom ? map : 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_menu, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_strip, 0, __ATOMIC_RELAXED);
|
||||
__atomic_store_n(&g_camera, 0, __ATOMIC_RELAXED);
|
||||
|
||||
@@ -50,6 +50,11 @@ uint64_t nvn_new_serial(void); // next tex_t / prog_
|
||||
void nvn_sync_ahead_present(void);
|
||||
uint64_t nvn_sync_ahead_guard(void);
|
||||
int nvn_sync_ahead_on(void); // 1 when the frame-ahead wait is in effect: TOTK_SYNC_AHEAD=1 and a wait site known for this version
|
||||
// vk_exec_xfer.c, TOTK_SYNC_AHEAD: at the game's frame wait the newest timestamp written becomes the bound; the value
|
||||
// the game reads for the timestamp t of the report at addr (t, or the bound for a report its frame wait did not cover)
|
||||
void vk_counter_frame(void);
|
||||
uint64_t vk_counter_timestamp(uint64_t addr, uint64_t t);
|
||||
void vk_counter_log(void); // the run total, once (gfx_exit_log)
|
||||
int vk_mem_shadow_on(void); // vk_memory.c: 1 with shadow storage on (valid once the Vulkan back end is up)
|
||||
int vk_mem_mirror_on(void); // vk_memory.c: 1 when pools used as buffers get VRAM mirrors (memory = mirror or auto on a discrete GPU)
|
||||
void vk_mem_shadow_fence(void); // vk_memory.c: returns once every shadow sync that read the old guard is done
|
||||
|
||||
@@ -581,6 +581,7 @@ NVN_API(nvnSyncWait) {
|
||||
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
|
||||
b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
|
||||
if (det) vk_ahead_frame_done(1);
|
||||
if (mode == 1) vk_counter_frame();
|
||||
ret_x(c, NVN_SYNC_WAIT_RESULT_ALREADY_SIGNALED);
|
||||
return;
|
||||
}
|
||||
@@ -592,6 +593,7 @@ NVN_API(nvnSyncWait) {
|
||||
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
|
||||
if (ok) b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
|
||||
if (det) vk_ahead_frame_done(ok);
|
||||
if (mode == 1) vk_counter_frame();
|
||||
ret_x(c, ok ? NVN_SYNC_WAIT_RESULT_CONDITION_SATISFIED : NVN_SYNC_WAIT_RESULT_TIMEOUT_EXPIRED);
|
||||
}
|
||||
// void nvnEventBuilderSetDefaults(NVNeventBuilder *b)
|
||||
|
||||
+6
-2
@@ -60,8 +60,12 @@ NVN_API(nvnDeviceSetAutomaticCheckpointsMask) { (void)c; }
|
||||
static uint64_t ticks_to_ns(uint64_t t) { return t / 12 * 625 + t % 12 * 625 / 12; }
|
||||
// uint64_t nvnDeviceGetCurrentTimestampInNanoseconds(const NVNdevice *d)
|
||||
NVN_API(nvnDeviceGetCurrentTimestampInNanoseconds) { ret_x(c, ticks_to_ns(rt_ticks())); }
|
||||
// uint64_t nvnDeviceGetTimestampInNanoseconds(const NVNdevice *d, const NVNcounterData *counter)
|
||||
NVN_API(nvnDeviceGetTimestampInNanoseconds) { ret_x(c, ticks_to_ns(((const NVNcounterData *)arg_p(c, 1))->timestamp)); }
|
||||
// uint64_t nvnDeviceGetTimestampInNanoseconds(const NVNdevice *d, const NVNcounterData *counter): with the frame wait
|
||||
// one frame late, a report that wait did not cover reads as the newest one written by then (vk_exec_xfer.c)
|
||||
NVN_API(nvnDeviceGetTimestampInNanoseconds) {
|
||||
const NVNcounterData *d = arg_p(c, 1);
|
||||
ret_x(c, ticks_to_ns(vk_counter_timestamp((uintptr_t)d, d->timestamp)));
|
||||
}
|
||||
|
||||
// ---------- memory pools and buffers
|
||||
// size_t nvnMemoryPoolGetSize(const NVNmemoryPool *p)
|
||||
|
||||
+34
-9
@@ -44,6 +44,8 @@
|
||||
#include "ov.h"
|
||||
#include "platform/platform.h"
|
||||
|
||||
static void vert_plus_init(double ratio_over_16x9);
|
||||
|
||||
#define BASE_W 1920
|
||||
#define BASE_H 1080
|
||||
#define SCENE_W 1600
|
||||
@@ -643,6 +645,7 @@ void res_init(void) {
|
||||
memcpy(page + 56, &r, sizeof r);
|
||||
rt_patch_switch(aspect, 1);
|
||||
rt_log("resolution: camera aspect ratio %.4f (16:9 is %.4f)", ratio, game);
|
||||
if (ratio < game) vert_plus_init(ratio / game);
|
||||
}
|
||||
} else {
|
||||
rt_patch_switch(aspect, 0); // the page holds no ratio
|
||||
@@ -673,25 +676,47 @@ int res_wants_wide_overlay(const unsigned out[2]) {
|
||||
|
||||
// Field of view (TOTK_FOV, percent of the game's own, 70..140, live): the camera's vertical view angle times the factor
|
||||
// on page +60 (recomp/patches-v110.txt, patches-v121.txt and patches-v143.txt, set fov). The horizontal angle follows
|
||||
// through the aspect ratio. 100 switches the set off, so the camera code is the game's own. Runs on a settings change
|
||||
// (gfx_present.c window_settings_live), the first time at the first present.
|
||||
// through the aspect ratio. A factor of 1 switches the set off, so the camera code is the game's own. Runs on a settings
|
||||
// change (gfx_present.c window_settings_live), the first time at the first present.
|
||||
//
|
||||
// Vert+ (TOTK_VERT_PLUS, off by default; the Display tab's row under the field of view): the camera keeps the game's vertical view angle at every shape, so a shape
|
||||
// narrower than 16:9 (16:10, 3:2, 4:3) showed less of the world at the sides than 16:9 does. The factor is then also
|
||||
// multiplied by the one that gives the game's default view the horizontal angle it has at 16:9: tan(v'/2) = tan(v/2)
|
||||
// * (16/9) / aspect, so v' / v = 2 atan(tan(v/2) k) / v with k = 16:9 over the aspect. v is the game's default
|
||||
// vertical angle, 51.2 degrees, measured on 1.4.3 at Lookout Landing: a 4:3 frame at TOTK_FOV=130 is a 16:9 frame of
|
||||
// the same moment scaled by 0.730 about its middle (tan(v/2) / tan(1.3 v/2) = 0.730 gives v = 51.2). The patch scales
|
||||
// the angle linearly, so a zoomed view (the bow, the scope) gets the same factor, a few percent short of the exact one.
|
||||
#define FOV_MIN 70
|
||||
#define FOV_MAX 140
|
||||
#define VERT_PLUS_V (51.2 * 3.14159265358979 / 180)
|
||||
static float vert_plus_k = 1; // set by res_init (vert_plus_init) for a camera narrower than 16:9
|
||||
|
||||
static void vert_plus_init(double ratio_over_16x9) {
|
||||
double k = 1 / ratio_over_16x9, v = VERT_PLUS_V;
|
||||
vert_plus_k = (float)(2 * atan(tan(v / 2) * k) / v);
|
||||
}
|
||||
|
||||
void res_fov_live(void) {
|
||||
static int set = -2, shown = 100;
|
||||
static int set = -2, shown = 100, shown_vp = 0; // the game's own view: nothing to write until one changes
|
||||
if (set == -2) set = rt_patch_set("fov");
|
||||
int pct = cfg_int("TOTK_FOV");
|
||||
pct = pct < FOV_MIN ? FOV_MIN : pct > FOV_MAX ? FOV_MAX : pct;
|
||||
if (pct == shown) return;
|
||||
shown = pct;
|
||||
int vp = vert_plus_k != 1 && cfg_bool("TOTK_VERT_PLUS");
|
||||
if (pct == shown && vp == shown_vp) return;
|
||||
shown = pct, shown_vp = vp;
|
||||
if (set < 0) {
|
||||
rt_log("resolution: this game version has no field-of-view patch; TOTK_FOV=%d does nothing", pct);
|
||||
if (pct != 100 || vp)
|
||||
rt_log("resolution: this game version has no field-of-view patch; TOTK_FOV=%d and Vert+ do nothing", pct);
|
||||
return;
|
||||
}
|
||||
float k = pct / 100.0f;
|
||||
float k = pct / 100.0f * (vp ? vert_plus_k : 1);
|
||||
memcpy((uint8_t *)rt_patch_page() + 60, &k, sizeof k); // before the switch: a site that sees it on reads k
|
||||
rt_patch_switch(set, pct != 100);
|
||||
rt_log("resolution: field of view %d%% of the game's", pct);
|
||||
rt_patch_switch(set, k != 1);
|
||||
if (vp)
|
||||
rt_log("resolution: field of view %d%% of the game's, times %.4f for Vert+ (the 16:9 width at this narrower "
|
||||
"shape)", pct, vert_plus_k);
|
||||
else
|
||||
rt_log("resolution: field of view %d%% of the game's", pct);
|
||||
}
|
||||
|
||||
// TOTK_DYNAMIC_RES = 0 holds the game's dynamic resolution at 100 % (patches-v110.txt, patches-v121.txt and patches-v143.txt,
|
||||
|
||||
+10
-6
@@ -571,15 +571,18 @@ static void folders_retry(const char *id, int need) {
|
||||
}
|
||||
|
||||
// The game resolution (resolution.c): 16:9 sizes from its smallest, 1280x720 (for weak GPUs), up, the common 21:9 and
|
||||
// 32:9 monitor sizes, the 16:10 screens of the Steam Deck, handhelds and laptops and the 3:2 screens of laptops and
|
||||
// tablets (Surface, Framework; the camera and the HUD follow
|
||||
// another shape, resolution.c res_init; the installer lays the HUD out for each, installer/steps.py ASPECT_SIZES), and
|
||||
// the current value when it is another size.
|
||||
// 32:9 monitor sizes (7680x2160: the 57-inch dual-4K ones), the 16:10 screens of the Steam Deck, handhelds and laptops, the 3:2 screens of laptops and
|
||||
// tablets (Surface, Framework), the 4:3 screens of CRT monitors and iPads and the 19.5:9 and 20:9 screens of phones a
|
||||
// game is streamed to (the camera and the HUD follow another shape, resolution.c res_init; the installer lays the HUD
|
||||
// out for each, installer/screens.py ASPECT_SIZES), and the current value when it is another size: any shape from 4:3
|
||||
// to 32:9 gets a layout of its own (cfg.c cfg_shape_size).
|
||||
static void row_output_res(void) {
|
||||
static const char *const vals[] = {"1280x720", "1600x900", "1920x1080", "2560x1440", "3200x1800", "3840x2160",
|
||||
"2560x1080", "3440x1440", "3840x1600", "5120x2160", "3840x1080", "5120x1440",
|
||||
"2560x1080", "3440x1440", "3840x1600", "5120x2160", "3840x1080", "5120x1440", "7680x2160",
|
||||
"1280x800", "1680x1050", "1920x1200", "2560x1600",
|
||||
"1920x1280", "2160x1440", "2256x1504", "2880x1920", "3000x2000"};
|
||||
"1920x1280", "2160x1440", "2256x1504", "2880x1920", "3000x2000",
|
||||
"1440x1080", "1600x1200", "2048x1536", "2732x2048",
|
||||
"2340x1080", "3120x1440", "2400x1080", "3200x1440"};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
char shown[N][32];
|
||||
const char *names[N];
|
||||
@@ -822,6 +825,7 @@ static void tab_screen(float scale) {
|
||||
static const UiTextId movie_aspect[] = {UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH};
|
||||
opt_choice("TOTK_MOVIE_ASPECT", UI_MENU_MOVIE_ASPECT, movie_aspect, 2, UI_MENU_MOVIE_ASPECT_DESC);
|
||||
opt_slider("TOTK_FOV", UI_MENU_FOV, 70, 140, UI_MENU_FOV_DESC, 5, "%.0f %%");
|
||||
opt_toggle("TOTK_VERT_PLUS", UI_MENU_VERT_PLUS, UI_MENU_VERT_PLUS_DESC);
|
||||
static const char *const aniso[] = {"game", "2", "4", "8", "16"};
|
||||
const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"};
|
||||
opt_choice_list("TOTK_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC);
|
||||
|
||||
+103
-64
@@ -101,6 +101,8 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_KEEP] = "Black bars", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Stretch",
|
||||
[UI_MENU_FOV] = "Field of view",
|
||||
[UI_MENU_FOV_DESC] = "How much of the world the camera shows, in percent of the game's own. Game versions 1.1.0, 1.2.1 and 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "Keep the 16:9 width",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "On screens narrower than 16:9 (Steam Deck, 16:10, 4:3) the camera shows the same width of the world as at 16:9, and more above and below. No effect at 16:9 or wider.",
|
||||
[UI_MENU_SHADOW_RES] = "Shadow map size",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Size of the sun's shadow map. The game's own size changes with the view, down to about 400 "
|
||||
"near the ground, so leaf shadows look blocky and jump; a fixed size keeps them still and "
|
||||
@@ -563,12 +565,13 @@ 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] = "Particles after DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "With DLAA, 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. The fog and the clouds still "
|
||||
"go through DLSS, so distant edges against the sky stay clean. Off: DLSS also "
|
||||
"processes the particles, as before. DLAA mode only; the upscaling DLSS 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 "
|
||||
@@ -749,6 +752,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_KEEP] = "Чёрные полосы", [UI_MENU_MOVIE_ASPECT_STRETCH] = "Растянуть",
|
||||
[UI_MENU_FOV] = "Поле зрения",
|
||||
[UI_MENU_FOV_DESC] = "Сколько мира показывает камера, в процентах от игрового. Для версий игры 1.1.0, 1.2.1 и 1.4.3.",
|
||||
[UI_MENU_VERT_PLUS] = "Ширина обзора как в 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "На экранах уже 16:9 (Steam Deck, 16:10, 4:3) камера показывает мир той же ширины, что и в 16:9, и больше сверху и снизу. На 16:9 и шире ничего не меняет.",
|
||||
[UI_MENU_SHADOW_RES] = "Размер карты теней",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Размер карты теней от солнца. Собственный размер игры меняется вместе с видом, у земли до "
|
||||
"примерно 400, поэтому тени листвы выглядят квадратными и дёргаются; постоянный размер делает "
|
||||
@@ -1216,12 +1221,13 @@ 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] = "Частицы после DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "С DLAA пыль и другие частицы рисуются поверх картинки, уже сглаженной DLSS, "
|
||||
"как игра рисует их без DLSS: мелкие частицы в тумане (святилища) больше не "
|
||||
"пропадают и не оставляют шлейфов. Туман и облака по-прежнему проходят через "
|
||||
"DLSS, поэтому далёкие края на фоне неба остаются чистыми. Выкл.: DLSS "
|
||||
"обрабатывает и частицы, как раньше. Только в режиме DLAA; режимы DLSS с "
|
||||
"повышением разрешения обрабатывают их всегда. Применяется сразу.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "Фиксированная экспозиция DLSS",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS берёт яркость картинки игры как есть, а не оценивает экспозицию по "
|
||||
"каждому кадру: в тёмных сценах (Глубины) большие участки в тумане больше не "
|
||||
@@ -1671,12 +1677,14 @@ 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] = "Partículas após o DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Com DLAA, 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. A névoa e as nuvens "
|
||||
"continuam passando pelo DLSS, então as bordas distantes contra o céu ficam "
|
||||
"limpas. Desligado: o DLSS também processa as partículas, como antes. Só no "
|
||||
"modo DLAA; os modos de DLSS que aumentam a resolução sempre as 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 "
|
||||
@@ -1745,6 +1753,8 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FOV] = "Campo de visão",
|
||||
[UI_MENU_FOV_DESC] = "Quanto do mundo a câmera mostra, em porcentagem do original do jogo. Nas versões 1.1.0, 1.2.1 e 1.4.3 "
|
||||
"do jogo.",
|
||||
[UI_MENU_VERT_PLUS] = "Manter a largura de 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Em telas mais estreitas que 16:9 (Steam Deck, 16:10, 4:3), a câmera mostra a mesma largura do mundo que em 16:9, e mais acima e abaixo. Sem efeito em 16:9 ou mais largo.",
|
||||
[UI_MENU_SHADOW_RES] = "Tamanho do mapa de sombras",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "Tamanho do mapa de sombras do sol. O tamanho do jogo muda com a vista, até cerca de "
|
||||
"400 perto do chão, então as sombras das folhas ficam quadriculadas e pulam; um "
|
||||
@@ -2145,6 +2155,8 @@ 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_VERT_PLUS] = "保持 16:9 宽度",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "在比 16:9 更窄的屏幕上(Steam Deck、16:10、4:3),镜头显示与 16:9 相同宽度的世界,上下显示更多。16:9 或更宽的屏幕没有变化。",
|
||||
[UI_MENU_SHARPNESS] = "FSR 锐度",
|
||||
[UI_MENU_SHARPNESS_DESC] = "FSR 缩放后的锐化强度;0 为关闭。",
|
||||
[UI_MENU_COLOR] = "色彩",
|
||||
@@ -2472,10 +2484,10 @@ 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] = "DLAA 之后绘制粒子",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "开启 DLAA 时,灰尘和其他粒子绘制在 DLSS 已平滑的画面之上,与游戏不用 DLSS "
|
||||
"时的绘制方式相同:雾中的细小粒子(神庙中)不再消失,也不再留下拖影。雾和云仍由 DLSS 处理,因此远处与天空相接的边缘保持干净。关闭:DLSS "
|
||||
"也处理这些粒子,与以前相同。仅用于 DLAA 模式;提升分辨率的 DLSS 模式始终处理它们。立即生效。",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "固定 DLSS 曝光",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS 直接使用游戏画面的亮度,而不是逐帧自行估算曝光:在暗场景(地底)中,"
|
||||
"镜头移动时大片雾中区域不再忽暗忽亮一帧。关闭:DLSS 自行估算曝光,与以前相同。立即生效。",
|
||||
@@ -2857,6 +2869,8 @@ static const char *const text_de[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "16:9-Breite behalten",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Auf Bildschirmen, die schmaler als 16:9 sind (Steam Deck, 16:10, 4:3), zeigt die Kamera dieselbe Breite der Welt wie bei 16:9 und mehr darüber und darunter. Bei 16:9 oder breiter ohne Wirkung.",
|
||||
[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 "
|
||||
@@ -3508,13 +3522,14 @@ static const char *const text_de[UI_TEXT_COUNT] = {
|
||||
"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 "
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "Partikel nach DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Mit DLAA werden 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.",
|
||||
"mehr. Nebel und Wolken gehen weiterhin durch DLSS, sodass ferne Kanten vor "
|
||||
"dem Himmel sauber bleiben. Aus: DLSS verarbeitet auch die Partikel, 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 "
|
||||
@@ -3761,6 +3776,8 @@ static const char *const text_fr[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "Garder la largeur 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Sur les écrans plus étroits que 16:9 (Steam Deck, 16:10, 4:3), la caméra montre la même largeur du monde qu'en 16:9, et davantage au-dessus et en dessous. Sans effet en 16:9 ou plus large.",
|
||||
[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 "
|
||||
@@ -4430,13 +4447,15 @@ static const char *const text_fr[UI_TEXT_COUNT] = {
|
||||
[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_DLAA_EFFECTS_AFTER] = "Particules après DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Avec DLAA, la poussière et les autres particules sont dessinées 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. Le brouillard et les nuages passent toujours "
|
||||
"par DLSS, donc les bords lointains sur le ciel restent nets. Désactivé : "
|
||||
"DLSS traite aussi les particules, 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), "
|
||||
@@ -4685,6 +4704,8 @@ static const char *const text_es[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "Mantener el ancho de 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "En pantallas más estrechas que 16:9 (Steam Deck, 16:10, 4:3), la cámara muestra el mismo ancho del mundo que en 16:9, y más por arriba y por abajo. Sin efecto en 16:9 o más ancho.",
|
||||
[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 "
|
||||
@@ -5341,12 +5362,14 @@ static const char *const text_es[UI_TEXT_COUNT] = {
|
||||
"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_DLAA_EFFECTS_AFTER] = "Partículas tras DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, 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. La niebla y las "
|
||||
"nubes siguen pasando por DLSS, así que los bordes lejanos contra el cielo "
|
||||
"quedan limpios. No: DLSS también procesa las partículas, 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 "
|
||||
@@ -5594,6 +5617,8 @@ static const char *const text_it[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "Mantieni la larghezza 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Sugli schermi più stretti di 16:9 (Steam Deck, 16:10, 4:3) la telecamera mostra la stessa larghezza del mondo che in 16:9, e di più sopra e sotto. Nessun effetto a 16:9 o più largo.",
|
||||
[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 "
|
||||
@@ -6253,12 +6278,13 @@ static const char *const text_it[UI_TEXT_COUNT] = {
|
||||
"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_DLAA_EFFECTS_AFTER] = "Particelle dopo DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Con DLAA, 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. Nebbia e nuvole "
|
||||
"passano ancora per DLSS, così i bordi lontani contro il cielo restano "
|
||||
"puliti. No: DLSS elabora anche le particelle, come prima. Solo in modalità "
|
||||
"DLAA; le modalità DLSS con upscaling le 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) "
|
||||
@@ -6505,6 +6531,8 @@ static const char *const text_nl[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "16:9-breedte behouden",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Op schermen die smaller zijn dan 16:9 (Steam Deck, 16:10, 4:3) toont de camera dezelfde breedte van de wereld als bij 16:9, en meer erboven en eronder. Geen effect bij 16:9 of breder.",
|
||||
[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 "
|
||||
@@ -7145,12 +7173,14 @@ static const char *const text_nl[UI_TEXT_COUNT] = {
|
||||
"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_DLAA_EFFECTS_AFTER] = "Deeltjes na DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Met DLAA worden 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. Mist en wolken gaan nog steeds door DLSS, zodat verre randen tegen "
|
||||
"de lucht schoon blijven. Uit: DLSS verwerkt ook de deeltjes, 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 "
|
||||
@@ -7385,6 +7415,8 @@ static const char *const text_ja[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_STRETCH] = "引き伸ばし",
|
||||
[UI_MENU_FOV] = "視野角",
|
||||
[UI_MENU_FOV_DESC] = "カメラが映す範囲を、ゲーム本来の視野に対するパーセントで指定します。ゲームのバージョン 1.4.3 のみ。",
|
||||
[UI_MENU_VERT_PLUS] = "16:9 の横幅を保つ",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "16:9 より横幅の狭い画面(Steam Deck、16:10、4:3)で、カメラが 16:9 と同じ横幅の世界を映し、上下はより広く映します。16:9 以上の横長の画面では変わりません。",
|
||||
[UI_MENU_SHADOW_RES] = "シャドウマップのサイズ",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "太陽のシャドウマップの大きさです。ゲーム本来のサイズは視点によって変わり、地面近くでは約 400 まで下がるため、葉の影がブロック状になって跳ねます。固定サイ"
|
||||
"ズにすると影が安定し、くっきりします。1024 を超えると GPU 時間とビデオメモリが増えます。",
|
||||
@@ -7920,9 +7952,10 @@ static const char *const text_ja[UI_TEXT_COUNT] = {
|
||||
[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 "
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER] = "DLAA の後にパーティクル",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 使用時、ちりやその他のパーティクルを、DLSS が滑らかにした後の映像の上に描きます。DLSS なしでゲームが描くのと同じです: "
|
||||
"霧の中の小さなパーティクル (祠) が消えたり残像を残したりしなくなります。霧と雲は引き続き DLSS "
|
||||
"を通るため、空を背にした遠くの輪郭はきれいなままです。オフ: これまでどおり DLSS がパーティクルも処理します。DLAA "
|
||||
"モードのみ。アップスケーリングする DLSS モードでは常に処理されます。すぐに反映されます。",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS の露出を固定",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS が各フレームから露出を推定せず、ゲームの映像の明るさをそのまま使います: 暗い場面 (地底) "
|
||||
@@ -8134,6 +8167,8 @@ static const char *const text_ko[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_MOVIE_ASPECT_STRETCH] = "늘리기",
|
||||
[UI_MENU_FOV] = "시야각",
|
||||
[UI_MENU_FOV_DESC] = "카메라가 보여 주는 범위를 게임 원래 시야에 대한 퍼센트로 지정합니다. 게임 버전 1.4.3 전용입니다.",
|
||||
[UI_MENU_VERT_PLUS] = "16:9 너비 유지",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "16:9보다 좁은 화면(Steam Deck, 16:10, 4:3)에서 카메라가 16:9와 같은 너비의 세계를 보여 주고 위아래는 더 많이 보여 줍니다. 16:9 이상 넓은 화면에서는 효과가 없습니다.",
|
||||
[UI_MENU_SHADOW_RES] = "그림자 맵 크기",
|
||||
[UI_MENU_SHADOW_RES_DESC] = "태양 그림자 맵의 크기입니다. 게임 원래 크기는 시점에 따라 바뀌며 지면 가까이에서는 약 400까지 내려가서 나뭇잎 그림자가 각지고 튀게 됩니다. 고정 "
|
||||
"크기로 하면 그림자가 안정되고 선명해집니다. 1024를 넘으면 GPU 시간과 비디오 메모리가 늘어납니다.",
|
||||
@@ -8671,10 +8706,11 @@ static const char *const text_ko[UI_TEXT_COUNT] = {
|
||||
[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_DLAA_EFFECTS_AFTER] = "DLAA 후 파티클",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "DLAA 사용 시 먼지 등 파티클을 DLSS가 이미 부드럽게 한 영상 위에 그립니다. DLSS 없이 게임이 그리는 방식과 같습니다. 안개 "
|
||||
"속의 작은 파티클(사당)이 더 이상 사라지거나 잔상을 남기지 않습니다. 안개와 구름은 계속 DLSS를 거치므로 하늘을 배경으로 한 먼 "
|
||||
"윤곽이 깨끗하게 유지됩니다. 끄기: 예전처럼 DLSS가 파티클도 처리합니다. DLAA 모드 전용이며, 업스케일링 DLSS 모드는 항상 이 "
|
||||
"효과를 처리합니다. 즉시 적용됩니다.",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE] = "DLSS 노출 고정",
|
||||
[UI_MENU_DLSS_FIXED_EXPOSURE_DESC] = "DLSS가 프레임마다 노출을 추정하지 않고 게임 영상의 밝기를 그대로 사용합니다. 어두운 장면(지저)에서 안개 낀 넓은 영역이 카메라가 "
|
||||
"움직일 때 한 프레임 동안 어두워지거나 밝아지지 않습니다. 끄기: 예전처럼 DLSS가 노출을 직접 추정합니다. 즉시 적용됩니다.",
|
||||
@@ -8869,6 +8905,8 @@ static const char *const text_vi[UI_TEXT_COUNT] = {
|
||||
[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_VERT_PLUS] = "Giữ bề ngang 16:9",
|
||||
[UI_MENU_VERT_PLUS_DESC] = "Trên màn hình hẹp hơn 16:9 (Steam Deck, 16:10, 4:3), camera cho thấy thế giới rộng ngang như ở 16:9, và nhiều hơn ở phía trên và dưới. Không có tác dụng ở 16:9 hoặc rộng hơn.",
|
||||
[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 "
|
||||
@@ -9319,11 +9357,12 @@ static const char *const text_vi[UI_TEXT_COUNT] = {
|
||||
[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_DLAA_EFFECTS_AFTER] = "Hạt sau DLAA",
|
||||
[UI_MENU_DLAA_EFFECTS_AFTER_DESC] = "Với DLAA, 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. Sương mù và mây vẫn đi qua DLSS, nên các cạnh ở xa "
|
||||
"trên nền trời vẫn sạch. Tắt: DLSS cũng xử lý các hạt 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 "
|
||||
|
||||
@@ -45,6 +45,7 @@ typedef enum {
|
||||
UI_MENU_ASPECT, UI_MENU_ASPECT_DESC, UI_MENU_ASPECT_FIT, UI_MENU_ASPECT_STRETCH,
|
||||
UI_MENU_MOVIE_ASPECT, UI_MENU_MOVIE_ASPECT_DESC, UI_MENU_MOVIE_ASPECT_KEEP, UI_MENU_MOVIE_ASPECT_STRETCH,
|
||||
UI_MENU_FOV, UI_MENU_FOV_DESC,
|
||||
UI_MENU_VERT_PLUS, UI_MENU_VERT_PLUS_DESC,
|
||||
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,
|
||||
|
||||
@@ -480,6 +480,7 @@ void gfx_exit_log(void) {
|
||||
vk_mem_shadow_read_log();
|
||||
vk_ahead_log_final();
|
||||
vk_ahead_log_guards();
|
||||
vk_counter_log();
|
||||
if (gfx_replay_async() && r_started && !plat_xchg32(&done, 1)) replay_log(game_frames, 1);
|
||||
}
|
||||
|
||||
|
||||
+18
-2
@@ -327,6 +327,7 @@ static struct {
|
||||
VkImage light_z; // this frame: the D16 depth the lighting draws into the light target with
|
||||
int fx_on; // dlaa_effects_after, read at each present while DLSS runs
|
||||
int fx_seen, fx_open, fx_bad; // this frame: the point found / the scene not ended since / drawn on after it
|
||||
int fx_comp; // this frame: a full-size pass into the light target without depth after the lighting
|
||||
uint32_t fx_steady; // DLSS frames in a row with the point found and nothing of the scene after it
|
||||
// jitter (vk_dlaa_viewport)
|
||||
VkImage jdepth; // the scene depth of the last frame DLAA ran on: passes drawing with it are jittered
|
||||
@@ -1617,6 +1618,19 @@ static void gbuf_light(const VkExec *ex) {
|
||||
// breaks it puts DLSS back at the bloom until it holds again, so a frame the rule does not fit changes the picture at
|
||||
// most once a second instead of from frame to frame.
|
||||
// dlaa_effects_after = 0 (the Screen tab, read each frame): DLSS at the bloom, effects included.
|
||||
// The point waits for the first full-size pass into the light target without depth after the lighting (the composite
|
||||
// of the half-size clouds outdoors, of the volumetric fog in shrines, of the field's effects in the yard) and runs DLSS
|
||||
// before the next pass with a depth, the particles or the dust. Run at the first pass after the lighting, it left the
|
||||
// fog layer and those composites over its picture: they decide per pixel from the scene depth whether a pixel is sky
|
||||
// or a surface, and that depth is still this frame's jittered one while DLSS's picture is not, so on a silhouette
|
||||
// against clouds or fog a pixel the picture shows as sky took the surface's side of the test in some frames. No clouds
|
||||
// or fog there that frame: a brighter dot along distant ridges at night and at dawn, flickering with the jitter's
|
||||
// phase and never resolved, since it came after DLSS. Measured at 2560x1440 with FSR 4 (frame dumps, a ridge against
|
||||
// the night sky): a ridge pixel brighter than the sky and the mountain beside it in 34 % of the columns with the point
|
||||
// before the fog layer, 15 % with it after the composite (6 % with the upscaler off). These layers are smooth and
|
||||
// follow the scene, so DLSS takes them with the scene's motion; the particles and the dust still go over its picture.
|
||||
// A frame without such a composite before the bloom runs DLSS at the bloom, and the FX_STEADY count holds the point
|
||||
// back as for any frame the rule does not fit.
|
||||
#define FX_STEADY 60u
|
||||
|
||||
static int effects_point(const VkExec *ex) {
|
||||
@@ -1630,6 +1644,8 @@ static int effects_point(const VkExec *ex) {
|
||||
unsigned o[2], s[2];
|
||||
res_sizes(o, s);
|
||||
if (c->width < o[0] || !scene_shaped(c) || !scene_large(c)) return 0;
|
||||
if (!z->image) D.fx_comp = 1; // asked again at the same pass: the same answer
|
||||
if (!D.fx_comp || !z->image) return 0;
|
||||
D.fx_seen = D.fx_open = 1;
|
||||
return D.fx_steady >= FX_STEADY;
|
||||
}
|
||||
@@ -1948,7 +1964,7 @@ void vk_dlaa_frame(void) {
|
||||
D.on = on, D.fg = vk_dlaa_fg_on = fg, D.fsr = fsr;
|
||||
// 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;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = 0, D.fx_steady = 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = D.fx_comp = 0, D.fx_steady = 0;
|
||||
D.nodepth = D.glight = D.light_z = VK_NULL_HANDLE;
|
||||
D.hold = 0;
|
||||
return;
|
||||
@@ -1957,7 +1973,7 @@ void vk_dlaa_frame(void) {
|
||||
D.fx_on = dl_active() && cfg_bool("TOTK_DLAA_EFFECTS_AFTER"); // DLSS's point alone
|
||||
if (!D.done) D.frames_missed++;
|
||||
else D.fx_steady = D.fx_seen ? D.fx_steady + (D.fx_steady < FX_STEADY) : 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = 0;
|
||||
D.fx_seen = D.fx_open = D.fx_bad = D.fx_comp = 0;
|
||||
if (D.jit_used && !D.done) D.hold = 60, D.holds++; // jittered but not resolved: that frame shook
|
||||
else if (D.hold) D.hold--;
|
||||
if (!D.done) D.jit_ok = 0;
|
||||
|
||||
+93
-3
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cfg.h"
|
||||
#include "host.h"
|
||||
#include "nvn_api.h"
|
||||
#include "nvn_tex.h"
|
||||
@@ -92,9 +93,11 @@ static void event_cb(void *arg) {
|
||||
}
|
||||
|
||||
// NVNcounterData = {counter, timestamp}; timestamps are Tegra 19.2 MHz ticks (the base of GetSystemTick).
|
||||
static uint64_t counter_last; // the newest timestamp written (completion thread), for the bound below
|
||||
static void write_counter(uint64_t addr, uint64_t counter) {
|
||||
uint64_t rec[2] = {counter, (uint64_t)((unsigned __int128)kern_now_ns() * 12 / 625)};
|
||||
memcpy((void *)(uintptr_t)addr, rec, sizeof rec);
|
||||
__atomic_store_n(&counter_last, rec[1], __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
static void counter_cb(void *arg) {
|
||||
@@ -104,11 +107,21 @@ static void counter_cb(void *arg) {
|
||||
}
|
||||
|
||||
// Reports queued by the replay that the GPU has not finished. The condition of RENDER_COND reads a timestamp one as 0
|
||||
// and a samples-passed one as unknown.
|
||||
// and a samples-passed one as unknown. The replay thread writes the ring; game threads read it too
|
||||
// (vk_counter_timestamp): an entry's fence is stored before its address, so a reader that finds the address sees its
|
||||
// fence or a newer one, and an entry caught in between is judged by the newer fence (pending, the safe side).
|
||||
#define PENDING 256
|
||||
static struct { uint64_t addr, fence; int unknown; } pending[PENDING];
|
||||
static unsigned pending_head;
|
||||
|
||||
static void pending_add(uint64_t addr, uint64_t fence, int unknown) {
|
||||
unsigned i = pending_head % PENDING;
|
||||
__atomic_store_n(&pending[i].fence, fence, __ATOMIC_RELAXED);
|
||||
pending[i].unknown = unknown;
|
||||
__atomic_store_n(&pending[i].addr, addr, __ATOMIC_RELEASE);
|
||||
__atomic_store_n(&pending_head, pending_head + 1, __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
// ---- occlusion counts (samples passed)
|
||||
//
|
||||
// After a SAMPLES_PASSED reset, the first draw of a pass begins an occlusion query (precise when the device has
|
||||
@@ -300,7 +313,84 @@ static void report_counter(VkExec *ex, const p_report_counter *p) {
|
||||
*a = p->addr;
|
||||
vk_completion_add(ex->fence, counter_cb, a);
|
||||
}
|
||||
if (!ex->chunked) pending[pending_head++ % PENDING] = (typeof(pending[0])){p->addr, ex->fence, samples}; // else the scan's
|
||||
if (!ex->chunked) pending_add(p->addr, ex->fence, samples); // else the scan's
|
||||
}
|
||||
|
||||
// ---- timestamps read one frame early (TOTK_SYNC_AHEAD)
|
||||
//
|
||||
// A report lands in guest memory when its submission's fence completes (write_counter). With the frame wait one frame
|
||||
// late the game reads timestamps of work the GPU may not have finished. TotK's GPU time for its dynamic resolution
|
||||
// controller (1.4.3 main+0xa1a50, 1.2.1 main+0x972bac) converts the end and then the begin report of a pair it issued
|
||||
// two updates before, subtracts them unsigned and zeroes both reports. An end not written yet reads 0, and one written
|
||||
// after the zeroing leaves the value of the report before it for the next read: either way the difference wraps to
|
||||
// about 2^64, the controller sees an over-budget frame, and two of those in a row drop the game to its lowest quality
|
||||
// level until 60 good frames bring it back (the half-second blur of #1123). Measured on 1.4.3 (islands): 12-20
|
||||
// wrapped pairs in 40 s with the late wait, none without it.
|
||||
//
|
||||
// Every read is kept consistent with the order of the reports. At each frame wait the bound B becomes the newest
|
||||
// timestamp written so far. A read of a report that holds 0, holds a time after B, or whose newest replayed report is
|
||||
// not done yet reads B instead. Every report done before B was taken is written and holds at most B, so of two reports
|
||||
// in submission order the first never reads later than the second: the difference lies between 0 and what the exact
|
||||
// wait gives, never wrapped. Reports the exact wait would also have covered read as they are. Only the converted value
|
||||
// changes (nvnDeviceGetTimestampInNanoseconds); guest memory, RENDER_COND and samples-passed counts stay as they were.
|
||||
// TOTK_SYNC_AHEAD_TIMESTAMPS: 1 (default; acts only with the frame wait late), 0 off, check: counts what it would
|
||||
// replace and leaves the reads as they are.
|
||||
static uint64_t ts_bound; // 0: off
|
||||
static int ts_mode = -1; // 0 off, 1 on, 2 check
|
||||
static struct { uint64_t reads, zero, later, pending, last_log; } ts_stat; // game threads, approximate counts
|
||||
|
||||
static int ts_on(void) {
|
||||
if (ts_mode < 0) {
|
||||
const char *v = cfg_get("TOTK_SYNC_AHEAD_TIMESTAMPS");
|
||||
ts_mode = !v || !*v ? 1 : !strcmp(v, "check") ? 2 : strcmp(v, "0") != 0;
|
||||
rt_log("sync-ahead: timestamps the game reads before their frame is done read as the newest one written at "
|
||||
"the frame wait: %s", ts_mode == 2 ? "check (counted, not replaced)" : ts_mode ? "on" : "off");
|
||||
}
|
||||
return ts_mode;
|
||||
}
|
||||
|
||||
void vk_counter_frame(void) {
|
||||
if (ts_on()) __atomic_store_n(&ts_bound, __atomic_load_n(&counter_last, __ATOMIC_ACQUIRE), __ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
// 1: the newest replayed report to addr is not done
|
||||
static int report_pending(uint64_t addr) {
|
||||
uint64_t done = vk_sync_fence_done();
|
||||
unsigned head = __atomic_load_n(&pending_head, __ATOMIC_ACQUIRE);
|
||||
for (unsigned k = 1; k <= PENDING; k++) { // newest first: the last report to addr decides
|
||||
unsigned i = (head - k) % PENDING;
|
||||
if (__atomic_load_n(&pending[i].addr, __ATOMIC_ACQUIRE) == addr)
|
||||
return __atomic_load_n(&pending[i].fence, __ATOMIC_RELAXED) > done;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ts_log(const char *when) {
|
||||
rt_log("sync-ahead: timestamps %s: %llu reads, %s %llu (zero %llu, after the bound %llu, report not done %llu)", when,
|
||||
(unsigned long long)ts_stat.reads, ts_mode == 2 ? "would be replaced" : "replaced",
|
||||
(unsigned long long)(ts_stat.zero + ts_stat.later + ts_stat.pending), (unsigned long long)ts_stat.zero,
|
||||
(unsigned long long)ts_stat.later, (unsigned long long)ts_stat.pending);
|
||||
}
|
||||
|
||||
uint64_t vk_counter_timestamp(uint64_t addr, uint64_t t) {
|
||||
uint64_t b = __atomic_load_n(&ts_bound, __ATOMIC_ACQUIRE);
|
||||
if (!b) return t;
|
||||
ts_stat.reads++;
|
||||
int why = !t ? 1 : t > b ? 2 : report_pending(addr) ? 3 : 0;
|
||||
if (why == 1) ts_stat.zero++;
|
||||
else if (why == 2) ts_stat.later++;
|
||||
else if (why == 3) ts_stat.pending++;
|
||||
uint64_t now = kern_now_ns();
|
||||
if (now - ts_stat.last_log > 30000000000ull) { // every 30 s of host time
|
||||
if (ts_stat.last_log) ts_log("so far");
|
||||
ts_stat.last_log = now;
|
||||
}
|
||||
return why && ts_mode == 1 ? b : t;
|
||||
}
|
||||
|
||||
void vk_counter_log(void) {
|
||||
static int once;
|
||||
if (ts_mode > 0 && !__atomic_exchange_n(&once, 1, __ATOMIC_RELAXED)) ts_log("over the run");
|
||||
}
|
||||
|
||||
// ---- conditional rendering
|
||||
@@ -694,7 +784,7 @@ int vk_exec_xfer_scan(VkExec *ex, uint32_t op, const void *payload) {
|
||||
VkMemSpan m;
|
||||
if (!nvn_gpu_only(p->addr) && !vk_mem_resolve(p->addr, sizeof(NVNcounterData), &m)) break; // the recording stops
|
||||
if (samples) oq_report_state(ex);
|
||||
if (!nvn_gpu_only(p->addr)) pending[pending_head++ % PENDING] = (typeof(pending[0])){p->addr, ex->fence, samples};
|
||||
if (!nvn_gpu_only(p->addr)) pending_add(p->addr, ex->fence, samples);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-6
@@ -103,7 +103,7 @@ static struct {
|
||||
unsigned toggle;
|
||||
uint64_t frame_id, last_prep_ns, made;
|
||||
// settings read at start (vk_fg_init)
|
||||
int workers, sync_ahead, hdr, test, debug, times;
|
||||
int workers, hdr, test, debug, times;
|
||||
uint64_t shot_at; // TOTK_FG_SHOT: the first present shot, or (shot_w) the first after that world time
|
||||
int64_t shot_w;
|
||||
char shot_dir[260];
|
||||
@@ -295,7 +295,6 @@ static void start(void) {
|
||||
}
|
||||
g.win_fmt = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
g.workers = cfg_int("TOTK_REPLAY_WORKERS");
|
||||
g.sync_ahead = cfg_bool("TOTK_SYNC_AHEAD") && strcmp(cfg_value("TOTK_SYNC_AHEAD"), "check") != 0; // check: exact
|
||||
g.hdr = vk_hdr_wanted();
|
||||
g.test = knob_int("TOTK_FG_TEST");
|
||||
g.debug = knob_int("TOTK_FG_DEBUG");
|
||||
@@ -329,14 +328,16 @@ extern "C" int vk_fg_wanted(int dlss) {
|
||||
if (vk_fg_engine() != VK_FG_FSR3) return 0;
|
||||
if (!started) start(); // turned on in the menu: the contexts now; the first prepare makes them for the scene
|
||||
if (!g.live || g.failed) return 0;
|
||||
// the inputs are this frame's, recorded in replay order: one frame in flight more or chunks recording side by
|
||||
// side are not handled yet
|
||||
int why = dlss ? 1 : g.workers > 0 ? 2 : g.sync_ahead ? 3 : g.hdr ? 4 : 0;
|
||||
// the inputs are this frame's, recorded in replay order: chunks recording side by side are not handled yet.
|
||||
// sync_ahead only moves the game's frame wait; the replay and the presents keep their order, and the replay's
|
||||
// next submission waits until the present thread submitted the blit (vk_backend.c submit_sync, vk_present_drain),
|
||||
// so out[] and hl[] alternate safely with it on.
|
||||
int why = dlss ? 1 : g.workers > 0 ? 2 : g.hdr ? 3 : 0;
|
||||
if (why) {
|
||||
if (!(g.said & 1u << why)) {
|
||||
g.said |= 1u << why;
|
||||
static const char *const r[] = {"", "DLSS runs (dlaa = 1)", "the replay records in chunks (replay_workers > 0)",
|
||||
"sync_ahead = 1", "HDR output (hdr = 1)"};
|
||||
"HDR output (hdr = 1)"};
|
||||
rt_log("fg: frame generation off while %s", r[why]);
|
||||
}
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ int vk_fg_active(void);
|
||||
void vk_fg_release(void);
|
||||
|
||||
// vk_dlaa.c vk_dlaa_frame, once per present: 1 when frame generation follows the scene in the next frame. 0 while
|
||||
// DLSS runs (dlss), with replay workers or sync_ahead = 1 (the inputs are per frame and recorded in replay order),
|
||||
// DLSS runs (dlss), with replay workers (the inputs are per frame and recorded in replay order),
|
||||
// with HDR output, or while the game shows a menu without its world (vk_fg_menu); each reason is logged once.
|
||||
int vk_fg_wanted(int dlss);
|
||||
// vk_dlaa.c, the game's thread at each present: 1 while the map or a loading or event fade is open (sampled there,
|
||||
|
||||
@@ -156,6 +156,15 @@ class RealArchiveTest(unittest.TestCase):
|
||||
ui.apply(full, members, width, height)
|
||||
expected = bytearray(original)
|
||||
baseline['apply'](expected, members, width, height)
|
||||
# The map (its layout and the minimap animation's width keys), the Purah Pad's frame and the loading screen
|
||||
# changed on purpose after it (the maps fill the screen, the frame keeps its width, the camera's album window
|
||||
# has the screen's shape, the inn's clock follows the choices to the bottom edge); the rest is byte for byte.
|
||||
for member in ('blyt/AppMap_00.bflyt', 'blyt/AppMenuOverlay_00.bflyt', 'blyt/LoadingFade_00.bflyt',
|
||||
'blyt/CameraSystemWindow_00.bflyt', 'blyt/Time_00.bflyt',
|
||||
'anim/AppMap_00_MiniMap.bflan', 'anim/LoadingFade_00_BarIn.bflan',
|
||||
'anim/LoadingFade_00_BarOut.bflan'):
|
||||
lo, hi = members[member]
|
||||
expected[lo:hi] = full[lo:hi]
|
||||
self.assertEqual(full, expected)
|
||||
for cap, extension in ((16 / 9, 0), (21 / 9, 300)):
|
||||
data = bytearray(original)
|
||||
|
||||
+62
-2
@@ -1037,6 +1037,59 @@ class FreeSpaceTest(unittest.TestCase):
|
||||
usage.assert_called_once_with(root)
|
||||
|
||||
|
||||
class MissingLibraryTest(unittest.TestCase):
|
||||
"""#1428, #1315, #1419: a system library the release's libSDL3.so.0 links is missing; the setup names it (and the
|
||||
package that provides it) before the lift, and after a game start the loader stopped, instead of exit code 127."""
|
||||
|
||||
LDD = ('\tlinux-vdso.so.1 (0x00007ffd)\n\tlibXss.so.1 => not found\n'
|
||||
'\tlibX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f00)\n\tlibdecor-0.so.0 => not found\n')
|
||||
|
||||
def test_packages_of_known_libraries(self):
|
||||
self.assertEqual(steps.library_packages(['libXss.so.1']),
|
||||
' (Fedora: libXScrnSaver, Debian/Ubuntu: libxss1, Arch: libxss)')
|
||||
self.assertEqual(steps.library_packages(['libXss.so.1', 'libfoo.so.9', 'libdecor-0.so.0']),
|
||||
' (Fedora: libXScrnSaver libdecor, Debian/Ubuntu: libxss1 libdecor-0-0, '
|
||||
'Arch: libxss libdecor)')
|
||||
self.assertEqual(steps.library_packages(['libfoo.so.9']), '')
|
||||
|
||||
def test_ldd_not_found_lines(self):
|
||||
runs = []
|
||||
|
||||
def ldd(cmd, **kw):
|
||||
runs.append(cmd)
|
||||
return SimpleNamespace(returncode=1, stdout=self.LDD, stderr='')
|
||||
with mock.patch.object(steps.sys, 'platform', 'linux'), mock.patch.object(steps.subprocess, 'run', ldd):
|
||||
self.assertEqual(steps.missing_libraries([Path('a/libSDL3.so.0'), Path('b/libother.so')]),
|
||||
['libXss.so.1', 'libdecor-0.so.0'])
|
||||
self.assertEqual([c[0] for c in runs], ['ldd', 'ldd'])
|
||||
|
||||
def test_no_ldd_or_not_linux(self):
|
||||
def missing(cmd, **kw):
|
||||
raise FileNotFoundError('ldd')
|
||||
with mock.patch.object(steps.sys, 'platform', 'linux'), mock.patch.object(steps.subprocess, 'run', missing):
|
||||
self.assertEqual(steps.missing_libraries([Path('libSDL3.so.0')]), [])
|
||||
with mock.patch.object(steps.sys, 'platform', 'win32'):
|
||||
self.assertEqual(steps.missing_libraries([Path('SDL3.dll')]), [])
|
||||
|
||||
def test_loader_error_in_the_prepare_log(self):
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
log = Path(d) / 'prepare-prepare_shaders.log'
|
||||
log.write_text('/home/p/TotK/totk: error while loading shared libraries: libXss.so.1: cannot open shared '
|
||||
'object file: No such file or directory\ntotk.exe --prepare-shaders: rc=127\n'
|
||||
'/home/p/TotK/totk: error while loading shared libraries: libXss.so.1: cannot open shared '
|
||||
'object file: No such file or directory\n', encoding='utf-8')
|
||||
self.assertEqual(steps.loader_missing(log), ['libXss.so.1'])
|
||||
self.assertEqual(steps.loader_missing(Path(d) / 'none.log'), [])
|
||||
|
||||
def test_messages_take_the_parameters(self):
|
||||
for path in (ROOT / 'installer' / 'text').glob('*.json'):
|
||||
catalog = json.loads(path.read_text(encoding='utf-8'))
|
||||
for id in ('check.libraries_missing', 'prepare.libraries_missing'):
|
||||
text = catalog[id].format(libraries='libXss.so.1', packages=' (Fedora: libXScrnSaver)', log='x.log')
|
||||
self.assertIn('libXss.so.1', text, (path.name, id))
|
||||
self.assertIn('libXScrnSaver', text, (path.name, id))
|
||||
|
||||
|
||||
class BaseGameCheckTest(unittest.TestCase):
|
||||
"""Issue #261: an update NSP chosen as the base game was reported as "not Tears of the Kingdom"."""
|
||||
BASE, UPDATE = '0100F2C0115B6000', '0100F2C0115B6800'
|
||||
@@ -1090,8 +1143,11 @@ class ShapesTest(unittest.TestCase):
|
||||
|
||||
def test_shape_rule(self):
|
||||
self.assertEqual([screens.shape_size(*s) for s in ((5120, 2160), (3440, 1440), (1920, 800), (2560, 1600),
|
||||
(1920, 1080), (1024, 768))],
|
||||
['2560x1080', '3440x1440', '3840x1600', '1280x800', None, None])
|
||||
(1920, 1080), (1024, 768), (3120, 1440), (2560, 1200),
|
||||
(1280, 1024), (1080, 1920), (7680, 1440), (7680, 2160))],
|
||||
['2560x1080', '3440x1440', '3840x1600', '1280x800', None, '1440x1080', '2340x1080',
|
||||
'2560x1200', None, None, None, '3840x1080'])
|
||||
self.assertIsNone(screens.shape_size(2560, 1200, listed=True)) # a display of an unlisted shape
|
||||
self.assertEqual(screens.default_size(3440, 1440), '2560x1080') # runtime/cfg.c screen_default
|
||||
self.assertEqual(screens.default_size(1280, 800), '1280x800')
|
||||
|
||||
@@ -1125,6 +1181,10 @@ class ShapesTest(unittest.TestCase):
|
||||
(['2560x1080', '3440x1440', '1280x800', '1920x1280'], 'pc'))
|
||||
self.assertEqual(screens.wanted(self.dest / 'none', [(2560, 1440)]), ([], None))
|
||||
|
||||
def test_wanted_unlisted_output_res_gets_its_own_size(self):
|
||||
(self.dest / 'totk.ini').write_text('output_res = 2560x1200\n')
|
||||
self.assertEqual(screens.wanted(self.dest, [(2560, 1200), (1600, 1200)]), (['1440x1080', '2560x1200'], None))
|
||||
|
||||
def test_layout_settings_keep_the_last_nonempty_value(self):
|
||||
for empty in ('', ' ', '""'):
|
||||
with self.subTest(empty=empty):
|
||||
|
||||
+113
-10
@@ -15,9 +15,10 @@ and every pane field and animation key holds the value the edit expects before i
|
||||
import math
|
||||
import struct
|
||||
|
||||
# BFLYT pane sections (pan1, pic1, txt1, ...): name at +12 (24 bytes), translate x / y at +44 / +48, scale x / y at +68 / +72.
|
||||
# BFLYT pane sections (pan1, pic1, txt1, ...): name at +12 (24 bytes), translate x / y at +44 / +48, scale x / y at +68 / +72,
|
||||
# size (width) at +76.
|
||||
PANE_MAGICS = (b'pan1', b'pic1', b'txt1', b'wnd1', b'bnd1', b'prt1', b'ali1', b'scr1')
|
||||
FIELD = {'x': 44, 'y': 48, 'scale_x': 68, 'scale_y': 72}
|
||||
FIELD = {'x': 44, 'y': 48, 'scale_x': 68, 'scale_y': 72, 'w': 76, 'h': 80}
|
||||
|
||||
# Full-screen layouts whose root pane stays as wide as the canvas.
|
||||
KEEP_ROOT = {'AppMenuBG_00', 'PauseMenuBG_00', 'ShopMenuParasailBG_00', 'ShortCutBG_00', 'TitleMenuBG_00', 'EventFade_00',
|
||||
@@ -60,6 +61,22 @@ def hud_extent(k, hud_aspect):
|
||||
inner = 1 / ((16 / 9) / hud_aspect) - 1 # 1 / kc - 1
|
||||
return 960 * inner, 960 * k * inner
|
||||
|
||||
# The loading screen's map is a capture of the world map that the game draws as the 3 x 3 tiles of 840 units around the
|
||||
# player's tile (measured with TOTK_DUMP at 3840x1080: nine 840x840 tile draws into the capture), so only 840 units
|
||||
# either side of the player are certain to hold map; wider, the capture shows black beside the tiles where the player
|
||||
# stands near a tile's edge. At 16:9 it is 1470 wide (the screen's 1920 less 450), its left edge 23 units past the
|
||||
# screen's, and the side panel (a window, so its frame keeps its proportions at any width) covers its right 237 units.
|
||||
LOADING_MAP_MAX = 1660
|
||||
|
||||
def loading_map(k):
|
||||
"""(width, shift, panel width) of the loading screen's map capture and side panel for k = 16:9 over the aspect: the
|
||||
map as wide as the screen allows up to LOADING_MAP_MAX, its left edge where 16:9 has it relative to the screen's
|
||||
edge (shift: how far its centre moves from x -248), and the panel from the map's right part to the screen's edge."""
|
||||
width = min(1920 / k - 450, max(1470, LOADING_MAP_MAX))
|
||||
centre = -960 / k - 23 + width / 2
|
||||
panel = 960 / k - (centre + width / 2 - 237)
|
||||
return width, centre + 248, panel
|
||||
|
||||
def edits(k, hud_aspect):
|
||||
"""(layout, pane, field, value) for the aspect: k = 16/9 over the aspect (the root's scale), w = how far a 1920-wide
|
||||
layout's edge moves out in its own units (960 * (1 / k - 1)). OFF moves a pane out of sight. hud_aspect: the
|
||||
@@ -71,7 +88,15 @@ def edits(k, hud_aspect):
|
||||
out = [
|
||||
('AppAlbum_00', 'N_FadeInOut_00', 'scale_x', k), ('AppAlbum_00', 'N_Open_01', 'scale_x', wide),
|
||||
*[('AppMap_00', f'N_BlurInOut_0{i}', 'scale_x', wide) for i in range(4)],
|
||||
('AppMap_00', 'N_MiniMap_00', 'x', -270 * (1 - k)),
|
||||
# With the map as wide as the screen, the layer tabs go to its left edge and the time, temperature and
|
||||
# position to its right edge, as at 16:9 (neither position is animated; AppMap_00_MiniMap keys their visibility).
|
||||
('AppMap_00', 'N_MiniMap_00', 'x', -w), ('AppMap_00', 'N_AllMapTime_00', 'x', w),
|
||||
# The map: the panes that cut it out and its black backing are 2250 wide, so under the 16:9 root the world map
|
||||
# ended short of the screen's sides and black bars showed there. They take the screen's width in the root's
|
||||
# units instead (a size, not a scale: the map inside keeps its proportions and more of it shows), and so do the
|
||||
# icon area and the shadow frame over it.
|
||||
*[('AppMap_00', pane, 'w', 2250 / k) for pane in ('N_Cut_00', 'N_Capture_00', 'Black8_01', 'N_Cut_01',
|
||||
'P_MapCapture_00', 'N_Cut_02', 'N_IconArea_00', 'W_Shadow_00')],
|
||||
('AppMenuOverlay_00', 'N_FadeInOut_00', 'scale_x', k), ('AppMenuOverlay_00', 'N_FadeInOut_01', 'scale_x', k),
|
||||
('AppMenuOverlay_00', 'N_Icon_00', 'scale_x', k), ('AppMenuOverlay_00', 'N_TitleOne_01', 'scale_x', k),
|
||||
('AppOpenDemoWindow_00', 'P_BG_00', 'scale_x', wide), ('AutoBuilder_00', 'N_BG_00', 'scale_x', wide),
|
||||
@@ -83,12 +108,17 @@ def edits(k, hud_aspect):
|
||||
('CameraSystemWindow_00', 'T_Text_00', 'scale_x', k),
|
||||
('ChallengeLog_00', 'C_CaptureUp_00', 'x', OFF), ('ChallengeLog_00', 'C_CaptureUp_01', 'x', OFF),
|
||||
('GameOver_00', 'P_BG_00', 'scale_x', wide),
|
||||
('LoadingFade_00', 'N_Base_00', 'scale_x', wide), ('LoadingFade_00', 'N_Logo_00', 'x', w),
|
||||
# The loading screen: the map starts at the screen's left edge and the side panel ends at its right edge, each
|
||||
# unstretched. See loading_map for the widths.
|
||||
('LoadingFade_00', 'N_Logo_00', 'x', w),
|
||||
('LoadingFade_00', 'N_Status_00', 'x', w), ('LoadingFade_00', 'N_Tips_00', 'x', -w),
|
||||
('LoadingFade_00', 'P_BG_00', 'scale_x', wide), ('LoadingFade_00', 'P_SideBGDeco_00', 'scale_x', k),
|
||||
('LoadingFade_00', 'Pa_IconPlayer_00', 'scale_x', k), ('LoadingFade_00', 'Pa_LargeDungeonMap_00', 'scale_x', k),
|
||||
('LoadingFade_00', 'Pa_LargeDungeonMap_01', 'scale_x', k), ('LoadingFade_00', 'Pa_Map_00', 'scale_x', k),
|
||||
('LoadingFade_00', 'Pa_Map_01', 'scale_x', k),
|
||||
('LoadingFade_00', 'P_BG_00', 'scale_x', wide), ('LoadingFade_00', 'P_BG_01', 'scale_x', wide),
|
||||
('LoadingFade_00', 'P_Grid_00', 'scale_x', wide), ('LoadingFade_00', 'P_Bar_00', 'scale_x', wide),
|
||||
*[('LoadingFade_00', pane, 'w', loading_map(k)[0]) for pane in ('C_CaptureMap_00', 'C_CaptureMap_01',
|
||||
'P_CaptureMap_00', 'P_CaptureMap_01')],
|
||||
('LoadingFade_00', 'N_Map_00', 'x', -248 + loading_map(k)[1]),
|
||||
('LoadingFade_00', 'W_SideBGDeco_00', 'x', 960 / k), ('LoadingFade_00', 'W_SideBGDeco_00', 'w', loading_map(k)[2]),
|
||||
('LoadingFade_00', 'P_SideBGDeco_00', 'x', 960 / k),
|
||||
('MessageLog_01', 'P_Capture_00', 'scale_x', wide), ('OwnedHorseList_00', 'N_BG_00', 'scale_x', wide),
|
||||
('PaCommonBtnTitle_00', 'B_Hit_00', 'x', OFF), ('PaCommonBtnTitle_00', 'N_Cursor_00', 'x', OFF),
|
||||
('PaLargeDungeonMap_00', 'P_BG_00', 'scale_x', wide), ('PaMessageBtn_00', 'B_Hit_00', 'x', OFF),
|
||||
@@ -99,6 +129,13 @@ def edits(k, hud_aspect):
|
||||
*[e for pane, x, _ in BALLOON_PART for e in (('PaBalloonMessage_00', pane, 'scale_x', k),
|
||||
('PaBalloonMessage_00', pane, 'x', x * k))],
|
||||
]
|
||||
# The Purah Pad's frame (map, album, ...): AppMenuOverlay_00 keeps a root as wide as the screen, so the stone and
|
||||
# light pieces at its left and right edges (x = -960 / 960, anchored at their outer side) were stretched with it.
|
||||
# They keep their own width at the edges.
|
||||
out += [('AppMenuOverlay_00', f'P_Frame{side}{part}', 'scale_x', k) for side in 'LR'
|
||||
for part in ('Core_00', 'AlbNrm_00', 'Light_00', 'EdgeFast_00', 'EdgeSlow_00', 'EdgeFastGlow_00',
|
||||
'EdgeSlowGlow_00')]
|
||||
out += [('AppMenuOverlay_00', f'P_Frame{side}Dent_0{i}', 'scale_x', k) for side in 'LR' for i in (0, 1)]
|
||||
# Menus framed by two side decorations, a header and a background: the frame stays at the screen's edges.
|
||||
for layout, deco in (('PauseMenuOverlay_00', 'P_Deco{}_00'), ('SystemLoadList_00', 'P_Deco{}_00'),
|
||||
('SystemOption_00', 'P_Deco{}_00'), ('SystemSaveLoad_00', 'P_Deco{}_00')):
|
||||
@@ -135,10 +172,21 @@ def tall_edits(k):
|
||||
out = [('AppAlbum_00', 'N_FadeInOut_00', 'scale_y', k), ('AppAlbum_00', 'N_Open_01', 'scale_y', tall),
|
||||
*[('AppMenuOverlay_00', p, 'scale_y', k) for p in ('N_FadeInOut_00', 'N_FadeInOut_01', 'N_Icon_00',
|
||||
'N_TitleOne_01')],
|
||||
('CameraPointer_00', 'N_Type_01', 'scale_y', k), ('CameraSystemWindow_00', 'N_FirstOut_00', 'scale_y', k),
|
||||
('CameraPointer_00', 'N_Type_01', 'scale_y', k),
|
||||
# The camera's "save to the album?" window: N_InOut_00 takes the screen's height (below), so the photo's
|
||||
# frame (N_AlbumPic_00) has the screen's shape, as the photo has. The compendium's square photos
|
||||
# (N_PictureBook_00) and the album's question and buttons (N_AlbumCon_00) keep their proportions, and the
|
||||
# question and the buttons move out by the frame's extra half height (319.5 of its 639).
|
||||
*[('CameraSystemWindow_00', p, 'scale_y', k) for p in ('N_PictureBook_00', 'N_AlbumCon_00')],
|
||||
('CameraSystemWindow_00', 'T_TextAlbum_00', 'y', 380 + 319.5 * (tall - 1)),
|
||||
*[('CameraSystemWindow_00', p, 'y', -396 - 319.5 * (tall - 1)) for p in ('Pa_BtnL_01', 'Pa_BtnR_01')],
|
||||
*[('LoadingFade_00', p, 'scale_y', k) for p in ('Pa_IconPlayer_00', 'Pa_LargeDungeonMap_00',
|
||||
'Pa_LargeDungeonMap_01', 'Pa_Map_00', 'Pa_Map_01')],
|
||||
*[('AppMap_00', f'N_BlurInOut_0{i}', 'scale_y', tall) for i in range(4)],
|
||||
# The map's capture, its cut, backing and shadow are 1080 high, the height of a 16:9 layout: they take the
|
||||
# screen's height, 1080 / k, so the map fills it instead of leaving black above and below (tall_anim
|
||||
# does the same for the keys of AppMap_00_MiniMap that hold 1080)
|
||||
*[('AppMap_00', pane, 'h', 1080 * tall) for pane in MAP_TALL + ('W_Shadow_00',)],
|
||||
*[(layout, 'P_BG_00', 'scale_y', tall) for layout in ('AppOpenDemoWindow_00', 'GameOver_00', 'LoadingFade_00',
|
||||
'PaLargeDungeonMap_00', 'PaRecipeCardList_00')],
|
||||
('LoadingFade_00', 'N_Base_00', 'scale_y', tall),
|
||||
@@ -157,7 +205,10 @@ def tall_edits(k):
|
||||
'ShopMenu_00', 'SystemActionGuide_00') + SYSTEM_MENUS]
|
||||
out += [(name, 'RootPane', 'y', -540 * (1 - k)) for name in (
|
||||
'CtrlGuide_00', 'DoCommand_00', 'EnvironmentInfo_00', 'HorseGauge_00', 'MessageDialog_00', 'MessageLog_01',
|
||||
'PauseMenuOverlay_00', 'SaveLoadIcon_00', 'TreasureFullShortCut_00')]
|
||||
'PauseMenuOverlay_00', 'SaveLoadIcon_00', 'TreasureFullShortCut_00',
|
||||
# the clock an inn's choices show (05:00) under MessageDialog_00's list: it stayed in the middle 16:9 and was
|
||||
# drawn over the list's last rows
|
||||
'Time_00')]
|
||||
out += [('AppAlbum_00', 'N_PicLoad_01', 'y', -540 * (1 - k)), ('AppMap_00', 'N_AllMapTime_00', 'y', -h),
|
||||
('AppMenuOverlay_00', 'A_Align_00', 'y', -(505 + h)), ('AppMenuOverlay_00', 'Pa_GuideLeft_00', 'y', -(505 + h)),
|
||||
('AppMenuOverlay_00', 'N_TitleTab_00', 'y', 491 + h),
|
||||
@@ -200,6 +251,49 @@ def anim_keys(blarc, lo, pane, tag, target):
|
||||
pos += size
|
||||
return out
|
||||
|
||||
FLPA_SIZE_X = 8 # BFLAN FLPA target: the pane's width
|
||||
|
||||
# The map's panes that AppMap_00_MiniMap sizes: in the full map they hold the width 2250 in its keys (the minimap
|
||||
# shrinks them), and the animation's keys win over the layout's size, so a wider screen still cut the map at 2250.
|
||||
MAP_SIZED = ('N_IconArea_00', 'N_Cut_00', 'N_Capture_00', 'P_MapCapture_00', 'Black8_01', 'N_Cut_01', 'N_Cut_02')
|
||||
|
||||
# The map's panes that hold the 16:9 layout's height, 1080, in the layout and in the full map's keys of AppMap_00_MiniMap
|
||||
MAP_TALL = ('N_Cut_00', 'N_Capture_00', 'P_MapCapture_00', 'Black8_01')
|
||||
FLPA_SIZE_Y = 9 # BFLAN FLPA target: the pane's height
|
||||
|
||||
def wide_anim(blarc, members, k, changed):
|
||||
"""The animation keys that hold the full map's width, for a canvas wider than 16:9: 2250 becomes 2250 / k, the
|
||||
screen's width in the 16:9 root's units plus the same margin, as edits() does for the layout's sizes."""
|
||||
member = 'anim/AppMap_00_MiniMap.bflan'
|
||||
if member not in members: raise SystemExit(f'AppMap_00_MiniMap: no animation {member} in the archive')
|
||||
lo = members[member][0]
|
||||
if blarc[lo:lo + 4] != b'FLAN': return # tests/hud_layout_test.py's synthetic archive: fixed-offset keys only
|
||||
found = 0
|
||||
for pane in MAP_SIZED:
|
||||
for keys in anim_keys(blarc, lo, pane, b'FLPA', FLPA_SIZE_X):
|
||||
for key in keys:
|
||||
if abs(struct.unpack_from('<f', blarc, key + 4)[0] - 2250) < 1e-3:
|
||||
struct.pack_into('<f', blarc, key + 4, 2250 / k); found += 1
|
||||
if found < len(MAP_SIZED): raise SystemExit(f'AppMap_00_MiniMap: {found} width keys of 2250, expected at least {len(MAP_SIZED)}')
|
||||
changed.add(member)
|
||||
|
||||
def loading_anim(blarc, members, k, changed):
|
||||
"""The loading screen's map slides by 24 units when the bar comes in and goes out (LoadingFade_00_BarIn: x -278 to
|
||||
-302, BarOut: -302 to -326); the keys move with the map's centre (loading_map)."""
|
||||
shift = loading_map(k)[1]
|
||||
for name, shipped in (('LoadingFade_00_BarIn', (-278, -302)), ('LoadingFade_00_BarOut', (-302, -326))):
|
||||
member = f'anim/{name}.bflan'
|
||||
mini = members.get('anim/AppMap_00_MiniMap.bflan')
|
||||
if mini and blarc[mini[0]:mini[0] + 4] != b'FLAN': return # tests/hud_layout_test.py's synthetic archive
|
||||
if member not in members: raise SystemExit(f'{name}: no animation {member} in the archive')
|
||||
lo = members[member][0]
|
||||
curves = anim_keys(blarc, lo, 'N_Map_00', b'FLPA', 0)
|
||||
keys = [key for curve in curves for key in curve]
|
||||
values = tuple(round(struct.unpack_from('<f', blarc, key + 4)[0], 3) for key in keys)
|
||||
if values != shipped: raise SystemExit(f'{name} N_Map_00 x: keys {values}, expected {shipped}')
|
||||
for key in keys: struct.pack_into('<f', blarc, key + 4, struct.unpack_from('<f', blarc, key + 4)[0] + shift)
|
||||
changed.add(member)
|
||||
|
||||
def tall_anim(blarc, members, k, changed):
|
||||
"""The animation keys that hold positions or zooms on the screen's height, for a canvas narrower than 16:9."""
|
||||
h = 540 * (1 / k - 1)
|
||||
@@ -221,6 +315,13 @@ def tall_anim(blarc, members, k, changed):
|
||||
abs(get(k1 + 4) + 360) < 1e-3 and get(k1 + 8) == 0):
|
||||
raise SystemExit(f'AppMap_00_MiniMap {pane}: not a line from 0 to y -360')
|
||||
put(k0 + 8, -(360 + h)), put(k1 + 4, -(360 + h))
|
||||
# The full map's height keys hold 1080 (the minimap shrinks the panes), and they win over the layout's sizes
|
||||
found = 0
|
||||
for pane in MAP_TALL:
|
||||
for keys in anim_keys(blarc, lo, pane, b'FLPA', FLPA_SIZE_Y):
|
||||
for key in keys:
|
||||
if abs(get(key + 4) - 1080) < 1e-3: put(key + 4, 1080 / k); found += 1
|
||||
if found < len(MAP_TALL): raise SystemExit(f'AppMap_00_MiniMap: {found} height keys of 1080, expected at least {len(MAP_TALL)}')
|
||||
# The large place name of a discovery holds its height (285, then 260) in flat keys; they move to the top edge.
|
||||
curves = anim_keys(blarc, anim('Location_00_IsDiscovery'), 'N_Large_00', b'FLPA', FLPA_Y)
|
||||
values = [get(key + 4) for keys in curves for key in keys]
|
||||
@@ -317,4 +418,6 @@ def apply(blarc, members, width, height, hud_aspect=None):
|
||||
have = struct.unpack_from('<f', blarc, lo + offset)[0]
|
||||
if abs(have - shipped) >= 1e-4: raise SystemExit(f'{anim} +{offset}: {have}, expected {shipped}')
|
||||
struct.pack_into('<f', blarc, lo + offset, value); changed.add(member)
|
||||
wide_anim(blarc, members, k, changed)
|
||||
loading_anim(blarc, members, k, changed)
|
||||
return sorted(changed)
|
||||
+30
-16
@@ -69,7 +69,7 @@
|
||||
# timer_1ms = 1
|
||||
|
||||
# One frame ahead of the GPU.
|
||||
# Let the game build the next frame while the GPU still draws the previous one, 0 or 1. Default: off. Each frame the
|
||||
# Let the game build the next frame while the GPU still draws the previous one, 0 or 1. Default: on. Each frame the
|
||||
# game waits once for the GPU to finish the frame it presented last; with 1 that wait covers the frame before it
|
||||
# instead. On Great Sky Island (Linux, RX 9070 XT) with shadow_defer = 1 this took about 73 to 100 fps. Costs one more
|
||||
# frame of input delay, and frame times vary more from frame to frame than with 0. GPU results the game reads back every frame after that wait, for example its depth queries, can be a frame old; a result it reads only once is waited for.
|
||||
@@ -78,7 +78,7 @@
|
||||
# game's memory in place and guards copy or wait for what the game rewrites while the GPU still reads it (no shadow
|
||||
# copies, about 1 ms a frame less on a weak CPU). With memory = import and no shadow storage the setting is ignored
|
||||
# and the log says so.
|
||||
# sync_ahead = 0
|
||||
# sync_ahead = 1
|
||||
# Shadow storage, 0 or 1: each CPU-visible memory pool of the game gets a host-visible copy that the GPU reads, in
|
||||
# place of importing the game's memory. Default: on under Linux and Wine, off on native Windows.
|
||||
# Costs about 0.2 ms a frame and doubles the memory of those pools (about 1.1 GB; docs/building.md). Read at start.
|
||||
@@ -219,16 +219,19 @@
|
||||
# gpu_index = 0
|
||||
# gpu_name = NVIDIA
|
||||
# Game resolution: the size the game draws its picture and interface in (1280x720 to 7680x4320). Above 1920x1080 the
|
||||
# game's texture heap and memory pool grow with it. Another shape than 16:9, such as 3440x1440 on a 21:9 monitor or
|
||||
# the Steam Deck's 1280x800 (16:10), gives the camera's view that shape and lays the HUD out for it. The installer
|
||||
# prepares the UI layout for fifteen sizes: 2560x1080, 3440x1440, 3840x1600, 5120x2160 (21:9), 3840x1080, 5120x1440
|
||||
# (32:9), 1280x800, 1680x1050, 1920x1200, 2560x1600 (16:10), 1920x1280, 2160x1440, 2256x1504, 2880x1920 and 3000x2000
|
||||
# (3:2). For any other size, or a source build that has not made the layout, the game draws the largest 16:9 size that
|
||||
# fits inside it (3440x1080 gives 1920x1080) and the present adds bars; build the layout with
|
||||
# tools/make_romfs_patches.py --aspect WxH to use the full shape. Read at start. Default: 1920x1080, or on a primary
|
||||
# display of one of those shapes the smallest of its sizes at least 1080 high that fits the display (1920x1280 on a 3:2
|
||||
# laptop, 2560x1080 on a 21:9 monitor), so the picture fills the screen without black bars, with prompts = xbox or pc
|
||||
# too (on an install by an older setup, which built the Xbox prompts for 16:9 only, prompts = xbox keeps 1920x1080).
|
||||
# game's texture heap and memory pool grow with it. Another shape than 16:9, such as 3440x1440 on a 21:9 monitor or the
|
||||
# Steam Deck's 1280x800 (16:10), gives the camera's view that shape and lays the HUD out for it. Any shape from 4:3 to
|
||||
# 32:9 works: 21:9 monitors (2560x1080, 3440x1440, 3840x1600, 5120x2160), 32:9 ones (3840x1080, 5120x1440, 7680x2160;
|
||||
# hud_width below keeps the HUD in the middle), 16:10 and 3:2 screens, 4:3 (1440x1080, 2048x1536 on an iPad) and phone
|
||||
# screens streamed to (2340x1080 or 3120x1440 at 19.5:9, 2400x1080 at 20:9). The installer makes the UI layout for the
|
||||
# shapes of the connected displays and of this setting; at a shape it has none for, the game draws the largest 16:9 size
|
||||
# that fits inside it with bars and makes the layout in the background for the next start (a source build: make it with
|
||||
# tools/make_romfs_patches.py --aspect WxH). With vert_plus = 1 a shape narrower than 16:9 keeps the width of the 16:9
|
||||
# view and shows more above and below. Portrait shapes and shapes outside 4:3..32:9 draw 16:9 with bars. Read at start.
|
||||
# Default: 1920x1080, or on a primary display of 21:9, 32:9, 16:10, 3:2 or 4:3 the smallest size of that shape at least
|
||||
# 1080 high that fits the display (1920x1280 on a 3:2 laptop, 2560x1080 on a 21:9 monitor), so the picture fills the
|
||||
# screen without black bars, with prompts = xbox or pc too (on an install by an older setup, which built the Xbox
|
||||
# prompts for 16:9 only, prompts = xbox keeps 1920x1080).
|
||||
# output_res = 1920x1080
|
||||
# HUD width on a game resolution wider than 16:9: full, the default, puts the HUD at the screen's left and right edges;
|
||||
# 21:9 keeps it within the middle 21:9 of the screen and 16:9 within the middle 16:9 (the game's own HUD), so the
|
||||
@@ -263,6 +266,11 @@
|
||||
# Field of view, in percent of the game's own: 70 to 140, 100 (the default) leaves the camera as it is. Higher shows
|
||||
# more of the world around Link. Game versions 1.1.0, 1.2.1 and 1.4.3. Changes while the game runs take effect at once.
|
||||
# fov = 100
|
||||
# Vert+ at a game resolution narrower than 16:9 (16:10, 3:2, 4:3): 1 widens the camera's vertical view so the picture
|
||||
# shows as much of the world at the sides as 16:9 does, and more above and below. 0, the default: the game's own
|
||||
# vertical view at every shape, so a narrower shape shows less at the sides. No effect at 16:9 or wider. Multiplies
|
||||
# with fov. Changes while the game runs take effect at once.
|
||||
# vert_plus = 0
|
||||
# Anisotropic filtering of surface textures: game (the level the game asks for, as on the Switch) or 2, 4, 8, 16. Keeps
|
||||
# ground, roads and walls seen at a shallow angle sharp into the distance. Only filtered, mipmapped textures that tile
|
||||
# are raised; shadow maps, data maps and screen-sized buffers keep the game's setting. Read at start.
|
||||
@@ -351,10 +359,12 @@
|
||||
# for a frame. 0, the default: DLSS estimates the exposure itself, as before. Every DLSS mode. Changes while the game
|
||||
# runs take effect at once.
|
||||
# dlss_fixed_exposure = 0
|
||||
# With DLAA (dlaa = 1, dlss = dlaa), fog, dust and other particles are drawn over the picture DLSS has already smoothed,
|
||||
# as the game draws them without DLSS, so small particles in fog (shrines) no longer vanish or leave trails. 0: DLSS
|
||||
# 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.
|
||||
# With DLAA (dlaa = 1, dlss = dlaa), dust and other particles are drawn over the picture DLSS has already smoothed, as
|
||||
# the game draws them without DLSS, so small particles in fog (shrines) no longer vanish or leave trails. The fog layer
|
||||
# and the clouds still go through DLSS: drawn over its picture they left a flickering bright outline on distant ridges
|
||||
# at night and at dawn. 0: DLSS processes all 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
|
||||
# Low latency: off, auto, on or boost. Reduces system input latency. on and boost enable NVIDIA Reflex
|
||||
# (VK_NV_low_latency2); boost also keeps NVIDIA GPU clocks high in CPU-bound scenes. auto enables Reflex, or AMD
|
||||
@@ -454,6 +464,10 @@
|
||||
# labels, xbox for the others). The bind_ lines below apply on top. Changes while the game runs take effect at once.
|
||||
# 0.1.9's xbox_prompts is read as nintendo with prompts = xbox.
|
||||
# pad_layout = auto
|
||||
# The gamepad while the game window has no focus (Linux; on Windows it always plays): 1 keeps it playing behind other
|
||||
# windows, 0 pauses it, auto pauses it only when Steam started the game, so the Steam overlay and Steam's menus
|
||||
# (the Quick Access menu in SteamOS's Game Mode) get the gamepad while they are open. Read at start.
|
||||
# pad_background = auto
|
||||
# The buttons the game's prompts show: nintendo (the game's own), xbox (LB RB LT RT, Menu, View and a d-pad cross,
|
||||
# and A B X Y as labelled on the button pad_layout presses: with nintendo, A shows as B and X as Y), playstation
|
||||
# (○ × △ □, L1 R1 L2 R2, Options and Share, on the button pad_layout presses: with nintendo, A shows as ○), or pc
|
||||
|
||||
Reference in new issue
Block a user