summon.dat / readef.DAT streaming slots Confirmed
When a character casts a Seru summon or performs an art, the game doesn't have those assets in memory - it streams them off the CD while the cast animation plays. \data\battle\summon.dat and \data\battle\readef.DAT are the two files that feed this side-band stream (CDNAME block bat_back_dat): per-special-attack texture pages and palettes bound for VRAM (the console's video memory), summon-creature actor records (mesh + textures - mostly reused enemy meshes from the monster archive), and the player art-animation archives, all in fixed 0x10800-byte (33-sector) slots so any slot can be seeked directly. Byte-verified RAM↔disc and VRAM↔disc in a mid-cast battle save state.
PROT entries + index spaces
Despite the file-path names, both files live inside PROT.DAT (the disc's single big archive) like almost everything else. The battle overlay's streaming handler FUN_801F17F8 opens both files through the file-open shim FUN_800558FC(path, 0, 0, prot_index). In the retail build the ISO9660 open is a trap stub, so the dev path string is ignored and the fourth argument goes straight to FUN_8003E8A8 as a raw PROT TOC index. The in-RAM TOC copy at 0x801C70F0 keeps PROT.DAT's 8-byte header, while the extraction pipeline strips it - so a raw TOC index maps to the extraction-space entry minus 2:
| File | Raw TOC index | Extraction entry | Footprint | Slots |
|---|---|---|---|---|
summon.dat | 0x37F | 893 | 6 961 152 B | exactly 103 × 0x10800 |
readef.DAT | 0x380 | 894 | 5 271 552 B | exactly 78 × 0x10800 |
The same idx + 2 arithmetic applies to every FUN_8003E8A8 consumer, so CDNAME #define numbers live in the raw TOC space, not the extraction space. Verified byte-for-byte: a mid-cast save state's full 67584-byte stream buffer at *0x8007BD74 equals extraction entry 894 at offset 1 × 0x10800, and slot 0's CLUT row + texture page match the same state's VRAM exactly.
Action id → slot math
Two coupled state machines in the battle context stream slots on demand: a transfer SM (opens the file, seeks slot × 0x10800 past the entry start, reads one slot into *0x8007BD74) and an applier SM (FUN_801F12D0, consumes arriving slots; for readef groups it stops after base+1). Three sites feed them: the initiative scheduler FUN_801DABA4 seeds the acting entity's group base per turn (party: 3×(char−1); enemy: 3 × monster_record[+0x1C], each monster record's readef group byte - leaving the character's main "ME" archive resident for the turn), the battle-end win-pose staging requests slot 3×char+2 (the base "ME" archive) directly - the victory arm re-rolls the win-pose pick onto a living party member only when the acting actor is dead; a living acting actor skips the re-pick at 0x801E6690 (the hole behind the enemy-ally charm softlock) - and the cast sequence computes the base slot byte in the battle-action SM FUN_801E295C (case 0x32) from the actor's action id (actor + 0x1DF):
id < 0x9A: base = 3 * (id - 1) (mod 256)
id ≥ 0x9A: base = 4 * id + 0x63 (mod 256)
Bit 7 of base selects the file (set → summon.dat, clear → readef.DAT); base & 0x7F is the starting slot. The id bands tile both files exactly:
| Action ids | File | Group shape | Slots |
|---|---|---|---|
0x01..=0x1A | readef.DAT | 3 slots [texture, aux, aux] | 26 × 3 = 78 |
0x81..=0x99 | summon.dat | 3 slots [texture, texture, actor record] | 25 × 3 = 75 |
0x9A..=0xA0 | summon.dat | 4 slots [texture, texture, raw CLUT+texture+part pool, actor record] | 7 × 4 = 28 |
Summon group 0 (spell id 0x81, Gimard) carries the "Burning Attack" actor record - consistent with the spell table's player Seru-magic block.
Slot formats
Texture slot (u32 mode ∈ {0, 1, 2}):
+0x000 u32 mode
+0x004 CLUT rows - 256 BGR555 entries each (mode 1: 2 rows, else 1 row)
+0x204 / +0x404 4bpp texture page, 256 rows tall:
mode 0: 64 halfwords wide (0x8000 bytes)
mode 1/2: 128 halfwords wide (0x10000 bytes)
VRAM targets are positional: the group's first texture slot → CLUT at (0, 488) + page at (512, 0); the second → CLUT at (0, 490) + page at (640, 0).
Big-summon raw slot (3rd slot of the 0x9A..=0xA0 groups) is consumed headerless; the three regions tile the slot exactly (0x1E0 + 0x8000 + 0x8620 = 0x10800): a 240-entry BGR555 CLUT → VRAM (0, 486), a 64×256-halfword texture page → VRAM (448, 256), and a 0x8620-byte part pool for the summon creature.
Actor-record slot (last slot of a group), consumed in place by FUN_801F19EC (slot-relative offsets):
+0x00 u32 name offset - NUL-terminated attack-name string
+0x04 u32 TMD offset - Legaia TMD, magic 0x80000002
+0x08 u32 texture-pool offset
+0x4A u8 part count
+0x4C u32[part_count] per-part offsets (+ indirection fixups)
The TMD + texture pool route through FUN_80055468 - the same mesh/texture installer the monster archive uses - and the summon creature is staged as a battle actor. For the base + evolved-Seru summons (0x81..=0x95) the actor-record TMD is byte-identical to a record in the monster archive (extraction entry 867): the summon reuses an ordinary enemy creature's mesh (map in legaia_asset::summon_creatures). The big-summon block 0x9A..=0xA0 instead carries a bespoke mesh in its raw slot - no archive match.
Art "ME" stream-archive slots: the aux slots of readef.DAT groups 0..3 (slots 3×char + 1 / 3×char + 2 for Vahn / Noa / Gala / Terra) carry the player art-animation keyframe-stream archives - magic 'M' 'E', u8 count, u16 entry_sizes[count] (bit 15 = compressed), concatenated bodies - each decompressing through the channel-delta codec into a packed [u8 parts][u8 frames][9-byte TRS] stream (see player battle files). Parser legaia_asset::me_archive. The main-vs-base pick is per battle phase (turn staging vs the battle-end win-pose staging - see the slot math above). The aux slots of the higher readef groups (enemy-special bands) are still unattributed as content, though their selection is pinned to the monster record's group byte +0x1C.
Parser + tooling
Parser: legaia_asset::summon_readef (slot classification, texture layouts, action-id → (file, slot) resolution). CLI: asset summon-readef <entry.BIN> lists every slot's class and attack-name string; --texture-png-dir decodes texture pages to PNG; --action-id resolves an action id to its stream target. The disc-gated summon_readef_real test asserts the raw-TOC-to-extraction mapping and slot tiling; summon_creature_tmd_map_real byte-validates the spell → creature mesh map. The attack-name sequence across the summon.dat actor records follows the spell-id order exactly, independently corroborating the case-0x32 banding. Provenance: ghidra/scripts/funcs/overlay_battle_801f17f8.txt, overlay_muscle_dome_801f12d0.txt, overlay_muscle_dome_801f19ec.txt, overlay_battle_action_801daba4.txt, 800558fc.txt, 8003e8a8.txt.