Builder: stand in for the damaged textures of a 23.3 GB dump (Water Temple walls, #1002) #1308
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1308
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/damaged-dump-stand-ins"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The incomplete 23.3 GB
.nup(the complete one is about 23.8 GB) has three romfs.zsfiles whose first bytes are zeros. They are not zstd, and the game leaves out every model that uses one:Tex/Rock_WaterTemple_Gate_M_01_Nrm.bntx.zsTex/CmnTex_Map_Soil_FairyFountain_Floor_D_Nrm.bntx.zsTex/RBake_Scene_GanonStage_G_2_1_d0_t0.bntx.zsThe zeros are inside the stored data of the package's only title, so nothing in the
.nupholds a whole copy.After
make_game.pyunpacks a.nup(or reuses an earlier unpack, so folders that are already built get the fix on their next build), it:.zsfiles that do not start with the zstd magic (nup.damaged_game_files);_Nrm.bntx.zsfor a normal map), then the longest common name start, then the nearest size. Other damaged files are never chosen. For the three files above, the picks areRock_WaterTemple_Gate_P_01_Nrm,CmnTex_Map_Sand_FairyFountain_Sand_A_NrmandRBake_Scene_GanonStage_G_2_2_d0_t0;It writes only to the romfs that the builder unpacked. A
--romfsfolder belongs to the player and is not touched. This is the same idea as Lichii's zortos293/Lichii#740, done once at build time.Tested
nx2/test_nup_stand_in.py(new, synthetic, no game data) andpython -I -B tests/run_all.py nup: all pass.🤖 Generated with Claude Code
Looks good. The replacement goes through
.partplusos.replace,--romfsis untouched, and the new test is discovered by run_all.Nits:
--nupbuild, including the read-before path (about 34 s cold by your numbers);--updatewithout--nupdoesn't apply the fix, as the description says;CI is green.
Thanks for the review. All three nits are addressed in
45f4900:.hookshot_romfs_checkedstores the.hookshot_romfsstamp the check ran under, so a rebuild over the same.nupskips it. A fresh unpack deletes the note first, and the note goes throughcheck_cache_pathslike the other generated paths.--update: it applies there too, but only to a romfs the builder unpacked itself (the.hookshot_romfsstamp must exist).nup.zstd_startaccepts0x184D2A50to0x184D2A5F, and the test has a case for it.test_make_game_cache.test_same_source_reuses_the_cachenow allows exactly that one added note, with the same stamp. The fulltests/run_all.pyrun passes locally on Linux: 167 passed, 17 skipped for missing tools.Thanks for the quick follow-up, all three nits check out in
45f4900.The new tests cover the skippable frame, the range edges, and the stamp/once/re-check cases, and the cache test accounts for the extra note file. Looks good to me.