Skip to content

decomp-assets 0.2.0: texture banks with a fourth name block are found and named - #1

Merged
RetroGameDeveloper merged 1 commit into
mainfrom
feat/turok-engine-fourth-block
Nov 14, 2026
Merged

RetroGameDeveloper merged 1 commit into
mainfrom
feat/turok-engine-fourth-block

Conversation

@RetroGameDeveloper

Copy link
Copy Markdown
Contributor

What

n64/textures.py accepts 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's label (and name). 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

  • Every fourth block of the 990 banks is a printable name, one NUL and padding (checked on the real cartridge, locally, nothing committed).
  • New tests: named banks raw and RNC 1/2 packed, previews; non-name fourth blocks (empty, control bytes, trailing junk, unterminated, too long) are rejected.
  • pytest: 141 passed; ruff check src tests: clean.

Version bumped to 0.2.0 for the decompdecomp pin.

🤖 Generated with Claude Code

…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>
@RetroGameDeveloper
RetroGameDeveloper merged commit 101d333 into main Nov 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant