dm2-graphics: decode the console-only cls = (1, 0, 7, 0x0a) 1652-byte entry #266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
A single 1652-byte record at
cls = (1, 0, 7, 0x0a)appears only on Sega-CD US/JP and Mac-JP; absent from every other port. Its format is unknown and it is the only remaining undecoded entry type ingraphics.dat(ROADMAP.md:300–301). It currently falls throughiter_unknown.Scope
docs/formats/graphics-dat.md.Acceptance
Unknown, or an explicit note that it stays raw with a byte-pinned fixture.Identified.
cls = (1, 0, 7, 0x0A)is the global creature animation frame table —tblCreatureFrameInfo14(né_4976_5a98) in skproject's V4 engine.Evidence
The legacy SKWIN port declares the table with the cls tuple in a comment and loads it from this exact GDAT entry at startup:
SKWIN/SkWinCore.h:685—U8 (*_4976_5a98)[14]; // 01-00-07-0A-00-00SKWIN/SkWinCore.cpp:54795-54796— allocatesQUERY_GDAT_ENTRY_DATA_LENGTH(GDAT_CATEGORY_INTERFACE_GENERAL, 0, dt07, 0xa)bytes, thenLOAD_GDAT_ENTRY_DATA_TO(…, 0xa, _4976_5a98)Consumers:
SKWINSPX/src/v4/skbltgfx.cpp:798-883(QUERY_CREATURE_PICST) andv4/skcrture.cpp:2040, indexed by animation frame ID fromCREATURE_SEQUENCE_4937_000f(a static object resolves to frame 4). The inline comment atskbltgfx.cpp:798spells out the record shape: "table has 2+4+4+4 bytes: 4 * images ID in GDAT, 4 * scales, then 4 * mirror flags".Layout
1652 bytes = 118 records × 14 bytes. Direction indices 0 = back, 1 = left, 2 = front, 3 = right (per the
CreatureAnimationFrameInfoFD_V5comment inv0/dme.h; matches theiFaceDirImg = 2"front" convention).0x0C= centered (skbltgfx.cpp:861)skbltgfx.cpp:883)cls4under(0x0F, creatureType, dtImage, ·))[n, n+3, n+2, n+3]— sides share one image0x40= 100 % (CALC_STRETCHED_SIZE)skbltgfx.cpp:825)Centered records never scale; off-center records shrink one side view and enlarge the other (between-cell advance frames).
Correction: not console-only
Extracting all 16 fixture archives shows the record is a V4-lineage (Japanese engine family) marker, not console-only. Present and byte-identical (md5
0e3991914999b2efd0b6f6586f7e3337) on pc9801-jp (retail + demo), pc9821-jp, fm-towns-jp, ibm-psv-jp, mac-jp, sega-cd-us, and sega-cd-jp; absent from all eight Western archives (dos-en/de/fr, dos-demo, dos-en-beta, amiga-eu, mac-us, mac-demo). The V5 engine never queries the slot — it keeps the same information in per-creature(0x0F, creature, dtRaw7, 0xFC/0xFD/0xFE)records (present on dos-en, absent on the JP-lineage ports), which explains the split exactly. The original "Sega-CD US/JP and Mac-JP only" claim came from the five-port slot survey, which didn't cover the four Japanese PC ports.Resolution
Branch
feat/creature-frame-info:dm2_graphics::CreatureFrameTable/CreatureFrametyped decoder, exposed asArchive::creature_frame_table()tests/creature_frame_fixture.rspins the 8-port byte identity, the 8-port absence, and the per-field invariants abovegraphics-dat.mdgains § "Slot 0x0a — creature animation frame table" (replacing the out-of-scope note); ROADMAP entry checked offThe entry still flows through
iter_unknown(cls3-keyed, like the font slots); the typed accessor is the dedicated path.