erysdren's WWW site

software, gameware, strangeware

RSS Feed

idTech WAD Format
2024-06-25

The WAD file format stores "lumps" of data in a table, either referenced by name or index. It usually ends with the .wad file extension.

NOTE: The values here are assumed to be in little-endian byte order.

Version 1

Version 1 was introduced with DOOM (1993).

Header structure:

OffsetSizeDescription
0x004Magic identifier (IWAD or PWAD in ASCII)
0x044Number of entries in the lump table
0x084Offset to the lump table from the start of the file

Lump table entry structure:

OffsetSizeDescription
0x004Lump data offset from the start of the file
0x044Lump data size in bytes
0x088Lump name

Prey

The leaked 1995 version of Prey by Apogee Software uses a slightly modified version of the Version 1 WAD format. The structures are the same, except for the lump table entry structure which looked like this:

OffsetSizeDescription
0x004Lump data offset from the start of the file
0x044Lump data size in bytes
0x084Lump data type
0x0C8Lump name

Known type value meanings:

ValueDescription
0x08Palette
0x0BMip texture
0x11Colormap

Version 2

Version 2 was introduced with Quake (1996).

Header structure:

OffsetSizeDescription
0x004Magic identifier (WAD2 in ASCII)
0x044Number of entries in the lump table
0x084Offset to the lump table from the start of the file

Lump table entry structure:

OffsetSizeDescription
0x004Lump data offset from the start of the file
0x044Lump data size in bytes (compressed)
0x084Lump data size in bytes (uncompressed)
0x0C1Lump type
0x0D1Boolean signifying compression
0x0E2Padding
0x1016Lump name

Version 3

Version 3 was introduced with Half-Life (1998). It has no structure differences whatsoever, but contains different lump data types from Quake. The magic identifier is WAD3 in ASCII.

Versions 4 and 5

The leaked Half-Life 2 (2004) source code contains a handful of references to later revisions of the WAD format. There are no known examples, but according to the source code the magic identifiers were WAD4 and WAD5 in ASCII, and the lump table entry structure looked like this:

OffsetSizeDescription
0x004Lump data offset from the start of the file
0x044Lump data size in bytes (compressed)
0x084Lump data size in bytes (uncompressed)
0x0C1Lump type
0x0D1Boolean signifying compression
0x0E2Padding
0x10128Lump name