Difference between revisions of "Mohawk archive format"
From A look inside The Link @ wiki
(→IFF header) |
(→RSRC header) |
||
Line 26: | Line 26: | ||
==RSRC header== | ==RSRC header== | ||
+ | I think this is actually the "Resource Dir header". Note that the Dir can be anywhere in file, but this header always follows the IFF Header. | ||
+ | {| border="0" align="center" style="border: 1px solid black;background-color:#ffa" | ||
+ | |align="right" style="color:#622"|4 bytes | ||
+ | |chunk signature (RSRC) | ||
+ | |- | ||
+ | |align="right" style="color:#622"|unsigned long | ||
+ | |should be length of RSRC chunk (never bothered to check) | ||
+ | |- | ||
+ | |align="right" style="color:#622"|unsigned long | ||
+ | |total file size in bytes | ||
+ | |- | ||
+ | |align="right" style="color:#622"|unsigned long | ||
+ | |absolute offset of the Resource Dir | ||
+ | |- | ||
+ | |align="right" style="color:#622"|unsigned short | ||
+ | |offset in Resource Dir of the File Table | ||
+ | |- | ||
+ | |align="right" style="color:#622"|unsigned short | ||
+ | |File Table size in bytes | ||
+ | |} | ||
==Type table== | ==Type table== |
Revision as of 14:34, 4 February 2008
Contents
General layout
Mohawk archives are organized in chunks, and this is the chunk layout:
- IFF chunk
- IFF header
- RSRC header
- Resource dir
- Type table
- Name tables (one for each resource type)
- Resource tables (one for each resource type)
- Resource name list
- File table
- Actual data (resource contents)
Note that the chunks may be found in a different order: never trust on them being at fixed locations, and use the offsets to reach them.
Every integer is in big-endian (Motorola) byte order.
IFF header
This is always at the beginning of the file.
4 bytes | chunk signature (MHWK), identifies Mohawk archive format |
unsigned long | file size in bytes, not counting this IFF header (that is, file size - 8) |
RSRC header
I think this is actually the "Resource Dir header". Note that the Dir can be anywhere in file, but this header always follows the IFF Header.
4 bytes | chunk signature (RSRC) |
unsigned long | should be length of RSRC chunk (never bothered to check) |
unsigned long | total file size in bytes |
unsigned long | absolute offset of the Resource Dir |
unsigned short | offset in Resource Dir of the File Table |
unsigned short | File Table size in bytes |