The disc and its archives
The 179 files, and how the headerless MRG archives are cut.
- Where
- GYFEA4 disc image, 1,459,978,240 bytes
- Files
- 179 under files/, plus the boot data
- Archive tables of contents
- None; the layout is in main.dol or a fixed stride
- main.dol in the image
- Offset 0x1E000
Files
| Path | Count | What |
|---|---|---|
y01-y11, Y12-Y23, S01-S22, J01-J11 .lsc |
56 | mission scripts (the game asks for lowercase names) (format) |
map000_map_000.dat to map025_... |
26 | terrain of stages 0-25 (stage 26 has none, details): 91 × 91 f32 heights (row stride 0x16C), 90 × 90 u8 terrain ids at +0x8164, 24 zero bytes; 0xA120 bytes |
MAP000W.DAT to MAP025W.DAT |
26 | 103 points of 3 floats, identical in all files; loaded with each mission; nothing reads the data |
Model/MONSTER.MRG |
1 | 187 model archives of 0x80000 bytes each |
Model/SCENE.MRG |
1 | 24 cut-scene models |
Model/BATTLE00-19.MRG, LOCAL00-29.MRG |
50 | scenery archives, 1 to 16 per file (390 in all; the offset tables have room for 20); BATTLE19 and LOCAL27-29 are 0 bytes |
texture/*.MRG |
7 | texture archives (format) |
effect/B_MODULE.MRG, Z_MODULE.MRG |
2 | attack effect modules (code) |
sd_intr/SECTL.MRG, grp.pac, system.grp; sd_strm/str.pac |
4 | sound (format) |
Movie/fka_opmv.thp, fka_trial.thp |
2 | movies (format) |
icon/card_y.bin, card_s.bin, card_j.bin |
3 | memory card banner and icons, 16,384 bytes each (RGB5A3) |
opening.bnr |
1 | the banner the GameCube menu shows |
MRG archives
An .MRG file is a plain concatenation with no header and no table of contents. The game knows the layout:
- Some have a fixed stride:
MONSTER.MRGuses records of0x80000bytes (record = index in the card-number table),PICTURE.MRG0x1240, the effect archives0x8000(module n at offset n ×0x8000, no index). - The scenery archives (
BATTLEnn,LOCALnn; 21-word tables),SCENE,SYSTEM,EVENTandEFFECTare cut by tables of offsets inmain.dol’s data. SECTL.MRGis 248 slots of0x100bytes.
In MONSTER.MRG, the space after each archive up to the next record is filler: 165 records are zero there, 22 carry a 0x30 byte every 1 KB. The game clamps each read to the archive’s own size and never looks past it.
Layout of the image
main.dol sits at 0x1E000 and the file table (FST) at 0x1AA200 (0x1130 bytes). The files are packed at the end of the disc in file-table order, each on an 8-byte boundary and back to back, except that the 52 map files (MAPnnnW.DAT and mapnnn_map_nnn.dat) each start on a 0x8000-byte boundary; the last file ends 16 bytes before the end of the image. The roughly 870 MB between the file table and the first file (effect/B_MODULE.MRG at 0x342F72F0) hold filler. Every .lsc starts on a 16-byte boundary.
Evidence
The game opens every file by path through the DVD functions of the GameCube SDK, so the paths and the way each file is cut come straight from the decompiled loaders. The image layout was read from the disc’s own header and file table, and confirmed by writing images back that the game accepts.