15 Commits
Author SHA1 Message Date
leonelalej 2bcfc2ef39 fix(runtime): clean amiibo platform portability, default path, and dump validation 2026-10-31 14:11:46 +00:00
Valiantsin DzerakhandClaude Opus 5.5 43a18a9bb1 Merge pull request #60: Linux port (AppImage) and Steam Deck support (wdiasjunior)
The branch forked 79 commits before main and 98 before dev. Resolutions:

1. Aspect ratio: dev's implementation stays (camera patch at page +56 on 1.4.3, tools/ultrawide_layout.py layouts per
   size in romfs-patches-<w>x<h>, the aspect = fit|stretch setting). The PR's second implementation is dropped: the
   aspect sets of patches-v121.txt and patches-v143.txt (the 1.4.3 one patched the same viewport sites as dev's),
   tools/aspect_layouts.py, the resolution.c shapes that limited game resolutions to 16:9, 16:10 and 21:9, and the
   picture_fit setting. Its letterbox code (gfx_fit_rect) is kept and reads TOTK_ASPECT.
2. Code dev changed where the PR moved it: the stick dead zone, the test gamepad and the paddles go to input.c; the
   DPI awareness, keep-awake and IME detach of gfx_window.c go to gfx_window_win.c; device fault reports and GPU
   breadcrumbs to gfx_present.c. gfx_window_dpi gets an SDL version.
3. dev's Win32 calls in shared code go through platform.h: the shader cache pack reader (PlatFile), the romfs
   overlay checks, the audio pacing waits, the motion, ASTC and device fault locks. plat_cpu_usable and
   plat_commit_info get Linux versions; plat_cpu_count counts the machine's processors on both. dpi_probe.c becomes
   dpi_probe_win.c.
4. assume_focus defaults to 1 as the PR has it (a load interrupted by a focus loss can stop for good) and stays live,
   with dev's Game tab row.
5. The frame limits 40 and 45 join dev's list. The BC 3D storage fallback for Vega only runs with
   TOTK_BLOCK_VIEWS_3D=1, since dev makes 3D BC images without block views by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:26:42 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0aa529b4ce Offer the dynamic alpha to coverage switch in the menu and fix stale comments
TOTK_VK_DYN_A2C from pull request #188 gets the settings row, the Advanced tab choice and the totk.ini.example
line that TOTK_VK_DYN_VERTEX has. The IME comment in gfx_window.c window_main named a walk key the runtime does not
have, and ov_system.c still said TOTK_ASSUME_FOCUS opens the window without focus, which TOTK_BACKGROUND_WINDOW does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:54:05 +03:00
shenjack e4eef8ae0c Offer the keep-running-out-of-focus switch in the Game tab
The game pauses whenever its window loses focus, as it does on the Switch when Home is pressed, and ASSUME_FOCUS was the
only way to change that: a known key with no row in the settings table. The runtime reads it at each focus change rather
than once at start, so the row takes effect the next time the window is left, and the build guide says what an unfocused
window now does.
2026-10-31 16:50:32 +08:00
Wellington Dias 6b4b228fdd Name no operating system in the oe log lines, so Linux logs stop saying Windows.
The application environment and performance request lines and the services probe's locale line said Windows on every
host; a Steam Deck tester's log printed them on SteamOS.
2026-10-30 16:32:49 -03:00
Wellington Dias 021413740d Keep the game in focus by default, so switching windows during a load no longer stops it for good.
The game sets focus handling mode 2: on a Switch the system then suspends the whole process while it is out of focus.
Here only its main thread stopped, in PopNotificationMessage, while the loader threads, audio and clocks ran on, and a
tester on Hyprland with 1.4.3 saw a load never finish after the window lost and regained the focus; TOTK_ASSUME_FOCUS=1
avoided it. That is now the default (assume_focus in totk.ini, as MacNativeGames always reports in focus); 0 restores
the pause. Each focus change is logged, so a report shows whether the window saw it.
2026-10-30 14:56:13 -03:00
Valiantsin DzerakhandClaude Opus 5.5 67116a387f Map the zh-CN and zh-TW game languages to zh-Hans and zh-Hant
Choosing Simplified Chinese in the installer wrote lang = zh-CN to totk.ini and the game showed Japanese: ov_language() handed the code to nn::oe::GetDesiredLanguage unchanged, and TotK only accepts zh-Hans and zh-Hant for Chinese. Reported in #72 and #68.

ov_language() now maps both old spellings, so existing totk.ini files keep working and cfg.c still accepts them. The F1 menu offers one row per language under the canonical codes. The installer lists only zh-Hans and zh-Hant, writes them, and reads zh-CN or zh-TW from the CLI or from a recorded totk-install.json as the canonical code, so a repair or update of an old install does not fail with check.lang_unknown and rewrites the ini. --probe-services prints the configured language and checks the four Chinese codes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:27:19 +03:00
Wellington Dias 1d51343ac1 Build and run the runtime natively on Linux.
Shared runtime code now goes through runtime/platform/platform.h, implemented by platform/win32.c and a new
platform/linux.c: futex locks, a userfaultfd and PAGEMAP_SCAN write watch, signal-based async preemption, our own
fiber switch, and a SIGSEGV handler for the thaw and crash hooks. The window, input, menu and software keyboard get
SDL3 back ends beside the Win32 ones, with the swapchain (gfx_present.c) and input merging (input.c) shared. SHA-256
replaces BCrypt, ELF builds get their own override sections, and the build tools gain Linux branches.

On Linux the selftest and the gfx-abi, astc, nvn and window probes pass. probe-vkmem still fails: imported guest
memory cannot be write-watched on Linux, which the shadow buffers in vk_memory.c will address.
2026-10-29 16:56:56 -03:00
Valiantsin DzerakhandClaude Opus 5.5 ce150130df Make code comments say what they mean instead of pointing at things a reader cannot follow
Comments cited codes from local notes (port-lessons P1, backlog), task labels (T6c1-T6c3, M4), bare upstream commit
hashes and issue numbers, a file that no longer exists (nvn_api.c, now nvn_api_*.c), a generated file (main_0103.c)
and line numbers into upstream files that refs/ has moved past, so they pointed at unrelated code. Those now name the
file, function or project and say what the cited code does. Attribution of copied code keeps its pinned commits.

Corrected facts: TOTK_REPLAY_ASYNC defaults to 0, and the shader cache, pipeline cache and pipeline keys live next to
totk.exe, not in build/v121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:58:01 +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 a7e362fc0a Run 1.4.3 into its opening cutscene: CPU-visible physical pools, no add-on content list, probes on SDK 20.5
1.4.3's GPU heap allocator creates a physical pool with flags 0x18c (CPU_CACHED, GPU_NO_ACCESS, COMPRESSIBLE): it
keeps the game's storage and gets device memory like the 0x189 pools of 1.2.1, which virtual pools alias. The CPU
never writes that storage (its hash was unchanged over 3600 frames of the intro), so nothing is synced.
nn::aoc::ListAddOnContent, which 1.4.3's main calls at start, returns no add-on content instead of running the SDK
on an uninitialized aoc client.

probe-ipc runs the 1.4.3 SDK's renderer semaphore constructor (sdk+0x221fb0) instead of the 1.2.1 sf heaps, and
expects SDK 20.5 to keep its audren:u manager session open. probe-services checks ListAddOnContent.
package_build.py takes --version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:09:47 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b0805112ed Merge main into task/menu: the docs and comment cleanup, with the Dear ImGui set-up of menu.cpp kept in the LAS Recomp notices row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:16:23 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8b514f6ead Keep every default in the settings table: cfg_value, cfg_int, cfg_double and cfg_bool read it, and the consumers of table keys drop their own defaults
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:32:30 +03:00
Valiantsin DzerakhandClaude Opus 5.5 111f748c51 Remove citations of local build/ notes from code comments and correct the TOTK_REPLAY_ASYNC default in vk_backend.c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:23:21 +03:00
Valiantsin DzerakhandClaude Opus 5.5 19c9b648d1 Add the recompiler, Windows runtime, tools and docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:27:54 +03:00