Formats
Byte-level specifications for every file format on the Legend of Legaia disc - from the raw CD sector layout, through the archive that holds the game's assets and the compression around them, to each asset type: textures, meshes, sound banks, dialog, stat tables. Every claim traces to a function in the game's own code, and every format has a from-scratch Rust parser in the workspace.
How this section is organised
Pages are grouped the way the disc is layered, outermost first: the disc and its one big archive, then how the game unpacks and routes what it loads, then the bundles a scene or a battle loads as a unit, then single assets by kind, the stat tables baked into the executable and overlays, and the archive entries that hold code. The sidebar uses the same groups in the same order. New here? Start with disc geometry and PROT.DAT - every other page assumes those two.
- Disc and archivesectors, PROT.DAT, CDNAME.TXT
- Compression and dispatchLZS, chunk streams, packs
- Scene and battle bundleswhat a room or a fight loads at once
- Textures and modelsTIM, TMD, palettes
- Characters and animationmeshes, clip banks, arts
- SoundVAB, SEQ, XA, SFX tables
- Textdialog, font, place names
- Static tablesitems, spells, equipment, move power
- Code overlaysMIPS code in archive entries
Each page carries a badge for how solid its decode is. The badge is a claim about evidence, not page length; a page's own confidence row is authoritative over the badge here.
- Confirmed - traced in the game's own code and verified end-to-end against real on-disc data.
- Inferred - deduced from byte patterns; structurally consistent but not exhaustively validated.
Disc and archive
The disc image before any in-game format is involved: the sector layout, the one archive that holds nearly everything, the text file that names its contents, and the archive slots that hold nothing. The disc map draws all of it at once - every file and every PROT.DAT entry as nested boxes sized by sector count, each linked back to its page here.
iso crate hides the sector layer and returns clean user data.#define name N lines; each define marks a block start and names inherit forward. The numbers are raw TOC indices, two above the extraction numbering.Compression and dispatch
How archive bytes become usable assets: the compression scheme, the chunk stream an entry decompresses to, the type-byte dispatcher that routes each chunk, and the one "many assets in one file" pack layout with its two readers.
(type << 24) | size headers each followed by raw, uncompressed data, ended by a zero-size header. Carries the battle-form character / effect run and a family of scene bundles.(type_byte << 24) | size calling convention the dispatcher takes, and the descriptor-pair walker that only runtime overlays call.u32 count + u32 word_offsets[count], then assets back-to-back. Used inside DATA_FIELD streaming chunks.byte_offset = word_index*4 + 4). Includes the boot-UI bundle at the head of the archive.0x01059B84 word is a DATA_FIELD chunk header wrapping an ordinary pack of one scene's textures. The page records how it came to look like a magic number.Scene and battle bundles
What a scene or a battle loads as a unit - room geometry, textures, scripts and audio together - plus the records that drive encounters, scene transitions and movies, and the battle side-band slots streamed beside them.
0x12000 bytes: object descriptors, the collision and floor grid, the per-tile object map and the trigger block..PCH walk-on trigger sidecar: a four-kind sub-table directory plus inline 4-byte trigger records, exactly one sector in all 97 scenes. The stager prescript is the next PROT entry.efect.dat 2-pack (extraction 0873) - a sprite atlas, frame-animation batches and spawn scripts indexed by effect id.0x10800 bytes each: per-special-attack palettes, texture pages, summon-creature actor records and the player art-animation "ME" archives.Textures and models
What a single texture or mesh looks like once unpacked, and the palette and picture formats that ride beside them.
crates/tim exports to PNG and encodes PNG back to TIM.0x80000002: primitives batched behind an 8-byte group header, with a 6-row shape table setting each record's layout. Most rows carry baked colour; the lit rows shade through the GTE light.Characters and animation
How the party and the monsters are built and moved: the character meshes, the per-character battle files, the animation clip banks, and the art records that drive a Tactical Art.
data\battle\PLAYER1..4: an LZS animation record, a descriptor table keyed by equipment item, and one mesh + texture slot per item.MOVE buffer the script VM's 0x22 EXEC_MOVE plays from - by its bytes the scene's ANM clip bank. Sourced per scene from a CDNAME slot, not from one boot-time PROT entry.Sound
Instrument banks, music sequences, streamed CD audio, and the tables that route a sound-effect cue to a bank.
crates/vab extracts and decodes to WAV. The vab_01 block (extraction 1070..1192) is wall-to-wall VAB.pQES container in Legaia's 15-byte-header variant: u32 BE version, PPQN 480, a placeholder tempo the first body event overrides, meta events without a length byte.crates/xa demuxes per channel and emits one WAV per stream.0x200 and up while a battle is on screen, loaded per battle..dpk, .spk, .MAP, .PCH) and their consumers. The per-scene .dpk pack holds a VAB + SEQ pair.Text
Dialog containers, the proportional font they are drawn with, and the place names the map screens show.
(896, 0).legaia_scene_formats::place_names.Static tables
The game's numbers - item names, spell stats, equipment bonuses, steal chances, move power - are static tables inside SCUS_942.54, the main executable, or the data segment of the battle and menu overlays, not in the asset archive. Each is byte-pinned against its image.
legaia_game_tables::item_names.legaia_game_tables::equip_stats.legaia_game_tables::accessory_passive.0x81..=0x8B; named monster attacks from 0x25. Parser legaia_game_tables::spell_names.[chance, item] pairs - chance first, the reverse of the drop fields. What the Evil God Icon steals. Parser legaia_game_tables::steal_table.town01. Parser legaia_game_tables::new_game.0x414 bytes per slot. Cheat-database-pinned offsets for stats, level, magic rank, spells, summons and equipment.[opcode][window id][operand] in the menu overlay's data segment.Code overlays
Archive entries that hold code, not assets: overlays are chunks of MIPS machine code the game loads into RAM on demand, and most of the game's logic lives in them.
0x801C0000+, detected by the function-prologue fingerprint at byte 0.The port's own formats
Formats the port defines rather than decodes. They carry no disc bytes, so they have no confidence level: each page is the specification. Start from the expansion packs hub for the tour.
pack.toml, DiscRef coordinates, the .lxpack bundle, validation, cards and modes, and the no-disc-bytes rule.LXP1 block a save carries with its tagged tail records.