Commit Graph

3 Commits

Author SHA1 Message Date
chrg6
7ee5ce195e Check a .nup table of contents against the file size before reading it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:09:26 -05:00
chrg6
96b33aefd2 Report a malformed .nup table of contents as a damaged file instead of hanging or crashing.
The table's sha256 is checked, but a table whose counts and offsets do not fit it went on: a directory listed as its
own child made tree() go round for good (the build hung at "check"), and a name pool placed before the entries, an
entry index past the lists, a name that is not UTF-8 or damaged zstd data raised struct.error, IndexError,
UnicodeDecodeError or ZstdError, which make_game.py does not catch, so the player got a traceback. All of them are
NupError now, which make_game.py and the launcher report as a damaged dump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:51:48 -05:00
chrg6
a6bc3d837b Add a build kit that builds the game on the player's PC from their own .nup dump or exefs/romfs folders.
tools/make_game.py checks the title and main's build id (1.1.1), stores the ExeFS modules plainly (ZBIC through the
player's own zbic package), packs every RomFS file straight from the container into romfs.bin and index.json after
checking its sha256, lifts with recomp/patches-v111.txt plus the two SDK bring-up fixes, and compiles and links with
MSYS2's clang into <out>/ocarina.exe with the DLLs it loads and the shader translator beside it. Finished steps are
skipped on a rerun. tools/nup.py reads the container; tools/make_kit.py assembles the kit (sources, tools, the
translator, README-BuildKit.md) and refuses it when check_content finds game content.

Measured from an empty folder: 5.4 minutes in all on a 16-thread Ryzen 7 (RomFS 25 s, lift 48 s, compile 237 s), and
the result plays into Kokiri Forest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 09:26:51 -05:00