Format:MIX (Westwood)
| Developer | Westwood Studios |
|---|---|
| Extensions | .mix |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Westwood Studios' archive format (.mix) of Command & Conquer, Red Alert, Tiberian Sun and Red Alert 2: a 12-byte-per-file index of hashed names (no names stored), in an unencrypted C&C layout and a flag-prefixed RA/TS/RA2 layout whose header may be Blowfish-encrypted.
Layouts
OpenRA (GPL-3.0) MixFile.cs tells the variants apart by the first 16-bit word:
- Command & Conquer (Tiberian Dawn): first u16 is non-zero and is the file count. Header at offset 0: u16 count, u32 data size, then
countentries of 12 bytes. Data starts at 6 + 12 * count. - Red Alert / Tiberian Sun / Red Alert 2: first u16 is 0, the next u16 holds flags; bit
0x2means the header is encrypted. Unencrypted: the same header as above begins at offset 4. - Encrypted: after the 4 flag bytes comes an 80-byte key block; a Blowfish key is derived from it (public-key step, see OpenRA BlowfishKeyProvider), then the header is Blowfish-decrypted in 8-byte blocks starting at offset 84 (u16 count first, rounded up to whole blocks). Data starts after the decrypted header.
Entry (12 bytes, little endian): u32 name hash, u32 offset (relative to the data start), u32 length. Entries are normally sorted by hash. Names are not stored.
Name hashes
Two schemes (see the facts on this page): the classic hash of C&C and Red Alert, and a CRC-32 variant of Tiberian Sun and later. A reader cannot tell which a file uses, so OpenRA hashes its candidate name list with both and keeps the scheme that resolves more entries.
Recovering names
Archives often contain local mix database.dat (XCC Mixer's name database, itself found by its hash) listing the other file names; OpenRA also ships a global mix database.dat.
Tools
OpenRA (reader, Format:MIX (Westwood) code in OpenRA.Mods.Cnc/FileSystem), XCC Mixer (closed source).
Code & repositories
- https://github.com/OpenRA/OpenRA @
e180e3225f3930272dd451917467631618f8976f· license: GPL-3.0
OpenRA (GPL-3.0): MIX reader with both name-hash schemes and Blowfish header decryption in OpenRA.Mods.Cnc/FileSystem
Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2026-10-11; Note: the latest release ships binaries; the wiki links only the source, never the binaries
Pitfalls
- No stored names: unknown hashes can only be matched against a list of guessed names.
- Nested mix files are common (a MIX inside a MIX).