feat(dm2-graphics): apply the per-object cls3=0x0E remap LUTs #273
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/273/head"
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?
Implements #265: wire the entry-492/496 selector chain into palette resolution and apply the resolved
cls4remap LUT to per-object image palettes.Static-RE findings driving the design
Disassembling the Sega CD
SKUL.FTLGDAT resolver (entry 313,0x2abc0) and its record finder (0x2aafa) calibrated the argument ABI against records that exist in every archive, correcting the tuple notation used by the issue and the earlier notes:word at (0x0B, 0x09, ·, object_type) == 1— notGDAT(0x0B, 0, 0x0A, type). It opens exactly for object type 8, the wall trap shooter; the trailing#0x9at the policy sites iscls2 = 9, not a dtype.(0x0B, 0x09, 0x0E, cls4). The only such record in any staged fixture iscls4 = 0x67— payload-----------b----, a functional identity remap. All 12 retail ports carry the full gate+LUT trio, PC family included; the demos ship none of it.behaviourbits 15:12); real dungeons have 30–31 type-8 trap shooters with nonzero ornate indices. The selector's byte table remains runtime generation state (per #269) and is statically approximated by the documented unique-record rule.Changes
Archive::object_lut_gate/object_lut/find_object_lut— the gate → ornate-nibble → LUT chain.Lut0e::remap_palette+RemappedPalette— the application step (entrypof the result = entrylut[p]of the 16-entry sub-palette).Archive::find_image_palette_obj—find_image_palette_ctxwith the per-object remap layered on top, returningBase/Remapped.palette-lut.mdgains the resolver-ABI calibration section plus inline corrections;graphics-dat.md's per-port 0x0E count table now reflects reality (PC retail ships 4 records, not 0); ROADMAP item moved to landed.Acceptance (from the issue)
0x67on the live path and the genuine remap(0x09, 0x43, 0x0E, 0x66)for a non-identity application.Closes #265