Repository navigation
decomp-assets 0.3.0: N64 textures found from the display lists that load them - #2
Merged
Merged
Conversation
…oad them Cartridges that store their display lists and textures uncompressed, with no container format, had no textures found: a kart racer and a futuristic racer showed none. Each texture load in a display list names the image's format, size and palette, but by its RAM or segment address. The file's displacement is worked out from the file itself: its vertex loads must land on vertices, and of those displacements the one under which most of its list starts are named by a pointer wins, only when unique (and a RAM file must fit in 8 MB). Palettes are tracked per TMEM entry and taken when the tile is drawn, so a palette loaded after the tile size is the one used. On the two cartridges (read locally, nothing committed): 453 and 395 textures, every one of 48 random samples each a real image with the right palette. 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
New recogniser
n64/display_lists.py, part ofn64.regions: textures named by uncompressed display lists (Fast3D, F3DEX, F3DEX2 vertex loads; the RDP texture commands are common to all).0x80…) or a segment. Display lists close together form a file; its displacement must put every vertex load on vertices (flag halfword zero, not all zero), keep a RAM file inside 8 MB, and among those the displacement under which most list starts are referenced by a pointer wins, only when unique. Displacements found for one file are tried first on the next (files loaded to the same buffer share one).confidence='inferred',layout='display-list', withframe_offsets/palette_offsets, sotextures.previewshows them unchanged.Why
Cartridges with no container format (a kart racer, a futuristic racer) had empty texture browsers.
Checked (user's own cartridges, read locally, nothing committed)
48 random textures from each of the first two were rendered: all real images with correct palettes.
Tests (homemade cartridge): RAM and segment files, palette loaded before or after the tile size, no pointer → nothing guessed, RAM bounds, each microcode's vertex load, stop.
pytest: 149 passed; ruff clean.Not covered yet: display lists inside compressed blocks (e.g. RNC-packed models), textures loaded as sub-rectangles of a wider image, and multi-tile/mipmapped tiles.
🤖 Generated with Claude Code