Commit Graph
246 Commits
Author SHA1 Message Date
Valiantsin DzerakhandClaude Opus 5.5 0dbfffe7df Merge the log file: a game run started without a redirected stderr writes logs\totk.log next to totk.exe, keeps the four runs before it and stops a file at 64 MiB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:47:27 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c7b290f2b0 Write the log of a game run to logs\totk.log next to totk.exe when stderr is not a file
A player who starts totk.exe from Explorer or a shortcut had no log to attach to a report: the log went only to stderr.
A game run whose stderr is not a file (a console or a pipe) now also writes logs\totk.log, keeps the four earlier
runs as totk.1.log to totk.4.log, and stops the file at 64 MiB. Runs whose stderr is a file (run_game.py, 2> file) and
the tool modes write no extra file. Lines from before the file opens (mem_init comes first so the CRT heap stays out of
the guest address space) wait in a static buffer.

Crash reports, fatal errors, IPC and SVC diagnostics, guest debug output and the boot: lines now go through
rt_logf / rt_log_raw, so they reach the file too. Open log folder in the menu opens the folder of the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:41:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f4619f7b45 Add a VERSION file with the port's semver, shown beside the installer title and on the game menu's title line with the game update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 11:40:01 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4e764cd39a Take world-clock windows in TOTK_PROFILE_FRAMES and TOTK_CRIT: w<lo>-<hi> is seconds of game time since the save loaded, so a profile or critical-path session covers the same play at any frame rate instead of a present range that lands elsewhere on a slow machine
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:56:50 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b35f66207f Merge branch 'main' into task/wwatch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:35:10 +03:00
Valiantsin DzerakhandClaude Opus 5.5 505374ba92 Refit the installer window after every text change: the hint about an earlier installation, the form errors, new step rows and warnings appeared after fit had sized the window, and pack took the missing height from the button bar, so Start shrank to a sliver without its label. The button bars are now packed first on every screen, so text is what gets cut if a refit is ever missed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:07:54 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1274fb65d8 Read totk.ini in mem_init before the pool size: the size asks resolution.c, which decides output_res and render_scale once on that first call, and main read the file only after mem_init, so both settings from totk.ini and the menu were ignored and only TOTK_* environment variables reached them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:45:48 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1f7d80306e Freeze idle regions that also hold memory outside NVN pools, and freeze after 60 idle submissions instead of 300
Write-watch queries skip frozen 2 MiB regions, but a region was frozen only when it lay wholly in imported pools and
wholly committed. NVN pools are small and not 2 MiB aligned, so most regions also hold other guest memory or reserved
holes: in town 340 of the 436 MiB queried every frame lay in regions nothing had written for 300 submissions. On the
GTX 1050 Ti laptop the queries took up to 2.2 ms a frame, 1.4 ms of it in queries that found no write.

mem_freeze now makes the committed pages of a region read-only when all of them are read-write and leaves reserved
holes alone; thaw_locked already restored such regions run by run. The pool rule is gone: the only kernel writes into
guest memory are file reads, which thaw their buffer first, and every user-mode write faults and thaws as before.
TOTK_FREEZE_IDLE defaults to 60 (in a fight 100 of 257 queried MiB lay in regions idle for 30-299 submissions; a thaw
by a write costs about 60 us on the RX 9070 machine), and import mode freezes too, for the texture checks of APUs.

RX 9070, per frame after load: town 436 -> 96 MiB queried, 0.68 -> 0.38 ms; fight 168 MiB, 0.45 ms (257 MiB, 0.57 ms
with the new rule at 300 submissions), about 20 thaws a second. TOTK_MEMORY=verify in the fight: 3.65 million pages compared, 0 mismatches. The gfx-abi probe
covers a region with reserved holes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:22:30 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3af201b43b Bind uniform blocks from a copy taken when the submission starts recording
TotK rewrites per-object uniform blocks on other threads soon after it submits the frame that reads them, and the
replay records for milliseconds after the submit call, so late draws could read another object's matrix (phantom
rocks, a flat far field). The guard in nvn_api_core.c obs_release_read only knows 1.2.1's producer. runtime/vk_usnap.c
copies every uniform range of imported pools that the submission binds into an arena, after MacNativeGames'
TOTK_UBO_SNAPSHOT, and ubo_info binds the copy; ranges a submission still in flight writes are left out, and GPU writes
within the submission drop the copies they touch. TOTK_UBO_SNAPSHOT=0 binds live memory; =ab alternates.

Town on an RX 9070 (in-launch A/B, 70 s): 2235 ranges, 1.9 MiB per submission in 0.49 ms; interval +0.02 ms, replay
+0.19 ms. The sort of the ranges was half of the cost with qsort (0.53 ms for about 10,000 bindings) and is a radix
sort now. fight2 interval within noise. The four probes passed on 1.4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 20:25:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c2943970cc Merge the spin wait gates: they also end the fight hangs
The generator emits a guest poll such as `ldr w9, [x19]; cmp w9, #1; b.eq` as a plain C load, and clang hoists it out
of the loop: the lock wait in f_7001fa0e2c compiled to `cmp; jne; jmp .`, so a thread that found the lock held spun
forever after its holder released it. A fight run hung this way in 3 of 13 launches on an RX 9070, with the UBO
snapshot on and off; gdb showed the thread on that `jmp` in every sample. The gate is an opaque call on every
back-edge of the 868 loops tools/spin_waits.py lists, so each pass reloads memory: the exe goes from 182 self-jumps to
148, and 144 of those are the game's own `b .` instructions. 8 of 8 fight runs then passed; tests/diff/func.py with
--patches passed 5470 cases on 878 functions, and the four probes passed on 1.4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 20:05:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 456f3b7f92 Compile ov_zstd.c per install with patches.c: it includes the player's patches.h for the patch page its host functions sit on, so in the prebuilt runtime library of a release it compiled to nothing and the patched zstd calls would have reached no host function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:08:44 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1f4c6fcdb5 Decode the game's zstd frames with the host's libzstd: the patch set zstd (TOTK_ZSTD_NATIVE, on by default) sends the calls of ZSTD_decompressMultiFrame and ZSTD_decompress_usingDDict in main to runtime/ov_zstd.c, which makes host dictionaries from the guest DDicts, gives the virtual core up for inputs of 64 KiB and more, and leaves in-place decodes and every error to the guest decoder
The lifted decoder ran its copy loops as chains of small functions. On the island and fight routes TOTK_ZSTD_CHECK=1 decoded every call both ways with no difference; the host took 0.72 s where the guest decoder took 1.99 s. Load time and fps on an RX 9070 and a 7900X did not change: the gain is CPU time on the loading threads, for machines with fewer cores. The caller at main+0x547a04 stays on the guest decoder: it resets a static DCtx with which the game's zstd rejects some frames libzstd decodes, and the game relies on that result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:27:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4e9322730d Log the load time with the world clock start: the line now says how many seconds after the guest started the world clock began, so load times compare across runs without the presents count
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 18:27:11 +03:00
Valiantsin DzerakhandClaude Opus 5.5 72253abcc0 Run and measure by game time instead of presents: totk.exe --seconds S ends a run once the world clock passed S seconds (run_game.py --seconds, regress.py routes in world seconds), TOTK_AB blocks are seconds of world clock, the perf line carries the world clock, and TOTK_SHOTS=w<lo>-<hi>:<step> takes shots by it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:51:36 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3fb4b8d4b9 Make the replay's Vulkan calls on a recorder thread: each vkCmd* into the replay command buffer becomes a packet in a ring that the recorder makes in order, every other command buffer is called at once, and the submit waits for the ring to empty. Town on an RX 9070: replay 9.98 -> 8.29 ms a frame (in-launch A/B), no new validation messages, same picture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:41:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 48dfe0cfdf Measure a change within one launch: TOTK_AB=<presents> alternates A and B blocks (A B B A), a switch set to ab is on in the B blocks, and tools/ab_summary.py compares the perf windows of each side; TOTK_ONE_PER_CORE=1 keeps one logical processor per physical core (off: no gain on a 7900X)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:41:46 +03:00
Valiantsin DzerakhandClaude Opus 5.5 ab88c10e4c Drop the fixed 720x640 installer window size: it now fits its largest screen and grows for the log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:23:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 67f6c973ff Merge the freeze fixes: full-screen draws skip while their pipeline builds, staging buffers come from a pool of their own, released textures go oldest first instead of thousands in one frame, and input scripts count game time before the world clock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:17:13 +03:00
Valiantsin DzerakhandClaude Opus 5.5 166e5a7b7d Drop released textures oldest first, one per release past 2048, instead of all of them once the count passed 4096: that sweep destroyed thousands of images in one frame, 333-422 ms frames every 40-50 s on a GTX 1050 Ti, and the textures still in use came back as new images and uploads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:14:11 +03:00
Valiantsin DzerakhandClaude Opus 5.5 01dfe5d5a6 Take staging buffers from a VMA pool of their own that keeps two 64 MiB blocks from boot: in the default pool a block made by the headroom thread or by a burst of uploads held the render thread's staging allocations under the memory type's lock, 47-50 ms for one in the first frame after a save load (that frame 138 -> 70 ms)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:06:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 41f201ad39 Skip full-screen draws while their pipeline builds by default (TOTK_PIPE_SKIP=fullscreen): in a fight a full-screen pass whose stage libraries were cold in the driver cache held three frames in a row at 64-72 ms, each spending the 50 ms wait budget, and some draws were skipped after all
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:02:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 9dc738c045 Count untimed script lines in 60 Hz ticks of game time instead of presents, so the title menus get scripted presses at the same game time at any frame limit; in a recording the untimed lines stop when the world clock starts, and the recorder cuts a button or stick held at that moment and continues it as a timed event
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:49:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5da6c5bb89 Merge the frame critical path recorder: TOTK_CRIT=<first>-<last frame> with TOTK_TRACE=sched writes the guest threads' state changes and wakes, read by tools/crit_path.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:13:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 608bfed6f0 Merge the FP fast path: MXCSR follows FPCR where FPCR changes (rt_fpcr_sync at MSR FPCR, rt_call, fiber resume) instead of a mirror check in every FP op; hot guest code 25% smaller
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:13:40 +03:00
Valiantsin DzerakhandClaude Opus 5.5 2fe6a6d4c1 Keep MXCSR in line with FPCR where FPCR changes instead of checking it in every FP op
The FP helpers compared c->fpcr with a cached copy before every operation to resync MXCSR lazily. MXCSR now
follows FPCR.FZ at once: MSR FPCR calls rt_fpcr_sync, and so do rt_call (thread, fiber and host entry into guest
code), fiber resume (FIBER_FLAG_FLOAT_SWITCH fibers keep their own MXCSR) and the differential test harness per
case. op and vop only test FPCR.RMode for the slow path, and their redo check is one ordered-not-equal compare of
|r| with the smallest normal, the same NaN-or-smallest-normal set as before.

Hot guest code shrinks by about a quarter (132 functions holding half the guest cycles, 1.4.3); fight frame time
moves 1-3%, inside the run-to-run spread. lift, simd, func, atomic and flags_check pass on 1.4.3; simd.py fails
without the harness sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:25:25 +03:00
Valiantsin DzerakhandClaude Opus 5.5 ba52fe6e89 Record the critical path of the frame with TOTK_CRIT
With TOTK_TRACE=sched, TOTK_CRIT=<lo>-<hi> records every state change and wake of the guest threads and every
present over those frames (runtime/kernel.c crit_add from acct() and wake(), crit_frame at the present) and writes
them to TOTK_CRIT_OUT at the last frame. tools/crit_path.py walks back from each present through the waits to the
thread whose signal ended them and splits the frame interval by thread and state; the sums equal the interval.

A 1.4.3 fight: with the replay on the submitting thread the path is 7.3 ms of replay on the render thread and 4.3 ms
of guest code; with TOTK_REPLAY_ASYNC=1 it is 10.1 ms of guest code through the fork-join of the main thread and five
workers, at the same frame interval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:26:07 +03:00
Valiantsin DzerakhandClaude Opus 5.5 adc1cbce69 Merge the generated-code register work: NZCV and the six most used general registers of each function live in C locals, synced with the Cpu only at calls, SVCs and exits; tests/diff/func.py checks the registers at every call
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:24:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0ca11dfba2 Keep the six most used general registers of each generated function in C locals
Every lifted instruction read and wrote c->x[n] and c->sp, so each register passed from one guest instruction to the
next went through a store and a load, and clang could not keep it in a host register across a guest store.
recomp/regs.py now copies the six most used X registers and SP of a function into locals at its entry. A forward pass
over the function's flow tracks which locals changed since the last sync, and only those are stored back before a
call, an SVC, a trap, a return or a tail exit. After an SVC every local reloads; after a call only X0-X18 and X30,
since AAPCS64 has the callee preserve X19-X29 and SP. TotK does not break that: main and subsdk0 import neither
longjmp nor the unwinder, sdk's have no direct callers, and the runtime writes no register above X3 except X30.
gen.py --no-callee-saved-trust reloads them too, --reg-locals sets the count. Functions with an unresolved computed br
keep their registers in the Cpu, as they keep NZCV.

All registers in locals was slower than none: clang spills them to the stack and the syncs stay. Over 300 hot
functions, 4-6 locals gave the fewest instructions and memory operands.

1.4.3 .text 299 -> 266 MiB. Fight bench (bench-fight2-2026-10-27b, frames 5400-7500, uncapped): 11.30 and 11.92 ms vs
13.5-13.9 on main; frames 2400-5300 11.24 and 11.36 vs 13.25. Without the callee-saved trust 12.58 ms.
tests/diff/func.py: 0 failing on 1.4.3 (889 functions, 583 with calls) and 1.2.1 (810); a plan with no spills fails
at once. Probes kernel, vkexec, nvn-tex and shader pass in both versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:21:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 fae0faf6dc List tests/flags_check.py among the lifter checks in docs/building.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:08:11 +03:00
Valiantsin DzerakhandClaude Opus 5.5 27056b212a Keep NZCV in a local of each generated function instead of c->nzcv
Every flag-setting instruction packed N, Z, C and V into c->nzcv and every reader unpacked them. recomp/flags.py
now runs a reaching-definitions pass per function: a compare stores its operands in a local Flags F, and a reader
whose definitions are all of one kind computes its condition from them, so cmp and b.cond become one host compare.
CCMP, FCMP, MSR NZCV and ADCS write the packed form, which readers reached by several kinds also use. Calls and
returns publish nothing (AAPCS64 neither passes nor preserves NZCV); tail branches, falls into the next function and
br through rt_dispatch publish c->nzcv, since discovery can start a function inside another one. Functions with an
unresolved computed br keep flags in c->nzcv.

1.4.3 main: 492k direct and 89k packed flag reads, .text 342 -> 299 MiB. Fight bench (bench-fight2-2026-10-27b,
frames 5400-7500, uncapped) 13.15 and 13.63 ms vs 13.9 before. tests/flags_check.py checks the new helpers against
the packed ones; tests/diff/func.py no longer compares NZCV, which generated code leaves untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:07:58 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e9216b8b49 Test functions with calls in tests/diff/func.py: every BL and BLR goes to one stub on both sides, which folds the registers at the call into a digest kept in the scratch buffer and sets X0-X18, NZCV and V0-V7 from it, so a register missing from the Cpu at a call or held across one fails the case
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:12:34 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6c14dd5937 Merge the host cost fixes: the performance counter is scaled without a 128-bit divide, NVN calls are counted per thread, and nn::fs host functions and NVN memory pool setup give the virtual core up; core diagnostics report waits on owners in host calls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:46:38 +03:00
Valiantsin DzerakhandClaude Opus 5.5 101f2c8b5e Give the virtual core up in nn::fs host functions and in NVN memory pool setup, as the Switch blocks those threads in IPC: the game's loader threads held a core through CloseFile, CreateCacheStorage and nvnMemoryPoolInitialize (up to 20 ms) while job workers waited. Core diagnostics now also report waits on an owner in a host call, with its module, offset, latest SVC and guest lr, and the AllocateMemoryPages and AllocateAddressRegion lines need TOTK_TRACE=host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:42:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5b783728e5 Count NVN calls per thread and add them to the shared counter 1024 at a time: the main thread and the job workers record command buffers, and a locked add per call kept the counter's cache line moving between their cores
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:29:32 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8e15d70fd4 Scale the performance counter by a fixed-point multiplier set before main: plat_now_ns and rt_ticks divided a 128-bit product by the counter frequency on every call, and __udivti3 took 5% of the game's running samples
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:22:11 +03:00
Valiantsin DzerakhandClaude Opus 5.5 acd550e822 Merge the VRAM headroom: a background thread allocates the next VMA block of each memory type before the render thread needs it (vk_headroom.c, TOTK_VRAM_HEADROOM)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:09:38 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0775796244 Merge the replay speedups: render target views live as long as their image, command buffer parts span at least a millisecond of recording (TOTK_SPLIT_US) and the shader memo skips its handle compare while nothing was bound; the fight replay on the desktop falls from 8.12 to 7.61 ms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:09:38 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d1149e5060 Allocate the next VMA block of each memory type on a background thread: a new block made by another thread wakes vk_headroom.c, which allocates half a block every 500 ms and keeps it as the anchor of a block it had to create, so the render thread finds room instead of calling vkAllocateMemory for 8-19 ms; no headroom above 85% of the VRAM budget (TOTK_VRAM_HEADROOM)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:05:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 bac4d6cf91 The shader memo skips its 1 KiB handle compare while no texture or image was bound
memo_match compared the vertex and fragment stages' 64 texture and 64 image handles on every draw. Every OP_BIND_TEX and now every OP_BIND_IMG bumps tex_serial; a key whose serial is current has the same handles, and a key that matched by the compare takes the current serial. memo_match went from 0.95% to 0.27% of the fight replay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:54:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c238c341c7 Replay command buffer parts span at least a millisecond of recording
A fight frame of about 2,000 draws made 15 parts on the 7900X at 64 draws a part, each split costing the render thread a submit, a new command buffer and a mirror prologue (vk_sync_split, 7.6% of the replay). maybe_split now also waits until TOTK_SPLIT_US (1000, 0 off) has passed since the part began, so a frame makes 7-9 parts there. A millisecond of recording is well under a millisecond of GPU work, so the GPU still starts early in the frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:53:59 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c9c06f2501 Render target views of registered textures live as long as their image
vk_exec_pass_begin created every attachment view again in each submission and freed them at its fence: 2% of the fight replay on the 7900X, more on drivers with a slower vkCreateImageView. view_of now takes the view from vk_exec_target_view, which keeps it in the sampled-view tables under the texture lock, and vk_exec_image_gone releases it with the image. Images that are not registered textures keep the per-submission views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:53:59 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3984344635 Spin wait gates: tools/spin_waits.py (the nxnative search) lists the loops that only another thread can end, the patch tables carry them as spin lines (857 in 1.4.3, 864 in 1.2.1), the generator sends their back-edges through rt_spin_gate, and the gate pauses the core once per pass and hands the virtual core to a waiter after 50 us of polling (TOTK_SPIN, TOTK_SPIN_HANDOFF_US)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:51:47 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8e0d6b3119 Merge the overlay order: the settings menu draws over the performance overlay while it is open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:26:00 +03:00
Valiantsin DzerakhandClaude Opus 5.5 403606bbcb The settings menu draws over the performance overlay while it is open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:24:14 +03:00
Valiantsin DzerakhandClaude Opus 5.5 34b5716686 Merge the menu and overlay work: the left stick moves the menu cursor, the D-pad leaves the bottom buttons and the tabs for the page's rows, and the full performance overlay reads AMD sensors through ADL and shows the window, game image and 3D scene sizes, the scaling, frame limit and presentation mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:22:31 +03:00
Valiantsin DzerakhandClaude Opus 5.5 89cc960f09 Menu navigation with the left stick and back from the bottom buttons; AMD sensors and the picture lines in the performance overlay
The left stick now moves the menu cursor as the D-pad does (ImGui only scrolled with it). The page's rows are a
direct NavFlattened child of the menu window: behind a second child level ImGui did not clip them, so up from
Continue went to the tabs and down from the tabs to Continue.

The full overlay reads temperature, board power, clock and GPU load from ADL's PM log on AMD GPUs (matched by PCI
bus), and shows the window, game image and 3D scene sizes, the scaling to the window (FSR and its sharpness), the
frame limit and the presentation mode in use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:21:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f8219ed793 Merge the game resolution work: the output and scene patch sets render 1.2.1 and 1.4.3 above 1080p with a grown texture heap (TOTK_OUTPUT_RES, TOTK_RENDER_SCALE, supersampling above 100 %), and AMD FSR 1 scales the game's output to a larger window (TOTK_UPSCALER, TOTK_SHARPNESS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:02:55 +03:00
Valiantsin DzerakhandClaude Opus 5.5 eca89641fa Keep 1.2.1's scene at the wanted size, package zstd for the installer
1.2.1 renders the scene size it reads, while 1.4.3 scales it by output width / 1920: on 1.2.1 the scene set is on
whenever the output grows (2560x1440 gave a 1600x900 scene before, 2133x1199 now). An output at or below the shipped
size needs no grown HeapDef. The release deps carry the static libzstd and its header, totk.ini.example the four new
keys, THIRD_PARTY_NOTICES.md the MacNativeGames sites, FSR 1 and zstd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:56:28 +03:00
Valiantsin DzerakhandClaude Opus 5.5 7abdbc90ac Render the game above 1080p and scale it to the window with FSR 1
The output and scene patch sets make the game read its output, swapchain and scene sizes from the patch page
(MacNativeGames' sites for 1.2.1 and 1.4.3); resolution.c picks them from TOTK_OUTPUT_RES and TOTK_RENDER_SCALE and
grows the HeapDef texture heap, its parent and the application pool to match. vk_fsr.c runs AMD FSR 1 EASU and RCAS
on the present when the window is larger than the game's output (TOTK_UPSCALER, TOTK_SHARPNESS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:40:34 +03:00
Valiantsin DzerakhandClaude Opus 5.5 098f8a52da Merge the hactool build: tools/build_hactool.py and the two patches in tools/hactool/ make the extraction tool reproducible from the repository
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:18:32 +03:00