Repository navigation
Load player RomFS mods, select the official pt-BR text, accept Opus packets without a final range - #32
Merged
Conversation
- runtime/romfs.c: overlays have no fixed limit; each file opens when the game opens it. Player mods load from TOTK_ROMFS_MODS after the build's overlays, verified by SHA-256 at start. - app/launcher.m: point TOTK_ROMFS_MODS at <data>/mods/<version> and pass the app's preferred language as TOTK_LOCALE, so a per-app language applies. - runtime/services.c: Brazilian Portuguese maps to pt-BR in the 1.4.3 build (official USpt text). - README, docs/how-it-works.md: mods folder, manifest format, per-app language.
A fan dub's encoder writes 0 into the final-range field of every Opus packet (all 186,758 packets of the PKG PT-BR dub; they decode without error), while none of the 280,723 packets in 1.4.3's English voice streams carries 0. The runtime aborted with "Opus stream integrity" on the first dubbed line. A header range of 0 now skips only that comparison; a wrong nonzero range still stops the game.
ly05010419
added a commit
that referenced
this pull request
Oct 19, 2026
…'s time, name clashing overlays, and get a manifest tool (after PR #32) - runtime/romfs.c: an overlay file is opened when the game opens it; the device, inode, size and modification time from the start check must still match, otherwise the game stops instead of serving bytes nobody checked. Each overlay folder logs how much it hashed and how long it took. Two overlays replacing one file name both paths. - scripts/make_mod_manifest.py: writes a mod's manifest.tsv from the app's (or a work folder's) RomFS index and image; files equal to the original are left out, unknown paths write nothing. - Tested: 1.4.3 boots to the world with a mod; a mod clashing with the build's game-over patch stops the start and names both files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AZC16EYkS2AmLMgumTJaXJ
ly05010419
added a commit
that referenced
this pull request
Oct 20, 2026
…ultrawide HUD, 1.4.3 survey, mods, controls.txt) into the Breath of the Wild branch Resolved by hand: nvn_mtl.m (PR #34's paged-bitmap serial sets keep the serial forgetting of 635fb31: totk_serial_del clears a bit; the memory line shows both; the BotW frame reset stays in mtl_present), build_app.py (make -j and the per-game launcher defines), the Makefile (the BotW targets and the Opus test), loader.c (the #57 stale-reference handler and 1.4.3's survey return address are TOTK-only: Breath of the Wild has no GAME_ADDR for them), world_survey.c (BotW keeps its stub, with runtime_survey_sync), README (both update-history rows). Found by the merged build: Breath of the Wild lacked runtime_output_size_current (frontend.m's shortcut text) and runtime_survey_sync (hle_nvn.c); and the add-on content file handles shared fs_host.c's 0x200000000 range, so closing a host file at the title ended the game ("close invalid add-on content handle"): they now start at 0x400000000. Tested on the merged binaries: TOTK 1.2.1 jump session (anomalies 0, occlusion normal, serial set 48,606 / 13 pages), Breath of the Wild DLC + key 3 (k3a6) and key 2 (k2c, 11 of 12 pairs within 5 px). Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Players on 1.4.3 could not use Nintendo's official Brazilian Portuguese text, and a RomFS mod with more than 16 files could not load at all.
Change
runtime/romfs.c,app/launcher.m): the runtime loads~/Library/Application Support/MacNativeGames/TOTK/mods/<version>/manifest.tsvafter the build's overlays. The manifest format is the existing one (path, size, SHA-256, original SHA-256), and every listed file is still hashed at start. The fixed 16-entry table is gone. The overlays are sorted by RomFS index and found by binary search, and each overlay file is opened when the game opens it, so a mod with thousands of files does not hold a descriptor per file.TOTK_ROMFS_MODSoverrides the folder, and0disables it.runtime/services.c,app/launcher.m): 1.4.3 shipsMals/USpt.Product.142.sarc.zs, the official pt-BR text. A Brazilian locale now selectspt-BRin the 1.4.3 build; other builds keeppt. The launcher passes the app's first preferred language asTOTK_LOCALE, so a per-app language works:defaults write org.macnativegames.totk AppleLanguages -array pt-BR.TOTK_LANGstill overrides everything.runtime/opus_codec.c): a fan dub's encoder writes 0 into the final-range field of every packet, and the runtime aborted withOpus stream integrityon the first dubbed line. A header range of 0 now skips only that comparison. A wrong nonzero range still stops the game.Tested
1.4.3 (base NSP plus the 1.4.3 update), M4, macOS 27, before this rebase:
probe-fswith a 1,560-file voice modRomFS overlay integrity mismatchAppleLanguagespt-BRRomFS overlay: 1560 files from .../mods/v143opus_codec.cdecode() over 1,560 dubbed voice filesOpus stream integrityPacket scan of the same files: none of the 280,723 packets in 1.4.3's English voice streams has a final range of 0. All 186,758 packets of the dub do, and all of them decode without error.
After the rebase onto
f50f3bf:romfs.c,services.c,opus_codec.candlauncher.mcompile with-Wall -Wextra -Werrorfor v0, v112, v121 and v143, andpython -m unittest discover -s testspasses (68 tests). The rebuilt 1.4.3 app (15,321 startup shaders, 6,484 compiled into the app) passes--check, loads the 1,560-file mod with no failure, finishes the warm-up (34,882 items) and shows the pt-BR title screen.Not tested
pt, as before.