Skip to main content

What is on the disc

The PAL disc is a plain DVD with an ISO 9660 filesystem and a UDF bridge on top. Both directories describe the same files, and the build has to keep them in agreement - see the archive page.

/SLES_525.68 2.05 MB the executable (a PS2 ELF)
/SYSTEM.CNF tells the console which file to boot
/CRASH6/CRASH.BD 886.84 MB every level, packed end to end
/CRASH6/CRASH.BH 0.03 MB the index: name, offset and length of each file inside CRASH.BD
/CRASH6/MUSIC.MB 211.50 MB streamed music
/CRASH6/ENGLISH.MB 12.56 MB speech, one bank per language (also FRENCH, GERMAN, ITALIAN, SPANISH)
/CRASH6/SYS/*.IRX IOP modules the game uploads at boot
/FMV/*.PSS the pre-rendered movies, 8 to 155 MB each

The archive​

CRASH.BD is a flat blob and CRASH.BH is its table of contents: a list of names with an offset and a length. The game only ever looks files up by name, never by position, which is what lets the build move the whole archive to the outer edge of the disc for faster loading. The details are on The archive and the disc.

Inside the archive, each level is two files:

Levels\Earth\Hub\hubd.rm2the level itself - models, textures, animations, collision, objects, instances, scripts
Levels\Earth\Hub\hubd.sm2the level's scenery - its models, materials, textures, LOD models, the skydome and the lights. See Lighting.

Paths use backslashes and are matched case-insensitively.

Inside a level (.rm2)​

An .rm2 is a container of items, each with a numeric id, grouped into sections. The Twinsanity Editor library reads and writes this format, and this project drives it through twinsdump.

The sections this mod cares about:

SectionWhat it holds
ScriptsThe state machines that drive everything. Two items per behaviour: a small header, and the COM_ item with the actual states. See Scripts.
Game objectsObject types: a name, a list of script slots, and the models, animations and sounds they use. See Objects.
InstancesPlacements of an object in the level: a position, a rotation and the object id.
TriggersBoxes in the world that activate or message objects when the player enters them.
GraphicsModels, materials and shaders, including the flag that decides whether a surface receives Crash's shadow. See Graphics.
Collision, AI graphs, pathsThe level's collision mesh and the node graphs enemies walk along.
Names survive

Every object and script keeps the name the developers gave it - COM_TIKI_MON_ACTIVATED, |LabInt|H02B_Cutscene|act_ICELABINT_CUTSCENE_DIRECTOR. Those names are the single most useful thing in the whole format; almost all of this wiki was found by reading them.

The executable​

SLES_525.68 is a 2 MB ELF that the PS2 loads at virtual address 0x100000. Because PCSX2 identifies a game by a CRC over that executable, every change to it produces a new CRC and needs a matching .pnach - which the build regenerates itself, deleting the stale one.

The address arithmetic, the patch file format and the code cave are on The executable.

How the pieces line up at runtime​

SLES_525.68 ─ engine, script interpreter, renderer, loaders
│
├─ reads CRASH.BH once, then streams chunks out of CRASH.BD as you move
│
├─ each level's .rm2 becomes: objects ─ instances ─ triggers
│ │
│ └─ scripts: one state machine per running behaviour
│
└─ movies stream straight off the disc from /FMV/*.PSS