Repository navigation
decomp-assets 0.2.0: texture banks with a fourth name block are found and named - #1
Merged
Merged
Conversation
…file name, are found and named
A later version of the indexed-bank engine (a 16 MB Turok-engine shooter) appends
a fourth block to each texture bank: the texture's source file name ("BUSH01.GIF"),
NUL-terminated and padded to eight bytes. The recogniser required exactly three
blocks, so all 990 of that game's banks were rejected and its texture browser was
empty. The fourth block must be printable text, one NUL and zero padding, and it
becomes the bank's label. Raw (uncompressed) four-block banks are found too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
n64/textures.pyaccepts indexed texture banks with a fourth outer block: the texture's source file name (BUSH01.GIF), NUL-terminated and zero-padded to eight bytes. The name becomes the bank'slabel(andname). Raw four-block banks are found too (the raw header pattern and extent read follow the block count).Why
A Turok-engine shooter (16 MB cartridge) stores every texture bank this way. All 5,856 of its RNC blocks decode, but the recogniser required exactly three blocks, so its texture browser showed nothing. With this change it finds 990 banks (930 CI4, 33 RGBA16 mipmap, 27 CI8), each with its file name. The original Turok-format game is unchanged (1,070 banks).
Checks
pytest: 141 passed;ruff check src tests: clean.Version bumped to 0.2.0 for the decompdecomp pin.
🤖 Generated with Claude Code