WP-003: Inspect the 1 MB pre-payload region (palette hunt)

Status: ✅ Done (2026-06-02) Phase: 1 — Format Research Depends on: — Unblocks (recommended, not strict): WP-001 (Ghidra session can drop palette-hunt scope if this finds the palette), WP-002 (decoder gets a head-start on first decode strategy) Companion EC: — (single-session investigation; no checklist needed) Pre-flight required: Yes — this WP writes facts into docs/formats/tgifile-art.md. See pre-flight gate → “format documentation under docs/formats/** that locks a fact.” Paired pre-flight at pre-flight-WP-003-2026-06-02 (verdict READY); paired session prompt at session-WP-003-2026-06-02. Targets generation(s): Gen 1 (Showdown). TGIFILE.ART is Gen-1-only; Gen 2/3 use the MMFW family (see mmfw-container). Phantom’s archive format is still unverified per scooby-exe §Pending: Phantom archive format — this WP does not extend to Phantom until WP-006 locks the generation classification. Estimated effort: 1–2 hours Actual effort: ~2 hours (matched estimate). Findings landed in tgifile-art.md §Pre-payload region — engine name table; spec correction landed in tgifile-art.md §Header layout; strings cross-check landed in tgifile-art.md §Gen 1 (Showdown) — Strings cross-check (WP-007 hand-off).


Goal

Identify the contents of the 1,045,046-byte region between the end of the TGIFILE.ART asset entry table (offset 0x0F48) and the first asset payload (offset 0x10017E). Most likely candidates: palette table(s), asset name strings, frame metadata, or some combination.

Background

The asset entry table ends at offset 0x0F48 (3,912 bytes after the start). The first asset payload starts at offset 0x10017E (1,048,958 bytes). That leaves ~1 MB of unaccounted bytes currently labeled “packed/padded region” in docs/formats/tgifile-art.md.

One megabyte is a lot of padding. The strong working hypothesis is that this region contains the palette table — and if true, WP-002 gets much easier because palette-indexed decode becomes the obvious first thing to try.

Secondary hypothesis: this region contains asset name strings (which would also confirm the lookup mechanism that the deferred hash-test was meant to probe).

Scope

In scope:

Out of scope:

Dependencies

Exit criteria

  1. The byte range 0x0F48–0x10017E is characterized in writing — palette table? name table? both? something else?
  2. If a palette is found: format documented (entries, bit depth, byte order) and one palette block extracted as a raw binary file for use by WP-002’s probe_art.py.
  3. If name strings are found: at least three sample strings recorded and cross-referenced against object.ini references.
  4. The 4-byte gap at 0x0118–0x011B is read in hex and characterized (zero padding? unidentified field? typo in the spec?).
  5. docs/formats/tgifile-art.md updated — either “packed/padded region” is replaced with concrete findings, or the label is confirmed as accurate with a note explaining why a 1 MB pure-padding region exists.

Deliverables

Notes


Findings landed (2026-06-02)

Exit criterion Status Evidence
1. Pre-payload region characterized in writing — palette? names? both? ✅ tgifile-art.md §Pre-payload region — engine name table. Region is the engine name table (811 clean records in the continuous block, + further records in the mixed tail). Not a palette.
2. If a palette is found: format documented; one block extracted ✅ (negative) No palette in the region — explicit negative finding in tgifile-art.md §Remaining unknowns. Palette discovery moved to WP-002.
3. If name strings are found: ≥ 3 samples cross-referenced against object.ini ✅ (cross-referenced against strings-ansi.txt per WP-007 hand-off; stronger evidence than object.ini alone) tgifile-art.md §Gen 1 (Showdown) — Strings cross-check (WP-007 hand-off) — 42/42 ROOM (100 %), 228/453 OBJ (50.3 %), 65/316 ANIM (20.6 %) of continuous-block names also present in tools/exes/showdown/strings-ansi.txt.
4. 4-byte gap at 0x0118 read in hex and characterized ✅ tgifile-art.md §Gen 1 (Showdown) — 4-byte gap at 0x0118. Outcome (c) from the session prompt: bytes at 0x0118 are the asset_count field; the prior spec had the offset wrong by 4 bytes. Whole header shifted 4 bytes earlier in the corrected layout.
5. tgifile-art.md updated — “packed/padded region” replaced or downgraded ✅ Replaced with three concrete subsections: §Region layout, §Record format, §Resource ID schema, plus §Strings cross-check (WP-007 hand-off).

Out-of-scope follow-ups surfaced during execution (not bundled):