DDirectorWikiDirector & Lingo Encyclopedia

File Formats

Director movie, cast, and projector file formats - .dir, .dxr, .dcr, .cst, .cxt, .cct - and what is inside them.

Format family

Director content ships in three parallel families: movies, casts, and packaged runtimes. Each family has an editable form, a protected form, and a compressed (Shockwave) form.

ExtensionFamilyFormScripts inside
.dirMovieEditable sourceSource + compiled bytecode
.dxrMovieProtectedBytecode only (source stripped)
.dcrMovieShockwave compressedBytecode only, assets compressed
.cstCastEditable external castSource + bytecode
.cxtCastProtected external castBytecode only
.cctCastShockwave compressed castBytecode only, compressed
.exeProjectorPlayer + embedded movie(s)Depends on embedded movie form
.w32 / .a5r etc.Xtra-related / legacyVarious-
.x32Xtra (Windows)Native plugin DLLNative code
.x16Xtra (16-bit Windows)Legacy native pluginNative code

Container structure (RIFX)

Director files are RIFF-style containers with a big-endian variant signature RIFX (or little-endian XFIR on Windows-authored files). Inside, four-character-code chunks describe the movie:

ChunkContents
imapInitial map: points at the current mmap.
mmapMemory map: table of every chunk, its offset and size.
KEY*Key table: associates child chunks (media data) with owner cast members.
CAS*Cast member ID table for a cast library.
CAStOne cast member's metadata (type, name, registration, flags).
VWSCScore data: frames, channels, sprite spans.
VWLBFrame labels (markers).
VWFIFile info.
LscrCompiled Lingo script (bytecode) for one script.
LnamLingo name table (handler and symbol names) for a script context.
Lctx / LctXScript context: maps scripts to the name table.
BITDBitmap pixel data (optionally RLE-compressed).
CLUTColor lookup table (palette).
STXTStyled text data.
XMEDExtended media (Director 7+ text members, other media).
snd Sound data.
THUMThumbnail.
Fver, Fcdr, ABMPShockwave (afterburner) versioning and compressed chunk map.

Shockwave files (.dcr, .cct) are "afterburned": the chunk map is replaced by a compressed ABMP table and most chunk payloads are zlib-compressed. Community tooling reconstructs a normal RIFX view from that.

Community projects that parse these structures include ScummVM's Director engine, the dirplayer runtime, Shockky, ProjectorRays, and the various "offset registry" writeups from the Director preservation scene. When in doubt, cross-check a parser against more than one of these; several chunk fields changed meaning across Director versions.

Lingo bytecode

Protected and Shockwave files carry compiled Lingo only. Key facts for tooling authors:

  • Each Lscr chunk is one script: a header, handler table, literal table, and bytecode stream per handler.
  • Handler and variable names live separately in the Lnam chunk; bytecode refers to names by index. This is why decompilers can recover readable handler names even from protected files.
  • Opcodes are one byte, with one-, two-, or four-byte operand forms for larger arguments (the same width-promotion idea appears inside the native descriptor executor documented in Native Lingo internals).
  • The stack machine matches Lingo semantics directly: push literal, push symbol, call handler by name index, get/set property via descriptor, chunk operations, and so on.
  • Decompilation to readable Lingo is well understood; multiple community decompilers produce faithful source for D4 through MX 2004 era files.

Projectors

A projector is the player runtime with one or more movies appended. Windows-era projectors consist of:

  • a small launcher executable,
  • the runtime DLLs (Dirapi.dll, Iml32.dll, Proj.dll, plus Xtras in an Xtras folder, or all of these embedded for single-file projectors),
  • the movie data appended or external.

Projector behavior flags (fullscreen, resizable stage, center stage, title bar) are stored as resource strings inside Proj.dll and parsed at startup. The recovered flag list and their bit values are documented in Native stage and presentation.

Casts: internal vs external

A movie always has at least one internal cast. External casts (.cst/.cxt/.cct) can be linked at authoring time or loaded at runtime, and are the standard mechanism for:

  • sharing UI assets between movies (Habbo used dozens of .cct files),
  • streaming updates without re-shipping the movie,
  • splitting large media from logic.

At runtime a cast library is addressed as castLib n or castLib "name", and members as member "name" of castLib "ui". Member lookup rules are covered in Cast members.

Practical identification

text
First 4 bytes:
  52 49 46 58  "RIFX"  big-endian Director file (Mac-authored)
  58 46 49 52  "XFIR"  little-endian Director file (Windows-authored)

Next 4 bytes (codec):
  "MV93" / "39VM"   movie (.dir/.dxr)
  "MC95" / "59CM"   cast (.cst/.cxt)
  "FGDM" / "MDGF"   afterburned movie (.dcr)
  "FGDC" / "CDGF"   afterburned cast (.cct)

If a file claims to be .cct but starts with XFIR+MC95, it is really an uncompressed protected cast that was merely renamed; parsers should trust signatures, not extensions.