Mojo
Hacking

DAOC's MPK files: partial spec

The following partial spec is reproduced from this post on the Dawn of Light forum by PlayerX.

For more information about this file format, see dempak.c.

To download free programs (executable and source code) that unpack MPKs, click here.

Index
Type
Value
00
bytes
"MPAK"
04
byte
2

The next 16 bytes are XOR'ed with their index, ie. offset 5 is XOR'ed with 0, offset 6 is XOR'ed with 1, etc. up to 15

Index
Type
Value
05
long
CRC32 of deflated directory section
09
long
Compressed size of directory section
0D
long
Compressed size of archive name section
11
long
No. of files in archive
15
bytes
Name of archive (deflated)
nn
bytes
Directory (deflated)
nn
bytes
Files (individually deflated)

Each directory entry is 0x11C in size:

Index
Type
Value
000
bytes
Name of entry
100
long
Timestamp of entry (time_t)
104
long
Unknown, usually 4
108
long
Offset in memory (only applicable if you unpack everything into one big memory block)
10C
long
Size of file
110
long
Offset in file of deflated data (indexed from after directory)
114
long
Compressed size of file
118
long
CRC32 of compressed data
11C
 
 

This page was first published on September 26, 2014 and last modified on October 2, 2019

Comments