
MADS (Microprose Adventure Development System)
----------------------------------------------

All the informations are in Little Endian Format.


*.HAG
16 bytes      : MADSCONCAT 1.0 0x1A 0x00
 2 bytes      : number of entries
repeat (number of entries) {
 1 uint32     : offset to beginning of file
 1 uint32     : file length
 13 bytes     : file name 8+3 (rest filled with 0x00 0x12 0x00|0xC6) 
 0xB8         : separator
}


Data Files (concat'ed in HAG files) :
14 bytes      : MADSPACK 2.0 0x1A 0x00
 2 bytes      : number of blocks
16(max) * 10 bytes {
 1 uint8      : ? / 1 | 0 - boolean packed
 1 uint8      : ? / same value for all entries
 1 uint32     : size unpacked
 1 uint32     : size of block (PACK_ID included)
}
at offset 0xB0:
nentries {
  1 uint32 : FAB_ == 0x46 0x41 0x42 0x0C
  << packed_data >>
  0x00 0x00 0x00 : separator
} or {
  1 uint32 : 0000 = 0x00 ...
  << data >>
}
