+---------------------+ | GENERAL INFORMATION | +---------------------+ This file describes many different archive formats used by games. You can use these specifications to help you create your own programs, or to give you an insight into the information contained in a particular file. ** NOTE: Some specifications are not complete. ** There is absolutely NO GUARENTEE that the information within this document is correct! All information has been obtained through experimentation and investigation only, no information has been verified by the associated companies or game developers. For better clarification of format structures, and for additional formats not listed here, be sure to download the source code for Game Extractor (http://www.watto.org/extract) as it contains fully commented Java code for reading and writing many game archives, and is free for use by anyone. If you have any information that you can add to this file, including new archives and corrections, please contact WATTO at watto@watto.org - your help is greatly appreciated! +-----------------------+ | HOW TO READ THIS FILE | +-----------------------+ * General comments are indicated by a // at the start of the line * Comments for a particular line are written within ( ) at the end of the line * A number at the start of a line is the number of bytes used to store the value * The text to the right of a number is a description of the value * Information in ( ) to the right of a description, is the default value of the field * Information in [ ] to the right of a description, is a calculation to apply to the field * A ? in the description indicates that the description may not be correct * An X at the start of the line (in place of a number) shows a variable number of bytes * A line with "X - Filename (null)" indicates that the filename is read up to the first null byte * A line with "# - Filename (null)" indicates that the filename has a maximum length of # bytes, and the remaining space is filled with null bytes * The statement (big) next to a game name indicates that the archive uses big-endian order (all others use little-endian) * The statement (chunk) next to a game name indicates the use of a variation on the EA IFF'85 chunk format * In most directory-based archives, the file data follows the directory. Unless it is otherwise indicated where the file data is located, this should be assumed, thus read the specs for the game and the file data will follow directly after. * X - File Data indicates that the data for each file is located in this area, with each file's data stored one after the other Example: 4 - Header (HEAD) 2 - Offset [+6] * The header field is 4 bytes long, and has the value "HEAD" * The offset field is 2 bytes long, and you need to add 6 to it for the correct value +-----------------------+ | 187 Ride Or Die *.mfd | +-----------------------+ 4 - Number Of Files // for each file 4 - File ID? 4 - File Offset 4 - File Length // for each file X - File Data X - null Padding to a multiple of 4? bytes +---------------------------------+ | 1944 - Battle Of The Bulge *.fx | +---------------------------------+ 4 - Header ((bytes)173,165,255,255) 4 - Filename Directory Offset X - Unknown // Filename Directory 4 - Number Of Files? // for each file X - Filename (null) 4 - null +------------------+ | 3D Frogger *.mwd | +------------------+ 4 - Header (DAWM) 4 - null 2040 - Description (null) X - Unknown +--------------------------+ | 3D Ultra Cool Pool *.tbv | +--------------------------+ // Same as 3D Ultra Cool Pinball *.tbv +------------------------------------------+ | 3D Ultra Cool Radio Control Racers *.tbv | +------------------------------------------+ // Same as 3D Ultra Cool Pinball *.tbv +------------------------------------------+ | 3D Ultra Cool Radio Control Racers *.rbx | +------------------------------------------+ 4 - Header (158 154 169 11) 4 - Number Of Files // for each file 12 - Filename (null) 4 - File Offset X - File Data +------------------------------+ | 3D Ultra Pinball *.001 *.002 | +------------------------------+ // for each file 13 - Filename (null) 4 - File Size X - File Data +---------------------------------------------+ | 3D Ultra Pinball - The Lost Continent *.001 | +---------------------------------------------+ // Same as 3D Ultra Pinball *.001 +-------------------------------------+ | 3D Ultra Pinball: Thrill Ride *.tbv | +-------------------------------------+ 8 - Header (TBVolume) 1 - null 2 - Unknown 4 - Number Of Files 2 - Unknown 12 - Description 1 (RichRayl@CUC) 12 - Description 2 (null) 4 - Unknown 4 - First File Offset X - Unknown (up to first file offset) // for each file 24 - Filename 4 - File Size X - File Data +------------------------------+ | 4x4 Evolution *.pod (type 1) | +------------------------------+ 4 - Number Of Files 80 - Archive Name // for each file 32 - Filename 4 - Size 4 - Offset X - File Data +------------------------------+ | 4x4 Evolution *.pod (type 2) | +------------------------------+ 4 - Header (POD2) 4 - Unknown 80 - Archive Name 4 - Number Of Files 4 - Number Of Trails // for each file 4 - Filename Offset (from start of filename directory) 4 - Size 4 - Offset 8 - Unknown // for each file X - Filename (null) X - File Data // for each trail 312 - Unknown +--------------+ | 7 Sins *.pak | +--------------+ // ARCHIVE HEADER 4 - Header (PACK) 4 - Directory Offset 4 - Directory Size // FILE DATA // for each file X - File Data 160 - null // DIRECTORY // for each file 72 - Filename (null) 4 - File Offset 4 - File Size +----------------------------------------+ | Abomination: The Nemesis Project *.awf | +----------------------------------------+ 4 - Number Of Files // for each file 4 - File Offset 260 - Filename (null) X - File Data +----------------------------------------+ | Abomination: The Nemesis Project *.clt | +----------------------------------------+ 4 - Header (AWAD) 4 - Number Of Files // for each file 260 - Filename (null) 4 - File Length 4 - File Offset X - File Data +-----------------------+ | Absolute Terror *.pak | +-----------------------+ 4 - Header (PAK4) 4 - Data Size? 4 - Unknown (8) 4 - Unknown 16 - null 4 - Unknown 4 - Unknown X - Unknown // SOME KIND OF COMPRESSION OR ENCRYPTION MIGHT BE USED? +------------------+ | Act Of War *.dat | +------------------+ // NOTES: // The files are stored in a special way so as to reduce the amount of space // needed to store the filenames. It does this by grouping the files together // that share a common first-part of their name, and then building up the actual // filename of each file by joinging a whole lot of group names together. // // For example, if we have 2 files called "sound11.wav" and "sound22.wav", you // can see that they both share 5 common letters at the beginning of the filename // (ie "sound"). This archive would have a group with the name "sound" and each // of the 2 files would be saved with names "11.wav" and "22.wav" within that // group, thus saving space. This space saving is only really benificial for // storing directorie names though, as there is a lot of overhead. // // Groups can be nested inside each other, so there is no boundary as to the // number of groups that can exist in a nested way. // // Also, filenames can be reused by using a negative number for the Group/File ID. // In this case, take the offset just before the negative Group/File ID, subtract // the negative number, and it will point to the filename that will be reused. 4 - Header (edat) 4 - Length of the header after the 10 nulls (18) 4 - Unknown 10 - null 2 - Unknown (1) 1 - null 4 - Directory Offset 4 - Directory Length 7 - null X - File Data X - Directory // go to dirOffset // for each group 4 - Group/File Indicator (0=file, #=length of this group entry, -#=offset to a previous file entry) if (group){ 4 - Length of this group, including the file entries (ie relative offset to next group) (or null) X - Group name (null) 0-1 - null padding to a multiple of 2 bytes (ie only exists if groupnameLength+1 is odd) } else if (file){ 4 - Last File Indicator (0=last file in this group, #=length of this file entry) 4 - File Offset 4 - File Length 1 - Unknown (0) // something to do with the Filename position? X - Filename (null) 0-1 - null padding to a multiple of 2 bytes (ie only exists if filenameLength+2 is odd) } else if (previous offset (negative number)){ 4 - Last File Indicator (0=last file in this group, #=length of this file entry) 4 - File Offset 4 - File Length 2 - null } +----------------------------+ | Actua Soccer *.dat + *.off | +----------------------------+ // OFF has the details, DAT has the file data // for each file 4 - Offset 4 - File Size +-------------------------------+ | Actua Soccer 2 *.mad (Type 1) | +-------------------------------+ // for each file 16 - Filename (null) 4 - File Offset 4 - File Length X - File Data +-------------------------------+ | Actua Soccer 2 *.mad (Type 2) | +-------------------------------+ // for each file 4 - File Offset 4 - File Length X - File Data +--------------+ | AFL 98 *.lbm | +--------------+ // Same as Allan Border Cricket *.lbm +--------------+ | AFL 99 *.paf | +--------------+ 1 - Number Of Files // for each file 4 - Unknown 4 - End Of Directory Marker (null indicates end of directory, otherwise there are more files) 4 - Unknown 4 - Offset (relative to the end of the directory) X - File Data +--------------+ | AFL 99 *.pgf | +--------------+ 4 - Header (TCA + (byte)2) 4 - Version (1) 4 - Unknown 4 - Unknown 4 - null 4 - Unknown 2 - Number Of Files? // for each file 44 - Unknown Junk X - Filename (null) (filename is absolute - ie it is D:\XXX) // for each file 2 - Unknown X - Filename (null) X - File Type Description 1 (null) X - File Type Description 2 (null) 60 - Unknown Junk X - File Data +----------------------+ | Age Of Empires *.drs | +----------------------+ // Same as Age Of Empires 2 *.drs +------------------------+ | Age Of Empires 2 *.drs | +------------------------+ 36 - Header (Copyright (c) 1997 Ensemble Studios.) 4 - Unknown (26) 16 - Archive Name (null terminated) (1.00tribe) 4 - Number Of Groups 4 - First File Offset // for each group 4 - Extension (reversed, 32 terminated after reversal) 4 - Directory Offset 4 - Number Of Files // go to each directory offset // for each file in the directory 4 - File ID 4 - Offset 4 - Size X - File Data +----------------------------+ | Age Of Empires 3 *.age3scn | +----------------------------+ // COMPRESSED 4 - Header (l33t) 4 - Decompressed File Size X - ZLib Compressed File Data // DECOMPRESSED 2 - Header (BG) 4 - Archive Size [+8] X - Unknown +------------------------+ | Age Of Empires 3 *.bar | +------------------------+ // ARCHIVE HEADER 4 - Header (ESPN) 4 - Version (2) 4 - Unknown (1144201745) 264 - null 4 - Unknown 4 - Number Of Files 8 - Directory Offset // FILE DATA // for each file X - File Data // DIRECTORY 4 - Directory Name Length [*2 for unicode] X - Directory Name (unicode) (including trailing slash) 4 - Number Of Files // for each file 4 - File Offset 4 - File Length 4 - File Length 4 - Unknown 2 - Unknown (4) 2 - Unknown (9) 2 - Unknown (21) 2 - Unknown 2 - Unknown 2 - Unknown 4 - Filename Length [*2 for unicode] X - Filename (unicode) +------------------------+ | Age Of Mythology *.bar | +------------------------+ 12 - Unknown 4 - Number Of Files 4 - Directory Length 4 - Directory Offset X - File Data // Directory // for each file 4 - Next File Entry Offset? 4 - File Offset 4 - File Length 12 - Unknown X - Filename 1 - null Filename Terminator +------------------------+ | Airbourne Troops *.pak | +------------------------+ 8 - Unknown 4 - Directory Offset 4 - Number Of Files X - File Data // Directory // for each file 10 - Filename 4 - File Offset 4 - File Length +----------------------------+ | Airline Tycoon *.gli *.glj | +----------------------------+ 5 - Header (GLIB2) 3 - null 2 - Unknown (3) 4 - Archive Size 8 - null 4 - Unknown 4 - Unknown 4 - Unknown 4 - Number Of Files [-1] 4 - Unknown (54) 4 - Unknown 8 - null 4 - Unknown (13) 4 - Unknown 1 - null 4 - Data Size // for each file 4 - Type ID? 1 - Unknown (1) 8 - Filename (null) 4 - Offset X - File Data +--------------------------------+ | AirStrike 2 Gulf Thunder *.apk | +--------------------------------+ 8 - Header (0,0,128,63,153,153,0,0) 4 - Archive Size [+##### bytes] 4 - Unknown X - Unknown +-------------------------------+ | Ajax Club Football 2005 *.bib | +-------------------------------+ // SAME AS FIFA/Need For Speed *.big/*.viv archives 4 - Header (BIGF) 4 - Archive Size (LITTLE) 4 - Number Of Files? (BIG) 4 - Directory Length (including these 4 fields) (BIG) // for each file 4 - File Offset (BIG) 4 - File Length (BIG) X - Filename 1 - null Filename Terminator 0-127 - null Padding to a multiple of 128 bytes // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +----------------------------------+ | Alien Vs Predator *.ffl (Type 1) | +----------------------------------+ // for each file 2 - Unknown X - Filename 1 - null Filename Terminator 4 - File ID 4 - File Length X - File Data +----------------------------------+ | Alien Vs Predator *.ffl (Type 2) | +----------------------------------+ 4 - Header (RFFL) 4 - null 4 - Number Of Files 4 - Directory Length 4 - File Data Length // for each file 4 - Data Offset 4 - File Length X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - File Data +-----------------------------------------+ | Allan Border Cricket *.lbm (chunk)(big) | +-----------------------------------------+ 4 - Type 4 - Size Of Archive 4 - name/extension? // for each file 4 - File Type 4 - Length X - File Data +-------------------------------+ | Allods 2: Rage Of Mages *.res | +-------------------------------+ 4 - Header (&YA1) 4 - Unknown 4 - Unknown 4 - Unknown (1) 4 - Directory Offset 4 - Number Of Files X - File Data // for each file 4 - null 4 - File Offset (if directory, this is the number of files in this directory?) 4 - File Length (if directory, this is the number of files in this directory?) 4 - Directory/File Indicator (0=file, 1=Directory) 16 - Filename (null) +-------------------------------------+ | Amber - Journeys Beyond *.dxr (big) | +-------------------------------------+ // This archive uses BIG endian byte order for all numeric fields 4 - Header (RIFX) 4 - Archive Size [+18] 4 - Header 2 (MV93) 4 - iMap Header (imap) 4 - iMap Length (24) 4 - Unknown (1) 4 - Offset to mMap (44) 4 - Unknown (1217) 12 - null // mMap is the directory 4 - mMap Header (mmap) 4 - mMap Length 2 - Unknown (24) 2 - Unknown (20) 4 - Number Of Files (including nulls at the end of the directory) 4 - Number Of Files (not including the nulls at the end of the directory) 8 - Padding (all 255s) 4 - Unknown 4 - Header (RIFX) 4 - Archive Size [+18] 4 - null 4 - Unknown 4 - null // for each file 4 - File Type/Extension 4 - Length 4 - Offset 8 - null X - null padding (according to the numOfFiles fields above) // for each file 4 - File Size X - File Data 0-1 - null Padding (to multiple of 2 bytes) +---------------+ | America *.rda | +---------------+ 4 - Header 4 - Unknown 4 - Number Of Files // for each file 124 - Filename (null) 4 - Data Offset X - File Data +------------------------------------+ | American McGees Scrapland *.packed | +------------------------------------+ 4 - Header (Pozi) 4 - null 4 - Number Of Files? // for each file 4 - Filename Length X - Filename 4 - File Length 4 - File Offset X - File Data +------------------+ | Anachronox *.dat | +------------------+ // Uses ZLib compression? 4 - Header (ADAT) 4 - Directory Offset 4 - Directory Length 4 - Unknown (9) X - File Data X - Directory // go to dirOffset // for each file 128 - Filename (null) 4 - File Offset 4 - Decompressed File Length 4 - Compressed File Length 4 - Unknown (hash?) +----------------------+ | Anarchy Online *.dat | +----------------------+ 4 - Archive Size [+1] (including end padding) 4 - Unknown Size 4 - Archive Size [+1] (excluding end padding) 4 - First File Offset (512) 4 - null 4 - Unknown 4 - Unknown 4 - Unknown 8 - null 4 - Length Of Archive Header? (129) [-1] 4 - Unknown 4 - Unknown 2 - Unknown (196) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - null 4 - Unknown 16 - null 4 - Unknown 4 - Padding Byte Value? (255) 4 - Unknown (47) 4 - null 4 - Unknown 4 - Unknown 12 - null 384 - Padding to offset 512 (using (byte)255) X - File Data X - Padding to a multiple of 4096 bytes (using (byte)255) +--------------------------+ | Animal Quest *.ggl *.gsl | +--------------------------+ 2 - Unknown (big-endian) 32 - Header (Copyright (c)ALIVE SOFTWARE 1995) 94 - Unknown // for each file 1 - null 8 - Filename (terminated by spaces) 4 - File Extension (including the .) 1 - null 4 - File Offset 4 - File Size 4 - Unknown X - File Data +-------------------------------+ | Apache Longbow *.bin (Type 1) | +-------------------------------+ 4 - Number Of Files // for each file 4 - Data Offset X - File Data +-------------------------------+ | Apache Longbow *.bin (Type 2) | +-------------------------------+ 4 - Unknown // for each file 8 - Null 4 - Data Offset 12 - Null X - null padding to first file offset at 1444 X - File Data +----------------+ | Aquarium *.sdf | +----------------+ // These are WAV Audio files +----------------------+ | Aquarium *.bin + hdt | +----------------------+ // HDT contains the file offsets, BIN contains the file data // for each file 4 - File Offset +-----------------+ | Archangel *.pak | +-----------------+ // I have looked over this again and again and still can't find a way to locate // the beginning of the directory - it has to have something to do with the // archive footer, but I can't figure it. // ARCHIVE HEADER 4 - Version (1) 4 - Number Of Files // FILE DATA // for each file X - File Data 4 - Unknown (26) // DIRECTORY // for each file 4 - File Offset 4 - File Size // FILENAME DIRECTORY // for each file 4 - Filename Length (including null) X - Filename 1 - null Filename Terminator // ARCHIVE FOOTER 4 - Offset to something +--------------------------+ | Ardennen Offensive *.wrs | +--------------------------+ // This archive uses a compression algorithm structured around control characters // similar to RLE compression or plain-text compression // Control=255 means read the next 8 bytes normally // This archive probably has a separate index file for the directory? 4 - Header (WRS2) // for each file X - File Data +---------------+ | Area 51 *.dfs | +---------------+ 4 - Header (SFDX) 4 - Version (3) 4 - Unknown 4 - Padding Size (2048) 4 - Unknown 4 - Number Of Files 4 - Unknown (1) 4 - Length Of Filename Directory 4 - Unknown (48) 4 - Archive Header Length (56) 4 - null 4 - Length Of Offset Directory + Archive Header 1 - null 4 - Archive Size? 2 - null 1 - null // for each file 4 - Unknown (Filename Length?) 4 - Unknown (Filename Length?) 4 - null 4 - Unknown 4 - File Offset (Relative to the end of the directory) 4 - File Size // for each file X - Filename 1 - null Filename Terminator 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes? +----------------------+ | Armored Fist 3 *.pff | +----------------------+ 4 - First File Offset (20) 4 - Header (PFF3) 4 - Number Of Files 4 - Length Of Each Directory Entry (32) 4 - Directory Offset X - File Data X - Directory // go to directory offset // for each file 4 - End Of Directory Marker (non-null for end of directory, null for a file entry) 4 - File Offset 4 - File Size 4 - Some kind of file type identifier? 16 - Filename (null) 4 - End Of Directory Marker (ie the first field in the loop above - non-null value) 4 - null 4 - End Of Archive Tag (KING) +-------------------------------------+ | Army Men: Toys In Space *.amm *.atl | +-------------------------------------+ 4 - Header (FORM) 4 - Archive Size [+8] 4 - Archive Name (MAP ,TILE) // For each file 4 - File Type/Extension 4 - File Size (if FileType="OATT", subtract 1 from this field!) X - File Data +-----------------+ | Arsenal 2 *.adf | +-----------------+ // The files are ZLib compressed // for each file X - Encrypted Filename? (null) 4 - Decompressed File Size 4 - Compressed File Size X - File Data +-------------------+ | Arx Fatalis *.pak | +-------------------+ 4 - Directory Offset X - File Data // Directory 4 - Unknown 5 - Unknown X - Path 1 - null Path Terminator 4 - Number Of Files // for each file X - Filename 1 - null Filename Terminator 4 - File Offset 4 - Compressed Length 4 - Decompressed Length 4 - File Length +------------------+ | Ascendancy *.cob | +------------------+ 4 - Number Of Files // for each file 50 - Filename (null) // for each file 4 - File Offset X - File Data +---------------------------------------------------+ | Astérix and Obélix XXL 2: Mission Las Vegum *.kwn | +---------------------------------------------------+ // weird format - not quite right 4 - Number Of Files? (4) 4 - Number Of Files? (12) // for each file 4 - Unknown ID (usually 24) 4 - File Length 2 - Unknown 2 - Unknown (usually 7170) X - File Data 2 - Filename Length X - Filename +---------------------------------------+ | Azurik: Rise Of Perathia (XBox) *.xbr | +---------------------------------------+ // ARCHIVE HEADER 4 - Header (xobx) 4 - Version? (4) 4 - null 4 - Number Of Files 4 - First File Offset (8192) 4 - Number Of File Types 4 - Offset To File Type Directory 4 - Number Of Unknown Items 4 - Offset To Unknown Item Directory 4 - null 4 - Filename Details Directory Offset 4 - Number Of Filename Details 4 - Filename Details Directory Offset 4 - Filename Directory Offset 4 - Filename Directory Length // DIRECTORY // for each file 4 - File Offset (Relative to the first file offset) 4 - File Length 4 - File Type Name 4 - File Type ID (8=wave, 16=sdsr 128=surf) 0-8191 - Padding to a multiple of 8192 bytes // FILE DATA // for each file X - File Data 0-8191 - Padding to a multiple of 8192 bytes // FILE TYPE DIRECTORY // for each file type 4 - File Type Name 4 - Unknown // UNKNOWN ITEM DIRECTORY // for each unknown item 4 - Unknown // FILENAME DETAILS DIRECTORY // for each file 4 - File ID that this filename belong to 4 - Filename Offset (Relative to the start of the filename directory) // FILENAME DIRECTORY // for each file X - Filename 1 - null Filename Terminator +---------------------+ | Baldur's Gate *.bif | +---------------------+ 6 - Header (BIFFV1) 2 - Unknown 4 - Number Of Files 8 - Unknown // for each file 2 - File ID 2 - Unknown 4 - File Offset 4 - File Size 4 - File Type X - File Data +------------------------------------------+ | Baldurs Gate: Dark Alliance (XBox) *.lmp | +------------------------------------------+ 4 - Number Of Files // for each file 56 - Filename (null terminated) (filled with junk) 4 - File Offset 4 - File Length 0-255 - null Padding to a multiple of 256 bytes // for each file X - File Data 0-1023 - null Padding to a multiple of 1024? bytes +----------------------------+ | Batman Begins (XBox) *.003 | +----------------------------+ 4 - Header (MUSX) 4 - Unknown 4 - Unknown (6) 12 - Hash? 4 - Unknown (1) 4 - null 4 - Directory Offset (2048) 4 - Directory Length 4 - First File Offset (8192) 4 - Length Of File Data? X - Padding to offset 2048 (using byte 171) // for each file 4 - File Offset (relative to the first file offset) X - Padding to offset 8192 (using byte 171) X - File Data X - A heap of extra data // This archive seems to have a directory which only covers // about half of the archive size. Possibly there are several // directories in the archive, which the next directory found // at the "Length Of File Data" field value, but I do not know // this for sure because I do not have access to a full archive. +----------------------------+ | Batman Begins (XBox) *.005 | +----------------------------+ 4 - Header (MUSX) 4 - Unknown 4 - Unknown (6) 4 - Unknown 8 - Hash? 4 - Unknown (1) 4 - null 4 - Directory 1 Offset (2048) 4 - Directory 1 Length 4 - Directory 2 Offset 4 - Directory 2 Length 8 - null 4 - First File Offset 4 - Unknown 4 - Unknown X - Padding to offset 2048 (using byte 171) // DIRECTORY 1 4 - Number Of Files // for each file 4 - File ID? 4 - Offset to File Details [+dirOffset] // for each file 4 - Unknown ID Number 2 - null 1 - Unknown 4 - Unknown 4 - Unknown 4 - File Size? 4 - File Size? 1 - null 4 - File Size? 4 - null 4 - Unknown (0/1) 14 - null 2 - Unknown (0/10) 2 - Number Of Groups // for each group 2 - Unknown 2 - Unknown 4 - Unknown (100) X - Padding to Directory 2 Offset (using byte 171) // DIRECTORY 2 4 - Number Of Files // for each file 4 - Unknown (0/1) 4 - File Offset (relative to the first file offset) 4 - File Length 4 - Sound Sample Rate? (22050/32000) 4 - File Length 4 - File ID? (starts at 0, increments by 96) 4 - Unknown (0/1536) 4 - Unknown ID Number X - Padding to First File Offset (using byte 171) X - File Data +-----------------------------+ | Battle Isle 2 *.lib (chunk) | +-----------------------------+ 4 - Data Size? 4 - Header (TCT ) 2 - Number Of Files 2 - Unknown // for each file 8 - Filename 4 - Offset X - File Data +------------------------+ | Battlefield 1942 *.rfa | +------------------------+ // Compression is used on some of the files 4 - Directory Offset 4 - Version X - File Data X - Directory // go to dirOffset 4 - Number Of Files // for each file 4 - Filename Length X - Filename 4 - Compressed File Size 4 - Uncompressed File Size 4 - Offset 4 - Type ID? 4 - Unknown 4 - Unknown +---------------------+ | Battle Realms *.h2o | +---------------------+ // NOTE: This archive is unusual in that the directory contains 4 times more entries // than the number of files in the archive, yet it only repeats twice. 480 - Header (starting with "//" + "*" x54 + "//") 1 - Unknown (26) 4 - Version (6) 4 - Number Of Files 4 - null 4 - Decompressed File Data Size 4 - Compressed File Data Size 4 - null 4 - Compressed File Data Size 12 - null // for each file [*4] 4 - File ID? 4 - Decompressed File Size 4 - Compressed File Size 4 - Unknown 4 - File Offset 4 - null 8 - Unknown 4 - null 4 - Unknown ID X - File Data +----------------------------------+ | Battleship Surface Thunder *.mgf | +----------------------------------+ 4 - Header (MGFs) 2 - Version? (1) 2 - Version? (1) 4 - Archive Size 4 - Number Of Files 4 - First File Offset 4 - Unknown // for each file 4 - Filename offset 4 - Size 4 - Unknown 4 - Data Offset // for each file X - Filename (null) X - File Data +-------------------+ | Battlespire *.bsa | +-------------------+ 2 - Number Of Files X - File Data // for each file 14 - Filename (null) 4 - File Length +-----------------------------------------+ | Battle Strike: The Road To Berlin *.dpk | +-----------------------------------------+ // Uses ZLib compression for the files 4 - Header (DPK4) 4 - Hash? 4 - Directory Length (not including these 4 fields) 4 - Unknown // for each file 4 - File Entry Length 4 - Decompressed File Size 4 - Compressed File Size 4 - File Offset X - Filename 1 - null Filename Terminator 0-3 - null padding to a multiple of 4 bytes +--------------------+ | Battlezone 2 *.pak | +--------------------+ 4 - Header (DOCP) 4 - Version (1) 4 - Number Of Directories 4 - Directory List Offset 4 - Number Of Files? 4 - File Directory Offset 4 - Unknown 4 - null 4 - Unknown 4 - Unknown (35) 4 - Unknown (1) 4 - Unknown 4 - Unknown (35) 4 - Unknown X - File Data // File Directory // for each file 4 - Directory ID (1=the first directory in the list) 1 - Filename Length X - Filename 4 - File Offset 4 - File Length // Directory List // for each directory 1 - Directory Name Length X - Directory Name +------------------------------------+ | Beat Down: Fist Of Vengeance *.xaf | +------------------------------------+ 4 - Header ("XAF" + null) 4 - Max Filename Length (256) 28 - Description (XPEC Entertainment Inc. 2003) 4 - null 4 - Number Of Files 4 - Number Of Files [+1] 4 - Archive Size 12 - null // for each file 4 - File Offset 4 - File Length // for each file 256 - Filename (null-terminated) 4 - null X - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +----------------------------------------------------+ | Beat Down: Fist Of Vengeance *.xau (internal file) | +----------------------------------------------------+ 4 - Header ("XAU" + null) 4 - Unknown (256) 4 - Header Size (64) 4 - Unknown 8 - null 4 - Unknown (1) 36 - null X - WAVE Audio File +---------------------------+ | Betrayal At Krondor *.001 | +---------------------------+ // SAME AS 3D Ultra Pinball *.001 +--------------------------------------------+ | Big Mutha Truckers 2: Truck Me Harder *.ar | +--------------------------------------------+ 4 - Header (ARCC) 4 - Number Of Files // for each group (60) 2 - Unknown ID (usually null) // for each file 4 - Unknown 4 - File Offset (relative to First File Offset) (exclude all =0 except for the first one) 4 - Unknown ID 2 - Flags 2 - Unknown X - File Data +----------------------+ | Bionicle *.vol *.avl | +----------------------+ // SAME AS CATWOMAN 4 - Header (VOLT) 4 - Version? (2) 4 - numFiles 4 - Directory Size // for each file 4 - Unknown 4 - File Type ID? (1) 4 - File ID Number? (goes up by 25 for each file) // for each file 4 - File Offset ? 4 - null 4 - File Size ? 4 - null X - Filename (null) X - File Data +-----------------------+ | Black And White *.sad | +-----------------------+ 8 - Header (LiOnHeAd) 21 - Description (LHFileSegmentBankInfo) 11 - null 4 - First File Start [+72] // go to firstFileStart 4 - Second File Start [+32+CurrentOffset] X - File Data // go to secondFileStart 4 - Offset Value 4 - Number Of Files if (offsetVal > 0){ offsetVal = OffsetVal / NumFiles } // for each file 256 - Filename (null) (including c:\) 12 - Unknown 4 - File Length 4 - Unknown +--------------------+ | Bleach (PSP) *.fpk | +--------------------+ 4 - Header? ("xJ" + 2x null) 4 - Number Of Files 4 - Maximum Padding Size (16) 4 - Archive Length // for each file 36 - Filename (null) 4 - File Offset 4 - File Length 4 - Decompressed File Length // for each file 1 - Compression Tag (255 if compressed) X - File Data (unknown compression) 0-15 - null Padding to a mulitiple of 16 bytes +--------------------+ | Blitzkrieg 2 *.pak | +--------------------+ // Generic PK-ZIP Archive +-------------+ | Blood *.rff | +-------------+ 3 - Header (RFF) 4 - Unknown 1 - null 4 - Directory Offset 4 - Number Of Files X - Unknown +---------------+ | Blood 2 *.rez | +---------------+ 127 - Description/Header 4 - Version (1) 4 - dirOffset 4 - dirSize 4 - Unknown 4 - Offset to Last Dir 4 - Unknown 4 - null 4 - Unknown (19) 4 - Unknown (24) 4 - null 4 - Unknown (1) 13 - null X - File Data X - Directory // go to dirOffset // for each file 4 - Type (0/1) if (type == 1){ // directory 4 - offset 4 - size 4 - Date/Time X - filename (terminated by 1 null) } if (type == 0){ // file 4 - offset 4 - size 4 - Date/Time 4 - File ID? 4 - Type/Extension (reversed) 4 - null X - filename (terminated by 2 nulls!) } +--------------------+ | Bloodrayne 2 *.pod | +--------------------+ 4 - Header (POD3) 4 - Unknown (Checksum or timestamp?) 80 - Description (null) 4 - Number Of Files 4 - Unknown 4 - Unknown (1000) 4 - Unknown (1000) 160 - null 4 - Directory Offset 4 - Unknown 4 - Filename Directory Length 4 - null 4 - Padding (all 255's) 4 - Unknown X - File Data X - Directory X - Filename Directory X - russellm Filename Directory // go to dirOffset // for each file 4 - Relative filename offset (relative to the start of the filename directory) 4 - File Length 4 - File Offset 8 - Unknown (checksum?) // for each file X - Filename (null) // for each file 32 - Description (null) (russellm) 4 - Unknown ((byte)20 + "RdA") 4 - Unknown (1) 256 - Filename (null) 8 - Unknown (checksum?) 8 - null (last file is a checksum or something, maybe for the whole archive) +-----------------------------------+ | Bone: Out From Boneville *.ttarch | +-----------------------------------+ // NOTE: File Data is XOR with 255 (apparently) ??? 4 - Number Of Directories // for each directory 4 - Directory Name Length X - Directory Name 4 - Number Of Files // for each file 4 - Filename Length X - Filename 4 - null 4 - File Offset (relative to the start of the file data) 4 - File Length 4 - Data Offset 4 - Data Length X - File Data +-----------------+ | Braveheart *.io | +-----------------+ 268 - Header ("v0D.07" + nulls to fill) 4 - Number Of Files 32 - null // for each file/directory 4 - Entry Type (13=File, !13=Directory) if (entryType == 13){ 4 - File Offset (relative to the start of the file data) 4 - File Length 8 - null X - Filename 1 - null Filename Terminator } else { 4 - Number Of Files In This Directory 4 - Number Of Sub-Directories In This Directory X - Directory Name 1 - null Directory Name Terminator // for each file and sub-directory { //repeat from "// for each file/directory } } X - File Data +-----------------+ | Breakneck *.syn | +-----------------+ 4 - Header (FNYS) 4 - Number Of Files 8 - null // for each file 24 - Filename (null) 4 - Data Offset 4 - File Length X - File Data +---------------------+ | Brett Hull 95 *.rsc | +---------------------+ 2 - Number Of Files // for each file 4 - File Size 4 - Timestamp (less the first 4 numbers - ie minus 1099000000000) 4 - Data Offset 13 - Filename (null) X - File Data +---------------------------------------------+ | Brian Lara International Cricket 2005 *.bag | +---------------------------------------------+ 4 - Version (0) 4 - Number Of Files // for each file 4 - Filename Length // for each file 4 - File Length? // for each file 64 - Filename (null) // for each file 4 - File Offset (relative to the start of the file data) X - null Padding to a multiple of 256 bytes // for each file X - File Data X - null Padding to multiple of 256 bytes +---------------------------------------------------+ | Brian Lara International Cricket 2005 (PS2) *.tex | +---------------------------------------------------+ // This format is an image which stores many mipmaps. // Each mipmap is half the dimensions of the previous image. // eg if the first mipmap is 256*128, the next one is 128*64, then 64*32, etc. 2 - Image Width 2 - Image Height 2 - Unknown (5) 2 - Number Of Mipmaps (4) 8 - Unknown (all 251's) // for each mipmap X - Pixel Data // for each color (256) 1 - Red 1 - Green 1 - Blue 1 - Alpha (unused?) +-----------------------------------------+ | Brothers In Arms: Earned In Blood *.uz2 | +-----------------------------------------+ // ZLib compressed file data // for each part of the file 4 - Compressed Length 4 - Decompressed Length (32768 except for the last piece) X - Compressed Data +----------------------+ | Call Of Duty 2 *.iwd | +----------------------+ // Generic PK-Zip Archive +----------------------------------------+ | Call Of Duty: Finest Hour (XBox) *.pak | +----------------------------------------+ 60 - Header (Spark Pack (C)2004 Spark Unlimited, Inc. Author Jim Schuler.) 60 - null 4 - Version? (1) 4 - Number Of Files // for each file 4 - File Length 4 - File Offset 8 - Hash? 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +----------------------------------------+ | Call Of Duty: Finest Hour (XBox) *.rws | +----------------------------------------+ 4 - Unknown 8 - CRC? 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown (20) 4 - Unknown (16) 4 - Unknown (36) 4 - Archive Name Length? 4 - Unknown 4 - Unknown 4 - null 4 - Number Of Files 4 - Unknown 4 - Unknown (1) 4 - Unknown 4 - Unknown (2048) 4 - Unknown 4 - First File Offset (8192) 4 - null 16 - Unknown X - Archive Name 1 - null Archive Name Terminator 4 - Unknown 4 - Unknown (39) // for each file 4 - Unknown 4 - Unknown 4 - null 4 - Unknown ID (incremental by 4) 8 - null 4 - File Size 4 - File Offset (relative to the first file offset) // for each file 4 - Unknown X - Unknown to offset 8192 // for each file X - File Data +------------------------------------------+ | Call Of Duty 2: Big Red One (XBox) *.cod | +------------------------------------------+ // Some files have null offset=0 // can't work out the file offsets! 4 - Header (KAPF) 4 - Unknown 4 - Block Size (28) 4 - Unknown (2) 4 - Directory Offset (328) 4 - Unknown (4672) 4 - Offset To The End Of The Filename Directory 12 - null 2 - Number Of Blocks (8) 2 - Number Of Files 4 - Archive Header Length (76) 4 - Directory Offset (328) 8 - Description ("AUDIO" + nulls to fill) 4 - null 2 - Unknown (1) 2 - Unknown (1) 4 - Unknown (300) 4 - Unknown (4632) // for each block 4 - Unknown (for the first block, this is the First File Offset) 4 - Unknown 4 - Unknown 4 - Unknown (0/1) 12 - null 4 - Unknown 4 - Unknown 4 - Unknown 16 - null // for each file 4 - Unknown 4 - Unknown 4 - Unknown 4 - File Type ID? (0,1,2,3,4) 4 - File Length // for each file X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - null Padding to offset 32768 X - File Data +-----------------------+ | Call To Power 2 *.zfs | +-----------------------+ 4 - Header (ZFS3) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Number Of Files 4 - Unknown 4 - Unknown 4 - Unknown // for each file 16 - Filename (null) 4 - File Offset 4 - Unknown 4 - File Length 8 - Unknown X - File Data +----------------------------------------+ | Carmageddon 2: Carpocalypse Now! *.twt | +----------------------------------------+ 4 - Archive Size 4 - Number Of Files // for each file 4 - File Size 100 - Filename (null terminated) X - File Data? +----------------------------------------------------------+ | Carmageddon: Total Destruction Racing 2000 *.pak + *.dir | +----------------------------------------------------------+ // *.dir has the details, *.pak has the file data // for each file (read until EOF) X - filename (read until byte=8) 4 - Offset 4 - Size // to determine the filename, do the following // String filename = readByte(); // while (readByte() != (byte)8){ // filename += readByte(); // } // // Explaination: // Each character of the filename is split over 2 bytes, with each 2nd byte determining when to stop // When the 2nd byte is 8, stop. // Otherwise, add the next byte to the filename +------------------+ | Carnivores *.3df | +------------------+ 4 - Number Of Points 4 - Number Of Triangles 4 - Number Of Bones 4 - Texture Length // for each triangle 4 - Point 1 4 - Point 2 4 - Point 3 4 - Point 1 X 4 - Point 2 X 4 - Point 3 X 4 - Point 1 Y 4 - Point 2 Y 4 - Point 3 Y 4 - Flags 4 - Unknown 4 - Parent Triangle Index 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each point 4 - X Coordinate 4 - Y Coordinate 4 - Z Coordinate 4 - Attached Bone Index // for each bone 32 - Bone Name (null) 4 - Bone X 4 - Bone Y 4 - Bone Z 2 - Parent 2 - Unknown X - Texture Image +------------------+ | Carnivores *.car | +------------------+ 24 - Archive Name 8 - Version ("msc: " + ###) 4 - Number Of Animations 4 - Number Of Sounds 4 - Number Of Points 4 - Number Of Triangles 4 - Texture Length // for each triangle 4 - Point 1 4 - Point 2 4 - Point 3 4 - Point 1 X 4 - Point 2 X 4 - Point 3 X 4 - Point 1 Y 4 - Point 2 Y 4 - Point 3 Y 4 - Flags 4 - Unknown 4 - Parent Triangle Index 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each point 4 - X Coordinate 4 - Y Coordinate 4 - Z Coordinate 4 - Attached Bone Index X - Texture Data // for each animation{ 32 - Animation Name 4 - Divisor 4 - Number Of Frames // for each frame{ // for each point{ 2 - X Coordinate 2 - Y Coordinate 2 - Z Coordinate } } } // for each sound 32 - Sound Name 4 - Sound Length X - Sound Data // for each animation 4 - Sound ID +--------------------------------------+ | Carnivores: Cityscape *.gro (Type 1) | +--------------------------------------+ // Generic PK_ZIP Archive +-----------------------------+ | CART Precision Racing *.pod | +-----------------------------+ // Same as 4x4 Evolution *.pod (version 1) and Terminal Velocity *.pod +-------------------+ | Case Closed *.dsk | +-------------------+ // for each file 4 - Header (SPIS) 4 - Compression Header ((byte)26 + LZH) 4 - Decompressed File Size 4 - Unknown 5 - null 2 - Filename Length 2 - Unknown 4 - Unknown 4 - Decompressed File Size 4 - Compressed File Size 1 - Unknown (2) 4 - Unknown 4 - null X - Filename (null) X - File Data +---------------------------+ | Castle Of The Winds *.cwg | +---------------------------+ 2 - Header (vw) 2 - Version ((byte)1 (byte)1) (ie 1.1) 4 - Unknown // for each file 4 - File Offset // stop when the fileOffset = 0 X - null padding to first file offset (or to 128) X - File Data +----------------------+ | Catwoman *.pcm *.pcs | +----------------------+ 4 - Header (BIGB) 4 - Header Size? (484) 120 - Unknown 4 - Directory Offset [+500] 288 - Unknown 4 - Number Of Files 76 - Unknown X - File Data // go to dirOffset // for each file 2 - File Type ID (1 = tga) 2 - Unknown 4 - File Offset [+500] 4 - Offset to File Size Header [+500] // go to file offset 4 - Unknown 64 - Filename of Archive this file is located in (null) 16 - Name 1 16 - Name 2 64 - Last Edited Date 64 - Created Date 64 - Filename (null) 4 - Offset to DDS Header [+fileSizeHeaderOffset] 4 - Offset to DDS Header [+fileSizeHeaderOffset] 4 - null //NOTE - If using the file size header offset, it jumps to this position 4 - File Header Size (relative to File Offset) 4 - File Size 4 - Unknown 4 - Unknown 16 - null X - File Header (to FileHeaderSize) X - File Data +----------------------+ | Catwoman *.vol *.avl | +----------------------+ 4 - Header (VOLT) 4 - Version? (2) 4 - numFiles 4 - Directory Size // for each file 4 - Unknown 4 - File Type ID? (1) 4 - File ID Number? (goes up by 25 for each file) // for each file 4 - File Offset ? 4 - null 4 - File Size ? 4 - null X - Filename (null) X - File Data +----------------+ | Cavewars *.dbs | +----------------+ 7 - Header (wavfile) 4 - Number Of Files // for each file 4 - Offset 4 - Length X - File Data +------------------+ | Champ Kong *.bin | +------------------+ 2 - Number Of Files? // for each file 2 - File Type ID? 14 - Filename (null) 4 - Length 4 - Offset X - File Data +--------------------+ | Chaos Control *.gb | +--------------------+ 4 - Header (unknown byte + "UBA") 4 - Directory Length (including these 2 fields) // for each file 13 - Filename (null Terminated) 4 - File Offset 4 - File Length 4 - Unknown X - File Data +-------------+ | Chaser *.fs | +-------------+ 1 - null X - File Data X - Directory 4 - Directory Offset // go to directory offset 4 - Directory Size (not including the 4 dir offset at the end) 4 - Unknown (8192) 4 - Archive Name Length 4 - Version (1) 4 - Filename Directory Size 4 - Number of Files X - Archive Name (null) // for each file X - Filename (null) // for each file 4 - File Offset 4 - Compressed File Size 4 - Decompressed File Size 4 - null // Archive uses unknown compression +-----------------------+ | Chasm: The Rift *.bin | +-----------------------+ 4 - Header (CSid) 2 - Number Of Files // for each file 1 - Filename Length 12 - Filename (null) 4 - File Length 4 - File Offset X - null Padding so that the directory is a multiple of 2048 bytes // note: padding does not include first 6 bytes of the archive, only the directory! X - File Data +-------------------+ | Chill Manor *.ani | +-------------------+ 4 - Header (ANI ) 4 - Archive Size [+4] 4 - Header Tag (hdr ) 4 - Version (1) 4 - Unknown (2) 2 - Unknown (10) 4 - Number of Audio Channels (22050) 2 - Mono/Stereo (1) 2 - Bits Per Channel (8) 2 - Unknown (320) 2 - Unknown (19) 4 - Number Of Files 4 - Unknown 4 - Unknown (2205) 4 - Unknown // for each file 4 - Offset (relative to the end of the directory) X - File Data +-------------------+ | Chill Manor *.lab | +-------------------+ // for each file 12 - Filename (null) 4 - Offset X - Padding to multiple of 2048 bytes X - File Data +-------------------------------------+ | Chrome SpecForce *.zip *.pak (some) | +-------------------------------------+ // Generic ZIP archive +------------------------+ | Chrome SpecForce *.tex | +------------------------+ 4 - Unknown 4 - Number Of MipMaps? DDS Version? (1) 4 - Image Width/Height 4 - Image Width/Height 4 - null 4 - Number Of Pixels In Final Image [*2] X - DDS Image Data (no alpha) ??? +-----------------------+ | City Of Heroes *.pigg | +-----------------------+ // USES ZLib COMPRESSION 4 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 4 - Number Of Files // for each file 4 - Unknown 4 - null 4 - Decompressed File Size 4 - Unknown 4 - Offset 4 - null 4 - Unknown (all 255) 16 - Unknown (hash?) 4 - Compressed File Size (if =0, it is uncompressed, so compressedSize=decompressedSize) 4 - Unknown 4 - Number Of Filenames 4 - Filename Directory Length // for each file 4 - Filename Length X - Filename (null) X - File Data +-----------------------------------+ | Civilization: Call To Power *.ctp | +-----------------------------------+ // ZIP Archive +----------------------+ | Civilization 4 *.fpk | +----------------------+ 4 - Version? (4) 4 - Header (FPK_) 1 - Version? (1) 4 - Number Of Files? // for each file 4 - Filename Length X - Filename (each char -= 1) 1 - Filename Padding Length (including this byte) 0-3 - null Filename Padding (to a multiple of 4 bytes) 8 - Checksum? 4 - File Length 4 - File Offset 4 - Unknown (788) X - File Data +-----------------------------------------+ | Close Combat 3: The Russian Front *.sfx | +-----------------------------------------+ // SAME AS CLOSE COMBAT 4 SFX 4 - Number Of Files 4 - Year Of Archive Creation? (99) 8 - null // for each file 4 - File Size 4 - File Offset 2 - Unknown (1) 2 - Unknown (2) 4 - Unknown (8790) 4 - Sound Quality (44100) 2 - Mono/Stereo (2) 2 - Sound Bitrate (8) 4 - Unknown (da + 2*null) X - File Data +-----------------------------------------+ | Close Combat 3: The Russian Front *.zfx | +-----------------------------------------+ 4 - Number Of Files (not always correct!) // for each file 13 - Filename (null) (Warning - can have a null in the middle of the filename too!) X - null Padding to offset 7804 (some have about 20 bytes of junk near the end of the padding) // for each file 4 - File Offset X - Padding to offset 12604 (mostly nulls and other groups of junk data) // for each file 4 - File ID (incremental from number 0) 4 - File Length 476 - Padding to the start of the file (padded with Unknown 4-byte values) X - File Data +-----------------------------------------------+ | Close Combat 4: The Battle Of The Bulge *.azp | +-----------------------------------------------+ 4 - Number Of Files // for each file 256 - Filename (null) 4 - File Offset 4 - File Length X - File Data +-----------------------------------------------+ | Close Combat 4: The Battle Of The Bulge *.gdg | +-----------------------------------------------+ 4 - Header (GADG) // GADG=gdg 4 - Version (1) 4 - Number Of Files // for each file 32 - Filename (null) 4 - Unknown (0/9) 4 - File Type ID? 4 - File Offset X - File Data +-----------------------------------------------+ | Close Combat 4: The Battle Of The Bulge *.pix | +-----------------------------------------------+ 4 - Header (PICS) // PICS=pix 4 - Version (1) 4 - Number Of Files // for each file 32 - Filename (null) 4 - Image Width (800) 4 - Image Height (600) 4 - File Length 4 - File Offset X - File Data +-----------------------------------------------+ | Close Combat 4: The Battle Of The Bulge *.sfx | +-----------------------------------------------+ 4 - Number Of Files 4 - Unknown (99) 8 - null // for each file 4 - File Length 4 - File Offset 2 - Unknown (1) 2 - Unknown (1) 4 - Audio Quality (22050) 4 - Audio Quality (44100) 2 - Number Of Sound Channels (2) 2 - Audio Quality (16) 4 - null X - File Data +-------------------------+ | Codename: Panzers *.pak | +-------------------------+ // Same As SWINE *.swn // Also just called Panzers 12 - Header 4 - Directory Size 1 - Unknown // for each file 1 - Filename size X - Filename 4 - Offset 4 - Size 4 - Unknown 2 - Unknown X - File Data +-----------------------------------+ | Codename: Panzers - Phase 2 *.map | +-----------------------------------+ 4 - Header (Sr + (byte)26,27) 4 - Unknown ((bytes)13,10,135,10) 4 - Archive Type (MAPF) 4 - Archive Size [+16] 4 - Number Of Files? // for each file 4 - File Type Code (reversed) 4 - File Length (not including these 2 fields) X - File Data +-----------------------------------+ | Codename: Panzers - Phase 2 *.pak | +-----------------------------------+ // Same as Codename: Panzers *.pak 4 - Header (Sr + (byte)26,27) 4 - Unknown ((bytes)13,10,135,10) 4 - Archive Type (PACK) 4 - Directory Length 1 - null // for each file 1 - Filename size X - Filename 4 - Offset 4 - Size 4 - Unknown 2 - Unknown X - File Data +-----------------------+ | Cold Fear (PS2) *.bin | +-----------------------+ 4 - Header (DWBF) 4 - Version (1) 4 - Number Of Files? 4 - Padding Multiple (2048) // for each file 4 - Hash? 4 - File Length 4 - File Offset // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +----------------+ | Cold War *.mfs | +----------------+ // ARCHIVE HEADER 14 - Header ("MENGxV4" + (byte)18 + "PACK1" + null) 2 - Unknown (64) 4 - null 4 - Unknown 4 - null 4 - Unknown 4 - Unknown 4 - Number Of Files 4 - Unknown 4 - Unknown // FILE DATA // for each file X - File Data X - null Padding to a multiple of 4? bytes // DIRECTORY (length=4096 bytes) // for each file 4 - Unknown 4 - File Type (WBNK, SBNK) 4 - null 4 - File ID Hash? 4 - Unknown (112) 4 - Unknown 4 - File Length 4 - File Length 4 - File Offset X - null Padding to make directory length 4096 bytes +---------------------------+ | Colin McRae Rally 2 *.bfl | +---------------------------+ 4 - Header (CMPR) 4 - Archive Size X - File Data X - Directory 4 - Directory Offset [+8] // go to dirOffset // for each file 4 - File Size 4 - Offset [+8] 4 - Filename Length X - Filename 0-3 - Padding to a multiple of 4 bytes +------------------------+ | Colin McRae 2005 *.big | +------------------------+ // This archive format is not fully known yet, and it probably uses some kind of weird // structure for storing the filenames, probably partially encrypted filenames too. 4 - Header (BIGC) 4 - Unknown (Decompressed Archive Size?) 4 - Archive Size [+12] 1 - Unknown (191) 4 - Header 2 (BIGF) 2 - Unknown (3/6) // for each file X - Unknown 1 - Unknown Terminator (255) 0-3 - null Padding to a multiple of 4 bytes X - Filename (read until the . and read 3 more for the extension) 0-3 - null Padding to a multiple of 4 bytes X - File Data +--------------------------+ | Commanche Enhanced *.kdv | +--------------------------+ 4 - Header (KRL0) //note the zero, not an O 4 - archive size [-8] 4 - Header (KDV0) // once again, it is a zero 4 - archive size [-8] 4 - Number Of Files 4 - Unknown 4 - DirSize [-8] 4 - Unknown 4 - Unknown // for each file 4 - File Offset [-8] X - File Data +--------------------------+ | Commanche Enhanced *.dta | +--------------------------+ 4 - Header 1 (Kyle) 4 - Header 2 ( DTA) 4 - Archive Type? 4 - Archive Type? 48 - Description 64 - Unknown X - Unknown +---------------------------------+ | Command: Aces Of The Deep *.dyn | +---------------------------------+ 20 - Header (Dynamix Volume File) + null 2 - Unknown 4 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 4 - numFiles // for each file 4 - Unknown // for each file 13 - Filename (null) 4 - File Size X - File Data 0-3 - null padding (to a multiple of 4 bytes) +---------------------------+ | Command And Conquer *.mix | +---------------------------+ 2 - Number Of Files 4 - File Data Length // for each file 4 - File ID 4 - Data Offset 4 - File Length X - File Data +----------------------------------------+ | Command And Conquer *.vqa (chunk)(big) | +----------------------------------------+ 4 - Header (FORM) 4 - Archive Size [+8] 4 - Header 2 (WVQA) // for each file 4 - Type/Extension 4 - File Size X - File Data +-------------------------------+ | Command and Conquer: Generals | +-------------------------------+ 4 - Header (BIGF) 4 - Archive Size 4 - Number Of Files 4 - Directory Size (including this header information ie. first file offset) // for each file 4 - Offset 4 - Size X - Filename (null) X - File Data +-----------------------------------------+ | Command And Conquer: Tiberium Sun *.mix | +-----------------------------------------+ // Same as Command And Conquer 2 - Number Of Files 4 - File Data Length // for each file 4 - File ID 4 - Data Offset 4 - File Length X - File Data +----------------------------------------+ | Command And Conquer: Red Alert 2 *.mix | +----------------------------------------+ // Same as Command And Conquer 2 - Number Of Files 4 - File Data Length // for each file 4 - File ID 4 - Data Offset 4 - File Length X - File Data +-----------------+ | Commandos *.dir | +-----------------+ // for each file 32 - Filename 4 - Entry Type ID 4 - File Length 4 - Data Offset if (entryTypeID == -842150401){ // End of current directory marker } else if (entryTypeID == -842150655){ // Start of sub-directory marker // repeat from "// for each file" } else { // file } +---------------------+ | Contract JACK *.rez | +---------------------+ // SAME AS BLOOD 2 *.rez +--------------------------+ | Counterstrike XBox *.xpr | +--------------------------+ 4 - Header (XPR1) 4 - Archive Size 4 - First File Offset (2048) 4 - Number Of Files // for each file 4 - Filename Offset [+12] 4 - Data Entry Offset [+12] 4 - null // for each file X - Filename (null) X - null padding until First Data Entry Offset // for each file 2 - Unknown (1) 2 - Unknown (4) 8 - Offset [+firstFileOffset] 8 - Unknown 4 - Padding (all 255's) X - Padding to first file offset (using dashes "-") X - File Data +--------------------------------------+ | Cross Racing Championship 2005 *.rpk | +--------------------------------------+ 4 - Header (RPAK) 4 - Unknown (512) 4 - Number Of Source Packs 4 - null // for each source pack 2 - null 2 - Pack ID (incremental from 1) 60 - Pack filename (null) 4 - Directory Length 4 - Total Number Of Files 4 - Number Of Internally-referenced files (files in this archive) 4 - Number Of Externally-referenced files (pointers to other archives) // for each internal file 2 - Unknown (1/8) 2 - Unknown (0/1) 4 - Unknown 4 - Unknown 2 - Unknown (16256) 4 - File Offset 4 - File Length 1 - Filename Length (including null) X - Filename 1 - null Filename Terminator // if there are internally-referenced files, the following fields exist 12 - null 1 - null 4 - Unknown 1 - null 4 - Unknown 4 - Unknown 23 - null // for each external file 2 - Unknown (1/8) 2 - Unknown (0/1) 4 - Unknown 4 - Unknown 2 - Unknown (16256) 4 - File Offset 4 - File Length 1 - Filename Length (including null) X - Filename 1 - null Filename Terminator X - Internal File Data X - External File Pointers +----------------------------+ | Crimson Land *.paq (chunk) | +----------------------------+ // The file data is compressed using ZLIB on some files. If a file is compressed, // the compressed file data starts at offset+9 and has size length-9. 4 - Header (paq) + null // for each file X - Filename (null) 4 - File Size X - File Data +---------------------------+ | Crusader: No Regret *.flx | +---------------------------+ 128 - Unknown // for each file 4 - File Offset 4 - File Length X - File Data +----------------+ | Cultures *.lib | +----------------+ 4 - Unknown 4 - Number Of Files // for each file 2 - Filename Length X - Filename 4 - File Offset 4 - File Length X - File Data +---------------------+ | Custom Person *.arc | +---------------------+ 4 - Number Of Files // for each file X - Filename (null) 4 - Data Offset 4 - null +-----------------+ | Cyberia 2 *.bin | +-----------------+ // Ignore offsets of size 0 // for each file 4 - File Offset X - File Data +------------------+ | Cybermercs *.res | +------------------+ 2 - Number Of Files 2 - Unknown (0/1) 4 - Unknown 4 - Unknown // for each file 4 - File ID? 2 - Filename Length 2 - Encrypted? (0=normal, 101=encrypted) // for each file X - Filename (the length is obtained from the directory above) 4 - File Offset 4 - File Size X - File Data +------------------------+ | Cyclones *.glb (chunk) | +------------------------+ // for each file 4 - Type 2 - Unknown 4 - Size X - File Data // can use the first field as a header for checking if archive is valid (GOBJ) +--------------------+ | Cyclones *.cd *.hd | +--------------------+ 2 - Number Of Files 4 - dirOffset 4 - dirSize (includes all directory entries and filenames) X - fileData X - Directory // go to dirOffset // for each file 4 - Data Offset (relative to the first file offset. ie 10) 4 - File Size 4 - Filename Offset (relative to dirOffset) // Note that some files have 0 as the offset and size, this should be ignored? // for each file X - Filename (null) +-----------------+ | Daikatana *.pak | +-----------------+ 4 - Header (PACK) 4 - Directory Offset 4 - Directory Length X - File Data // Directory // for each file 56 - Filename 4 - File Offset 4 - File Length 4 - Unknown 4 - Unknown +------------------+ | Dark Reign *.ftg | +------------------+ 4 - Header (BOTG) 4 - dirOffset 4 - Number Of Files X - File Data X - Directory // go to dirOffset // for each file 28 - Filename (null) 4 - Offset 4 - Size // NOTE - The files are NOT stored in the directory in the same order as they are stored in the archive // ie. File 1 in the directory is NOT necessarily the first file in the archive starting at offset 12 +--------------------+ | Dark Reign 2 *.zwp | +--------------------+ 4 - Header (NORK) 4 - Version (1) 4 - Unknown 4 - Archive Size 4 - Number Of Files 4 - Directory Offset 32 - null X - File Data X - Directory // go to Directory Offset // for each file 4 - null 1 - Filename Length X - Filename 4 - File Offset 4 - File Length +-----------------+ | Darkstone *.mtf | +-----------------+ 4 - Number Of Files // for each file 4 - Filename Length (not including null) X - Filename 1 - null Filename Terminator 4 - Data Offset 4 - File Length? X - File Data +----------------------+ | Dark Vengeance *.rbd | +----------------------+ // NOTE: Some numbers are big-endian, others are little-endian! 4 - Unknown (512) 4 - Unknown *BIG* (76) 4 - Padding (all 255's) 4 - Unknown 56 - Header (Copyright 1998 Reality Bytes, Inc. All rights reserved.) 952 - null Padding to offset 1024 // for each item 4 - Entry Type (0=File, 1=Leaf Directory, 257=Directory with sub-directories in it) if (entryType=1 || entryType=257){ 4 - Number Of Files/Subdirectories In Directory *BIG* 4 - Number of the following entries to be read before this directory is finished *BIG* 4 - null 4 - null 4 - null 4 - null 4 - null 1 - Directory Name Length 63 - Directory Name (null) } else if (entryType=0){ 4 - File Length *BIG* 4 - File Offset *BIG* 4 - Unknown 4 - Unknown 4 - Purpose Description (SCPL, ttxt, LMAN, MSWD, 8BIM, etc.) 4 - Type Description (WAVE, TEXT, PNGf, etc.) 4 - Unknown 1 - Filename Length 63 - Filename (null) } X - File Data +------------------------+ | Darkwatch (XBox) *.pck | +------------------------+ // FILE DATA // for each file X - File Data // DIRECTORY 4 - Number Of Files (including nulls) 4 - Number Of Files (excluding nulls) 4 - Unknown (127) 4 - null // for each file 8 - Hash? 4 - File Offset 4 - File Length // for each null 8 - null 8 - Padding (all (byte)205's) // for each file 4 - File Type Hash (137183231 = *.xsb, 135088716 = *.babf) 4 - Filename Length X - Filename X - Archive Creation Date ("Tue May 24 01:14:10 2005" + (byte)10) 1 - null Archive Creation Date Terminator 2 - Unknown 4 - Unknown 4 - Directory Offset 4 - Unknown +----------------+ | Darwinia *.dat | +----------------+ // Generic RAR archive +--------------------------------------+ | Dave Mirra Freestyle BMX *.zmd *.zsd | +--------------------------------------+ 4 - Header (MODL) 4 - Archive Size [+8] // for each file 4 - Tag/Extension String 4 - File Length X - File Data +--------------------------------+ | Dave Mirra Freestyle BMX *._sd | +--------------------------------+ // for each file 4 - Tag/Extension String 4 - File Length X - File Data +--------------------------------+ | Dave Mirra Freestyle BMX *.zal | +--------------------------------+ 4 - Header (28 81 129 42) 12 - null 4 OR 84 - Unknown // for each file 1 - File ID (incrementing from 0) 3 - Unknown 4 - Data Offset (+100) 4 - Unknown 4 - File Size 0-3 - Padding to a multiple of 4 bytes X - File Data +-------------------+ | Dawn Of War *.sga | +-------------------+ // SOME FILES ARE ZLIB COMPRESSED 8 - Header (_ARCHIVE) 4 - Version (2) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 128 - Archive Name (unicode) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - File Data Offset [+180] 4 - File Data Offset (exact, no need for +180!) 4 - Descriptions Directory Offset (24) [+180] 2 - Number Of Descriptions (1) 4 - Folders Directory Offset [+180] 2 - Number Of Folders 4 - Files Directory Offset [+180] 2 - Number Of Files 4 - Filename Directory Offset [+180] 2 - Number Of Filenames // THE DESCRIPTIONS DIRECTORY OFFSET POINTS TO HERE // for each description 64 - Category / Directory 64 - Archive Name 2 - Unknown 4 - Unknown 4 - Unknown // THE FOLDERS DIRECTORY OFFSET POINTS TO HERE // THIS DIRECTORY HOLDS REFERENCES TO FOLDERS THAT CONTAIN OTHER FOLDERS IN THEM // for each folder 4 - Folder Name Offset (relative to filename directory offset) 2 - First Sub-Folder Number 2 - Last Sub-Folder Number // NOTE - IF THE 2 FIELDS ABOVE =36, THEY CONTAIN NO SUB-FOLDERS 2 - First Filename Number 2 - Last Filename Number // THE FILES DIRECTORY OFFSET POINTS TO HERE // for each file 4 - Filename Offset (relative to filename directory offset) 4 - Unknown 4 - File Offset (relative to start of the file data) 4 - Decompressed File Size 4 - Compressed File Size // THE FILENAMES DIRECTORY OFFSET POINTS TO HERE // for each folder and file X - Filename (null) // THE FILE DATA OFFSET POINTS TO HERE // for each file 235 - Filename (null) 8 - File Header (maybe a hash?) X - File Data +----------------+ | Deadlock *.cam | +----------------+ 8 - Header (CYLBPC ) 2 - Version Main (1) 2 - Version Sub (1) 4 - Number Of File Types // for each file type 4 - Size of the directory for this file type [+8] (including these 4 fields) 4 - File Type Description (WAVE) 4 - Size of each file entry (28) 4 - Number Of Files of this type 4 - null // for each file of this type 4 - Filename? File ID? 16 - null 4 - File Offset 4 - File Size X - File Data +------------------------+ | Deadlock *.hdd + *.hdx | +------------------------+ // HDD STRUCTURE (CONTAINS THE FILE DATA) // for each file 4 - File Size X - File Data // HDX STRUCTURE (THE DIRECTORY) 4 - Number Of Files // for each file 4 - Filename/FileID (null) 4 - null 4 - File Offset +---------------------+ | Dead Or Alive *.xpr | +---------------------+ // ARCHIVE HEADER 4 - Unknown 4 - File Data 2 Offset 4 - Unknown 4 - Flags 4 - Directory 2 Offset [+20] 3 - Header (MDL) 1 - null 4 - Number Of Files 4 - Archive Header Length (36) 4 - null // DIRECTORY 1 4 - Number Of Files // for each file 4 - File Offset 4 - null // FILE DATA 1 // for each file X - File Data // DIRECTORY 2 // for each file 2 - Unknown 2 - Unknown 4 - File Offset? 4 - null // for each file 2 - Unknown 2 - Unknown 4 - File Offset 4 - null 4 - Unknown 4 - End Of Directory Marker (all 255's) X - Padding (byte 173) to make Directory2 have a length of 3048 bytes // FILE DATA 2 // for each file X - File Data +------------------------------+ | Dead To Right 2 (XBox) *.pak | +------------------------------+ // ARCHIVE HEADER 8 - Unknown 4 - Directory Offset 4 - Number Of Files // FILE DATA // for each file X - File Data // DIRECTORY // for each file X - Filename 1 - Filename Terminator ((byte)10) 4 - File Offset 4 - File Length 4 - Unknown (0/2048) +-------------------------+ | Defiance *.dat (Type 1) | +-------------------------+ // Just a ZIP file +-------------------------------------+ | Defiance *.dat (Type 2) *.bio *.rez | +-------------------------------------+ 4 - Header (BRGR) 4 - Version (1) 4 - Directory Size (excluding the first 3 fields of the header) 4 - Version (1) 4 - Unknown 4 - Number Of Files // for each file 4 - Offset 4 - Length 4 - null // FILE DATA (with the following format) // for each file 4 - File Tag / Extension 4 - File Size (BIG ENDIAN ORDER) X - File Data +------------------------------+ | Def Jam - Fight For NY *.viv | +------------------------------+ // SAME AS FIFA/Need For Speed *.big/*.viv archives 4 - Header (BIGF) 4 - Archive Size (LITTLE) 4 - Number Of Files? (BIG) 4 - Directory Length (including these 4 fields) (BIG) // for each file 4 - File Offset (BIG) 4 - File Length (BIG) X - Filename 1 - null Filename Terminator 0-127 - null Padding to a multiple of 128 bytes // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +--------------------------------+ | Delta Force Land Warrior *.sbf | +--------------------------------+ 4 - Header (SBF0) // note the zero, it is not an O 4 - Unknown (256) 8 - Version? (1) 4 - Unknown (24) 4 - Number Of Files // for each file 16 - Filename 4 - Offset 4 - Size 8 - Type ID? X - File Data +--------------------------------+ | Delta Force Land Warrior *.pff | +--------------------------------+ 8 - Header 4 - Number Of Files 4 - Unknown 4 - Directory Offset X - File Data X - Directory // go to dirOffset // for each file 4 - Unknown 4 - File Offset 4 - Size 4 - Unknown 16 - Filename +--------------------------+ | Delta Force Xtreme *.pff | +--------------------------+ 4 - Header Length (20) 4 - Header (PFF3) 4 - Number Of Files 4 - Length Of File Entry (36) 4 - Directory Offset X - File Data X - Directory // go to dirOffset // for each file 4 - Unknown (usually null) 4 - File Offset 4 - File Size 4 - Hash? 16 - Filename 4 - Hash? 4 - null 8 - Hash? CRC? 4 - Null 4 - End Header (KING) +--------------------------+ | Delta Force Xtreme *.sbf | +--------------------------+ // SAME AS DELTA FORCE LAND WARRIOR *.sbf 4 - Header (SBF0) // note the zero, it is not an O 4 - Unknown (256) 4 - Version? (1) 4 - null 4 - Header Length (24) 4 - Number Of Files // for each file 16 - Filename 4 - Offset 4 - Size 4 - Type ID? 4 - null X - File Data +------------------+ | Demon Star *.glb | +------------------+ 8 - Header (GLB2.0) + null null 8 - Unknown // for each file 4 - Offset 4 - Size 20 - Filename X - File Data +---------------+ | Descent *.pig | +---------------+ 4 - Number Of Images 2 - Number Of Sounds 2 - Unknown // for each Image 8 - Filename 5 - Unknown 4 - Offset // for each Sound 8 - Filename 4 - Raw File Size 4 - Compressed File Size 4 - Offset X - Image File Data X - Sound File Data +---------------+ | Descent *.hog | +---------------+ 3 - Header (DHF) // for each file 13 - Filename (null) 4 - Size X - File Data +-----------------+ | Descent 2 *.hog | +-----------------+ // SAME AS DESCENT *.hog +-----------------+ | Descent 2 *.mvl | +-----------------+ 4 - Header (DMVL) 4 - Number Of Files // for each file X - Filename (null Terminated) 3 - Unknown 4 - File Length X - File Data +-----------------------+ | Descent 2 *.s11 *.s22 | +-----------------------+ // compressed and uncompressed sizes are the same, as no compression is used 4 - Header (DSND) 4 - Version (1) 4 - Number Of Files // for each file 8 - Filename (null) 4 - Compressed File Size 4 - Uncompressed File Size 4 - Offset (from end of directory) X - File Data +-----------------+ | Descent 2 *.sow | +-----------------+ // Unknown compression is used in this archive 4 - Unknown (header?) 4 - Unknown 2 - Unknown (16) 6 - Unknown 4 - Unknown 14 - null 14 - Archive Filename // for each file??? 2 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Compressed File Size 4 - Uncompressed File Size 4 - Unknown 2 - null 4 - Unknown (file ID?) 12 - Filename X - File Data +-----------------------------------+ | Descent 3 *.hog *.d3c *.d3m *.mn3 | +-----------------------------------+ 4 - Header (HOG2) 4 - Number Of Files 4 - First File Offset 56 - Padding (filled with bytes of value 255) // for each file 36 - Filename (null) 4 - null 4 - Size 4 - Timestamp X - File Data +---------------------------------------+ | Descent Freespace: The Great War *.vp | +---------------------------------------+ 4 - Header (VPVP) 4 - Version (2) 4 - Directory Offset 4 - Number Of Files X - File Data X - Directory // go to dirOffset // for each file 4 - File Offset 4 - File Length (0=directory, #=file) 32 - Filename (null) 4 - Type Code? (0=directory) // NOTE: Directories are stored as file entries with a length of 0. Directory names // will always build up like as normal file tree. For example, if the directory name // is valid, it is assumed that the directory is inside the current directory, but a // directory with name ".." means go back up to a previous directory. Using this method, // the files and their directories can be built up level by level. +-------------------+ | Desert Raid *.lid | +-------------------+ // for each file 10 - Filename (filled with nulls, if filename is too short) 4 - File ID? 4 - File Size 4 - File Offset X - File Data +---------------------+ | Desert Strike *.dat | +---------------------+ 8 - Number Of Files [-1] 16 - null // for each file 4 - Offset 2 - ID? 2 - Unknown 8 - Filename X - File Data +-------------------------+ | Destruction Derby *.bin | +-------------------------+ // for each file 4 - File Offset 4 - File Size? 4 - Directory/File? (0/1) 4 - File/Directory? (0/100) // NOTE - Files where first field is 1 and also where second field is 100 (not at the same time) // Directories only occur at first field 0 and second field 0 // for each file 4 - null X - File Data +-------------------------------+ | Destruction Derby *.000 *.001 | +-------------------------------+ 6 - Header (PACKED) 4 - Unknown 4 - Decompressed File Size? // if (decompressedSize != fileSize) X - ZLib Compressed Data // else X - Unknown +----------------+ | Dethkarz *.zip | +----------------+ // Generic ZIP archive +------------------------+ | Die By The Sword *.atd | +------------------------+ 4 - Number Of Files // for each file 4 - Offset 4 - Length 80 - Filename (null) X - File Data +-------------------------------+ | Die Hard Nakatomi Plaza *.rez | +-------------------------------+ // SAME AS BLOOD 2 *.rez +---------------------+ | Dink Smallwood *.ff | +---------------------+ 4 - Number Of Files // for each file 4 - File Offset 13 - Filename (null) X - File Data +------------------------------------+ | Dirt Track Racing *.pf *.pfc *.pfb | +------------------------------------+ // Same as Leadfoot *.pf +--------------------------------------+ | Dirt Track Racing - Sprint Cars *.pf | +--------------------------------------+ 4 - Version (2) X - File Data X - Directory 4 - Directory Offset 4 - Unknown // go to dirOffset 4 - numFiles? // for each file X - Filename (null) 4 - File ID 4 - Unknown // if unknown field is all 255s, add the following 2 fields{ 4 - File Offset 4 - File Size } 2 - null +--------------------------------------+ | Disney's Chicken Little (XBox) *.hog | +--------------------------------------+ 2 - Version Major (2) 2 - Version Minor (1) 4 - Number Of Files? 4 - Directory Length 4 - Padding Size (2048) 2032 - null Padding to offset 2048 // for each file 4 - File ID? 4 - File Offset 4 - File Length // for each file X - Filename 1 - null Filename Terminator 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +----------------------------------------------------+ | DLL Resource File *.dll *.msstyle *.ocx *.exe etc. | +----------------------------------------------------+ // HEADER 2 - Header (MZ) 2 - Number of Fields following??? (3) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Offset to PE Header (always 184, but not always the right value!) 4 - null 4 - Offset to MS-DOS Program (64) 32 - null 4 - Offset to PE Header (this is the correct field!) X - MS-DOS Program // PE HEADER 4 - Header (PE) // IMAGE_FILE_HEADER 2 - Target Platform (332 = 32-bit Intel) 2 - Number Of Section Tables 4 - Created Timestamp 4 - Offset To Symbol Table (usually null) 4 - Number Of Symbols In The Symbol Table 2 - Length of IMAGE_OPTIONAL_HEADER 2 - Characteristics (EXE Attributes) // IMAGE_OPTIONAL_HEADER 2 - Type Code (267 = 32-bit Intel) 1 - Visual Studio Major Version (eg. 6 = Visual Studio 6.X) 1 - Visual Studio Sub Version (eg. 1 = Visual Studio X.1) 4 - Length of IMAGE_SCN_CNT_CODE section 4 - Length of Initialized Data 4 - Length of Uninitialized Data 4 - Offset to Program Entry Point 4 - Base Of Code 4 - Base Of Data 4 - Type Of EXE File (268435456 = DLL) 4 - Section Alignment 4 - File Alignment (Padding Size? usually 4096) 2 - Major OS Version 2 - Minor OS Version 2 - Major Image Version 2 - Minor Image Version 2 - Major Subsystem Version 2 - Minor Subsystem Version 4 - Win32 Version (unused - usually null) 4 - Length Of Image (length of executable data? - multiple of the SectionAlignment) 4 - Length Of Headers (length of all headers, resources, etc. - multiple of the FileAlignment) 4 - Checksum 2 - Subsystem Required 2 - DLL Characteristics 4 - Length Of Stack Reserve (initial memory size alocated to this file?) 4 - Length Of Stack Commit 4 - Length Of Heap Reserve 4 - Length Of Heap Commit 4 - Loader Flags (unused) 4 - Number Of Entries In The Data Directory (16) // DATA DIRECTORY // for each entry 4 - Virtual Address To Data (offset) 4 - Length Of Data // SECTION TABLES // for each section table 8 - Section Name (null terminated) (.rsrc = Resource) 4 - Virtual Length (length of data - kinda) 4 - Virtual Address (offset to data - kinda) 4 - Length Of Raw Data (multiple of FileAlignment) 4 - Offset To Raw Data (multiple of FileAlignment) 4 - Offset To Relocations 4 - Offset To Line Numbers 2 - Number Of Relocations 2 - Number Of Line Numbers 4 - Characteristics // ( GUESSED FROM THIS POINT ONWARDS!!! ) // RESOURCE TABLE 4 - Characteristics? (null) 4 - Timestamp? (null) 4 - Version Number? (null) 2 - Number Of Names Entries 2 - Number Of ID Entries (Different Languages?) // for each named entry + each ID entry 4 - Resource Name OR ID (ignore bit#32) if (bit#32 == 1) // Offset To Resource Name (relative to the start of the resource table) else // The first 2 bytes are the resource ID, the last 2 bytes are null 4 - Offset To Resource (relative to the start of the resource table) if (bit#32 of resourceOffset == 1) // offset points to a nested resource table (repeat from "//RESOURCE TABLE") else // offset points to the details for this resource // RESOURCE DETAILS // for each resource 4 - File Offset 4 - File Length 8 - null // RESOURCE NAMES // for each named resource 2 - Filename Length [*2 for unicode] X - Filename (unicode) // RESOURCE DATA // for each resource X - File Data X - Other Table Data X - Executable Data +-----------------------------------+ | Domination: Massive Assault *.dat | +-----------------------------------+ // Continue reading until you get offsets of length 0 4 - Header (XDAT) // for each file 4 - File Type ID? (1) 4 - File Offset 4 - File Length 48 - Filename (null) (filled with junk padding) X - File Data +------------------------------------+ | Dominion - Storm Over Gift 3 *.000 | +------------------------------------+ // FirstFileOffset = DirectorySize + 60 4 - Unknown 4 - Directory Size (Size of all the file entries) 4 - null 4 - Unknown (9) 4 - Unknown (2) 4 - Unknown (64) 4 - Unknown (1) 12 - null 4 - Number Of Files 4 - Unknown (64) 12 - null // for each file 4 - File Size 252 - null X - File Data +------------------------------------+ | Dominion - Storm Over Gift 3 *.rdf | +------------------------------------+ // Number of files is = (arcSize-dirOffset)/128 56 - Header ("Resource Data File " + (byte)254 + " Copyright (c) 1997 Ion Storm, Ltd." + (byte)10) 8 - null 128 - Description (null) 4 - Unknown 4 - Unknown 4 - Directory Offset X - File Data X - Directory // Go to directory offset // for each file 118 - Filename (null) 2 - File ID 4 - Length 4 - Offset +-------------------------------------+ | DragonBall Z: Budokai 3 (PS2) *.afs | +-------------------------------------+ // Same As Leisure Suit Larry: Manga Cum Laude *.afs +-------------------+ | Dragonshard *.h2o | +-------------------+ 8 - Header (LIQDLH2O) 4 - Version (float - 8.0) X - Comments 1 - Comment Terminator (26) 4 - Version (8) 4 - Number Of Files 8 - Unknown 8 - Decompressed File Data Size 8 - Decompressed File Data Size 8 - null // Directory // for each file 4 - Compression Tag (0=Uncompressed, #=Compressed) 4 - Directory Name Index (-1 for no directory) 4 - Filename Index (-1 for blank file entries) 4 - File ID (incremental from 0) 4 - Decompressed File Size 4 - Compressed File Size 8 - File Offset 4 - Checksum CRC32 4 - Unknown // File Data // for each file if (compressed){ 4 - Compressed Length 4 - Decompressed Length 4 - Checksum CRC32 X - Compressed File Data } else { X - File Data } // IF THERE IS A *.lqr FILE WITH THE SAME NAME... // LQR FILE 64 - Unknown // for each file 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Filename ID (incremental from 0) 2 - Unknown (1) 4 - Filename Length [*2 for unicode] (including null terminator) X - Filename (unicode text) 2 - null Filename Terminator +-------------------+ | Dragonshard *.lqr | +-------------------+ // Only partially investigated // Some strings have length 0 X - Unknown // for each string 4 - null 4 - String ID (incremental from 0) 2 - Unknown (1) 4 - String Length [*2 for unicode text] (including the terminating null X - String (unicode text) X - Unknown +--------------+ | Driver *.lev | +--------------+ // Archive Header 4 - Unknown 4 - Archive Header Length (12) 4 - Filename Directory Length (not including this 12 byte header) // Filename Directory // for each file X - Filename 1 - null Filename Terminator X - Optional null Padding 4 - null // File Data X - File Data +----------------+ | Driver 3 *.gsd | +----------------+ 4 - Header (01KB) 4 - Number Of Files // for each file 4 - File Offset 4 - Archive Length X - null Padding to multiple of 2048 bytes // for each file 4 - Number Of Trailing 4-byte Fields 4 - Header Size 4 - File Length 4 - null X - Header (size of field = headerSize-16) X - File Data // for each trailing 4-byte field 4 - Unknown } X - null Padding to a multiple of 2048 bytes +----------------------------------------------------------------------------------+ | Driver 3 *.cpr *.d3s *.dam *.gfx *.map *.mec *.mpc *.pcs *.pmu *.vgt *.vvs *.vvv | +----------------------------------------------------------------------------------+ 4 - Header (CHNK) 4 - Archive Size 4 - Number Of Chunks 4 - Unknown (3) // for each chunk 4 - Chunk Type Header (MDPC, PCSL, etc) 4 - File Offset 2 - Chunk Type Code Number? 2 - Chunk Type Specific Number? 4 - File Length if (CodeNumber == 4096){ // the chunk type header is a code number, not a human-readable string } 0-4095 - Padding (repeated 161,21,192,222) to a multiple of 4096 bytes // for each chunk X - File Data 0-4095 - Padding (repeated 161,21,192,222) to a multiple of 4096 bytes +----------------+ | Driver 3 *.xmv | +----------------+ // Bink Video +----------------------+ | Dr Muto (XBox) *.001 | +----------------------+ // for each file 4 - File Extension/Type (reversed string) 4 - File Length (including all these fields and padding) 4 - Padding multiple (2048) 2 - Unknown (6) 2 - Unknown (1) X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +--------------------+ | Duke Nukem 2 *.cmp | +--------------------+ // for each file 12 - Filename 4 - Offset 4 - Size X - File Data +---------------------+ | Duke Nukem 3D *.grp | +---------------------+ 12 - Header (KenSilverman) 4 - Number Of Files // for each file 12 - Filename (null) 4 - File Size X - File Data +---------------------+ | Duke Nukem 3D *.wad | +---------------------+ 4 - Header (IWAD) 4 - Number Of Files 4 - Directory Offset X - File Data // Directory // for each file 4 - File Offset 4 - File Length 8 - Filename +--------------+ | Dune 2 *.pak | +--------------+ // for each file 4 - File Offset X - Filename 1 - null Filename Terminator X - File Data +----------------------+ | Dune 3 *.bag + *.idx | +----------------------+ // The *.idx file contains the directory, the *.bag file contains the file data 4 - Header (GABA) 4 - Unknown 4 - Number Of Files // for each file 16 - Filename (null) 4 - Data Offset 4 - File Length 4 - Frequency 4 - File Type ID (2,6=*.w, 12,28=*.cmp, 37=*.mp3) 4 - Unknown +--------------+ | Dune 3 *.rfd | +--------------+ // for each file 4 - Filename Length 4 - Date 4 - Compressed? 4 - Compressed Length 4 - Decompressed Length 4 - Data Offset X - Filename X - File Data +----------------------+ | Dungeon Keeper *.dat | +----------------------+ // You need to be careful when reading this archive type because, for some reason, // the files are listed multiple times. Therefore, after reading the entire directory, // you should remove duplicated. Also, there are padding files with the "Padding File // Indicator" field set to 255 and "Offset" field set to 0 - these should be ignored. X - File Data // Directory 26 - null 4 - Unknown 2 - null // for each file 18 - Filename (null) 4 - File Offset 4 - null 4 - File Size 2 - Padding File Indicator (0=File, 255=Padding) // Tail Data 4 - null 4 - Unknown (1) 10 - null 32 - Padding (all (byte)255) 4 - Directory Offset 4 - null 4 - Number Of Files? 4 - Directory Offset 96 - Padding (all (byte)255) 16 - null 4 - Directory Offset 4 - Number Of Files? 48 - null 4 - Offset to Tail Data +---------------------+ | Dungeon Lords *.000 | +---------------------+ 4 - Number Of Files // for each file 4 - File ID 4 - File Offset 4 - File Length X - File Data +---------------------+ | Dungeon Lords *.pak | +---------------------+ // Some files have null for both offset and length fields - just ignore them. // Repeat the loop until you reach the first file offset // for each file 4 - File Offset 4 - File Length X - File Data +-----------------------------------+ | Dungeon Siege 2 *.ds2map *.ds2res | +-----------------------------------+ // Compressed files use ZLib compression, broken up into separate ZLib chunks of size 16384 // rather than compressing the whole file as a single chunk. 8 - Header (DSg2Tank) 4 - Unknown 4 - Directory 1 Offset 4 - Directory 2 Offset 4 - Length Of XXX Directory? 4 - First File Offset 4 - Directory Length 28 - null 30 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 400 - Copyright Information ("Copyright (C) 1998-2004 Gas Powered Games. All rights reserved") (unicode text) (null terminated) 200 - Archive Description (unicode text) (null terminated) 84 - Company Information ("Gas Powered Games") (unicode text) (null terminated) 8 - Unknown (2) 8 - Unknown (2) 16 - null Padding to the first file offset X - File Data // DIRECTORY 1 4 - Number Of Sub-Directories // for each sub-directory 4 - Offset To Sub-Directory (relative to the Directory 1 Offset) // SUB-DIRECTORIES // for each sub-directory 4 - Offset To Parent Directory 4 - Number Of Files 8 - Hash? 2 - dirName Length X - dirName 0-3 - null Padding to a multiple of 4 bytes // for each file in this sub-directory 4 - Offset to sub-directory details or file details (pointer into dir1 or dir3) 16 - null Padding // DIRECTORY 2 4 - Number Of Files // for each file 4 - Offset To File Details for this file (relative to Directory 2 Offset) (pointer into dir3) // DIRECTORY 3 // for each file 4 - Offset To Parent Directory (relative to Directory 1 Offset) 4 - Decompressed File Size? 4 - File Offset [+firstFileOffset] 4 - Unknown 8 - Hash? 4 - Compressed Tag? (0/1) 2 - Filename Length X - Filename 1-4 - null Padding so filenameField+filenameLengthField is a multiple of 4 bytes if (compressionTag == 1){ 4 - Compressed Length 4 - Maximum Chunk Size (16384) while (MoreDetailsMarker != 0){ 4 - Decompressed Size Of Chunk 4 - Compressed Size Of Chunk [+16 if moreDetailsMarker == 16] 4 - More Details Marker (0=no more comp data, 16=another comp data follows) 4 - Unknown } } +-----------------------+ | EA Cricket 2004 *.gob | +-----------------------+ X - File Data // Directory // for each file 16 - MD5 Hash 4 - Data Offset 4 - File Length 4 - Unknown 4 - Number Of Files 4 - Directory Length 2035 - Unknown +-----------------------------+ | EA Cricket 2005 (PS2) *.ssh | +-----------------------------+ 4 - Header (SHPS) 4 - File Length 4 - Version? (1) 4 - File Code (G359) 4 - Filename (batt) 4 - Header Size? (48) 4 - Group Name? (Buy ) 4 - ERTS Header (ERTS) 16 - null 4 - Decompressed Image Size? 2 - Image Width/Height 2 - Image Width/Height 4 - null 4 - Unknown (8192) X - Image Data (up to fileLength-256) 4 - EAGL Header (EAGL) 236 - Description (240 metal bin attachment for runtime texture management) (null to fill) 4 - Unknown (112) 4 - Filename (batt) 8 - null +-----------------------------+ | EA Cricket 2005 *.big *.gob | +-----------------------------+ // Same as Command And Conquer Generals BIG_BIGF +-----------------------+ | EA Cricket 2005 *.vp6 | +-----------------------+ // "MVhd" can be used as an archive validator as the first file always has this file type code // for each file 4 - File Type Code 4 - File Length (including these 2 fields) X - File Data +-----------------+ | Earth 2160 *.wd | +-----------------+ // ZLib compression X - Compressed Archive Header X - Compressed File Data X - Compressed Directory 4 - Compressed Directory Length // When the directory is decompressed (ZLib) it has this structure 8 - Unknown 2 - Number of Files // for each file 1 - Filename Length X - Filename 1 - null 4 - File Offset if (fileOffset <= 0 || fileOffset > arcSize){ // directory 15 - Unknown } else { // file 4 - Compressed File Length 4 - Decompressed File Length } +------------------------+ | Earth And Beyond *.mix | +------------------------+ // The files in the directory have a different order to the files stored in the archives // HEADER 4 - Header (MIX1) 4 - Directory Offset 4 - Filename Directory Offset 4 - null // FILE DATA // for each file X - File Data // DIRECTORY 4 - Number Of Files // for each file 4 - Unknown 4 - File Offset 4 - File Length // FILENAME DIRECTORY 4 - Number Of Files // for each file 1 - Filename Length (including null terminator) X - Filename 1 - null Filename Terminator +------------------------+ | Earthworm Jim 3D *.dat | +------------------------+ 4 - numFiles // for each file 4 - File Offset 4 - Unknown (sometimes nulled by 64,0,64,0) 4 - Unknown (0,4,0,7) // for each file 2 - Filename Length (including null) X - Filename (null) X - File Data +------------------------------+ | Echelon *.cmp *.dat (Type 1) | +------------------------------+ // NOTE - the first file offset and length are 0; 4 - Header (EVG1) 4 - Length of Directory (not including this and the above field) // for each file 4 - File Offset (relative to the start of the file data) 4 - File Size X - File Data +------------------------------+ | Echelon *.dat (Type 2) *.sfx | +------------------------------+ 4 - Header (DATA, DMAT, DSFX, DXMC, GSND, MEOS, PARS, PICS, TEXS) 4 - Number Of Files 4 - Length Of File Data 4 - Length Of Filename Directory // for each file 4 - Unknown (Hash?) 4 - Offset to the filename (relative to the start of the filename directory) 4 - File Size 4 - File Offset X - File Data X - Filename Directory 0-16 - null Padding to make the filename directory a multiple of 16 bytes // Go To ArchiveLength + LengthOfFileData (ie start of filename directory) // for each file X - Filename (null) ///// HEADER CODE REPRESENTATIONS ///// // DATA = Generic Data, Uncategorized // DMAT = Materials // DSFX = Sound Files // DXMC = ??? // GSND = Sound Data (volumes etc?) // MEOS = Objects // PARS = Particles // PICS = Pictures // TEXS = Textures +----------------------------+ | Elder Scrolls: Arena *.bsa | +----------------------------+ // Same As Battlespire *.bsa 2 - Number Of Files X - File Data // for each file 14 - Filename (null terminated) 4 - File Length +----------------+ | Empire 2 *.dat | +----------------+ // BIG ENDIAN 32 - Unknown // for each file 6 - Filename 4 - File Offset X - File Data +----------------------+ | Empire Earth 2 *.zip | +----------------------+ // Generic ZIP archive +-----------------------------------------+ | Empires: Dawn Of The Modern World *.ssa | +-----------------------------------------+ 4 - Header (rass) 4 - Version (1) 4 - null 4 - dirSize // for each file 4 - Filename Length X - filename 4 - offset 4 - Size [-1?] 4 - Unknown X - File Data // Some are PK compressed? +------------------------------------------------+ | Empires: Dawn Of The Modern World *.spt, *.aud | +------------------------------------------------+ // WAVE AUDIO // Some are PK compressed? +--------------------------------+ | Emperor: Battle For Dune *.bag | +--------------------------------+ 4 - Header (GABA) 4 - Version (4) 4 - Number Of Files 4 - Size Of Each Directory Entry (64) // for each file 32 - Filename (null) 4 - Offset 4 - Length 4 - Audio Quality (22050) 4 - File Type? (6,28,37) 4 - Unknown 12 - null X - File Data +---------------------+ | Enemy Nations *.dat | +---------------------+ 4 - Header (WSDF) 4 - Directory Size (not including these 2 fields) // for each file 4 - Filename Length (including null padding to a multiple of 4 bytes) X - Filename 1-4 - (null) Padding to a multiple of 4 bytes 4 - Offset X - File Data +------------------------+ | Enter The Matrix *.asb | +------------------------+ // This archive uses the dash (-) for a filler or unspecified values // most noticable in groups of 4 dashes // also, I can't see why the file offsets don't start right after the directory, // nor continue to the end of the archive 4 - Directory Size (including the directory and all this header stuff) 4 - Header Size (32) 4 - Unknown 4 - numFiles 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Filler 4 - numIDs? [-5] 4 - Filler 4 - Unknown // for each ID 4 - ID number 120 - Filler 212 - Unknown // for each file 4 - File Offset X - File Data +------------------------+ | Enter The Matrix *.car | +------------------------+ // Not an archive? 4 - Version (1000 as a string) 8 - null 4 - Unknown 12 - null 2 - Unknown (1) 2 - Unknown (1)(big) 32 - Filename 1 (null) 32 - Internal Name (null) 32 - Filename 2 (null) 8 - null X - Unknown +------------------------+ | Enter The Matrix *.dcx | +------------------------+ // if any filename is too long, it is cut off 4 - null 16 - Filename (null) 24 - Unknown 4 - numFiles 48 - Unknown // for each file 32 - Filename 4 - Unknown 4 - Unknown (same as above unknown) 4 - File Type? 4 - File Size 4 - File ID or Timestamp? 12 - null X - File Data +-----------------+ | Entomorph *.lib | +-----------------+ 4 - numFiles // for each file 4 - File Offset 4 - File Size X - File Data +-----------------+ | Entomorph *.tlb | +-----------------+ 4 - Header 1 (HLIB) 4 - Archive Size 4 - numFiles 4 - Header 2 (TIL2) // for each file 4 - File Offset X - File Data +--------------------+ | Entrepreneur *.mtd | +--------------------+ 6 - Header (MTDLIB) 4 - Unknown // for each file 6 - File Header Tag (LIBBLK) 4 - File Size 4 - Extension/Type Tag 1 - Version (1) 20 - Filename X - File Data +--------------------+ | Entrepreneur *.sfx | +--------------------+ // Just a WAVE audio file +---------------------------------------------+ | Epic Warhammer 40k - Final Liberation *.muk | +---------------------------------------------+ 34 - Header (MUK file (C) Holistic Design 1997 + (byte)26) 6 - null 4 - Unknown 10 - null // for each file 13 - Filename (null) 4 - Offset 4 - Length X - File Data +---------------------------------------------------+ | Escape From Monkey Island (Monkey Island 4) *.lab | +---------------------------------------------------+ // Same as Star Wars Episode 1 *.lab +----------------------------+ | Escape Velocity Nova *.rez | +----------------------------+ // Similar to Defiance *.rez 4 - Header (BRGR) 4 - Version (1) 4 - Directory Size (excluding the first 3 fields of the header) 4 - Version (1) 4 - Unknown 4 - Number Of Files // for each file 4 - Offset 4 - Length 4 - null (last file = length of directory and header data [+12]) X - Resource Name (resource.map) 1 - null Resource Name Terminator X - File Data +----------------+ | Esoteria *.22k | +----------------+ 4 - Header (cgds) 4 - Number Of Files [-1] // for each file 4 - Offset 4 - Archive Size X - File data +---------------+ | Esoteria *.e3 | +---------------+ 7 - Header (ESv1.0 ) 1 - Sub-type ((byte)96 or (byte)97 or (byte)99 or (byte)104 or (byte)105) 4 - Number Of Files // for each file 64 - Filename (null) 4 - Offset 4 - Length X - File Data +-------------------------------+ | Esoteria *.e3 (Internal Type) | +-------------------------------+ 7 - Header (ESv1.0 ) 1 - Sub-type ((byte)48 or (byte)83 or (byte)84 or (byte)94) 4 - null 4 - Type Name Length (including null) // NOTE: THE FOLLOWING 2 FIELDS DON'T APPEAR IF TypeNameLength=99 X - Type Name 1 - null 4 - null 4 - Filename Length (sometimes including null) X - Filename (null) (without extension) 18 - null X - File Data +------------------+ | Etherlords *.res | +------------------+ // Note: The files in the directory are in a different order to the files in the archive // eg File 1 in the directory might be File 273 in the archive // Also, the filenames in the filename directory do not have nulls in between them 4 - Header? ((bytes)60,226,156,1) 4 - Number Of Files 4 - Directory Offset 4 - Filename Directory Length // FILE DATA // for each file X - File Data // DIRECTORY // for each file 4 - Unknown 4 - File Length 4 - File Offset 4 - Unknown 2 - Filename Length 4 - Filename Offset (relative to the start of the filename directory) // FILENAME DIRECTORY // for each file X - Filename +--------------------+ | Etherlords 2 *.res | +--------------------+ 4 - Header? ((bytes)60,226,156,1) 4 - Number Of Files 4 - Directory Offset 4 - Filename Directory Length // File Data // for each file X - File Data // Directory // for each file 4 - Unknown 4 - File Length 2 - Filename Length 4 - File Offset 4 - Filename Offset (relative to the start of the filename directory?) // Filename Directory // for each file X - Filename +-----------------+ | Euro 2000 *.viv | +-----------------+ // SAME AS FIFA *.big/*.viv +--------------------+ | Eve Online *.stuff | +--------------------+ 4 - Number Of Files // for each file 4 - File Length 4 - Unknown X - Filename 1 - null Filename Terminator X - File Data +--------------------------------------------+ | Evil Islands: Curse Of The Lost Soul *.res | +--------------------------------------------+ // Same as Etherlords *.res +---------------------------+ | Expendable *.bdf (Type 5) | +---------------------------+ // NOTE - there are numerous entries that are totally null, and the directory is // padded to the first file offset using nulls 256 - Header ("BDF5 Rage Games Sound BDF Standard" + (bytes)13,10 + "BDF5 Created By Phil Scott (Rage Newcastle)" + (bytes)13,10 + nulls to fill) // for each file 4 - File Offset 4 - File Length 2 - Mono/Stereo? (1) 2 - Sound Quality (22050) 2 - Unknown (1) 2 - Unknown (1) 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 64 - Filename (null terminated) X - File Data +--------------------------+ | Expendable *.bdf + *.dta | +--------------------------+ // *.dta contains the directory, *.bdf contains the file data // DTA STRUCTURE // NOTE - Some filenames are empty, but still have the 2 terminating null bytes // Also, some file offsets and file lengths are null 4 - Header? (241,45,194,1) 4 - Number Of Files 4 - Length Of Filename Directory // for each file 4 - Filename Offset (relative to the start of the filename directory // for each file 4 - File Offset // for each file 4 - File Length // for each file X - Filename 2 - null +-------------------------------+ | Extreme Pinball *.bnd + *.idx | +-------------------------------+ // IDX has the details, BND has the file data // for each file 4 - File ID 4 - Unknown 4 - File Type ID 4 - File Offset +------------------------+ | European Air War *.cdf | +------------------------+ // for each file 4 - Next Entry Offset 4 - File ID? 13 - Filename (null) 4 - Offset 4 - Size 5 - Unknown X - File Data +------------------------+ | European Air War *.bgm | +------------------------+ // THESE ARE WAVE AUDIO FILES +----------------------------+ | Evasive Action *.bbm *.lbm | +----------------------------+ // Same as generic LBM_FORM +-------------------+ | Evil Genius *.erb | +-------------------+ 4 - Header (KCAP) 4 - Version (2) 4 - Directory Offset X - File Data X - Directory // go to Directory Offset 4 - Number Of Files // for each file X - Filename (null) 4 - File Size 4 - File Offset 4 - null 4 - Unknown 4 - Unknown +-----------------------+ | Excessive Speed *.vol | +-----------------------+ // Uses ZLib Compression for some files // for each file 2 - Header (VF) 1 - null 1 - Compressed (0=not compressed / 128=compressed) 4 - Compressed File Size (or junk if not compressed) 4 - Decompressed File Size X - File Data +---------------------------------+ | F-14 Fleet Defender *.rnc (big) | +---------------------------------+ 4 - Header (RNCA) 4 - Unknown 3 - Unknown // for each file X - Filename (null) 4 - File Offset // for each file 4 - Header (RNC) + (byte)1 4 - Unknown 4 - File Size (without the header data) 2 - Unknown 2 - Unknown 2 - Unknown X - File Data +------------------------------+ | F-16 Multirole Fighter *.pff | +------------------------------+ // Same as other *.pff PFF3 +------------------------------+ | F-16 Multirole Fighter *.sbf | +------------------------------+ // Same as other *.sbf SBF0 +------------------------+ | F-22 Lightning 2 *.res | +------------------------+ 12 - Header (RESOURCE2xxx) 4 - Number Of Files 4 - Unknown 4 - Unknown 4 - Unknown // for each file 4 - Offset 4 - Size 4 - Unknown 4 - Unknown 4 - Unknown X - File Data +-------------------+ | F-22 Raptor *.pff | +-------------------+ // SAME AS DELTA FORCE *.pff 4 - First File Offset (20) 4 - Header (PFF0) // NOTE - IT IS A ZERO! 4 - Number Of Files 4 - Length Of Each Directory Entry (32) 4 - Directory Offset X - File Data X - Directory // go to directory offset // for each file 4 - null 4 - File Offset 4 - File Size 4 - Some kind of file type identifier? 16 - Filename (null) +--------------------------------+ | Fable: The Lost Chapters *.??? | +--------------------------------+ 8 - Header (LiOnHeAd) 32 - Description (LHAudioBankCompData) (null-terminated) 4 - Directory Offset // FILE DATA // for each file 4 - File ID (same as in the DIRECTORY) 2 - Mono/Stereo? (1) 2 - Sample Rate (22050) 2 - Sound Range (40000) 4 - Unknown (1) 4 - Hash? 4 - Unknown (100) 4 - Unknown (16320) 2 - Unknown (16784) 4 - Unknown (500) 4 - Padding (all 255's) X - File Data // DIRECTORY 32 - Header (LHAudioBankLookupTable) (null-terminated) 4 - Directory Length (not including this field and the header) 4 - Unknown (500) 4 - Number Of Files // for each file 4 - File ID (incremental from 1) 4 - File Length 4 - File Offset (relative to the FILE DATA offset) // END DATA 32 - Header (LHFileSegmentBankInfo) (null-terminated) 4 - End Data Length (not including this field and the header) 260 - Archive Description 1 (\Generated bank for Fable) (null-terminated) 260 - Archive Description 2 (NoFPNameYet) (null-terminated) 4 - Unknown (4) +--------------------------+ | Fahrenheit *.dat + *.idm | +--------------------------+ // The *.idm contains the directory, the *.dat contains the file data // IDM FILE 20 - Header (QUANTICDREAMTABIDMEM) 4 - Padding Size? (64) 4 - Unknown (5) 4 - Unknown (8) 4 - Unknown (273) 4 - Unknown 4 - Unknown (7) 4 - Unknown (273) 4 - Unknown 4 - Unknown (10) // for each file 4 - File ID? 4 - File Offset 4 - File Length 4 - Unknown // DAT FILE X - Header Stuff // for each file X - File Data X - Padding (using (byte)45) +----------------+ | Falcon 4 *.zip | +----------------+ // Just a generic ZIP_PK archive +--------------------+ | Fallen Haven *.sti | +--------------------+ // Generic Bitmap *.bmp Image +---------------------+ | Fallout *.dat (big) | +---------------------+ 4 - Number of Directories 4 - Unknown 2 - null 4 - Unknown 2 - Unknown // for each directory 1 - Directory Name Length X - Directory Name 4 - Unknown 4 - Unknown 4 - Unknown (16) 4 - Unknown // for each file 1 - Filename Length X - Filename 4 - Unknown (64) 4 - File Offset 4 - Decompressed File Size 4 - Compressed File Size X - File Data +-----------------+ | Fallout 2 *.dat | +-----------------+ // THE COMPRESSION USED IS ZLIB X - File Data X - Directory 4 - Directory Length [+8] 4 - Archive Size // go to ArchiveSize - DirectoryLength 4 - Number Of Files // for each file 4 - Filename Length X - Filename 1 - Compression Tag? (1) 4 - Decompressed File Size 4 - Compressed File Size 4 - Offset +-------------------------+ | Fantastic 4 (XBox) *.fs | +-------------------------+ // FILE DATA // for each file X - File Data X - padding to a multiple of 2048 bytes (using (byte)255) // FILENAME DIRECTORY 4 - String Header (STR ) 4 - Filename Directory Length // for each file X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes // DIRECTORY 4 - Directory Header (DIR ) 4 - Directory Length // for each file 4 - Unknown (often null) 4 - File Offset [*2048] 4 - File Length 4 - Filename Offset (relative to the start of the filename directory) 4 - End Header (END ) 8 - null 4 - Filename Directory Offset 28 - null 4 - Filename Directory Offset +---------------------+ | Far Cry *.cgf *.cga | +---------------------+ 6 - Header (CryTek) 2 - Unknown 2 - null 2 - Unknown 4 - Unknown 4 - Directory Offset (can be all 255's, not sure what to do here if not a real value!) X - File Data X - Directory // go to dirOffset 4 - Number Of Files // for each file 2 - ID? 2 - Unknown (both 204) 1 - Group ID? 1 - File Type (0 = Archive Description, 9 = Root Directory?, 8 = Directory, 7 = File) 2 - null 4 - File Offset 4 - File Number (starting at 0) // at each file offset // IF TYPE = 0 X - Description (read until the next field = 14) 2 - ID? (14) (same as ID in dirEntry) 4 - Unknown 2 - Unknown 4 - File Offset (same as in dirEntry) 4 - File Number (same as in dirEntry) // IF TYPE = 9 2 - ID? (same as ID in dirEntry) 4 - Unknown 2 - Unknown 4 - File Offset (same as in dirEntry) 4 - File Number (same as in dirEntry) // IF TYPE = 8 2 - ID? (same as ID in dirEntry) 4 - Unknown 2 - Unknown 4 - File Offset (same as in dirEntry) 4 - File Number (same as in dirEntry) 4 - File Type / Extension? 4 - Unknown (160) 12 - Description (GlobalRange + null) 4 - File Number (same as in dirEntry) 4 - Offset? 4 - Unknown 4 - Unknown 8 - null 8 - Size? // IF TYPE = 7 2 - ID? (same as ID in dirEntry) 4 - Unknown 2 - Unknown 4 - File Offset (same as in dirEntry) 4 - File Number (same as in dirEntry) 128 - Description of item (null) X - File Data +---------------+ | Far Cry *.pak | +---------------+ // ZIP Archive +---------------------------+ | Far Cry - Instincts *.dat | +---------------------------+ // for each file 32 - Unknown 4 - Length Of File Header (ie relative pointer to the file data) 52 - Unknown 4 - File Length (including all the following fields, but not including this field) 160 - Unknown X - Filename 1 - null Filename Terminator X - Group 1 Name 1 - null Group 1 Name Terminator X - Group 2 Name 1 - null Group 2 Name Terminator 1 - File Header End Tag ((byte)205) X - File Data +---------------+ | FEAR *.Arch00 | +---------------+ // Some files have length 0 // It doesn't appear as if compression is used // ARCHIVE HEADER 4 - Header (LTAR) 4 - Version (3) 4 - Length Of Filename Directory 4 - Number Of Directories? (including root) 4 - Number Of Files 4 - Unknown (1) 4 - Unknown (0) 4 - Unknown (1) 16 - CRC? // FILENAME DIRECTORY // for each file and directory X - Filename/Directory Name 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes // DIRECTORY // for each file 4 - Filename Offset (relative to the start of the filename directory) 8 - File Offset 8 - File Length 8 - File Length 4 - null // FILE DATA // for each file X - File Data +---------------+ | FIFA 96 *.pog | +---------------+ 2 - Unknown 4 - Unknown 4 - Header X - Unknown +---------------------+ | FIFA 99 *.big *.viv | +---------------------+ // Same as Command And Conquer: Generals *.big +-----------------------------------------------------------------------------+ | FIFA 2000 *.big *.abg *.poa *.viv *.ama *.gea *.dua *.fra *.spa *.swa *.uka | +-----------------------------------------------------------------------------+ // SAME AS COMMAND AND CONQUER GENERALS *.big +-----------------+ | FIFA 2004 *.dat | +-----------------+ // SAME AS NEED FOR SPEED UNDERGROUND *.ast // for each file 4 - Header (SCHI) 4 - Split Header Offset X - Unknown 12 - Split Header (see below) X - File Data Chunks (see below) 4 - File End Tag (SCEI) 4 - Unknown (8) X - Padding (filled with null) // Split Header Format 4 - Split Header (SCCI) 4 - Chunk Data Offset (12) (relative to the start of the split header) 4 - Number Of Chunks // File Data Chunks Format 4 - Chunk Header (SCDI) 4 - Compressed Size (of the chunk) 4 - Uncompressed Size (of the chunk) 4 - Padding (filled with null) X - Chunk Data +-----------------------+ | FIFA 2004 *.big *.viv | +-----------------------+ // SAME AS FIFA/Need For Speed *.big/*.viv archives 4 - Header (BIGF) 4 - Archive Size (LITTLE) 4 - Number Of Files? (BIG) 4 - Directory Length (including these 4 fields) (BIG) // for each file 4 - File Offset (BIG) 4 - File Length (BIG) X - Filename 1 - null Filename Terminator 0-127 - null Padding to a multiple of 128 bytes // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +-----------------+ | FIFA 2005 *.big | +-----------------+ // SAME AS FIFA/Need For Speed *.big/*.viv archives 4 - Header (BIGF) 4 - Archive Size (LITTLE) 4 - Number Of Files? (BIG) 4 - Directory Length (including these 4 fields) (BIG) // for each file 4 - File Offset (BIG) 4 - File Length (BIG) X - Filename 1 - null Filename Terminator 0-127 - null Padding to a multiple of 128 bytes // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +-----------------+ | FIFA 2005 *.dat | +-----------------+ // SAME AS NEED FOR SPEED UNDERGROUND *.ast // for each file 4 - Header (SCHI) 4 - Split Header Offset X - Unknown 12 - Split Header (see below) X - File Data Chunks (see below) 4 - File End Tag (SCEI) 4 - Unknown (8) X - Padding (filled with null) // Split Header Format 4 - Split Header (SCCI) 4 - Chunk Data Offset (12) (relative to the start of the split header) 4 - Number Of Chunks // File Data Chunks Format 4 - Chunk Header (SCDI) 4 - Compressed Size (of the chunk) 4 - Uncompressed Size (of the chunk) 4 - Padding (filled with null) X - Chunk Data +----------------------+ | FIFA 06 *.big (Some) | +----------------------+ // Same as FIFA 2005 +---------------+ | FIFA 06 *.sng | +---------------+ // Same as other SCHl +-------------------------+ | FIFA Manager 2006 *.big | +-------------------------+ // Generic EA BIG_BIGF File ??? +-------------------------+ | FIFA Manager 2006 *.vp6 | +-------------------------+ // same as other vp6_MVhd files ??? +----------------------+ | Fighting Force *.wad | +----------------------+ // BIG ENDIAN ORDERING 4 - Number Of Files // for each file 12 - Filename (null) 4 - File Length 4 - File Offset X - File Data +----------------------+ | Fighting Steel *.cat | +----------------------+ // Compressed files use ZLIB compression? 4 - Created Year? (2002) 1 - Version (1) 4 - numFiles // for each file 4 - Unknown 4 - Unknown 4 - Uncompressed File Size 4 - Compressed File Size 4 - Unknown (sometimes all 255s) 2 - null 2 - Unknown // for each file 256 - Filename (null) 4 - File Offset 16 - Unknown 4 - Uncompressed File Size ? 4 - Compressed File Size 4 - null 4 - Unknown (1) X - File Data +-----------------------+ | Final Fantasy 7 *.lgp | +-----------------------+ 2 - null 10 - Header (SQUARESOFT) 4 - Number Of Files // for each file 20 - Filename (null) 4 - Offset 3 - Unknown X - Unknown // for each file 20 - Filename (null) (same as in the directory) 4 - File Size 14 - Ending Tag (FINAL FANTASY7) +-----------------------------------------------+ | Fire Captain - Fire Department 2 *.pak *.bank | +-----------------------------------------------+ // a generic PKZip file with all PK header fields changed to QL header fields // Basic Structure of a ZIP file (with PK replaced by QL) // for each file 2 - Header (QL) 4 - Entry Type (1311747 = File Entry) 2 - Unknown (2) 2 - Unknown (8) 8 - Checksum? 4 - Compressed File Size 4 - Decompressed File Size 4 - Filename Length X - Filename X - File Data // for each file 2 - Header (QL) 4 - Entry Type (513 = Directory Entry) 2 - Unknown (20) 2 - Unknown (2) 2 - Unknown (8) 8 - Checksum? 4 - Compressed File Size 4 - Decompressed File Size 4 - Filename Length 10 - null 4 - File Offset (points to QL for this file in the directory) X - Filename 2 - Header (QL) 4 - Entry Type (1541 = Archive Entry) 2 - null 8 - Checksum? 4 - Length Of File Data (archive size excluding the directory) 2 - null +--------------------------------+ | Firestorm: Thunderhawk 2 *.wad | +--------------------------------+ // BIG ENDIAN ORDERING // for each file 4 - Filename Offset 4 - File Offset 4 - File Length 4 - null // for each file X - Filename (null) 1 - null X - File Data +----------------------+ | First To Fight *.pwb | +----------------------+ 4 - Number Of Files // for each file 4 - File Offset X - File Data +---------------+ | FlatOut *.bfs | +---------------+ // To calculate the file checksums (checksum of the compressed data)... // Read as signed int, remove the sign and - 1 and you have the crc32. // ie. if checksum = -165278610 then crc32 = 165278609 4 - Header 4 - Version 4 - DataOffset 4 - Number Of Files // for each file 4 - Compression Type (4=No Compression, 5=ZLib) 4 - File Offset 4 - Decompressed File Length 4 - Compressed File Length 4 - Checksum 2 - Filename Length X - Filename // for each file 2 - Unknown 2 - Unknown +--------------------+ | Flying Saucer *.ff | +--------------------+ 4 - Number Of Files [-1] // for each file 4 - File Offset 36 - Filename (null) 4 - Archive Size 36 - null X - File Data +-------------------------+ | Formula 1 *.dat + *.pth | +-------------------------+ // The *.dat file contains the file data, the *.pth file contains the directory // for each file X - Filename 1 - null Filename Terminator 4 - File Length 4 - File Offset +-------------------------------+ | Forza MotorSport (XBox) *.bin | +-------------------------------+ // The entire archive is ZLib compressed - so you need to decompress it first. // After decompression, it has the following format // For some reason, the structure is not fixed like the format shown here. // The first few files are jagged, but then the remaining files follow the // consistent structure in the "//for each file" section. 4 - Version (1) 4 - First File Offset 4 - Length Of File Data? (not quite) 4 - Number Of Files 44 - null // for each file 44 - Filename (null) 4 - Unknown 8 - Unknown 2 - Unknown (1) 2 - Unknown (4) 4 - Offset [+FirstFileOffset] 4 - null 4 - Unknown (73513) 4 - Unknown 64 - null Padding to the next filename X - File Data +-------------------------------+ | Forza MotorSport (XBox) *.cab | +-------------------------------+ // Uses ZLib compression for the files 4 - Header? (170 170 192 192) 4 - Unknown (15) 4 - Number Of Files 4 - Version (1) 4 - Archive Size 4 - Decompressed Archive Size? 4 - Filename Directory Length 4 - Filename Directory Length 16 - null 2 - Unknown (1) 256 - Archive Directory (null) // for each file 4 - File Offset 4 - Compressed File Size 4 - Decompressed File Size 4 - Unknown 4 - null 4 - Unknown // for each file X - Filename 1 - null Filename Terminator X - File Data +-------------------------------+ | Forza MotorSport (XBox) *.ca2 | +-------------------------------+ // The entire archive is ZLib compressed - so you need to decompress it first. // After decompression, it has the same format as the *.cab files from this game. // Each file is still compressed using ZLib aswell! 4 - Header? (170 170 192 192) 4 - Unknown (15) 4 - Number Of Files 4 - Version (1) 4 - Archive Size 4 - Decompressed Archive Size? 4 - Filename Directory Length 4 - Filename Directory Length 16 - null 2 - Unknown (1) 256 - Archive Directory (null) // for each file 4 - File Offset 4 - Compressed File Size 4 - Decompressed File Size 4 - Unknown 4 - null 4 - Unknown // for each file X - Filename 1 - null Filename Terminator X - File Data +---------------------------+ | Frank Herberts Dune *.dun | +---------------------------+ // NOTE: The files in the directory are in a different order to the files in the archive. // eg. File 1 in the directory may be File 482 in the archive. 4 - Header? ((bytes)114 16 234 244) 4 - null 4 - Directory Offset 4 - Number Of Files X - File Data X - Directory // go to dirOffset // for each file X - Filename (terminated by (byte)10) (some starting with "..\" or "R:\") 4 - File Offset 4 - File Length +-------------------------------------+ | Freedom Force vs The 3rd Reich *.ff | +-------------------------------------+ // Generic ZIP_PK Archive +----------------------------------------+ | Frontline Attack: War Over Europe *.wd | +----------------------------------------+ // Same as Earth 2160 +-----------------------------+ | Full Spectrum Warrior *.xwb | +-----------------------------+ 4 - Header (WBND) 4 - Version (3) 4 - Size Of Header 1 (40) 4 - Size Of Header 2 (40) 4 - Offset To Details Directory (80) 4 - Length Of Details Directory 4 - Offset To Filename Directory 4 - Length Of Filename Directory 4 - First File Offset (8192) 4 - Unknown 2 - Unknown (1) 2 - Unknown (1) 4 - Number Of Files 16 - Archive Filename (null) (without extension) 4 - Length Of Each Details Entry (24) 4 - Length Of Each Filename Entry (64) 4 - Max padding size between each file (2048) 4 - null // for each file 2 - Unknown (0/2) 2 - Unknown (1) 4 - Unknown 4 - File Offset (relative to the start of the file data) 4 - File Length 8 - null // for each file 64 - Filename (null) (without extension) // for each file X - File Data 0-2047 - null Padding so the file length is a multiple of 2048 bytes +------------------------+ | Gabriel Knight 3 *.brn | +------------------------+ 8 - Header (GK3!Barn) 2 - null 4 - Version (1) 54 - Unknown 100 - Copyright ("Copyright " + (byte)169 + " 1999 Sierra Studios. All rights reserved." + nulls to fill) 100 - Archive Build Details (null terminated) 4 - Unknown (2) 4 - Data Directory Header (riDD) 2 - Unknown (2) 2 - Unknown (1) 8 - CRC? 4 - Unknown 4 - Unknown 4 - Directory Offset 4 - Data Header (ataD) 2 - null 2 - Unknown (1) 4 - Unknown 4 - null 4 - Unknown 4 - End Of Directory Offset [-5] 4 - End Of Directory Offset [-5] 40 - null 4 - Core Header (EROC) 40 - Archive Description ("Gabriel Knight III Demo" + nulls to fill) 4 - Unknown // ENTRY DIRECTORY // for each file 4 - Offset To File Entry (relative to XXX) 4 - Unknown (1) 4 - Unknown (1) // DIRECTORY // for each file 4 - File Length 4 - File Offset (relative to the start of the file data) 4 - Hash? 3 - Unknown 1 - Filename Length (not including null) X - Filename 1 - null Filename Terminator X - null Padding to the first file offset (multiple of 4096 bytes) // FILE DATA // for each file X - File Data X - Padding +-----------------------------------------+ | Galleon: Island Of Mystery (XBox) *.pkg | +-----------------------------------------+ // The filenames are stored to minimise the repeating characters at the start of a name // To build the filename of a file, you copy all the characters of the previous filename // except for the last ReuseFilenameLength characters, then append the FilenamePart to the // end, followed by the file extension. // // It isn't known if the directory or extension can be changed in each archive 4 - Header (CRSR) 2 - Unknown 2 - Unknown 4 - Archive Size [+12] 4 - null 4 - First File Offset [+4] 2 - Directory Name Length (including null) X - Directory Name 1 - null Filename Terminator // for each file 1 - Reuse Filename Length X - Filename Part 1 - Filename Part Terminator (byte 129) if (firstFileInDirectory){ X - File Extension 1 - File Extension Terminator (byte 243) } 4 - File Offset 4 - File Length 1 - End Of Directory Indicator (255) 4 - null X - File Data +----------------------------------+ | Game, Net, Match *.dat (Type BM) | +----------------------------------+ // Bitmap Image +---------------------------------+ | Game, Net, Match *.dat (Type 2) | +---------------------------------+ 4 - Archive Size 4 - numFiles // for each file 4 Offset X - File Data +--------------------------------+ | Game, Net, Match *.lib + *.din | +--------------------------------+ // DIN has the directory, LIB has the file data 4 - Header (DBIN) 4 - numFiles // for each file 4 - File ID (starting at 0) 13 - Filename (null) 4 - File Offset 4 - File Size +-----------------+ | Gateworld *.gw1 | +-----------------+ 32 - Header (HomeBrew File Folder) + 26 + nulls to fill 32 - Unknown // for each file 16 - Filename (null) 4 - File Offset 4 - File Size 8 - null X - File Data +----------------------+ | Genocide *.pak *.wad | +----------------------+ // for each file 4 - Length (including all these header fields) 12 - Filename X - File Data +-----------------+ | Gex *.lev *.idl | +-----------------+ 4 - Number Of Files 12 - null // for each file 4 - Unknown 4 - Unknown 4 - File Size 4 - File Offset X - padding to 2048 X - File Data +----------------------------+ | Ghost Recon 2 (XBox) *.xwb | +----------------------------+ // NOTE: Some archives do not use filenames, so the offset and length of the filename // directory are both null 4 - Header (WBND) 4 - Version (2) 4 - Size Of Header 1 (40) 4 - Size Of Header 2 (36) 4 - Offset To Details Directory (76) 4 - Length Of Details Directory 4 - Offset To Filename Directory (null) 4 - Length Of Filename Directory (null) 4 - First File Offset (512) 4 - Unknown 4 - Unknown (1) 4 - Number Of Files 16 - Archive Filename (null) (without extension) 4 - Length Of Each Details Entry (24) 4 - Length Of Each Filename Entry (64) 4 - Max padding size between each file (512) // for each file 4 - null 4 - Unknown 4 - File Offset (relative to the start of the file data) 4 - File Length 8 - null // for each file 64 - Filename (null) (without extension) 0-511 - null Padding to a multiple of 512 bytes // for each file X - File Data 0-511 - null Padding to a multiple of 512 bytes +-----------------------------+ | Giants Citizen Kabuto *.gzp | +-----------------------------+ 4 - Unknown 4 - Directory Offset X - File Data // Directory 4 - Unknown 4 - Number Of Files // for each file 4 - File Length 4 - Unknown 4 - Unknown 4 - File Offset [+16] 2 - Unknown X - Filename 1 - null Filename Terminator +---------------------------------------------------+ | Gladiator: Sword Of Vengeance (PC and XBox) *.mfs | +---------------------------------------------------+ // THIS ARCHIVE FORMAT - I JUST CAN'T WORK THE DARN THING OUT! 4 - Number Of Files 4 - Version (1) 4 - First File Offset 4 - Header (MFS4) 4 - Padding Size (2048) 32 - Filename Of Archive, in CAPS (eg CD-2.EN) 4 - Filename Directory Offset 4 - Filename Directory Length 4 - null // for each file 4 - Unknown 4 - File ID? 4 - File Size 4 - File Size 2 - null 2 - Unknown X - null Padding to FilenameDirectoryOffset - multiples of 2048 // THE FILENAME DIRECTORY IS EVERYTHING BETWEEN HERE AND THE FILE DATA 4 - Extensions Header (EXT ) 4 - Length Of Data (excluding padding at the end) [+12] 4 - Offset to the start of filenames // for each file 4 - Filename Offset 4 - Unknown // for each file X - Filename (null) (including "c:\" etc.) X - null Padding to FirstFileOffset - multiples of 2048 X - File Data +-----------------------------+ | Goblins 3 *.stk *.itk *.ltk | +-----------------------------+ 2 - Number Of Files // for each file 13 - Filename (null) 4 - File Offset 4 - File Length 1 - Unknown (0/1) X - File Data +-----------------------------------+ | Gorky Zero: Aurora Watching *.zap | +-----------------------------------+ // Unknown compression used for this archive? // FILE DATA // for each file X - File Data // DIRECTORY 4 - Unknown 4 - Unknown // for each file 4 - Unknown ID (usually 1) 1 - Filename Length if (filename starts with a null){ // skip over filenameLength-1 bytes, then... 1 - Filename Length } X - Filename 4 - File Offset? 4 - Decompressed Length 4 - Compressed Length 4 - Directory ID (for the directory the file belongs to)??? 4 - null // ARCHIVE END DATA 4 - Unknown 4 - Offset To Directory Start X - Unknown Data 4 - Pointer to Unknown 4 - Unknown 4 - Unknown (4) 4 - Pointer To Directory End 4 - Pointer to Unknown 4 - Unknown +---------------+ | G-Police *.da | +---------------+ // THESE ARE WAVE AUDIO FILES +----------------+ | G-Police *.rdt | +----------------+ 4 - Archive ID? 4 - Directory Size 4 - null 4 - Unknown 4 - null 4 - Header (RDA2) 4 - Unknown 4 - Number Of Files 4 - Type/Extension // for each file 4 - Offset (ignore offsets of 1) X - Padding? X - File Data +--------------------+ | Grand Prix 2 *.bin | +--------------------+ 8 - Header (f1pcanim) 4 - ID? // for each file 4 - Offset 4 - File Size 4 - Unknown 2 - Type? X - File Data +--------------------+ | Grand Prix 3 *.bin | +--------------------+ 28 - Header (©Pete Cooke & Geoff Crammond) 4 - Number Of Files 8 - null // for each file 4 - Unknown 4 - Unknown 4 - Size 4 - Offset 4 - Unknown 4 - Unknown X - File Data +--------------------+ | Grand Prix 3 *.dat | +--------------------+ 4 - Number Of Files // for each file 4 - File Offset? 4 - khz sound 2 - null 2 - 8-bit sound X - File Data +--------------------------+ | Grand Prix Legends *.dat | +--------------------------+ // SAME AS NASCAR RACING *.dat +-----------------------------------------+ | Great Battles of WWII: Stalingrad *.pak | +-----------------------------------------+ // Generic ZIP_PK Archive +-------------------------------------------+ | Ground Control 2 - Operation Exodus *.sdf | +-------------------------------------------+ 4 - Header (RYS + (byte)9) // for each file 3 - File Length (including the file header) 1 - Unknown (0 or 128) 3 - Unknown (93) 1 - Unknown (128) 2 - null X - File Data 4 - Unknown +------------+ | GTA3 *.adf | +------------+ // an MP3 file that has been XOR with (byte)34 +--------------------+ | GTA San Andreas *. | (ie. no extension) (streams directory) +--------------------+ // Decrypting the OGG Vorbis audio files // XOR the file with the following byte values // 234,58,196,161,154,168,20,243,72,176,215,35,157,232,255,241 +--------------------+ | GTA San Andreas *. | (ie. no extension) (SFX directory) +--------------------+ 4 - Number Of Files // for each file 4 - Unknown 4 - Padding (all 255's) 4 - File Offset [+4800] X - null padding to offset 4800 X - File Data +-----------------------+ | GTA San Andreas *.gxt | +-----------------------+ // This format holds the language strings used for mission dialogs, place names, etc. // Each file is thus a null-terminated string // // Note that the order of the files in the TKEY directories is different to the order // of the files in the related TDAT section // ARCHIVE HEADER 2 - Unknown (4) 2 - Unknown (8) 4 - Table Header (TABL) 4 - Length Of Table Data // TABLE DATA // for each group 8 - Group name (null) 4 - Offset to Group TKEY // GROUPS // for each group // THIS FIELD IS OPTIONAL 8 - Group Name (Same as in the TABLE DATA) 4 - TKEY Header (TKEY) 4 - Length Of TKEY Data // TKEY DATA // for each file in this group 4 - File Offset (relative to TDAT DATA) 4 - Hash? 4 - TDAT header (TDAT) 4 - Length of TDAT Data // TDAT DATA // for each file X - File Data (a null-terminated string) +-----------------------+ | GTA San Andreas *.img | +-----------------------+ 4 - Header (VER2) 4 - Number Of Files // for each file 4 - File Offset [*2048] 4 - File Length [*2048] (includes padding at the end of the file) X - Filename 1 - null Filename Terminator 0-3 - null Padding so filenameLength+1 is a multiple of 4 bytes // repeat until this file entry has length 32 bytes 2 - Unknown ID (incremental from 166 (from start of filename)) // for each file X - File Data X - Padding to a multiple of 2048 bytes +-----------------------+ | GTA San Andreas *.scm | +-----------------------+ // ARCHIVE HEADER 2 - Unknown (2) 1 - Unknown (1) 4 - Filename Directory Offset 1 - Unknown X - Padding to the first file offset (43808) // FILENAME DIRECTORY 2 - Unknown (2) 1 - Unknown (1) 4 - Offsets Directory Offset 1 - Unknown 4 - Number Of Files [-1] 24 - null // for each filename 24 - Filename (null terminated) // OFFSETS DIRECTORY 2 - Unknown (2) 1 - Unknown (1) 4 - Batch Directory Offset 1 - Unknown 4 - First File Offset 4 - Unknown 4 - Number Of Files in this directory 4 - Unknown // for each file in this directory 4 - File Offset // BATCH DIRECTORY // These files all have offsets that start just past the end of the file) 2 - Unknown (2) 1 - Unknown (1) 4 - Empty Directory 1 Offset 1 - Unknown // for each file in this directory 4 - File Offset 4 - File Length 20 - Filename (null terminated) // EMPTY DIRECTORY 1 2 - Unknown (2) 1 - Unknown (1) 4 - Empty Directory 2 Offset 1 - Unknown 4 - null // EMPTY DIRECTORY 2 2 - Unknown (2) 1 - Unknown (1) 4 - File Data Offset 1 - Unknown 4 - Unknown 4 - Unknown // FILE DATA // for each file X - File Data +------------------+ | GT Legends *.gtl | +------------------+ // same as GTR: FIA GT Racing *.gtr ??? +--------------------------+ | GTR: FIA GT Racing *.gtr | +--------------------------+ // Files use ZLib compression? 11 - Header (GMOTORMAS10) 5 - null 4 - Number Of Files 4 - Length of File Data // for each file 4 - File Type ID (18=BMP, 20=TGA) 4 - File Offset (relative to the end of the directory) 4 - Decompressed File Length 4 - Compressed File Length 240 - Filename (null) X - File Data +---------------+ | Gunlock *.dat | +---------------+ 8 - Header (FILECHNK) 4 - Unknown 4 - Unknown 4 - Number Of Files // for each file X - Filename 1 - null Filename Terminator 4 - File Length X - File Data +----------------+ | Gunship! *.cat | +----------------+ // Same as Magic the Gathering *.cat +-----------------+ | Half-Life *.pak | +-----------------+ 4 - Header (PACK) 4 - Directory Offset 4 - Directory Size X - File Data X - Directory // go to dirOffset // for each file 56 - Filename (null) 4 - Offset 4 - Size +-----------------+ | Half-Life *.wad | +-----------------+ 4 - Header (WAD3) 4 - Number Of Files 4 - Directory Offset X - File Data X - Directory // go to dirOffset // for each file 4 - Offset 4 - Compressed File Size 4 - Uncompressed File Size 1 - File Type 1 - Compression Type 2 - Padding 16 - Filename (null) +-----------------------------+ | Half-Life (Dreamcast) *.wad | +-----------------------------+ // SAME AS HALFLIFE *.wad 4 - Header (WAD3) 4 - Number Of Files 4 - Directory Offset X - File Data X - Directory // go to dirOffset // for each file 4 - File Offset 4 - Compressed File Size 4 - Uncompressed File Size 1 - File Type 1 - Compression Type 2 - Padding 16 - Filename (null) +-------------------+ | Half Life 2 *.bsp | +-------------------+ 4 - Header (VBSP) 4 - Version (19) X - Generic PK-Zip File +---------------------+ | Half Life 2 *.cache | +---------------------+ 4 - Unknown (2) 4 - Unknown (2) 4 - Unknown 4 - Number Of Files? // for each file 4 - File Size (including filename length + null) X - Filename (null) X - File Data +-------------------+ | Half Life 2 *.sav | +-------------------+ 4 - Header (JSAV) X - File Data X - Directory // go to directory // for each file while (variableID != 12) { 2 - Variable ID if (variableID == 1){ 3 - Unknown } if (variableID == 2){ 4 - Unknown } if (variableID == 12){ 4 - Unknown (3375) } } 4 - Unknown (16256) 6 - null 2 - Unknown (4) 2 - Unknown (72) 2 - Unknown (3) 2 - null 2 - Unknown (12) X - Unknown (null) 2 - Unknown (3866) 128 - filename (null) +------------------+ | Half Life 2 *.so | +------------------+ // Unix Script? 4 - Header ((byte)127 ELF) 4 - Version ((bytes)1,1,1,0) (ie 1.110) 8 - null X - File Data X - Filename Directory // go to filename directory // for each file X - Filename (null) +------------------------------+ | Halloween Harry *.fat + *.-0 | +------------------------------+ //FAT HAS THE DIRECTORY DETAILS // for each file 1 - Filename Length 12 - Filename (nulls to this length) 4 - Offset 4 - Size +------------------------------+ | Halo *.map (version 1 and 2) | +------------------------------+ 4 - Version (1) or (2) 4 - filename Offset (filenames are null terminated) 4 - dirOffset 4 - Number Of Files // go to dirOffset // for each file 4 - ID? 4 - Size 4 - Offset +---------------------+ | Halo *.map (type 2) | +---------------------+ 4 - Header (head) 4 - Version? numParts? (7) 8 - Archive Size 4 - dirOffset 4 - dataSize 8 - null 32 - Filename/Description 32 - Version 4 - Unknown (1) (file1?) // go to dirOffset 4 - Number Of Files? (maybe 2 sets of 2 bytes) 2 - ID1? Type? (internal?) 2 - ID2? (external?) 4 - File ID? 4 - Number Of Files? 4 - Offset? 4 - Size? 4 - dirOffset 4 - nextDir? 8 - Filename 4 - Unknown (255) 2 - File ID 4 - ID1? 4 - ID2? (combined with ID1 for offset?) 12 - Filename X - Unknown +----------------+ | Hardball *.glu | +----------------+ 4 - Header (MB6 + null) // for each file 4 - File Size 4 - File Offset 14 - Encrypted Filename X - File Data +-------------------------------------------+ | Harry Potter And The Goblet Of Fire *.big | +-------------------------------------------+ // Generic EA BIG_BIGF File +-------------------------------------------------------+ | Harry Potter And The Prizoner Of Azkaban (XBox) *.mus | +-------------------------------------------------------+ // Same as NFS:Underground *.ast (SCHl) +---------------------------------------------------+ | Harry Potter And The Sorcerers Stone (XBox) *.hog | +---------------------------------------------------+ // Note: Some files have length=0 4 - Header ("WART") 4 - Version ("3.00") 4 - Number Of Files 4 - Unknown 4 - Unknown 4 - Unknown // for each file 4 - File Offset 4 - File Length 4 - Decompressed File Length? 4 - Hash? 4 - Filename Offset? (relative to ???) 4 - File Type ID? (1/10/24/31/etc) // for each file X - File Data X - null Padding? +--------------------------------+ | Heath: The Unchosen Path *.nrm | +--------------------------------+ 24 - Header (Heath: The unchosen Path) // for each file 4 - File ID 4 - File Length [-filenameLength] 4 - File Length 32 - Filename (null) X - File Data +-------------------------+ | Heart Of Darkness *.lvl | +-------------------------+ 4 - Header (null + DOH) 10628 - Unknown // for each file 4 - Offset 4 - Raw File Size 4 - Compressed File Size 4 - null X - padding to 512 bytes (from 10632) (512-Number Of Files*16) // for each file 4 - Offset 4 - Raw File Size 4 - Compressed File Size 4 - null X - padding to 1152 bytes (from 10632) // Files are padded to a multiple of 2048 +-------------------------+ | Heart Of Darkness *.paf | +-------------------------+ 4 - Header Offset // repeat until reach header offset 2 - ID Number? 2 - Offset (to what?) 128 - Header (Packed Animation File V1.0 (c) 1992-96 Amazing Studio) + 10 + 26 + nulls to fill X - Unknown +------------------+ | Hellforces *.res | +------------------+ // ZLib Compression is used 4 - Number Of Files // for each file (136 bytes for each entry) 128 - Filename (null-terminated, filled with junk) 4 - File Offset 4 - Compressed File Length // for each file 4 - Decompressed File Length X - Compressed File Data +---------------+ | Hercules *.fs | +---------------+ // for each file 4 - Hash? 4 - File Offset 4 - File Length X - null Padding to offset 6144 X - File Data +---------------------------------+ | Heroes Of Might And Magic *.agg | +---------------------------------+ 2 - Number Of Files // for each file 2 - Unknown 4 - Data Offset 4 - File Length 4 - File Length X - File Data // for each file 15 - Filename (null) +-----------------------------------+ | Heroes Of Might And Magic 2 *.agg | +-----------------------------------+ 2 - Number Of Files // for each file 4 - Unknown 4 - File Offset 4 - File Length X - File Data // for each file 15 - Filename (null) +-----------------------------------+ | Heroes Of Might And Magic 3 *.lod | +-----------------------------------+ 4 - Header (LOD + null) 4 - Unknown 4 - Number Of Files 80 - Unknown // for each file 12 - Filename (null) 4 - Unknown 4 - File Offset 4 - Decompressed File Length 4 - Unknown 4 - Compressed File Length X - File Data +-----------------------------------------+ | Heroes Of Might And Magic 3 *.snd *.vid | +-----------------------------------------+ 4 - Number Of Files // for each file 40 - Filename (null) 4 - File Offset 4 - File Length X - File Data +-----------------------------------+ | Heroes Of Might And Magic 4 *.h4r | +-----------------------------------+ 4 - Header (72 52 82 5) 4 - Directory Offset X - File Data // Directory 4 - Number Of Files // for each file 4 - Data Offset 4 - File Length 4 - Directory Length 4 - Unknown Constant 16 - Filename (null) 16 - Directory Name (null) if (dirNameLength > 0){ // File 2 - Unknown 4 - Compression } else { // Directory 16 - Directory Name } +-----------------------------+ | Heroes Of The Pacific *.ffs | +-----------------------------+ 4 - Header (FFS ) 4 - Number Of Files // for each file 4 - Filename Length X - Filename 4 - File Offset 4 - File Length // for each file X - File Data 1 - File Separator (byte 255) +--------------------------------------+ | Heroes Of The Pacific *.fsb (Type 1) | +--------------------------------------+ 4 - Header (FSB3) 4 - Number Of Files 4 - Directory Length 4 - File Data Length 2 - Unknown (1) 2 - Unknown (3) 4 - Unknown (2) 2 - Maximum Filename Length (80) 80 - Filename (null terminated, filled with junk) // for each file 4 - File Offset? 4 - File Length? X - File Data +--------------------------------------+ | Heroes Of The Pacific *.fsb (Type 2) | +--------------------------------------+ // SAME AS NRL 2003 *.fsb and COLD FEAR *.fsb // ARCHIVE HEADER 4 - Header (FSB3) 4 - Number Of Files 4 - Directory Length (Length of //DIRECTORY only) 4 - File Data Length 2 - Unknown (0) 2 - Unknown (3) 4 - Unknown (0) // DIRECTORY // for each file 2 - File Entry Length (64) 30 - Filename (null terminated) 4 - Unknown Value 4 - File Length 4 - null 4 - Unknown Value [+1] (same as other Unknown Value field, when you add 1) 4 - Unknown (305) 4 - Sound Sample Rate (22050) 2 - Unknown (255) 2 - Unknown (128) 2 - Unknown (255) 2 - Unknown (1) // FILE DATA // for each file X - File Data +-----------------------------+ | Heroes Of The Pacific *.tar | +-----------------------------+ // Generic TAR archive // ALL FIELDS SHOULD BE READ IN THE FOLLOWING WAY... 1. All fields are null-terminated strings 2. The fields are also padded to the right, meaning that there is padding of (byte)32 at the start of each field, so that the entire contents of that field are as far to the right as possible for that field length 3. Fields that contain a number (such as the File Length) are Octal numbers (base 8) // for each file 100 - Filename 8 - Mode 8 - UID 8 - GID 12 - File Length 12 - Last Modification Time 8 - Checksum 1 - Link Flag 100 - Linked Filename 8 - Magic Number 32 - uName 32 - gName 8 - Major Version Number 8 - Minor Version Number 167 - null Padding to make this file header have length 512 X - File Data 0-511 - null Padding to a multiple of 512 bytes +----------------------------+ | Hidden And Dangerous *.dta | +----------------------------+ // Generic *.rar archive +------------------------------------+ | Hidden And Dangerous *.dta + *.cnt | +------------------------------------+ // The *.cnt file contains the directory, the *.dta file contains the file data 8 - Header (COMPCNT4) 4 - Archive Length 4 - Unknown 4 - Unknown 4 - Number Of Files // for each file 4 - File Offset 4 - File Length 16 - Filename (null) X - File Data +-----------------------+ | Hidden Strike 2 *.aps | +-----------------------+ // Uses ZLib compression // ARCHIVE HEADER 4 - Header (FZFF) 4 - Directory Offset // FILE DATA // for each file X - File Data (Compressed - ZLib) // DIRECTORY 4 - Decompressed Directory Length? (including Directory 1, 2, etc.) 4 - Unknown 4 - Length Of Compressed Directory 1 Data 4 - Number Of Files in Directory 1 and 2 4 - Directory Header Length (20) X - Compressed Directory 1 Data { // When Decompressed... // for each file 4 - Filename Offset (relative to the start of Directory 2) 4 - Unknown (8) 4 - Unknown Offset (relative) 4 - Unknown 4 - Unknown (16384) } 4 - Length Of Compressed Directory 1 Data 4 - Unknown (1) 4 - Decompressed Directory 2 Length? X - Compressed Directory 2 Data { // When Decompressed... // for each file X - Filename 1 - null Filename Terminator } 4 - Length Of Compressed Directory 3 Data 4 - Number Of Files in Directory 3 4 - Unknown (4) X - Compressed Directory 3 Data { // When Decompressed... // for each file 4 - File Offset } +-----------------------------------------------------+ | Highway Pursuit *.hfd *.hgd *.hmd *.hod *.hsd *.hvd | +-----------------------------------------------------+ 4 - Header (HPDT) 4 - Number Of Files [/2] // for each file 4 - File Size 4 - Padding Size // for each file X - File Data X - Padding +------------------------------+ | Hi-Octane *.dat (chunk)(big) | +------------------------------+ // for each file 4 - File Type 4 - File Size X - File Data +-----------------------------------------+ | Hitman 2: Silent Assassin *.wav + *.whd | +-----------------------------------------+ // WHD contains the details, WAV contains the file data 4 - Archive Size (without header) 4 - Archive Size (with header) 4 - Unknown 4 - Unknown // for each file X - Filename (null) 4 - Unknown (6) 4 - Unknown 4 - Unknown (17) 4 - Sampling Rate, khz (22050) 4 - Unknown (4) 4 - Unknown 4 - File Size 4 - Number Of Channels?, mono (1) 4 - File Offset 4 - Unknown 4 - Unknown 4 - Unknown +--------------------------------+ | Hitman Contracts *.wav + *.whd | +--------------------------------+ // WHD contains the details, WAV contains the file data 4 - Archive Size (without header) 4 - Archive Size (with header) 4 - Unknown 4 - Unknown // for each file X - Filename (null) 0-3 - Padding (to a multiple of 4 bytes) 4 - Unknown (6) 4 - Unknown 4 - Unknown (17) 4 - Sampling Rate, khz (22050) 4 - Unknown (4) 4 - Unknown 4 - File Size 4 - Number Of Channels?, mono (1) 4 - File Offset 4 - Unknown 4 - Unknown 4 - Unknown +------------------------+ | Hitman Contracts *.zip | +------------------------+ // A ZIP archive +--------------------------+ | Hollywood Monsters *.m02 | +--------------------------+ // for each file 4 - File Offset X - null padding to offset 400 X - File Data // NOTES: // The first offset is 0, indicating the offset to the file start // The last offset is the archive size, indicating the file end // The offsets in between are file offsets, but some offsets are repeated (just ignore the repeats) // Stop reading the directory when you read an offset that is the archive size +-----------------+ | Homeworld *.wxd | +-----------------+ 4 - Header (WXD1) 4 - Unknown // for each file 4 - Data Tag (DATA) 4 - File Length X - File Data +-----------------+ | Homeworld *.vce | +-----------------+ 4 - Header (VCE0) 4 - Unknown // for each file 4 - Information Tag (INFO) 4 - Unknown 4 - Data Tag (DATA) 4 - File Length X - File Data +------------------------------+ | Hostile Waters *.dat + *.mbx | +------------------------------+ // The *.dat file contains the directory, the *.mbx file contains the file data 4 - Number Of Files // for each file 12 - Unknown 4 - File Length 4 - File Offset X - File Data +----------------------+ | Hostile Waters *.mng | +----------------------+ // Uses ZLib compression 4 - Header (ZGWH) 4 - Number Of Files // for each file X - Filename 1 - null Filename Terminator 4 - Compressed File Length 4 - Decompressed File Length 4 - File Offset X - File Data +-------------------+ | Hotel Giant *.res | +-------------------+ 4 - Number Of Files // for each file 34 - Filename (null) 4 - Offset X - File Data +---------------------------+ | House Of The Dead 2 *.bin | +---------------------------+ 4 - Decompressed File Size 2 - Compression Type? X - File Data +---------------------------+ | House Of The Dead 3 *.afs | +---------------------------+ // Same As Leisure Suit Larry: Manga Cum Laude *.afs 4 - Header (AFS + null) 4 - Number Of Files // for each file 4 - Offset 4 - Length 4 - Filename Directory Offset 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes // for each file 32 - Filename (null) 4 - File Type ID 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 4 - Junk (matches each value in the directory, including offsets and sizes, in order) 0-2047 - null Padding to a multiple of 2048 bytes +---------------------------+ | House Of The Dead 3 *.zip | +---------------------------+ // Generic ZIP Archive +-----------------------+ | Hoyle Casino 99 *.prf | +-----------------------+ 4 - Version (1) 3 - Header (PRF) 1 - null 4 - Unknown (2) 4 - Unknown (64) 4 - Directory Size 4 - Directry Offset + 24 // numFiles = (dirSize - 24) / 16 - 1; // go to dir offset + 24 // for each file 4 - File Type 4 - File ID 4 - Offset 4 - File Size +--------------------+ | Hyper Cycles *.adt | +--------------------+ // for each file 11 - Unknown 4 - null 4 - File Offset 4 - File Size X - File Data +----------------+ | Ignition *.cdp | +----------------+ 4 - Header (CDP) + null 2 - Version (100) - ie 1.00 4 - Number Of Files? 4 - Unknown 1 - null 4 - Unknown // for each file 4 - Unknown 2 - Unknown 1 - null 4 - Unknown 2 - Unknown 1 - null 2 - Unknown X - File Data // I can't seem to find any offset or file size data anywhere, but it is split up into files. // File 2 starts at about offset 764 +------------------------+ | Ignition *.pfm (chunk) | +------------------------+ // for each file 4 - Type/Extension 4 - File Size X - File Data +----------------------+ | Imperial Glory *.pak | +----------------------+ // Generic ZIP Archive +---------------------+ | Imperialism 2 *.rsr | +---------------------+ 4 - Header (rsrc) 4 - Unknown 4 - Unknown 4 - Number Of Files // for each file 8 - Filename 4 - File Offset 4 - File Length X - File Data +----------------------------+ | Imperium Galactica 2 *.dat | +----------------------------+ // Files are compressed using ZLib X - File Data // Directory // for each file X - Filename 1 - null Filename Terminator 4 - Data Offset 4 - Unknown 4 - Compressed File Length 4 - Decompressed File Length 4 - Unknown 4 - Number Of Files 4 - Directory Offset +----------------------------------------------+ | Indiana Jones And The Infernal Machine *.gob | +----------------------------------------------+ 4 - Header (GOB ) 4 - Version (20) 4 - Unknown 4 - Number Of Files // for each file 4 - File Offset 4 - File Length 128 - Filename (null) X - File Data +----------------------+ | Indycar Racing *.dat | +----------------------+ // for each file 2 - Unknown 2 - Unknown 4 - Raw File Size 4 - Compressed File Size 11 - Filename X - File Data +---------------+ | Inferno *.dat | +---------------+ 4 - Directory Offset // go to Directory Offset 2 - Number Of Files 2 - Number Of Folders 2 - Number Of Extensions 2 - Length Of Directory Header [+8] (ie relative offset to first file directory entry) // for each folder 1 - Folder Name Length X - Folder Name // for each extension 1 - Extension Name Length X - Extension Name // for each file 8 - Unknown 4 - File Length? +----------------------+ | Interstate '76 *.mw2 | +----------------------+ // SAME AS MECH WARRIOR 2 *.mw2 4 - Number Of Files // for each file 4 - File Offset X - File Data +----------------------+ | Interstate '76 *.zfs | +----------------------+ // Notes: The archive is stored in chunks of 100 files, each with their own directory. // So you need to read the directory for 100 files, then skip to the next directory. 4 - Header (ZFSF) 4 - Version (1) 4 - Unknown (16) 4 - Number Of Files in each directory (100) 4 - Total Number Of Files in the archive 4 - null 4 - Unknown (28) // for each directory 4 - Next Directory Offset (null for the last directory) // for each file 16 - Filename (null) 4 - File Offset 4 - File ID (incremental stating from 0) 4 - Length 4 - Unknown (Hash?) 4 - null if (the last directory){ X - null padding to fill up the directory - ie. up to (numFilesInEachDir*36 + 4) } X - File Data (for the files in this directory +---------------------------+ | In The Raven Shadow *.dat | +---------------------------+ // NOTE: Some files have offset and length = 0 2 - Number Of Files 4 - Directory Offset 4 - Unknown X - File Data // go to the directory offset // for each file 4 - Offset 4 - Length 4 - File ID? // for each file X - Filename (null) +---------------------------+ | In The Raven Shadow *.lib | +---------------------------+ X - File Data X - Directory 2 - Number Of Files // go to arcSize - (numFiles*21 + 2) // for each file 4 - Length 4 - Offset 13 - Filename (null) +-----------------------+ | I, The Gangster *.rez | +-----------------------+ // SAME AS BLOOD 2 *.rez +-------------------+ | Jade Empire *.rim | +-------------------+ // Files with size=0 still incur padding, so infact take up 128 null padding bytes in the archive. 8 - Header (RIM V1.0) 4 - null 4 - Number Of Files 4 - Directory Offset (120) 4 - Version (1) 96 - null Padding // Directory // for each file 16 - Filename (null) 4 - File Type ID (2002, 3011, 3016, 3017) 4 - File ID (incremental, starting from 0) 4 - File Offset 4 - File Length 0-127 - null Padding to a multiple of 128 bytes // File Data // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +-------------------------+ | Jagged Alliance 2 *.slf | +-------------------------+ 256 - Archive Name (null) 256 - Directory Name (null) 4 - Number Of Files 16 - Unknown X - File Data // Directory (offset=archiveSize-numFiles*280) // for each file 256 - Filename (null) 4 - Data Offset 4 - File Length 16 - Unknown +--------------------------------+ | James Bond NightFire 007 *.??? | +--------------------------------+ 4 - Version Main (1) 4 - Version Sub (3) 4 - Unknown 4 - Header? 4 - Number of Directories 4 - Number Of Files // for each file 1 - Compression tag (0=Uncompressed, 1=Compressed) 4 - Decompressed File Size 4 - Compressed File Size X - File Data? +-----------------------------------------+ | James Cameron's Dark Angel (XBox) *.rcf | +-----------------------------------------+ // ARCHIVE HEADER 32 - Header ("RADCORE CEMENT LIBRARY" + nulls to fill) 4 - Unknown 4 - Directory Offset (2048) 4 - null 4 - Directory Length (including null padding after the entries) 2000 - null // DIRECTORY 4 - Number Of Files 4 - Filename Directory Offset 4 - Filename Directory Length (including null padding after the entries) 4 - Unknown // for each file 4 - Hash? 4 - File Offset 4 - File Length X - null Padding to a multiple of 2048 bytes // FILENAME DIRECTORY 4 - Number Of Files 4 - null // for each file 4 - Filename Length (including null terminator) X - Filename 1 - null Filename Terminator 4 - Unknown X - null Padding to a multiple of 2048 bytes // FILE DATA // for each file X - File Data X - null Padding to a multiple of 2048 bytes +------------------------+ | Jazz Jackrabbit 2 *.it | +------------------------+ 4 - Header (IMPM) 98 - Unknown 64 - Unknown (all @ symbols (byte)64) X - File IDs 1 - 255 // for each file 4 - File Offset // at each file offset 4 - Type/Extension (IMPS, IMPI, etc) X - File Data // Type IMPS - File Entry X - Filename (null) 4 - Unknown 26 - File Description 2 - Compressed True/False (1/0)? 4 - Compressed File Size 8 - null 4 - Decompressed File Size? 8 - null 4 - File Offset 6 - null // TYPE IMPI - Unknown (file?){ X - Unknown } +-------------------------+ | Jazz Jackrabbit 2 *.j2a | +-------------------------+ 4 - Header (ALIB) 4 - Unknown 4 - Header Size (first file offset) 4 - Unknown 4 - Archive Size 4 - Unknown 4 - Number of Files // for each file 4 - File Offset X - File Data +-------------------------+ | Jazz Jackrabbit 2 *.j2b | +-------------------------+ // the files use ZLIB compression? 4 - Header (MUSE) 4 - Unknown 4 - Archive Size 4 - Unknown // for each file 4 - Compressed Size 4 - Decompressed Size X - File Data (each listed one after the other) // continue reading until all the compressed sizes + header size equal the archive size +-------------------------+ | Jazz Jackrabbit 2 *.j2d | +-------------------------+ // the files use ZLIB compression? 4 - Header (PLIB) 4 - Unknown 4 - Unknown 4 - Archive Size 4 - Unknown 4 - Unknown 4 - Unknown X - File Data +-------------------------------+ | Jazz Jackrabbit 2 *.j2l *.j2t | +-------------------------------+ // the files use ZLIB compression? 180 - Header (" Jazz Jackrabbit 2 Data File" + (byte)(13 10 13 10) + " Retail distribution of this data is prohibited without" + (byte)(13 10) + " written permission from Epic MegaGames, Inc." + (byte)(13 10 13 10 26) ) 4 - Type Header (TILE) (LEVL) 4 - Unknown 32 - Archive Description 2 - Unknown 4 - Archive Size 4 - Unknown // for each file 4 - Compressed Size 4 - Decompressed Size X - File Data (each listed one after the other) // continue reading until all the compressed sizes + header size equal the archive size +-------------------------+ | Jazz Jackrabbit 2 *.j2s | +-------------------------+ 4 - Number Of Files in group 1 4 - Directory Offset [+8] X - Files 1 X - Directory X - Directory Filenames X - Files 2 // go to Directory Offset // for each file in group 1 4 - File Offset [+8] 4 - Number of Directories // for each directory 8 - Directory Name (null) 2 - Number Of Files in directory? 2 - Number Directory Offset [+endOfDirectoryOffset] 4 - Files 2 size? 1 - null // for each file in group 2 1 - File Size X - File Data +-------------------------+ | Jazz Jackrabbit 2 *.j2v | +-------------------------+ // the files use ZLIB compression? 8 - Header (CineFeed) 4 - Archive Size 4 - Unknown 4 - Video Width (640) 4 - Video Height (480) 2 - Audio Bits (8) 2 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Video Image Quality? (32) X - File Data +-------------------------+ | Jazz Jackrabbit 2 *.s3m | +-------------------------+ 28 - null 16 - Unknown 4 - Header (SCRM) X - Unknown // Similar? to the Jazz Jackrabbit 2 *.it files +--------------------+ | Jedi Academy *.pk3 | +--------------------+ // ZIP ARCHIVE +--------------------+ | Jedi Outcast *.pk3 | +--------------------+ // ZIP ARCHIVE +-------------------+ | Jets N Guns *.dat | +-------------------+ // NOTES: // The first few bytes of the filenames are encrypted, the last few bytes are not encrypted. // Also, the files are compressed using some kind of flag field amongst the data that tells // how to decompress them. The flag fields are all 1 byte long? // The compression *may* be similar to that used by Maxis in the DBPF-based archives? 2 - Unknown 2 - Unknown 4 - Number Of Files 4 - Directory Offset 4 - Unknown X - File Data X - Directory // go to dirOffset // for each file 2 - Filename Length (including 1 null) X - Filename 1 - null 4 - Decompressed Length 4 - Offset // go to each file offset 4 - Offset to the start of the compressed file data (offset from dir + 12) 4 - Unknown 4 - Compressed Length X - Compressed File Data +-------------------------------------------+ | Journey To The Center Of The Earth *.0000 | +-------------------------------------------+ 7 - Header (package) 4 - Version (1) 8 - CRC? 4 - Number Of Files? 1 - Directory Start Marker (1) 4 - null // for each file 4 - File Offset (relative to the end of the directory) 4 - File Length 4 - Filename Length X - Filename 1 - End Of Directory Marker (1) 4 - null 4 - Unknown 4 - File Data Length X - File Data +--------------+ | Juiced *.dat | +--------------+ // Files are ZLib compressed? // NOTE: The files in the archive are in a different order to the files in the directory // eg File 1 in the directory may be File 523 in the archive. // NOTE: Each file can have multiple compressed parts. Each part is described at each file // offset. To determine how many parts there are in a file, go to the file offset and read // the first field (firstPartOffset). Then do (firstPartOffset-fileOffset)/8 and you have // the number of parts. (or you can just read the field in the directory!) 4 - Number Of Files 4 - Directory Offset X - File Data X - Directory // go to dirOffset // for each file 4 - Unknown 4 - File Offset 4 - Number of File Parts 4 - Compressed File Size 4 - Decompressed File Size // go to each file offset // for each file part 4 - File Part Offset 4 - File Part Length // for each file part X - File Part Data +----------------------+ | Kens Labyrinth *.kzp | +----------------------+ 2 - numFiles // for each file 8 - Filename (null) 4 - File Offset X - File Data +------------------+ | Killswitch *.dat | +------------------+ 4 - Unknown 4 - Unknown 4 - Unknown 12 - Filename (null) 4 - Unknown 4 - null 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Description Data Length // for each description X - Description (null) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each file 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // THIS IS THE START OF THE FILE DATA 4 - File Length (-96) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 64 - Filename (null) X - Rest of the file +-----------------------+ | Kingdom O Magic *.dat | +-----------------------+ // SAME AS WACKY WHEELS *.dat +------------------------------------------------+ | King Of Fighters - Maximum Impact (XBox) *.pak | +------------------------------------------------+ 4 - Header (DATA) 8 - null 4 - Number Of Files // for each file 4 - File Offset 4 - Archive Size [-6] 4 - Unknown (400) // for each file 2 - File Header (PK) 1 - null 4 - Unknown (Decompressed Size?) 9 - null X - File Data +-----------------------------+ | Knights And Merchants *.dat | +-----------------------------+ 4 - Header // for each file (200) 4 - File Length // for each file (200) 2 - Unknown // for each file (200) 4 - File Tag (1) X - File Data +-------------+ | Kohan *.tgw | +-------------+ 2 - Unknown (6) 2 - Unknown (1) 4 - Unknown (30000000) 4 - Unknown (1000) 4 - Unknown (20) 4 - Unknown (1000000) 4 - Unknown (2) 4 - Unknown (2) 4 - Unknown 4 - Unknown 4 - Filename Directory Offset 4 - null 4 - null 4 - null 4 - Filename Directory Offset 4 - null 4 - Filename Directory Offset 4 - Number Of Files 4 - File Length Directory Offset 4 - Number Of Files 4 - File Offset Directory Offset 4 - Number Of Files 4 - null 4 - null 4 - null 4 - First File Data Offset 4 - Unknown 4 - null 4 - null 4 - null X - Filename Directory X - File Length Directory X - File Offset Directory X - File Data // go to Filename Directory offset // for each file 80 - Filename (null) 4 - Unknown 4 - File Length 4 - Unknown (1) 4 - File ID (incremental starting from 0) 4 - Unknown 4 - Unknown // go to File Length Directory offset // for each file 4 - null 4 - null 4 - File Length? 4 - Unknown (1) 4 - File ID (incremental starting from 0) // go to File Offset Directory offset // for each file 4 - File Offset 4 - Unknown Offset +------------------------------+ | Kohan 2 - Kings Of War *.rwd | +------------------------------+ // IMPORTANT NOTE! // All strings in these archives are Unicode text, meaning that each // letter uses 2 bytes instead of 1. For English, it is suitable to // skip every second character, as it will be null // // So, whenever it says to read a string, read it as unicode! 4 - Header (TGCK) 4 - Unknown (2) 4 - Unknown (3) 4 - Unknown (2) 2 - Description Length [*2, as it is unicode text] X - Description (Unicode text) 4 - null 4 - Unknown X - File Data X - Directory // go to (archiveSize - 288) // HEADER DETAILS 64 - Header Name (Header) (Unicode Text) 8 - Header Offset (12) 8 - Header Length 4 - Unknown 4 - Unknown 8 - Header Length // FILE DATA DETAILS 64 - File Data Name (Files) (Unicode Text) 8 - File Data Offset 8 - File Data Length 4 - Unknown 4 - Unknown 8 - File Data Length // FOOTER DETAILS 64 - Directory Name (Footer) (Unicode Text) 8 - Directory Offset 8 - Directory Length 4 - Unknown 4 - Unknown 8 - Directory Length // Go to directory offset // For each file 4 - File Type ID? 2 - Filename Length [*2, as it is unicode text] X - Filename (Unicode Text) 8 - Offset [+X] (relative to the start of the file data, as found in the FILE DATA DETAILS) 8 - Length 4 - null +----------------+ | Kyrandia *.pak | +----------------+ // for each file 4 - File Offset X - Filename (null) 4 - Archive Size 4 - null 1 - null padding to a multiple of 2 bytes X - File Data +-----------------------+ | Land Of Legends *.wad | +-----------------------+ // ARCHIVE HEADER 4 - Header? (206,202,239,190) 4 - Version (1) 4 - Unknown (158) 1 - Reader Package Name Length (41) 41 - Reader Package Name (System.Resources.ResourceReader, mscorlib) 1 - Resource Set Package Name Length (115) 115 - Resource Set Package Name (System.Resources.RuntimeResourceSet, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) 4 - Unknown (1) 4 - Number Of Files 4 - Unknown (1) 1 - Byte Array Package Name Length (93) 93 - Byte Array Package Name (System.Byte[], mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) 4 - Padding to Offset 280 (using repeating string "PAD"); // HASH DIRECTORY // for each file 4 - Hash? // UNKNOWN DIRECTORY // for each file 4 - Unknown 4 - First File Offset // DIRECTORY // for each file 1 - Filename Length X - Filename (unicode text) 4 - File Offset (relative to the start of the //FILE DATA) // FILE DATA // for each file 2 - null 4 - Unknown (1) 4 - Padding (all 255's) 4 - Unknown (1) 4 - null 4 - Unknown (271) 1 - null 4 - File Length 1 - File Start Marker (2) X - File Data 1 - File End Marker (11) +---------------------+ | Lands Of Lore *.pak | +---------------------+ // SAME AS KYRANDIA *.pak +--------------------+ | Last Dynasty *.itk | +--------------------+ 2 - Number Of Files // for each file 13 - Filename (null) 4 - File Length 4 - File Offset 1 - null X - Padding (to 2048 bytes) X - File Data +---------------------------+ | Leadfoot *.pf *.pfb *.pfc | +---------------------------+ 4 - Version (1) // go to endOfFile-4 4 - Directory Offset // go to dirOffset 4 - numFiles? // for each file X - Filename (null) 4 - File ID 4 - Unknown // if unknown field is all 255s, add the following 2 fields // otherwise, it is a directory? 4 - File Offset 4 - File Size 2 - null +-------------------------+ | Lego Loco *.rfd + *.rfh | +-------------------------+ // *.rfh contains the details, *.rfd contains the file data // for each file 4 - Filename Length (including the null) X - Filename + null 4 - Size 4 - ID? +-------------------+ | Lego Racers *.jam | +-------------------+ 4 - Header (LJAM) X - Directories/Subdirectories X - File Data // Directory Format 4 - Number Of Files (0 means that there are no files, only nested directoies) IF numFiles > 0 THEN // for each file 12 - Filename (null) 4 - Offset 4 - Size IF numFiles == 0 THEN 4 - Number Of SubDirectories // for each subdirectory 12 - Subdirectory name 4 - Offset to subdirectory // go to subdirOffset and start again from "Directory Format" +-------------------------------------------+ | Leisure Suit Larry: Manga Cum Laude *.afs | +-------------------------------------------+ 4 - Header (AFS + null) 4 - Number Of Files // for each file 4 - Offset 4 - Length 4 - Filename Directory Offset 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes // for each file 32 - Filename (null) 4 - File Type ID 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown 4 - Junk (matches each value in the directory, including offsets and sizes, in order) 0-2047 - null Padding to a multiple of 2048 bytes +-------------------------------------------+ | Leisure Suit Larry: Manga Cum Laude *.jam | +-------------------------------------------+ 4 - Header (JAM2) 4 - Unknown 4 - First File Offset 4 - Header 2 (none) 12 - null 2 - Number Of Filenames 2 - Number Of Extensions // for each filename 8 - Filename (null) // for each extension 4 - Extension Name (null) // the first extension is all nulls // NOTE: Some files have invalid offset - only allow offsets >= FirstFileOffset 4 - Unknown // for each file 2 - Filename ID 2 - File Extension ID 4 - Offset // at each file offset 4 - Compressed File Size 4 - Decompressed File Size 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown X - File Data 0-3 - Junk padding to a multiple of 4 bytes +------------------------------+ | Le Mans 24 Hours *.dat (big) | +------------------------------+ // for each file 2 - Unknown 2 - Unknown 4 - null 4 - null 2 - File Size [+41<-->44] 2 - Unknown X - File Data +------------------------+ | Le Mans 24 Hours *.pck | +------------------------+ 4 - Header (PACK) 4 - Number Of Files // for each file 35 - Filename (null terminated, filled with spaces (32)) 4 - File Size X - File Data +------------------------+ | Le Mans 24 Hours *.sam | +------------------------+ // This is an archive of WAVE files // we read this using the filesize information supplied in the WAVE files // So the offset of each file actually includes the WAVE header // ie the first offset is at 0, second offset at 0 + filesize + 8, etc. // EXTRA NOTE: Each file is padded with nulls to a multiple of 16 bytes // Also - some WAVE files have incorrect sizes in their header! (less by a few bytes) :( // for each file 4 - WAVE Header (RIFF) 4 - File Size [+8] X - File Data // Note that RIFF may be used as the header of the archive, for validation purposes +----------------------------------+ | Lemmings Paintball *.vsr (chunk) | +----------------------------------+ // This archive has a directory tree structure, with each directory and file sotred // in a chunk format. Each chunk with a CRID header is a directory // NOTE: CRID reversed is DIRC (Directory Chunk) 4 - Header (CRID) 4 - Archive Size [+8] 4 - Number Of Directories 4 - Type? (3) 4 - File Size (not including first 2 fields) (the size of THIS chunk, not the archive size!) // for each directory X - Filename (null) 0-3 - padding to make filename+null a multiple of 4 4 - Unknown 4 - Unknown // for each directory 4 - Header (CRID) 4 - Directory Offset 4 - Directory Size 16 - null 4 - Unknown 4 - File ID // go to each dirOffset 4 - Header (CRID) 4 - Directory Size (same as in the dirEntry above) 4 - Number Of Files in directory 4 - Type? (3) 4 - Offset to First File in the directory [+8] // for each file in the directory X - Filename (null) 0-3 - padding to make filename+null a multiple of 4 4 - Unknown 4 - Unknown // for each file in the directory 4 - Type/Extension (reversed) 4 - File Offset 4 - File Size 16 - null 4 - Unknown 4 - File ID // go to each file offset 4 - Type/Extension (reversed) 4 - File Size X - File Data +---------------------------+ | Lemmings Revolution *.box | +---------------------------+ 6 - Header (LEMBOX) 4 - Number Of Files 4 - Filename Directory Length // for each file 4 - Filename Length X - Filename 4 - Number Of Files // for each file 4 - File Offset 4 - Number Of Files // for each file 4 - File Length X - File Data +--------------------------------------------+ | Links 386 Pro *.crh *.mga *.fga *.lz *.wlz | +--------------------------------------------+ 4 - Header (MDmd) 2 - Unknown (11) 2 - Dir Offset (122) // go to dirOffset // for each file 13 - Filename (stop at first null. filled with spaces to the null at pos 13, so max filename length is 11 + 2 nulls) 4 - Offset //Continue until offset == 0 +--------------------+ | Links Extreme *.ls | +--------------------+ // Same as Links LS *.ls +---------------------------+ | Links LS *.ls *.crx *.ani | +---------------------------+ 4 - Header (LSIs) 2 - Unknown 4 - Offset to Start of Directory 4 - Number Of Files 11 - null 4 - Directory Size 4 - Directory Size 2 - null 4 - Unknown 2 - null 1 - Index Name Length 7 - Index Name (~INDEX~) 5 - Filler (all (byte)4) 1 - null // for each file 17 - Filename (null) 4 - Offset // FILE DATA (with the following format) // for each file 4 - Header (LSIs) 2 - Unknown 4 - Offset to Start of File Data 14 - null 1 - Compressed? (1) 4 - Decompressed File Size 4 - Compressed File Size 8 - Unknown 1 - Filename Length X - Filename 0-12 - Filename filler to length of 12 (all (byte)4) 1 - null X - File Data +--------------------+ | Links LS 1999 *.ls | +--------------------+ // Same as Links LS *.ls +------------+ | Lion *.gxl | +------------+ 2 - Header 51 - Comment 41 - Unknown 2 - Number Of Files 32 - Unknown // for each file 1 - null 12 - Filename (null Terminated) 1 - null 4 - File Offset 4 - File Length 4 - Unknown X - File Data +-------------------------------------------+ | Lionheart - Legacy Of The Crusdader *.dat | +-------------------------------------------+ // Generic ZIP_PK Archive +------------------------------+ | Little Bombers Returns *.dat | +------------------------------+ // Files are compressed using ZLib? // This is not quite right - only works for the first file. // Maybe the first file is a compressed directory??? 32 - Header (Artem Skakunov's resource file + (char)13,10) // for each file 2 - File Size [-2] X - File Data +--------------------------------+ | Lode Runner Online *.prs *.prd | +--------------------------------+ // PRD has the details, PRS has the file data 2 - null 128 - Archive Filename (null) 60 - Dummy file entry // for each file 2 - File ID 2 - Unknown 4 - null 4 - File Offset 4 - File Type / Extension 2 - Unknown 14 - Filename (null) 4 - null 4 - File Size +---------------------------+ | London Taxi Rushour *.wad | +---------------------------+ // Directories have fileOffset=0 // ARCHIVE HEADER 4 - Header (WADH) 4 - First File Offset 4 - Number Of Files 4 - Filename Directory Length? // DIRECTORY // for each file 4 - Filename Offset (relative to the start of the filename directory) 4 - File Offset (relative to the first file offset) 4 - File Length 4 - Unknown Boolean (0/1) 4 - Number Of Files In Directory? (all 255's for files) 4 - Unknown // FILENAME DIRECTORY // for each file X - Filename 1 - null Filename Terminator // FILE DATA // for each file X - File Data +-----------------+ | Longbow 2 *.tre | +-----------------+ 12 - Header (SKNKTREE010A) 4 - Number Of Files 4 - First File Offset // for each file 4 - File Offset // for each file 4 - File Length // for each file 4 - File Length // for each file 4 - null // for each file X - Filename (null) (including ..\) X - File Data +---------------------------------------------+ | Lord Of The Rings: Return Of The King *.scw | +---------------------------------------------+ // for each file 4 - Type Code 4 - File Length [-8] X - File Data +-----------------------------------------------------+ | Lord Of The Rings - Return Of The King (XBox) *.scx | +-----------------------------------------------------+ // for each file 4 - File Type Code/Extension 4 - File Length (including these 2 header fields) X - File Data +-----------------------------------------+ | Lord Of The Ring: War Of The Ring *.h20 | +-----------------------------------------+ // Same as Battle Realms *.h20 8 - Header (LIQDLH2O) 4 - Version (float - 6.0) X - Comments 1 - Comment Terminator (26) 4 - Version (6) 4 - Number Of Files 8 - Compressed File Data Size 8 - Decompressed File Data Size // Directory // for each file 4 - Compression Tag (0=Uncompressed, #=Compressed) 4 - Directory Name Index (-1 for no directory) 4 - Filename Index (-1 for blank file entries) 4 - File ID (incremental from 0) 4 - Decompressed File Size 4 - Compressed File Size 8 - File Offset 4 - Checksum CRC32 4 - Unknown (1239288 or 1239252) // Filename Directory 4 - Compressed Filename Directory Length 4 - Decompressed Filename Directory Length 4 - Checksum CRC32 X - Compressed Filename Directory (ZLib) // When decompressed 4 - Number Of Filenames 4 - Length Of Filename Directory // for each filename X - Filename (Unicode) 2 - null Filename Terminator // Folder Name Directory 4 - Compressed Folder Name Directory Length 4 - Decompressed Folder Name Directory Length 4 - Checksum CRC32 X - Compressed Folder Name Directory (ZLib) // When decompressed 4 - Number Of Folder Names 4 - Length Of Folder Name Directory // for each folder name X - Folder Name (Unicode) 2 - null Folder Name Terminator // Folder Structure 4 - Number Of Folders // for each folder 4 - Parent Folder Index // File Data // for each file if (compressed){ 4 - Compressed Length 4 - Decompressed Length 4 - Checksum CRC32 X - Compressed File Data (ZLib) } else { X - File Data } +---------------------+ | Lost In Space *.lid | +---------------------+ // SAME AS Desert Raid *.lid +--------------------------------------------------+ | Madden 2004 *.dat (Type 1 - No Compression Used) | +--------------------------------------------------+ // NOTE: Files with length=0 still incur padding, so are actually 64 null bytes 4 - Header (TERF) 4 - Directory Offset (64) 4 - Unknown (83886594) 2 - File Padding Size (64) 2 - Number Of Files 48 - null 4 - Directory Header (DIR1) 4 - Directory Length (including these 2 fields) // for each file 4 - File Offset (relative to the start of the FileDataHeader) 4 - File Length 0-63 - null Padding to a multiple of 64 bytes 4 - File Data Header (DATA) 4 - File Data Length (including these 3 fields) 56 - null // for each file X - File Data 0-63 - null Padding to a multiple of 64 bytes +----------------------------------------------------+ | Madden 2004 *.dat (Type 2 - Some Compression Used) | +----------------------------------------------------+ // NOTE: Files with length=0 still incur padding, so are actually 4 null bytes 4 - Header (TERF) 4 - Directory Offset (16) 4 - Unknown (83886594) 2 - File Padding Size (4) 2 - Number Of Files 4 - Directory Header (DIR1) 4 - Directory Length (including these 2 fields) // for each file 4 - File Offset (relative to the start of the FileDataHeader) 4 - File Length 4 - Compression Header (COMP) 4 - Compression Length (including these 2 fields) // for each file 4 - Compression Tag (0=uncompressed, 5=compressed) 4 - Decompressed Size (0=uncompressed) 4 - File Data Header (DATA) 4 - File Data Length (including these 3 fields) 4 - null // for each file X - File Data 0-3 - null Padding to a multiple of 4 bytes +----------------------------------------------------+ | Madden 2005 *.dat (Type 3 - Some Compression Used) | +----------------------------------------------------+ // NOTE: Files with length=0 still incur padding, so are actually 128 null bytes 4 - Header (TERF) 4 - Directory Offset (128) 4 - Unknown (83886594) 2 - File Padding Size (128) 2 - Number Of Files 4 - Directory Header (DIR1) 4 - Directory Length (including these 2 fields) // for each file 4 - File Offset (relative to the start of the FileDataHeader) 4 - File Length 0-127 - Padding to a multiple of 128 bytes 4 - Compression Header (COMP) 4 - Compression Length (including these 2 fields) // for each file 4 - Compression Tag (0=uncompressed, 5=compressed) 4 - Decompressed Size (0=uncompressed) 0-127 - Padding to a multiple of 128 bytes 4 - File Data Header (DATA) 4 - File Data Length (including these 3 fields) 4 - null // for each file X - File Data 0-127 - null Padding to a multiple of 128 bytes +------------------+ | MageSlayer *.vpk | +------------------+ // ARCHIVE HEADER 8 - Header (MageDemo) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown (5) 8 - null 3 - Unknown 3 - File Extension (VPK) 2 - Unknown 4 - Directory Offset 4 - Directory Length // FILE DATA // for each file X - File Data // DIRECTORY // for each file (64-bytes per entry) 56 - Filename (null terminated, filled with junk) 4 - File Offset 4 - File Length +---------------------------+ | Magic The Gathering *.cat | +---------------------------+ 4 - Number Of Files // for each file 4 - Unknown 4 - Offset 4 - Size +--------------+ | Mashed *.piz | +--------------+ 4 - Header ("PIZ" + null) 4 - Version (3) 4 - Number Of Files 2036 - null // for each file 116 - Filename (null) 4 - File Offset 4 - File Length 4 - File ID? X - null Padding to a multiple of 2048 bytes // for each file X - File Data X - null Padding to a multiple of 2048 bytes) +-------------------------+ | Master Of Orion 2 *.lbx | +-------------------------+ 2 - Number Of Files [-1] 4 - Unknown (65197) 2 - null 4 - Offset To Filename Directory (2048)? // for each file 4 - Offset 4 - Archive Size X - Unknown to offset 2048 // for each file 20 - Filename (null) X - null Padding to First File Offset (32768) X - File Data +-----------+ | MAX *.res | +-----------+ // ARCHIVE HEADER 4 - Header (RES0) 4 - Directory Offset 4 - Directory Length // FILE DATA // for each file X - File Data // DIRECTORY // for each file 8 - Filename (without extension, nulls to fill) 4 - File Offset 4 - File Length +-------------------------------------------------+ | McFarlane's Monsters: Evil Prophecy (PS2) *.bin | +-------------------------------------------------+ // for each file 4 - File Offset 4 - File Length // continue until offset+length==arcSize X - Junk padding until offset 2048 X - File Data +-----------+ | MDK *.sni | +-----------+ 4 - Archive Length [+4] 12 - Archive Filename (replacing ".sni" with ".snd") (nulls to fill) 4 - Archive Length [+12] 4 - Number Of Files // for each file 12 - Filename (null-terminated) 2 - Unknown (0/3) 4 - Hash? 2 - null 4 - File Length // for each file X - File Data 0-3 - null Padding to a multiple of 4 bytes +----------------------+ | Mech Commander *.pak | +----------------------+ 4 - Header (206 250 237 254) 4 - First File Offset // for each file 3 - File Offset 1 - Flags? X - File Data +------------------------+ | Mech Commander 2 *.fst | +------------------------+ // Some or all files are compressed using ZLIB? 4 - Header (175 236 221 202) 4 - numFiles // for each file 4 - File Offset 4 - File Size 4 - Unknown 4 - Unknown 250 - Filename (null) X - File Data +-------------------------------------------+ | Mech Warrior 2: Mercinaries *.prj (chunk) | +-------------------------------------------+ 4 - header (PROJ) 4 - Archive Size [-8] 4 - Unknown 4 - Tag (DDIT) 4 - Directory Size [-20] 4 - Unknown 2 - Number Of Files // for each file 4 - File Type 4 - File Offset 4 - File Size 4 - Unknown 4 - Unknown 2 - Unknown (62) 2 - Unknown (58) X - File Data // at each file offset 4 - File Type 4 - File Size X - File +-----------------------------------+ | Mech Warrior 2: Mercinaries *.mw2 | +-----------------------------------+ 4 - Number Of Files (if this equals the archive size, it is not an archive!) // for each file 4 - File Offset X - File Data +----------------------+ | Mech Warrior 3 *.zbd | +----------------------+ // SAME AS RECOIL *.zbd VERSION 1 4 - null 4 - Version (1) 4 - null 4 - Number Of Files 8 - null // for each file 32 - Filename (null) 4 - Offset 4 - Padding (all 255's) X - File Data +-----------------------------------+ | Mech Warrior 4: Mercinaries *.mw4 | +-----------------------------------+ 4 - Header (#VBD) 4 - Unknown 4 - Unknown 4 - First File Offset 2 - Number Of Files 2 - Number Of Files // for each file 8 - Last Modified Time 4 - Unknown 4 - File Length 4 - Data Offset [+firstFileOffset] 2 - Unknown 1 - Filename Length X - Filename X - File Data +------------------------------------------------+ | Medal Of Honor - European Assault (XBox) *.ast | +------------------------------------------------+ // Same as Need For Speed Underground 2 *.viv // NOTE: All values are in BIG ENDIAN order! 4 - Header (BIG4) 4 - Unknown 4 - Number Of Files 4 - Directory Size // for each file 4 - Offset 4 - Length X - Filename X - null Padding to a multiple of 128 bytes // for each file X - File Data X - null Padding to a multiple of 128 bytes +--------------------------------------+ | Medal Of Honor: Pacific Assult *.rez | +--------------------------------------+ // NOTE: Some files are compressed using an unknown routine. The compression is probably // similar to the DBPF compression used by Maxis. 4 - Header (MOPA) 4 - Version (1) 4 - Directory Length 8 - Header 2 (LZSSRLE ) 4 - Header 3 (NONE) 4 - Unknown (1) 4 - Number Of Files // for each file 4 - File Offset 4 - Decompressed Length 4 - File ID? 4 - File Length // for each file X - Filename (null) X - File Data +---------------------------------------+ | Medieval Total War *.lbm (chunk)(big) | +---------------------------------------+ // SAME AS ALLAN BORDER CRICKET *.lbm +--------------------------+ | Medieval Total War *.prf | +--------------------------+ 2 - Unknown // for each file 2 - Offset 2 - Type? // continue until you reach the first offset // Number Of Files = (firstOffset -2) / 4 X - File Data +--------------------------+ | Medieval Total War *.jjm | +--------------------------+ // I DON'T THINK THIS IS AN ARCHIVE! 2 - Unknown 2 - Unknown 1 - Unknown 4 - Unknown (data size?) // for each file 4 - Offset (relative to data offset) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown +-----------------+ | Mega Race *.dat | +-----------------+ 1 - Unknown // for each file 1 - null (except for the first file entry which = 10) 16 - Filename 4 - File Size 4 - Offset X - Padding to first file at 65536 X - File Data +-----------------------+ | Messiah *.dta + *.idx | +-----------------------+ // The IDX file has the directory, the DTA file has the file data // for each file 120 - Filename (null) 4 - File Offset 4 - File Size +------------------------+ | Metal Gear Solid *.dar | +------------------------+ 4 - Number Of Files // for each file X - Filename (null) 0-3 - Padding (so filename length is a multiple of 4 bytes) 4 - File Size X - File Data 1 - null +---------------------------------------+ | Metal Heart: Replicants Rampage *.pkg | +---------------------------------------+ // Compressed files use ZLib // ARCHIVE HEADER 4 - Header (ARCH) 2 - Version 2 - Unknown 4 - Unknown, possibly archive CRC/Timestamp 4 - Unknown, possibly archive CRC/Timestamp 4 - Archive Length 4 - Directory Offset (from the end of the archive) 4 - Unknown 2 - Number Of Files 2 - Unknown // FILE DATA // for each file X - File data // DIRECTORY // for each file 4 - Unknown, possibly archive CRC/Timestamp 4 - Unknown, possibly archive CRC/Timestamp 4 - Compressed Length 4 - Decompressed Length 4 - File Offset (directories have offset all 255's and lengths=0) 2 - Filename Length [*2 for unicode text] 2 - Unknown X - Filename (unicode text) +------------------------+ | Micro Machines 2 *.sfx | +------------------------+ // for each file 4 - Unknown 4 - File Length X - Filename 1 - null Filename Terminator X - File Data +----------------------+ | Microman *.pg1 *.pg2 | +----------------------+ // BMP images +-------------------------------+ | Microsoft Baseball 2000 *.fst | +-------------------------------+ 4 - Number Of Files // for each file 4 - Offset 64 - Filename (null) X - File Data +---------------------------------+ | Microsoft Train Simulator *.ace | +---------------------------------+ // ZLib compression is used to compress the file data? 8 - Header (SIMISA@F) 4 - Decompressed Size? 4 - Padding (all 64's) X - File Data (compressed) +----------------------+ | Midtown Madness *.ar | +----------------------+ 4 - Header (ARES) 4 - Number Of Files 4 - Unknown X - Directory // for each file 4 - Offset 4 - Unknown 4 - Unknown 4 - Unknown // for each filename X - Filename (terminated with a null, or a (1,0) pair of bytes) 12 - null X - File Data +------------------------+ | Midtown Madness 2 *.ar | +------------------------+ 4 - Header (DAVE) 4 - Unknown (Number Of Files?) 4 - Filename Offset [+2048] 4 - Data Offset [+Filename Offset+2048] // go to offset 2048 // for each file 4 - File ID 4 - File Offset 4 - Raw File Size 4 - Compressed File Size // go to Filename Offset // for each file X - Filename (null) // Each file is padded out (using null bytes) to a multiple of 2048 bytes +-----------------------+ | Monopoly Deluxe *.fpf | +-----------------------+ 4 - Number Of Files 2 - Unknown (null) // for each file 4 - File Offset (if this is greater than 1070000000 then discard and continue, it is not included in the Number Of Files count) +--------------------------------+ | Monty Python *.bin (Version 1) | +--------------------------------+ // This is a generic archive type for games by the 7th Level 2 - Header (7L) 2 - Version (1) 1 - Description Length 79 - Description (null) 2 - Number Of Files 2 - Unknown 2 - Unknown 2 - Unknown 4 - Unknown 4 - null 2 - Filename Directory Length 4 - N/A (all 255's) 4 - Unknown 8 - null // OFFSET DIRECTORY HERE // for each file 2 - File Type ID? (1,3,5,11,12) 4 - Offset (relative to the end of the directory) 4 - Length // FILENAME DIRECTORY HERE // for each file X - Filename (null) X - File Data +--------------------------------+ | Monty Python *.bin (Version 2) | +--------------------------------+ // This is a generic archive type for games by the 7th Level 4 - Header (7LB + (byte)1) 4 - Version (2) 78 - Description (null) 4 - Unknown (2) 8 - null 4 - Unknown 92 - null 2 - Unknown (1) 4 - Unknown (236) 2 - Unknown 4 - Unknown 2 - Unknown 4 - Unknown 14 - null 4 - Directory Offset 4 - Directory Length 16 - null 4 - Counter Offset 4 - Counter Length 4 - Filename Directory Offset 4 - Filename Directory Length 4 - Unknown Offset 4 - Unknown Length 4 - Image Offset 4 - Image Length 40 - null // OFFSET 322 IS HERE X - File Data X - Directories in the order specified by the header // Go to the directory offset // for each file 2 - File Type ID? (1-18) 4 - Offset 4 - Length +-----------------------------------------------------------+ | Monty Pythons Meaning Of Life *.bin + *.000 (7LU version) | +-----------------------------------------------------------+ // BIN contains the directory, 000 contains the file data 4 - Header (7L + (byte)220 + (byte)1) // (byte) 220 is a U with double dots above it 2 - Unknown 4 - Version (2) 76 - Description (null) 4 - Unknown (258) 2 - null 4 - Unknown 188 - null 4 - Unknown (1) 4 - Unknown (236) 4 - null 4 - Unknown (150) 4 - Unknown (42) 4 - Unknown (268) 4 - Unknown (274) 32 - null 2 - Unknown (1) 4 - Unknown 2 - null 4 - null 4 - Directory Offset 4 - Directory Length 16 - null 4 - Counter Offset 4 - Counter Length 4 - Filename Directory Offset 4 - Filename Directory Length 4 - File Data Offset (ie. offset to the start of the first file) 4 - File Data Length 4 - Image Offset 4 - Image Length 24 - null 4 - Filename Directory 2 Offset 4 - Filename Directory 2 Length 4 - Filename Directory 3 Offset 4 - Filename Directory 3 Length 4 - File ID Directory Offset 4 - File ID Directory Length 8 - null 4 - Source Filename Offset 4 - Source Filename Length // The directory starts here // go to directory offset (which is here anyway) // for each file // 2 - File Type ID? (1-21) // 4 - Offset // 4 - Length // go to each of the filename directories // for (each file?) X - Filename (null) // go to padding directory offset // for (each file?) 4 - File ID? // go to source filename offset X - Source Filename (null) (including path and drive letter) X - null padding (up to "Source Filename Length") +--------------------------------------------------------+ | Monty Pythons Complete Waste Of Time *.bin (7L type 2) | +--------------------------------------------------------+ 2 - Header (7L) 2 - Version (1) 1 - Description Length 79 - Description (null) 2 - Number Of Files 2 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 2 - Filename Directory Length 4 - Unknown 4 - Unknown 8 - null // Directory Starts Here // for each file // 2 - File Type ID? (1-11) // 4 - Offset // 4 - Length // go to the filename directories // for (each file?) X - Filename (null) +------------------+ | Moorhuhn 3 *.dat | +------------------+ // for each file 48 - Filename (null) 4 - Offset 4 - Size 8 - null // repeat until the name = **** // The first filename can be used as a header (MH3 V1.0) // every file is padded to multiples of 512 8 - Checksum +-----------------------+ | Mortal Kombat 3 *.ftr | +-----------------------+ 4 - Header (MFIL) 2 - numFiles 4 - Directory Offset // go to dirOffset 4 - Header 1 (CDIR) 1 - null 8 - Header 2 (FLAGBAG!) 1 - null 4 - Directory Size (excluding the directory header) 4 - Directory Size (excluding the directory header) 4 - null 4 - Unknown // for each file 4 - File Type / Extension 1 - null 8 - Filename (terminated by spaces) 1 - null 4 - File Offset 4 - File Size (excluding the 30 file header) 5 - null // at each file offset 4 - File Type / Extension 1 - null 8 - Filename (terminated by spaces) 1 - null 4 - File Size 4 - File Size 4 - null 4 - Unknown X - File Data +-------------------------------------+ | Mortal Kombat Deadly Alliance *.ssf | +-------------------------------------+ // This is a nested directory structure that starts right at the beginning of the file 4 - Header ( CES) 4 - Unknown (4) 4 - null 4 - Unknown (first instance of this field is the total number of files in the archive?) 4 - Number Of Files 4 - Archive Size // for each File 4 - File Type ID (1,2,3,4,5,6,7,8,9,10) 4 - Offset (relative to the start of the current directory, ie relative to the offset of " CES") 4 - Length X - Padding to multiple of 2048 bytes // What happens now depends on the file type ID // All files with the same type ID number are files with the same extension // // A Sub-Directory has ID=6. If encountered, go to the offset and repeat this format // from the beginning (ie, go to the offset and the first 4 bytes will be " CES", etc.) // // Other IDs mean different file types. Here are the known ones // 2 = 3D Bone? // 3 = 3D Model? // 7 = Directory Index (contains filenames and things like that) // 8 = Unknown Directory (has a similar structure to this format) +--------------------------------+ | Mortal Kombat Deceptions *.msx | +--------------------------------+ 4 - Version (2) 4 - Number Of Files [-1] 4 - File Padding Size (2048) 4 - Directory Size (including this archive header) 4 - Directory Padding Size (2048) 12 - null 4 - Archive Size 16 - null // for each file 2 - File ID (starting at 1, incremental) 1 - null 2 - Unknown (32) 2 - Unknown 1 - null 4 - File Size (including the 40 bytes of the header in the next loop) 4 - Padding Length? 4 - Unknown (40) 4 - null // for each file 4 - RIFF Header (RIFF) 4 - File Length [+8] 8 - Format Header (WAVEfmt ) 4 - Sound Description Length? (20) 2 - Unknown 2 - Mono/Stereo? (2) 4 - Sample Rate (32000) 4 - Sample Rate (36000) 2 - Unknown 2 - Unknown 2 - Momo/Stereo? (2) 2 - Block Size? (64) 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +--------------------------------+ | Mortal Kombat Deceptions *.ssf | +--------------------------------+ // This is a nested directory structure that starts right at the beginning of the file 4 - Header ( CES) 4 - Unknown (4) 4 - null 4 - Unknown (first instance of this field is the total number of files in the archive?) 4 - Number Of Files 4 - Unknown 4 - Archive Size // for each File 4 - File Type ID (1,2,3,4,5,6,7,8,9,10) 4 - Offset (relative to the start of the current directory, ie relative to the offset of " CES") 4 - Length 4 - Filename Offset (relative to the end of the directory) // for each file X - Filename 1 - null X - Padding // For the root directory, it is padded to 2048 bytes with nulls // For all sub-directories, it is padded to 512 bytes using 4 nulls followed by // a repeating string of "PAD128" // What happens now depends on the file type ID // All files with the same type ID number are files with the same extension // // A Sub-Directory has ID=1. If encountered, go to the offset and repeat this format // from the beginning (ie, go to the offset and the first 4 bytes will be " CES", etc.) // // Other IDs mean different file types. Here are the known ones // 1 = Sub-Directory // 2 = Sprite Texture? // 3 = 3D Model? // 4 = Texture Image? // 8 = Animation Path? +--------------------------------------+ | Mortal Kombat Deceptions (PS2) *.ssf | +--------------------------------------+ // SAME AS PC VERSION // This is a nested directory structure that starts right at the beginning of the file 4 - Header ( CES) 4 - Unknown (4) 4 - null 4 - Unknown (first instance of this field is the total number of files in the archive?) 4 - Number Of Files 4 - Unknown 4 - Archive Size // for each File 4 - File Type ID (1,2,3,4,5,6,7,8,9,10) 4 - Offset (relative to the start of the current directory, ie relative to the offset of " CES") 4 - Length 4 - Filename Offset (relative to the end of the directory) // for each file X - Filename 1 - null X - Padding // For the root directory, it is padded to 2048 bytes with nulls // For all sub-directories, it is padded to 512 bytes using 4 nulls followed by // a repeating string of "PAD128" // What happens now depends on the file type ID // All files with the same type ID number are files with the same extension // // A Sub-Directory has ID=1. If encountered, go to the offset and repeat this format // from the beginning (ie, go to the offset and the first 4 bytes will be " CES", etc.) // // Other IDs mean different file types. Here are the known ones // 1 = Sub-Directory // 2 = Sprite Texture? // 3 = 3D Model? // 4 = Texture Image? // 8 = Animation Path? +-------------------------------------------+ | Mortal Kombat Deceptions (GameCube) *.ssf | +-------------------------------------------+ // THIS IS THE SAME STRUCTURE AS THE PC VERSION, BUT USING BIG ENDIAN FORMAT // Which means all fields are still the same, but different order, and the header is reversed! // This is a nested directory structure that starts right at the beginning of the file 4 - Header (SEC ) 4 - Unknown (4) 4 - null 4 - Unknown (first instance of this field is the total number of files in the archive?) 4 - Number Of Files 4 - Unknown 4 - Archive Size // for each File 4 - File Type ID (1,2,3,4,5,6,7,8,9,10) 4 - Offset (relative to the start of the current directory, ie relative to the offset of " CES") 4 - Length 4 - Filename Offset (relative to the end of the directory) // for each file X - Filename 1 - null X - Padding // For the root directory, it is padded to 2048 bytes with nulls // For all sub-directories, it is padded to 512 bytes using 4 nulls followed by // a repeating string of "PAD128" // What happens now depends on the file type ID // All files with the same type ID number are files with the same extension // // A Sub-Directory has ID=1. If encountered, go to the offset and repeat this format // from the beginning (ie, go to the offset and the first 4 bytes will be " CES", etc.) // // Other IDs mean different file types. Here are the known ones // 1 = Sub-Directory // 2 = Sprite Texture? // 3 = 3D Model? // 4 = Texture Image? // 8 = Animation Path? +--------------------------------------+ | Mortal Kombat Gold (Dreamcast) *.geo | +--------------------------------------+ 4 - Header (0.1v) 4 - Archive Length 4 - Number Of Files 20 - null // for each file 2 - Unknown (1) 2 - File Type ID 4 - File Offset 24 - null +--------------------------------------+ | Mortal Kombat Gold (Dreamcast) *.kat | +--------------------------------------+ 4 - Number Of Files // for each file 4 - Unknown (1) 4 - File Offset 4 - File Length 4 - Unknown (11025) 4 - null 4 - Unknown (4) 20 - null X - File Data +-----------------------------+ | Mortal Kombat Trilogy *.snd | +-----------------------------+ 4 - Number Of Files // for each file 4 - File Offset +--------------+ | Mortyr *.hal | +--------------+ 4 - Header (APUK) 4 - Number Of Files 24 - Unknown // for each file 4 - File Length 4 - File Offset 4 - Unknown 4 - Unknown 16 - Filename (null) X - File Data +-------------------------+ | Motocross Madness *.dat | +-------------------------+ 4 - Header (RES) 4 - Number Of Files // for each file 32 - filename 4 - Offset [+8 header] 4 - Size X - File Data +---------------------------------------+ | Motocross Madness 2 *.res *.tex *.dat | +---------------------------------------+ 3 - Header (RS2) 1 - null 4 - Number Of Files // for each file 4 - Filename Length (including terminating null byte) X - Filename 4 - Offset 4 - Size X - File Data +-------------------------------------------+ | MotoGP Ultimate Racing Technology 3 *.ark | +-------------------------------------------+ // Uses unknown compression method - an RLE-Based derivative? 4 - null 4 - First File Offset [+8] 4 - Number Of Files 4 - Unknown (16) 4 - null 4 - First File Offset [+8] // for each file 4 - Compression Tag (0=Decompressed 1=Compressed) 4 - File Offset 4 - File Length 4 - Hash? X - File Data +-------------------------------------------+ | MotoGP Ultimate Racing Technology 3 *.vid | +-------------------------------------------+ // Bink Video +--------------------+ | Motoracer GP *.bkf | +--------------------+ 4 - Number Of Files // for each file X - Filename (null) 18 - Unknown (hash?) 4 - Offset 2 - Unknown 2 - Unknown X - File Data +--------------------+ | Moto Racer 2 *.bkf | +--------------------+ 4 - Header (254 255 255 255) 4 - Number Of Files 4 - Filename Field Length (48) // for each file 48 - Filename (null) (filled with junk) 4 - File Offset 4 - File Length 8 - Unknown X - File Data +-----------------+ | Motorhead *.pak | +-----------------+ 4 - Header (DIVI) 4 - Number Of Files 4 - First File Offset 4 - Type? // for each file 4 - File Offset 4 - Unknown 4 - Type? X - null padding to position 780 X - File Data +----------------+ | MotoTrax *.wad | +----------------+ // Same as Thief 3 *.bik +------------+ | Myst *.mhk | +------------+ // BIG ENDIAN ORDER // ONLY SOME FILES HAVE FILENAMES // ARCHIVE HEADER 4 - Header (MHWK) 4 - Archive Size [+8] // DIRECTORY HEADER 4 - Directory Header (RSRC) 4 - Length Of All Directories 4 - Archive Size 4 - Type Directory Offset 2 - Entry Directory Offset [+typeDirectoryOffset] 2 - Length of the Entry Directory // TYPE DIRECTORY 2 - Filename Directory Offset 2 - Number Of Types // for each type 4 - Type Code String 2 - Offset To This Type Details 2 - Unknown // for each type 2 - Number Of Files Of This Type // for each file of this type 2 - File ID 2 - File ID 2 // ENTRY DIRECTORY 4 - Number Of Files // for each file 4 - File Offset 3 - File Length 1 - Flags 2 - Unknown // FILE DATA // for each file X - File Data +-------------------------+ | Myst 4 Revelation *.m4r | +-------------------------+ 4 - Description Length X - Description (null) 4 - Number Of Directories 4 - null for each directory { 1 - Number Of SubDirectories (in the current directory) if (num > 0){ 4 - SubDirectory Name Length X - SubDirectory Name (null) } else { 4 - Number Of Files In The Directory for each file { 4 - Filename Length X - Filename (null) 4 - File Length 4 - File Offset } } } +-------------------------+ | Nascar Heat *.res *.trk | +-------------------------+ 4 - Header (0TSR) // Note the zero, not the letter "O" 4 - null 4 - Number Of Files 4 - Number Of Files (duplicate) 4 - Archive Length // for each file 36 - Filename (null) 4 - Type Code (GAMI=*.img, TYAL=*.lyt, PMTS=*.fnt, etc.) 4 - Unknown (1) 4 - File Length [+4] 8 - null 4 - null // for each file X - File Data 4 - null +---------------------+ | Nascar Racing *.dat | +---------------------+ // for each file 2 - Unknown 2 - Unknown 4 - Raw File Size 4 - Compressed File Size 13 - Filename (null) 2 - Unknown X - File Data +-----------------------+ | Nascar Racing 2 *.dat | +-----------------------+ 2 - Number Of Files? // for each file 2 - Unknown (5) 4 - File Length 4 - File Length 13 - Filename (null-terminated) 4 - File Offset X - File Data +------------------------+ | Nascar SimRacing *.mas | +------------------------+ // This archive uses ZLib Compression? 11 - Header (CUBEMAS4.10) 5 - null 4 - Number Of Files 4 - Size Of File Data // for each file 4 - Length of these 6 fields (20) 4 - File Offset (relative to the end of the directory) 2 - Unknown (32) 2 - Unknown (34) 4 - File Size 4 - Decompressed File Size 236 - Filename (null) X - File Data +-----------------------+ | NCAA Final Four *.jam | +-----------------------+ // This is a very simple directory structure that starts repetition from line 2 3 - Header (JAM) 4 - Number Of Files in this Directory // for each file in this directory 15 - Filename (null) 4 - Offset 4 - Length 4 - Number Of Sub-Directories // for each sub-directory 15 - Directory Name 4 - Offset to sub-directory // go to each sub-directory offset // nested repeat from line 2 ("Number of Files In This Directory") +----------------------+ | Need For Speed *.viv | +----------------------+ // Same as BIG_BIGF +------------------------+ | Need For Speed 2 *.viv | +------------------------+ // Same as BIG_BIGF +-----------------------------------+ | Need For Speed: Hot Pursuit *.viv | +-----------------------------------+ // Same as BIG_BIGF +-------------------------------------+ | Need For Speed: Hot Pursuit 2 *.viv | +-------------------------------------+ // Same as BIG_BIGF +-----------------------------------------+ | Need For Speed: Porsche Unleashed *.viv | +-----------------------------------------+ // Same as BIG_BIGF +-----------------------------------+ | Need For Speed: Underground *.ast | +-----------------------------------+ // This format lists all files one after the other. Each file is split up // into chunks, presumably to make for more efficient file buffering when // playing audio. // for each file 4 - Header (SCHI) 4 - Split Header Offset X - Unknown 12 - Split Header (see below) X - File Data Chunks (see below) 4 - File End Tag (SCEI) 4 - Unknown (8) X - Padding (filled with null) // Split Header Format 4 - Split Header (SCCI) 4 - Chunk Data Offset (12) (relative to the start of the split header) 4 - Number Of Chunks // File Data Chunks Format 4 - Chunk Header (SCDI) 4 - Compressed Size (of the chunk) 4 - Uncompressed Size (of the chunk) 4 - Padding (filled with null) X - Chunk Data +-------------------------------------+ | Need For Speed: Underground 2 *.viv | +-------------------------------------+ // NOTE: All values are in BIG ENDIAN order! 4 - Header (BIG4) 4 - Archive Size 4 - Number Of Files 4 - First File Offset / Directory Size // for each file 4 - Offset 4 - Length X - Filename X - null Padding to an offset of 64 bytes // for each file X - File Data X - null Padding to a multiple of 64 bytes +---------------+ | Neocron *.pak | +---------------+ // Uses ZLib Compression? 4 - Unknown 4 - Number of Files // for each file 4 - File Entry Length (ie 20 + filename.length() + 1) 4 - File Offset 4 - Compressed File Length 4 - Decompressed File Length 4 - Filename Length (including null terminator) X - Filename 1 - null Filename Terminator X - File Data +------------------------------------+ | Network Q Rally Championship *.bun | +------------------------------------+ // for each file 4 - File Offset // continue until you reach the first offset // Number Of Files = firstOffset / 4 X - File Data +--------------------------+ | Neverwinter Nights *.bif | +--------------------------+ // Same as BIF_BIFFV1 +--------------------------+ | NHL 06 *.ast *.big *.vp6 | +--------------------------+ // Same as other SCHl +--------------------+ | NHL 06 *.big *.viv | +--------------------+ // Same as FIFA 2005 +------------------------------+ | Nibiru: Age Of Secrets *.adb | +------------------------------+ 4 - Maximum Number Of Files ? 4 - Version (1) 4 - Number Of Files (including padding entries at the end of the directory) 4 - Number Of Files (NOT including the padding entries at the end of the directory) 4 - Unknown (31) // for each file (40 bytes per file entry) 4 - File Offset? (relative to the start of the file data) 32 - Filename (null) 4 - File Size? X - null Padding to the first file offset (at offset numFilesIncPadding*40) X - File Data +------------------------------+ | Nibiru: Age Of Secrets *.grp | +------------------------------+ // Same As Nibiru: Messenger Of The Gods *.grp (these ones here are the corrected specs!) 16 - Header ((bytes)232,193,205,195,181,247,251,233,170,251,166,244,182,210,221,161) 4 - Length Of Archive Header (44) 4 - Unknown 4 - Version (2) 4 - Number Of Files (NOT including the padding entries at the end of the directory) 4 - Number Of Files (including padding entries at the end of the directory) 4 - Unknown 4 - Unknown // for each file (49-bytes per entry) 33 - Encrypted Filename? (null) 4 - File Offset 4 - File Length 4 - Unknown 4 - null X - null padding to first file offset X - File Data // To determine the filename, do XOR with the following values // 137,134,137,144,149,144,137,134,223,139,134,146,223,190,184,187,172,223,137,158,141,138,149,154,197,223,183,158,156,148,?,?,? +--------------------------------------+ | Nibiru - Messenger Of The Gods *.grp | +--------------------------------------+ 16 - Unknown 4 - Length Of Archive Header (44) 4 - Archive Length? 4 - Version? (2) 4 - Number Of Files (NOT including the padding entries at the end of the directory) 4 - Number Of Files (including padding entries at the end of the directory) 4 - Unknown 4 - Unknown // for each file 33 - Encrypted Filename? (null) 4 - File Offset 4 - File Length 4 - Unknown 4 - null X - null padding to first file offset X - File Data // To determine the filename, do XOR with the following values // 137,134,137,144,149,144,137,134,223,134,134,146,223,190,184,187,172,223,137,158,141,138,149,154,197,223,183,158,156,148,?,?,? +----------------------------------------------+ | Nightlong: Union City Conspiracy *.cd0 *.cd1 | +----------------------------------------------+ 4 - Number Of Files // for each file 12 - Filename (null-terminated) 4 - File Offset 12 - null 4 - Archive Size X - File Data +-----------------+ | Normality *.das | +-----------------+ 4 - Header (DASP) 2 - Number Of Files? 4 - Unknown 2 - Unknown 4 - Archive Size (First File Offset) // for each file 4 - Offset (ignore or skip offsets of zero) 2 - Half the Size (ie actual file size = size*2) 2 - Unknown X - File Data +-----------------+ | Northland *.lib | +-----------------+ 4 - Version (1) 4 - Number Of Directories? 4 - Number Of Files? // for each directory 4 - Directory Name Length X - Directory Name 4 - Parent Directory ID // for each file 4 - Filename Length X - Filename 4 - File Offset 4 - File Length X - File Data +----------------+ | NRL 2003 *.fsb | +----------------+ 4 - Header (FSB3) 4 - Number Of Files 4 - dirSize 4 - Data size 4 - Unknown 4 - null //for each file 2 - Entry Size (64) 30 - Filename 4 - Raw File Size? 4 - Offset 4 - Compressed File Size 16 - Other sound information (Khz, bit rate, etc.) X - File Data +---------------------+ | Obscure *.hvp *.001 | +---------------------+ // BIG ENDIAN ORDERING // Uses ZLib compression 11 - Header (HV PackFile) 1 - null 4 - Unknown 4 - Unknown (8) 4 - Number Of Files and Directories 4 - Number Of Files only 4 - Directory Length (not including all these archive header fields) 8 - Unknown // for each entry 4 - Length Of Entry (including this field) 1 - Entry Type Indicator 1 (0=dir, 1=file) 4 - Entry Type Indicator 2 (0=dir, 1=file) if (entryType == dir){ 4 - Number Of Files/SubDirectories In This Directory 1 - Directory Name Length X - Directory Name } else if (entryType == file){ 4 - Compressed Size 4 - Decompressed Size 4 - Unknown (Hash or something?) 4 - File Offset 4 - Filename Length X - Filename } X - File Data +------------------------------------+ | Oddworld: Abes Oddysee *.ddv (big) | +------------------------------------+ // for each file 4 - Type // IF TYPE == MOIR 4 - File ID 4 - Header (AKIK) 2 - File ID (same as above ID field) 2 - File Size 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown X - File Data // IF TYPE == VALE (not 100% correct) 2 - File Size 2 - File ID (same as above ID field) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown X - File Data +------------------------------+ | Oddworld: Abes Oddysee *.lvl | +------------------------------+ 4 - First File Offset 4 - null 4 - Header (Indx) 4 - null 4 - numFiles? 4 - Unknown (5) 8 - null // for each file 12 - Filename 4 - Unknown 4 - Unknown 4 - File Size X - File Data // at each file offset 8 - Actual file size (without the file header) 8 - Filename/Type/Extension (null) X - File Data X - null padding to a multiple of 2048 bytes +------------------------------------------+ | Official Forumula 1 Racing *.lkf + *.fat | +------------------------------------------+ // LKF contains the file data, FAT contains the offsets X - Filename of the LKF archive this FAT file references 8 - null 496 - Padding to offset 513 // for each file 4 - File Type ID? (Stop loop when = 65535) 4 - Offset 4 - Unknown 4 - Length 4 - null X - Blank file entries of the pattern above, until offset 755 // continue until offset 30116 4 - Unknown 4 - Unknown 4 - Unknown 4 - null 1120 - Padding // continue until the extension is XXX X - Tag Name (null) (eg XXX ) X - File Extension (null) (eg .xxx) X - Directory Name (null) (eg XXX/) 4 - Number of Files, or offsets // 1144 bytes of the following pattern 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each file 1 - null 23 - Filename (32-terminated) +-----------+ | Oni *.dat | +-----------+ 20 - Header 4 - Number Of Files 4 - Unknown 4 - Unknown 4 - First File Offset 4 - Data Size 4 - Filename Directory Offset 4 - Filename Directory Size 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each file 4 - Type/Extension 4 - Offset (relative to first file offset) 4 - Filename Offset (relative to filename directory offset) 4 - File Size 2 - Unknown 2 - Unknown X - File Data // for each filename 4 - Type/Extension X - Filename (null) +----------------------------+ | Operation Flashpoint *.pbo | +----------------------------+ // for each file X - Filename (null) 12 - null 4 - Unknown 4 - File Size // continue until filename is null X - File Data +----------------------------+ | Orion Burger *.has + *.hag | +----------------------------+ // Same as The Riddle Of Master Lu // The *.has file contains the directory for all *.hag files, the *.hag files contain the file data 4 - Number Of Files // for each file 33 - Filename (null Terminated) 1 - Archive Name ID 1 - Entry Type (0 for a blank file) 4 - File Offset 4 - File Size 4 - Entry Offset (if not =FileOffset, then ignore?) // for each section (ie until end of file) 33 - Archive Name (null Terminated) (without extension) 1 - Archive Name ID +---------------+ | Outlive *.dat | +---------------+ 4 - Number Of Files // for each file 32 - Filename 4 - File Offset X - File Data +-----------------+ | Overdrive *.epf | +-----------------+ 4 - Header (EPFS) 4 - dirOffset // go to dir offset // for each file 14 - filename (null) (filled up with junk) 4 - File Offset? 4 - Unknown (type? ID?) +------------------------------------------------+ | Oxygen Phone Manager SMS Message Archive *.osm | +------------------------------------------------+ 24 - Header (Oxygen Software SMS. v3.) 4 - Number Of Items In Archive 4 - Number Of Actual SMS's (ie some SMS's span over 1 message) 4 - Number Of Actual SMS's (ie some SMS's span over 1 message) 4 - null 4 - Length of header data for each SMS (68) // for each message 1 - null 4 - Offset to the null above 4 - Message Number (incremental from 1) 8 - Timestamp? 3 - null 4 - Unknown 8 - null 4 - Unknown 4 - Unknown 12 - null 4 - Unknown (76 for messages with multiple parts) 4 - Number Of Message Parts (null for a single message) 4 - Message Part Number (null for a single message, incremental from 1 for multiple parts) 4 - SMS Station Phone Number Length? 2 - Message Length 2 - Topic Length 2 - Original Sender Phone Number Length X - Original Sender Phone Number X - Message (Unicode Text - length=messageLength*2) X - Topic (Unicode Text - length=topicLength*2) 16 - SMS Station Phone Number (null Terminated) +----------------------------------+ | Pacman: Adventures in Time *.pac | +----------------------------------+ 4 - header (_CA_) 4 - Unknown (100) (version? ie 1.00) 4 - null 4 - headerSize? (16) 4 - numDirectories // for each directory 4 - Number Of Files 32 - dirName 4 - Offset // for each file 4 - Unknown 32 - filename 4 - Unknown 4 - offset 4 - size +------------------------+ | Panzer Commander *.jrf | +------------------------+ 4 - Header (MTLU) 4 - Number Of Files 4 - Directory Offset 20 - Padding (all 205's) // go to directory offset // for each file 36 - Filename (null) 4 - Length 4 - Offset 4 - null +----------------------+ | Panzer General *.shp | +----------------------+ 4 - Version (1.10) - read as string 4 - Number Of Files // for each file 4 - offset 4 - ID? type? X - File Data +---------------+ | Panzers *.pak | +---------------+ 12 - Header 4 - Directory Size 1 - Unknown // for each file 1 - Filename size X - Filename 4 - Offset 4 - Size 4 - Unknown 2 - Unknown X - File Data +------------------+ | Paradoxion *.pak | +------------------+ 4 - Number Of Files // for each file X - Filename (null) X - File Type Description (null) (eg BGDESC, TEXTURE, MUSIC) 4 - File Offset 4 - File Size 4 - File Type ID 1 (5=BGDESC, 22=TEXTURE, 25=MUSIC) 4 - File Type ID 2 (0=BGDESC, 3=TEXTURE, 1=MUSIC) 4 - null 4 - Unknown X - File Data +------------------+ | Pathologic *.vfs | +------------------+ 4 - Header (LP1C) 4 - null 4 - Number Of Files? // for each file 1 - Filename Length X - Filename 4 - File Length 4 - File Offset 8 - Hash? X - File Data +-------------------+ | Patrician 2 *.cpr | +-------------------+ 16 - Header (ASCARON_ARCHIVE ) 4 - Version (V0.9) 12 - null 4 - Directory Length [-16] (including all these archive header fields and the 9 null padding) 4 - Directory Length [-15] (not including all these archive header fields or the padding) 4 - Number Of Files 4 - Unknown // for each file 4 - Data Offset 4 - Raw File Length 4 - Unknown (1) X - Filename (null) 9 - null X - File Data +-----------------+ | Perimeter *.pak | +-----------------+ // A ZIP archive +----------------------------+ | Phantasy Star Online *.afs | +----------------------------+ // Same as Leisure Suit Larry: Manga Cum Laude *.afs +---------------------------------------+ | Pilot Down - Behind Enemy Lines *.s10 | +---------------------------------------+ // Direct-X Image Directory? (without DDS headers, and maybe a separate directory index file) +---------------------------------------+ | Pilot Down - Behind Enemy Lines *.wga | +---------------------------------------+ 4 - Directory Length? 4 - Version (1)? // for each directory 4 - Directory Name Length X - Directory Name 4 - Number Of Files In This Directory // for each file in this directory 4 - Filename Length X - Filename 4 - File Offset? 4 - File Length? 4 - Number Of Sub-Directories In This Directory? // for each sub-directory in this directory // repeat from "// for each directory" X - File Data +----------------------------+ | Playboy: The Mansion *.cam | +----------------------------+ 8 - Header (CYLBPC ) 2 - Version Main (2) 2 - Version Sub (1) 4 - Number Of File Types // for each file type 4 - Size of the directory for this file type [+8] (including these 4 fields) 4 - File Type Description (WAVE) 4 - Size of each file entry (28) (OLD!) 4 - Number Of Files of this type 4 - null // for each file of this type 4 - Filename? File ID? 4 - File Offset 4 - File Size 4 - null X - File Data +----------------------------------------+ | Playboy: The Mansion *.cam (Version 1) | +----------------------------------------+ 8 - Header (CYLBPC ) 2 - Version Main (1) 2 - Version Sub (1) 4 - Number Of File Types 4 - Directory Length [+20 +numTypes*8] // for each type 4 - File Type Extension/Description 4 - Offset to the directory for this file type // for each type 4 - Number Of Files 4 - null // for each file of this type 20 - Filename? File ID? 4 - File Offset 4 - File Size X - File Data +----------------------------------------+ | Playboy: The Mansion *.cam (Version 2) | +----------------------------------------+ 8 - Header (CYLBPC ) 2 - Version Main (2) 2 - Version Sub (1) 4 - Number Of File Types 4 - Directory Length [+12] // for each type 4 - File Type Extension/Description 4 - Offset to the directory for this file type // for each type 4 - Number Of Files 4 - null // for each file of this type 4 - Filename? File ID? 4 - File Offset 4 - File Size 4 - Filename Length // for each file of this type X - Filename 0-2047 - null Padding to a multiple of 2048 bytes // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes +--------------------------------------+ | Playboy: The Mansion *.pict (Type 1) | +--------------------------------------+ // Header (22 bytes) 4 - Format Type (1) 2 - Number Of Colors? (256) 4 - Unknown (1) 4 - Unknown (8193) 2 - null 2 - Unknown (512) 2 - Number Of Colors? (256) 2 - Color Depth? (8) // Palette (256 colors) // for each color 1 - Blue 1 - Green 1 - Blue 1 - Alpha // Image Data // for each pixel 1 - Palette Index +--------------------------------------+ | Playboy: The Mansion *.pict (Type 8) | +--------------------------------------+ 4 - Format Type (8) X - Generic Bitmap Image (8-bit color / paletted) +-------------------------------------+ | PlayStation Portable Firmware *.pbp | +-------------------------------------+ // ARCHIVE HEADER 4 - Header (null + "PBP") 4 - Version ((bytes)0,0,1,0) // OFFSETS 4 - Offset To Param.sfo 4 - Offset To Icon0.png 4 - Offset To Icon1.pmf 4 - Offset To Pic0.png 4 - Offset To Pic1.png 4 - Offset To Snd0.at3 4 - Offset To Data.psp 4 - Offset To Data.psar // PARAM.SFO FILE DATA { // SETTINGS HEADER 4 - FSP Header (null + "PSF") 4 - Unknown 4 - Offset To Settings Names Directory [+40] 4 - Offset To Settings File Data [+40] 4 - Number Of Setting Files // SETTINGS OFFSETS DIRECTORY // for each settings file 2 - File ID? 4 - File Length? File Offset? 2 - null 4 - File Details Length 4 - File Details Offset (relative to the start of the SETTINGS FILE DETAILS) // SETTINGS NAMES DIRECTORY // for each file X - Setting Name 1 - null Setting Name Terminator // SETTINGS FILE DATA // for each settings file X - Setting File Data } // ICON0.PNG FILE DATA X - PNG Image Data // ICON1.PMF FILE DATA X - File Data // PIC0.PNG FILE DATA X - PNG Image Data // PIC1.PNG FILE DATA X - PNG Image Data // SND0.AT3 FILE DATA X - File Data // DATA.PSP FILE DATA 4 - Updater Header (~PSP) 4 - Padding Size? (2048) 1 - Version Main? (1) 1 - Version Sub? (1) 28 - Updater Name (updater) (null to fill) 1 - Version Main? (1) 1 - Version Sub? (2) 4 - Pv5 Header ("Pv5" + null) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - null 4 - null 4 - Unknown 4 - null 4 - null 4 - Unknown 4 - Unknown 32 - null 4 - Number Of 4-Byte Fields // for each 4-byte field 4 - Unknown 4 - Pv5 Header ("Pv5" + null) 4 - Unknown (128) 24 - null X - Unknown Data // DATA.PSAR FILE DATA 4 - PSAR Header (PSAR) 4 - Unknown (3) 4 - File Length? [+32] 4 - Unknown (1) X - PSAR File Data (The actual firmware data) +------------------+ | Pontifex 2 *.pfm | +------------------+ 4 - Version (1) 4 - Number Of Files // for each file 32 - filename (null) // go to offset 1160 X - Finished string (padded to 384 bytes) // go to offset 1544 X - Description string (padded to 128 bytes) +-----------------+ | Populus 3 *.sdt | +-----------------+ // SAME AS Sim Theme Park *.sdt 4 - numFiles // for each file 4 - File Offset X - File Data // at each file offset 4 - Unknown 4 - Unknown 16 - Filename (null) 4 - Unknown 8 - null X - File Data +--------------+ | Postal *.sak | +--------------+ // NOTE: The files in the directory are in a different order to the files in the archive 4 - Header (SAK ) 4 - Version (1) 2 - Number Of Files // for each file X - Filename (null) 4 - Data Offset +------------------+ | Powerdrome *.xwb | +------------------+ // Same as Full Spectrum Warrior *.xwb +------------------------+ | Prince Of Persia *.dat | +------------------------+ 4 - dirOffset 2 - Number Of Files? // go to dir offset 2 - Number Of Files? // for each file 2 - File ID 4 - File Offset 2 - File Size // EACH FILE IS SEPARATED BY A SINGLE NULL BYTE! +--------------------------+ | Prince Of Persia 2 *.dat | +--------------------------+ 4 - dirOffset 2 - Number Of Files? // go to dir offset 2 - numTypes // for each type 4 - ID/type string (extension) 2 - File Offset // at each type offset 2 - Number Of Files 2 - File ID 4 - File Offset 2 - File Size 2 - Unknown (64) 1 - null Spacing // EACH FILE IS SEPARATED BY A SINGLE NULL BYTE! +-------------------------------------------------+ | Prince Of Persia: Sands Of Time *.bf (Type BIG) | +-------------------------------------------------+ 3 - Header (BIG) 1 - null 4 - Unknown (37) 4 - numFiles 4 - Unknown (5) 8 - null 8 - Unknown (all 255s) 4 - Unknown 4 - Unknown (1) 4 - Unknown 4 - numFiles 4 - Unknown (5) 4 - Header Size (68) 4 - Unknown (all 255s) 4 - null 4 - Unknown // for each file 4 - File Offset 4 - Unknown X - Padding (like 200MB of null padding!) X - File Data +---------------------------------------+ | Prince Of Persia: Sands Of Time *.sb0 | +---------------------------------------+ // The number of files in both directories are the same // ARCHIVE HEADER 2 - Unknown (9) 2 - Unknown (18) 4 - Number Of Files in Directory 1 4 - Number Of Files in Directory 2 4 - Unknown (1) 4 - null 8 - Padding (all 255's) // DIRECTORY 1 // for each file in Directory 1 (108-bytes for each entry) 2 - File ID 2 - Group ID? 4 - Unknown (1) 4 - File ID (incremental from 0) 4 - Unknown (usually null) 2 - null 4 - Unknown (1) 6 - null 16 - Unknown 8 - Type Code? (null terminated) (usually null) 4 - Unknown Boolean (0/1) 4 - Unknown Boolean (0/1) (same as previous field value) 4 - null 4 - Unknown Boolean (0/1) (same as previous "Unknown Boolean" field value) 4 - Unknown Boolean (0/1) (same as previous "Unknown Boolean" field value) 4 - Unknown (usually null) 12 - null 4 - Unknown (1) 16 - null // DIRECTORY PADDING 2 - Unknown (131) 2 - Unknown (6) 4 - Unknown (1) // DIRECTORY 2 // for each file in Directory 2 (132-bytes for each entry) 4 - File Length 4 - null 4 - File Offset (relative to the first file offset) 2 - null 4 - Unknown 18 - null 4 - Unknown (1) 4 - Decompressed File Size? 4 - File Size 8 - null 4 - Unknown (16000) 4 - Unknown (32000) 4 - Unknown (16) 4 - Unknown (1) 4 - Unknown (3) 40 - Filename (null terminated) 4 - Unknown (1) 4 - Padding (all 255's) 2 - Unknown 2 - Group ID? (same as in first directory) 4 - Unknown (1) // FILE DATA // for each file in Directory 2 X - File Data +------------------------------------------------+ | Prince Of Persia: Warrior Within *.big + *.fat | +------------------------------------------------+ // FAT has the Directory, BIG has the file data // for each file 4 - File ID? (starting at 0, incrementing by 47) 4 - File Offset 4 - File Length 4 - null 4 - Filename Length (27) (including the trailing null) X - Filename 1 - null +---------------------------------------+ | Prince Of Persia: Warrior Within *.bf | +---------------------------------------+ // SAME AS PoP: Sands Of Time *.bf 4 - Directory Length [+4 for this field] // for each file 4 - Unknown 4 - File Offset (relative to the end of the directory) 4 - File Length 4 - null 4 - Filename Length (including trailing null) X - Filename 1 - null X - File Data +------------------------+ | Princess Maker 2 *.lbx | +------------------------+ X - File Data X - Directory 2 - Number Of Files 4 - Directory Offset // go to dirOffset // for each file 12 - Filename 4 - Offset 4 - Size +------------------------------+ | Pro Evolution Soccer 5 *.afs | +------------------------------+ // same as Silent Hill 3 +----------------------------------+ | Project IGI - I'm Going In *.iff | +----------------------------------+ // Same as Allan Border Cricket LBM_FORM +----------------------------------+ | Project IGI - I'm Going In *.res | +----------------------------------+ 4 - Header (ILFF) 4 - Archive Size 4 - Unknown (4) 4 - null 4 - Resources Header (IRES) // for each file 4 - Entry Header (NAME) 4 - Filename Length (including 1 null) 4 - Unknown (4) 4 - Offset to BODY header (relative to the start of this file entry) X - Filename 1-4 - (null) Padding to a multiple of 4 bytes 4 - Body Header (BODY) 4 - File Size (including all file entry data) 4 - Unknown (4) 4 - File Size (including all file entry data, but excluding this and the previous 3 fields) 4 - File Data Header (ILSF) X - File Data +-------------------------+ | Project Snowblind *.r## | +-------------------------+ // for each file 8 - Header ((byte)255 + "goefile") 1 - null 1 - Unknown (255) 4 - Decompressed File Size? 4 - Compression Tag? (1) 8 - File Data Header ((byte)255 + "symlist") 1 - null X - Compressed File Data 0-2047 - null Padding to a multiple of 2048 bytes +-------------------------+ | Project Snowblind *.rkv | +-------------------------+ 4 - Version (1) 4 - First File Offset [+8] 4 - Number Of Language Strings // for each language string 4 - Language Name Length X - Language Name 4 - Unknown (2) 4 - Name Null Length (4) 4 - Name Null (null) // for each file 4 - Filename Length X - Filename 4 - Code Value (File Type Code?) if (codeValue < 100){ 4 - Decompressed File Length? 4 - Compressed File Length? 4 - Compression Tag? (0/1) } else { 4 - null } X - File Data +-------------------------+ | Project Snowblind *.rkv | +-------------------------+ 4 - Version (1) 4 - First File Offset [+8] 4 - Number Of Folders // for each folder 4 - Number Of Items In This Folder // for each item in the folder 4 - Entry Type Identifier / Sub Folder Name Length if (entryTypeID == 0/1){ // file 4 - Filename Length X - Filename 4 - Unknown (3) 4 - File Offset [+firstFileOffset] 4 - Unknown } else { // sub-folder X - Sub Folder Name } // for each subfolder? // repeat from "// for each folder" X - File Data +-----------------+ | Project X *.epf | +-----------------+ // THE SAME AS Overdrive EPF_EPFS +-------------------------+ | Psychonauts *.icb *.isb | +-------------------------+ // RIFF-format audio using alternate codecs like OGG Vorbis +-------------------+ | Psychonauts *.pkg | +-------------------+ // ARCHIVE HEADER 4 - Header (ZPKG) 4 - Version (1) 4 - First File Offset 4 - Number Of Files In Directory 1 4 - Directory 2 Offset 4 - Number Of Files In Directory 2 4 - Filename Directory Offset 4 - Extension Directory Offset 480 - null Padding to offset 512 // DIRECTORY 1 // for each file in dir 1 1 - null 2 - File Extension Offset (relative to the start of the Extension Directory) 1 - null 4 - Filename Offset (relative to the start of the Filename Directory) 4 - File Offset 4 - File Length? // DIRECTORY 2 // I am not sure what this directory represents, but the junk chars make up a string // when added together, where the string represents directory names and general words // for each file in dir 2 1 - Junk char 1 - null 4 - Unknown 2 - File ID (incremental from 1) 4 - Unknown // FILENAME DIRECTORY 1 - null // for each filename X - Filename 1 - null // EXTENSION DIRECTORY 1 - null // for each extension X - Extension Name 1 - null // FILE DATA // for each file X - File Data +-------------------------+ | Railroad Tycoon 2 *.pak | +-------------------------+ 2 - Number Of Files 4 - Unknown // for each file 4 - Offset 4 - Size 4 - Unknown X - File Data // for each file 15 - Filename (null) +-------------------------+ | Railroad Tycoon 3 *.pk4 | +-------------------------+ 4 - Unknown 4 - Number Of Files // for each file 4 - Hash? 4 - Length 4 - Offset (Relative to the end of the directory) 1 - null 61 - Filename (null) X - File Data +----------------------------------------+ | Rainbow Six - Black Arrow (XBox) *.ss2 | +----------------------------------------+ 4 - Unknown (4) 4 - Number Of Parts In Each Group (3) 4 - Unknown 4 - Maximum Number Of Groups (too large by about 300) 4 - Group Header Size (24) 4 - Maximum Length Of Each Group (including Header)? 4 - Average Size of Each Part (482) 100 - Unknown to offset 128 // for each group 4 - Part ID (incremental from 1) 4 - This Offset [+4] 4 - Number Of Parts // for each part 4 - Part Length // for each part X - Part Data X - null padding to a multiple of 2048? bytes +-----------------------------------+ | Rainbow Six - Black Arrow *.umd16 | +-----------------------------------+ // File Data // for each file X - File Data // Directory 2 - Unknown // for each file 1 - Filename Length X - Filename 1 - null 4 - File Offset 4 - File Length 4 - null // End Data 4 - Unknown 4 - Directory Offset 4 - Archive Size 4 - Unknown (2) 4 - Unknown +---------------------+ | Rally Masters *.pdt | +---------------------+ // directory names have length=0 and offset=0 4 - Header (PDI1) 4 - Number Of Files (including Padding files) (128) 4 - Number Of Files 4 - Unknown (30) 4 - Directory Offset (46) 4 - CDI1 Data Offset 4 - Length Of CDI1 Data 2 - null 14 - Padding (all 255's) 2 - Unknown (3) // for each file (68-bytes per entry) 2 - File/Directory ID (4=directory, 25=file, 0=padding file) if (file){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (incremental from 1)(some are -1, which skip over the number for this loop) 6 - Padding (all 255's) 4 - File Offset (relative to the start of the file data) 4 - File Length 44 - Filename (null) 4 - Unknown } else if (directory){ 2 - File ID (incremental from -1)(some are -1, which skip over the number for this loop) 2 - File ID (-1) 4 - Unknown 4 - Unknown 6 - null 44 - Directory Name (null) 4 - null } else if (padding file){ 66 - null } 4 - CDI1 Header (CDI1) X - File Data? +----------------+ | Rayman 2 *.cnt | +----------------+ 4 - Number Of Folders 4 - Number Of Files? 2 - Unknown 1 - XOR Value // for each folder 4 - Folder Name Length X - Encrypted Folder Name (XOR with the "XOR Value Field") 1 - End Of Directory Marker (1) // for each file 4 - null 4 - Filename Length X - Encrypted Filename (XOR with the "XOR Value Field") 4 - Unknown 4 - Unknown 4 - File Offset 4 - File Length X - File Data +----------------+ | Rayman 3 *.cnt | +----------------+ // Same as Rayman 2 *.cnt +---------------+ | Rayman 3 *.gf | +---------------+ // IMAGE FORMAT 4 - Unknown 1 - Number Of Colors? 3 - Unknown 1 - Number Of Colors? 3 - Unknown X - Image Data? +-----------------+ | Real Myst *.dni | +-----------------+ 4 - Header (Dirt) 4 - Version (65536) 4 - Directory Offset 4 - FT Offset 4 - NL Offset 4 - File Data Offset 4 - FT Offset A // go to dirOffset { 4 - Directory Name Offset 4 - Inner Number Of Files 4 - Next Directory Offset // for each file { // go to innerDirOffset { X - Directory Name 1 - null Directory Name Terminator } // go to nextDirOffset { if (nextDirOffset < FToffset){ // restart from "4 - Inner Directory Offset" } else { 4 - Filename Offset 4 - Next Name Offset 4 - File Length 4 - Data Offset 4 - null // go to filenameOffset { X - Filename 1 - null Filename Terminator } } } } } +------------------------------------------------------------+ | Rebel Assult 2: The Hidden Empire *.san *.nut (chunk)(big) | +------------------------------------------------------------+ 4 - Header (ANIM) 4 - Archive Size [+8] // for each file 4 - Type/Extension 4 - File Size X - File Data +------------------------------------------------------+ | Rebel Assult 2: The Hidden Empire *.sad (chunk)(big) | +------------------------------------------------------+ 4 - Header (SAUD) 4 - Archive Size [+8] // for each file 4 - Type/Extension 4 - File Size X - File Data +-----------------------------+ | Rebels: Prison Escape *.pak | +-----------------------------+ // Uses ZLib compression for the file data // ARCHIVE HEADER 16 - Header (DoNuT:FSPacked:0) 1 - null 8 - Directory Offset // FILE DATA // for each file X - File Data (Compressed) // DIRECTORY 13 - Unknown 4 - Unknown (2047) 4 - Unknown 4 - Hash? 2 - Number Of Directories (1) // for each directory X - Directory Name 1 - null Directory Name Terminator // for each file 2 - null X - Filename 1 - null Filename Terminator 8 - File Offset (relative to the start of //FILE DATA) 8 - Decompressed Length 2 - Compression Tag? (1) 8 - Compressed Length 2 - Directory Terminator (4) +-------------------------------------------+ | Rebel Raiders - Operation Nighthawk *.bag | +-------------------------------------------+ // ARCHIVE HEADER 4 - Version (1) 4 - Number Of Files 4 - Directory Offset 4 - Unknown (4) // FILE DATA // for each file X - File Data // DIRECTORY (48-bytes per entry) 40 - Filename (null-terminated, filled with junk) 4 - File Offset 4 - File Length +-----------------------+ | Recoil *.zbd (Type 1) | +-----------------------+ 4 - null 4 - Version (1) 4 - Unknown 4 - numFiles // for each file 4 - Offset (relative to end of directory) 4 - Unknown 32 - Filename (null) X - File Data +-----------------------+ | Recoil *.zbd (Type 2) | +-----------------------+ 4 - Unknown (4) 4 - Version (2) // for each file X*4 - Unknown Fields (values between 2 and 5) 4 - Filename Length X - Filename +------------------------+ | Recoil *.zbd (Type 7) | +------------------------+ 2 - Unknown 2 - Unknown 4 - Version (7) 4 - numFiles? // for each file 120 - Filename (null) 4 - Unknown 4 - File Size X - File Data +------------------------+ | Recoil *.zbd (Type 15) | +------------------------+ 2 - Unknown 2 - Unknown 4 - Version (15) 4 - numFiles 4 - Directory Entry Size (36) 4 - Unknown 4 - Unknown 4 - Unknown // for each file 8 - null 4 - File Size? 4 - Unknown 20 - Filename (null) X - File Data +------------------------+ | Recoil *.zbd (Type 28) | +------------------------+ 4 - Unknown 4 - Version (28) // for each file 4 - Unknown X - Filename (null) 0-3 padding (to make filename+null a multiple of 4) 52 - File Data? +--------------------------+ | Recoil *.zbd (Type RIFF) | +--------------------------+ // This is an archive of WAVE files // we read this using the filesize information supplied in the WAVE files // So the offset of each file actually includes the WAVE header // ie the first offset is at 0, second offset at 0 + filesize + 8, etc. // for each file 4 - WAVE Header (RIFF) 4 - File Size [+8] X - File Data // Note that RIFF may be used as the header of the archive, for validation purposes +-------------------+ | Red Faction *.vpp | +-------------------+ // The archive is based on multiples of 2048 4 - Header (206 10 137 81) 4 - Version (1) 4 - Number Of Files 4 - Archive Size 2032 - Filler (ie filled to position 2048 using nulls) // for each file 60 - Filename 4 - File Size // after the directory X - padding to a multiple of 2048 bytes // The file offsets start at (numFiles * 64) + 2048 + (2048-((numFiles*64) % 2048)) // Where % is the mod function (remainder) // Also, each file is padded to a multiple of 2048, which must be taken into account when // calculating the offset to each file. +----------------------------------------+ | Red Faction 2 *.packfile + *.toc_group | +----------------------------------------+ // toc_group file has the details, packfile has the file data X - filename (null) X - directory Name (null) 4 - Unknown (2) 4 - Unknown (1) X - file filename (dirName + filename) (null) 4 - numFiles? // for each file X - Filename 4 - File Size 4 - File Offset +---------------------+ | Red Faction 2 *.peg | +---------------------+ 4 - Header (GEKV) 4 - Version (6) 4 - Directory Size (first file offset = dirSize + 32) 4 - File Data Size 4 - numFiles 4 - null 4 - numFiles 4 - Unknown (16) // for each file 2 - Unknown 2 - Unknown 4 - Unknown 2 - Unknown 2 - Unknown 48 - Filename (null) 4 - File Offset [+ first file offset] X - File Data +------------------------------------------------------------+ | Redneck Rampage *.ins (and maybe other installer packages) | +------------------------------------------------------------+ 4 - Unknown 4 - Unknown 2 - Unknown 4 - Unknown 2 - Unknown // for each file 4 - File Size (for first file, skip 3 bytes then read the 4 byte number. Remember to subtract 3 off the next field too!) 4 - Unknown 4 - Unknown 2 - Unknown (null) 4 - Unknown (32) X - Filename (null) X - File (compressed) +---------------------------------+ | Republic - The Revolution *.erb | +---------------------------------+ // Same as Evil Genius *.erb ??? 4 - Header (KCAP) 4 - Version (2) 4 - Directory Offset X - File Data X - Directory // go to Directory Offset 4 - Number Of Files // for each file X - Filename (null) 4 - File Size 4 - File Offset 4 - null 4 - Unknown 4 - Unknown +-----------------------+ | Resident Evil 2 *.bin | +-----------------------+ // for each file 4 - File Offset [+128] 4 - File Data Length (arcSize-128) X - null Padding to 128 bytes X - File Data // NOTES: Continue reading the loop until you reach (fileOffset+128=arcSize) // The first file offset is 0, so you can't read until fileOffset=0 or you will // be stopping prematurely +-----------------------+ | Resident Evil 2 *.bin | +-----------------------+ // for each file 4 - File Offset X - File Data // Continue reading until the first file offset +-----------------------+ | Restricted Area *.dat | +-----------------------+ // WAVE Audio +-----------------------+ | Restricted Area *.pak | +-----------------------+ // Unknown compression is used in this archive // for each file 4 - Decompressed File Length 4 - File Length (not including this 8-byte header) // Compressed File Data 2 - Compression Header (JC) 4 - Decompressed File Length X - Compressed File Data +--------------------------------------------------------+ | Return To Castle Wolfenstein: Tide Of War (XBox) *.xwb | +--------------------------------------------------------+ Same as Full Spectrum Warrior *.xwb +-------------------------------+ | Return to Mystery Island *.bf | +-------------------------------+ 16 - Header (CryoBF - 2.02.0 + (byte)26) 8 - null 4 - Directory Offset 4 - First File Offset (32) X - File Data X - Directory // go to DirOffset 4 - Number Of Directories // for each directory { 4 - Filename Length X - Filename 4 - Entry Type (1=dir, 2=file) if (type==dir){ 4 - Number Of Files In This Directory // for each file in this directory { X - File Entries (repeat from "//for each directory") } } else if (type==file){ 4 - File Length 4 - null 4 - Offset (relative to the first file offset) } } +-----------------------+ | Risk 2 *.gfx (Type 1) | +-----------------------+ 4 - First File Offset 4 - Unknown // for each file 4 - File Offset [+firstFileOffset] 4 - Unknown 4 - File Size? 4 - Unknown X - File Data +-----------------------+ | Risk 2 *.gfx (Type 2) | +-----------------------+ 32 - Description (null) 4 - Number Of Files 4 - File Data Size // for each file 2 - Unknown 2 - Unknown 2 - Unknown 2 - Unknown +-----------------------+ | Rising Kingdoms *.pak | +-----------------------+ // The filenames are stored so that directory names etc are reused, thus minimising repeats. // To determine the filename, take the first "Previous Filename Reuse Length" chars of the // filename of the previous file, and append the "Filename Part" to it. // In other words, if a directory repeats, you would keep the first X bytes of the previous // file and just append the actual name of the file. 16 - Header ("HMMSYS PackFile" + (byte)10) 4 - Unknown (26) 12 - null 4 - Number Of Files? 4 - Directory Length [+40 archive header] // for each file 1 - Filename Length 1 - Previous Filename Reuse Length X - Filename Part (length = filenameLength - previousFilenameReuseLength) 4 - File Offset 4 - File Length X - Padding (repeating 153,121,150,50) until first file offset X - File Data +------------------+ | Rival Ball *.prv | +------------------+ //This is a bitmap image! *.bmp +--------------------+ | Rock Manager *.cxt | +--------------------+ 4 - Header 1 (XFIR) 4 - Archive Length [+8] 4 - Header 2 (39VM) // for each file 4 - File Extension 4 - File Length X - File Data +------------------------------+ | RollerCoaster Tycoon 3 *.ovl | +------------------------------+ // .COMMON.OVL FILES Header ------ 4 - Header (FGRK) 4 - null 4 - Version (1) 8 - null 4 - Number Of Directories (maximum of 4 directories) // for each directory 2 - Format Header Length X - Format Header (FGDK,RCT3) 2 - Directory Name Length X - Directory Name 4 - Directory Format? (1=RCT3, 2=FGDK) 2 - Extension Name Length X - Extension Name 8 - Number Of Files Of Type 0 8 - Number Of Files Of Type 1 8 - Number Of Files Of Type 2 8 - Number Of Files Of Type 3 4 - null // NOTES // // The way I think this works is that there are a fixed number of directories // allowed in an archive (4). The directories each list their number of files // under the directory loop, as shown by "Number Of Files Of Type #" above. // // So to read the archive, you would read the filename directory file, then all // files of type 0, then all files of type 1, etc. Filename Directory ------------------ // for each filename directory 4 - Length of Directory // for each file in the directory X - Filename (null) (replace the : character with a . character) File Data --------- // for each file 4 - File Length X - File Data Offset Directory ---------------- 4 - Number Of Entries // for each entry 4 - Offset to something [+185] ID Directory ------------ // If the first 4 bytes are not null, then the ID directory exists // If null, it is the start of the source file directory as indicated below // There are 4 bytes for every 2 entries in the offset directory above // for each numEntries/2 4 - Unknown (1/4) Source File Directory --------------------- // Sometimes this section does not exist // NOTE: THIS SECTION HAS NOT BEEN RESEARCHED FULLY - IT WILL BE BUGGY! 4 - null (start of source file directory marker?) // for each group 4 - Unknown 4 - Group Data Length 2 - Description Length X - Description // for each file in this group 4 - A Relative Offset? 4 - Unknown (1) 1 - Unknown 2 - Filename Length X - Filename 1 - Unknown 1 - Unknown 4 - Group End Marker (all 255s) // .UNIQUE.OVL FILES Header ------ 4 - Header (FGRK) 4 - null 4 - Version (1) 8 - null 4 - Number Of Directories // for each directory 2 - Format Header Length X - Format Header (FGDK,RCT3) 2 - Directory Name Length X - Directory Name 4 - Unknown (1,2) 2 - Extension Name Length X - Extension Name 8 - Number Of Files Of Type 0 8 - Number Of Files Of Type 1 8 - Number Of Files Of Type 2 8 - Number Of Files Of Type 3 4 - null 4 - Directory Length // for each file 4 - Filename Offset (relative to the start of the filename directory) 4 - Unknown 4 - File Type ID? (1) 4 - Directory Length // for each file 4 - File Type ID? (0-6) 4 - Unknown 4 - null 4 - Unknown 4 - Unknown (1-2) 4 - Directory Length // for each file 4 - Unknown 4 - Unknown 4 - Unknown (increments by 20 every X files, where X is variable) 4 - Directory Length // for each file 22 - null 4 - Unknown 2 - null 4 - Unknown 8 - Unknown 4 - null 4 - Unknown 4 - Unknown 4 - Unknown (repeat) 4 - Unknown (repeat) 4 - null 4 - Padding (all 255's) 4 - null 4 - Unknown 4 - Unknown (2) 12 - null 4 - Unknown (1) 4 - null 4 - Offset? (big) 4 - Offset? (big)(repeat) 8 - null 4 - Directory Length // for each file 28 - null 4 - Unknown 28 - null 4 - Unknown 4 - Unknown (2) 28 - null 4 - Unknown (1) 4 - null 4 - Offset? (big) 4 - Offset? (big)(repeat) 4 - Directory Length [*4] // for each file 4 - Unknown // The source file directory comes here, same as in the .common.ovl files +------------------------------+ | Rome Total War *.dat + *.idx | +------------------------------+ // IDX FILE CONTAINS THE DIRECTORY, DAT CONTAINS THE FILE DATA 12 - Description (null) 4 - Number Of Files 4 - Unknown (8) // for each file 4 - File Offset 4 - File Length 12 - null 4 - File Type? (13) X - Filename (null) 3 - Padding (204 204 204) +------------------------------------------------------+ | Rome Total War: The Barbarian Invasion *.dat + *.idx | +------------------------------------------------------+ // The IDX file contains the directory, the DAT file contains the file data X - Archive Type ("SND.PACK" / "SKEL.PACK") 0-3 - Padding to a multiple of 4 bytes (using the bytes 209,154,234) 4 - Archive Type? (4/3) 4 - Number Of Files // repeat until offset 24 4 - Unknown // for each file 4 - File Offset 4 - File Length if (arcType == SND.PACK){ 4 - Sound Sample Rate (22050) 4 - Sound Quality (16) 4 - Sound Channels (1) } else { 12 - Unknown } 4 - File Type? (2) X - Filename (null) 3 - Padding (13,240,173) +-----------------------------+ | Rumble Roses *.pac (Type 1) | +-----------------------------+ // NOTE: Some archives have some random data put in them which consists of // a long string with no nulls in it - so if this is encountered just read // until the next null 4 - Header (DPAC) 4 - Number Of Files? 2 - Unknown 4 - Unknown (7) X - null Padding to offset 2048 // for each file? 4 - Type/Extension ID (32-padded) 2 - File ID? 2 - Unknown X - null Padding to offset 16384 // for each file 4 - File Header Tag if (tag == "BPE "){ 4 - Version Number? (256) 4 - Compressed Size 4 - Decompressed Size? X - File Data } else if (tag == "PAC "){ 4 - Number of 8-byte fields X - File Data (length = num8byte * 8) } else if (tag == "TIM2"){ 2 - Unknown (4) 2 - Unknown (1) 8 - null 4 - Image Data Length [-4] X - Image Data } X - null Padding (optional) +-----------------------------+ | Rumble Roses *.pac (Type 2) | +-----------------------------+ // for each file 4 - File Header Tag if (tag == "BPE "){ 4 - Version Number? (256) 4 - Compressed Size 4 - Decompressed Size? X - File Data } else if (tag == "PAC "){ 4 - Number of 8-byte fields X - File Data (length = num8byte * 8) } else if (tag == "TIM2"){ 2 - Unknown (4) 2 - Unknown (1) 8 - null 4 - Image Data Length [-4] X - Image Data } X - null Padding (optional) +------------------------+ | Runaway *.000 (Type 0) | +------------------------+ // NOTE: The file offsets in dir 1 go right past the end of the file - not sure why // This archive is totally weird - I can't follow it! Maybe its not even an archive, // but a group of images or something? 4 - null // for each file in dir 1 (ie until offset 21028) 4 - File Offset // for each file in dir 2 4 - File Offset X - null Padding to offset 24000 4 - null // for each file in dir 1 4 - File Length X - null Padding to offset 45028 // for each file in dir 2 4 - File Length X - null Padding to offset 48000 X - File Data +-------------------------+ | Runaway *.000 (Type 11) | +-------------------------+ 1 - Unknown (11) // for each file 4 - File Offset 4 - null // for each file 4 - File Length 4 - null X - File Data +---------------------+ | Runaway *.D## *.G## | +---------------------+ // for each file 4 - File Offset X - null Padding to offset 160 // for each file 4 - File Length X - null Padding to offset 320 X - File Data +---------------+ | Runaway *.S## | +---------------+ // Sometimes there are duplicate offsets in the file! // for each file 4 - File Offset X - null Padding to offset 4000 X - File Data +-----------------+ | Sabre Ace *.egl | +-----------------+ 4 - Number Of Files // for each file 4 - Offset 31 - Filename (null) 4 - Archive Size 31 - null X - File Data +--------------+ | Sacred *.pak | +--------------+ 3 - Header 1 - Type ID if (header == TEX && id == 3){ 4 - Number Of Files 4 - Unknown 244 - null // for each file 4 - Type ID 4 - Offset 4 - Compressed Size // for each file 32 - Filename (null) 2 - X Image Size 2 - Y Image Size 4 - Unknown 40 - null Padding X - File Data } else if (header == CIF && id == 0){ 4 - Number Of Files 4 - Unknown // for each file 64 - File Data } else if (header == WPN && id == 8){ 4 - Number Of Files 4 - Unknown // for each file 322 - File Data } else if (header == SND && id == 1){ 4 - Number Of Files 4 - Unknown 244 - null // for each file 4 - Type ID 4 - Offset 4 - Compressed Size } else if (header == ITM && id == 5){ 4 - Number Of Files 4 - Unknown 244 - null // for each file 4 - Type ID 4 - Offset 4 - Compressed Size // for each file 56 - Unknown 32 - Filename (null) X - File Data } else if (header == ITM && id == 3){ 4 - Number Of Files 4 - Unknown 244 - null // for each file 4 - Type ID 4 - Offset 4 - Compressed Size // for each file 32 - Filename (null) X - File Data } +-------------------------------+ | Samurai Warriors (XBox) *.bin | +-------------------------------+ // ARCHIVE HEADER 4 - null 4 - Padding Size (2048) 4 - Number Of Files 4 - Directory Offset X - null Padding to a multiple of 2048 bytes // FILE DATA // for each file X - File Data X - null Padding to a multiple of 2048 bytes // DIRECTORY // for each file 4 - File Offset 4 - File Length X - null Padding to a multiple of 2048 bytes +----------------------+ | Save Our Pizza *.lid | +----------------------+ // SAME AS Desert Raid *.lid +-------------------------------------+ | SCAR Squadra Corse Alfa Romeo *.mix | +-------------------------------------+ // Unknown encryption on the filename // Try the following XORs, in this order starting from the first char of the filename // 0,26,84,142,200,34,?... // HEADER 4 - null 4 - Number Of Files 4 - Directory Offset 20 - null // FILE DATA X - File Data 0-511 - Padding to a multiple of 512 bytes // DIRECTORY // for each file 4 - Encrypted Filename Length X - Encrypted Filename 4 - File Offset 4 - File Length 4 - File Length 1 - null 8 - Unknown +--------------------+ | Screamer 4x4 *.cod | +--------------------+ 21 - Header (->Unique Pc HUNGARY<-) 3 - null 4 - Directory Length // for each file 128 - Filename (null terminated, then filled with "." for the remaining bytes) 4 - Offset 4 - Length +--------------------+ | Second Sight *.pak | +--------------------+ 4 - Header (P4CK) 4 - Directory Offset 4 - Offset Directory Length 4 - Filename Directory Length X - File Data X - Offset Directory X - Filename Directory // goto Directory Offset // for each file 4 - Filename Offset (relative to the start of the directory) 4 - File Offset 4 - File Length 4 - null // for each file X - Filename (null) // go to first file offset // for each file X - File Data 0-15 - null padding to a multiple of 16 bytes +---------------------+ | Serious Sam 2 *.gro | +---------------------+ // Generic PK_ZIP Archive +---------------------------+ | Settlers 3 *.dat (Type 2) | +---------------------------+ 4 - Unknown 4 - Version (2) 4 - null 4 - Unknown 4 - Unknown 4 - Unknown 4 - Header Size? (28) [+8] 4 - Unknown 4 - Unknown // for each file 4 - Offset 8 - Unknown X - File Data +----------------------------+ | Settlers 3 *.dat (Type 12) | +----------------------------+ 4 - Unknown 4 - Version (12) 116 - Unknown // for each file 4 - Offset X - File Data +------------------------------------------+ | Settlers: Heritage Of Kings (DEMO) *.bba | +------------------------------------------+ // ZLib Compression is used extensively in this archive 3 - Header (BAF) 1 - Version (2) 4 - Archive Length [+8] 3 - BAH Header (BAH) 1 - BAH Version (2) 4 - BAH Length (8) 8 - Unknown (BAH Data) 3 - File Data Header (BAf) 1 - File Data Version (2) 4 - File Data Length X - File Data { // THE FILE DATA IS STRUCTURED LIKE THIS... // for each file { 4 - Compression Header if (compressionHeader != 104329917){ // the file is not compressed - read as normal } else { // the file is compressed with ZLib, and has the following structure 4 - Compressed Size (including 4 of these header fields) [-12] 4 - Compressed Size [+4] 4 - Decompressed File Size 4 - Unknown X - Compressed File Data } } } 3 - Directory Header (BAd) 1 - Directory Version (2) 4 - Directory Length X - Directory Data { 3 - File Entries Header (BAe) 1 - File Entries Version (2) 4 - File Entries Length X - File Entries Data { 4 - Compression Header (104329917) 4 - Compressed Data Length (File Entries Length - 8) 4 - Compressed Data Length [+2] 4 - Decompressed Size 4 - Unknown X - Compressed Directory Data { // WHEN DECOMPRESSED USING ZLIB, THE DIRECTORY HAS THIS STRUCTURE 4 - Number Of Files // for each file { 4 - File Type Identifier (also compression identifier) if (fileTypeID == 1){ // directory 8 - null 2 - Directory Name Length 2 - Number of characters from the start of the dirname that provide the parent directory 4 - null 4 - Unknown 8 - null X - Directory Name (null) 0-3 - Padding to multiple of 4 bytes } else { // file 4 - Offset 4 - Decompressed File Size 2 - Filename Length 2 - Number of characters from the start of the filename that provide the directory 4 - Padding (all 255's) 4 - Unknown (something to do with the offset to the next file entry) 8 - Unknown X - Filename (null) 0-3 - Padding to multiple of 4 bytes } } } } 3 - BAh Header (BAh) 1 - BAh Version (2) 4 - BAh Length X - Unknown (BAh Data) } // FILE TYPE ID NUMBERS // // 0 = Uncompressed File // 1 = Directory // 2 = Compressed File +------------------------------------------+ | Settlers: Heritage Of Kings (FULL) *.bba | +------------------------------------------+ // In the demo, the compression is ZLib // In the full version, the compression is different, most notible by the missing 'x' char // from the beginning of the compressed data. However, it may still be ZLib compressed // with the compressed data needing to be XOR with 32 before decompression, or maybe only // the first compressed byte XOR with 32 3 - Header (BAF) 1 - Version (2) 4 - Archive Length [+8] 3 - BAH Header (BAH) 1 - BAH Version (2) 4 - BAH Length (8) 8 - Unknown (BAH Data) 3 - File Data Header (BAf) 1 - File Data Version (2) 4 - File Data Length X - File Data { // THE FILE DATA IS STRUCTURED LIKE THIS... // for each file { 4 - Compression Header if (compressionHeader != 104329917){ // the file is not compressed - read as normal } else { // the file is compressed with ZLib?, and has the following structure 4 - Compressed Size (including 4 of these header fields) [-12] 4 - Compressed Size [+4] 4 - Decompressed File Size 4 - Unknown X - Compressed File Data } } } 3 - Directory Header (BAd) 1 - Directory Version (2) 4 - Directory Length X - Directory Data { 3 - File Entries Header (BAe) 1 - File Entries Version (2) 4 - File Entries Length X - File Entries Data { 4 - Compression Header (104329917) 4 - Compressed Data Length (File Entries Length - 8) 4 - Compressed Data Length [+2] 4 - Decompressed Size 4 - Unknown X - Compressed Directory Data { // WHEN DECOMPRESSED USING ZLIB???, THE DIRECTORY HAS THIS STRUCTURE 4 - Number Of Files // for each file { 4 - File Type Identifier (also compression identifier) if (fileTypeID == 1){ // directory 8 - null 2 - Directory Name Length 2 - Number of characters from the start of the dirname that provide the parent directory 4 - null 4 - Unknown 8 - null X - Directory Name (null) 0-3 - Padding to multiple of 4 bytes } else { // file 4 - Offset 4 - Decompressed File Size 2 - Filename Length 2 - Number of characters from the start of the filename that provide the directory 4 - Padding (all 255's) 4 - Unknown (something to do with the offset to the next file entry) 8 - Unknown X - Filename (null) 0-3 - Padding to multiple of 4 bytes } } } } 3 - BAh Header (BAh) 1 - BAh Version (2) 4 - BAh Length X - Unknown (BAh Data) } // FILE TYPE ID NUMBERS // // 0 = Uncompressed File // 1 = Directory // 2 = Compressed File +-------------+ | Shade *.res | +-------------+ // The first field can be used as a format verifier header field, by looking for "IPF1" // for each file 4 - File Type ("PK" + (byte)3,4 or "IPF1") 2 - Unknown (20) 2 - Unknown (2) 2 - Unknown (File=8, Dir=0) 4 - Directory/File Identifier? (Dir=823760679, File=823701178) // Note: If it is a Directory - the next 3 fields are null 4 - Timestamp??? 4 - File Size 4 - Decompressed File Size? 4 - Filename Length X - Filename X - File Data +--------------------------------------+ | Shadow Company - Left For Dead *.gut | +--------------------------------------+ 326+(filenameLength*2)+(1 if month=10,11,12) - Header (62x"*" + (char)13 + (char)10 + "** Shadow Company: Left For Dead" + (char)13 + (char)10 + "**" + char)13 + (char)10 + "** [" + filename + "] : GUT resource file" + (char)13 + (char)10 + "** Copyright 1998 by Sinister Games Inc." + (char)13 + (char)10 + "**" + (char)13 + (char)10 + "** [gut_tool.exe] Build date: 17:58:56, Aug 24 1999" + (char)13 + (char)10 + "** [" + filename + "] Created: " + time as HH:MM:S + ", " + date as M/DD/YYYY + (char)13 + char(10) + 62x"*" + (char)13 + char(10)) 8 - Unknown 4 - Unknown 32 - filename (null) // for each file 4 - Filename Length 4 - File Size 4 - File Offset [+headerSize] 4 - null 4 - Unknown X - Encrypted Filename X - File Data +----------------------------+ | Shadow Of Rome (PS2) *.img | +----------------------------+ // for each file 4 - Link Header (LINK) 4 - Unknown (258) 4 - Unknown 4 - Length Of Link Header (48) 4 - File Length [+48] 4 - null 4 - Unknown 4 - File Length (length of the "X - File Data" section only - ie not including this header) 4 - Length Of Link Header (48) 12 - null X - File Data X - null Padding to a multiple of 2048? bytes +----------------------+ | Shadow Warrior *.shr | +----------------------+ // Just a PK_ZIP archive +---------------------------+ | Shell Shock Nam '67 *.dat | +---------------------------+ 4 - Header 1 (Core) 6 - Version (<1.76>) 6 - Header 2 () 1-4 - Unknown (5) 0-3 - Padding (spaces) 1-4 - Directory length (Big) (UNSIGNED!) (+13 to find the start of file data) 0-3 - Padding (spaces) 1-4 - Number Of Files (Big) (UNSIGNED!) 0-3 - Padding (spaces) // for each file 1-4 - Filename length 0-3 - padding (nulls OR spaces) (so the filename length is 4 bytes total) X - Filename (no null!) 0-3 - Padding (so the filename is a multiple of 4 bytes) (padded with nulls OR spaces) X - File Data // NOTES ON WORKING OUT THE SIZE OF EACH FIELD // This archive format swaps between using byte(0) and byte(32) to represent null values. // Therefore, you need to do the following to work out the size of the 4-byte fields... // 1. Read the first byte (it will always have a value) // 2. Read the second byte // 3. if (byte2 != null AND byte2 != 32) then it is part of the value, else it should be treated as a null // 4. Repeat steps 2 and 3 for the remaining 2 bytes // This way you will build up the 4-byte value correctly. You could also do it the following way... // 1. Read the 4 bytes // 2. Working from the last of the 4 bytes, replace bytes with value byte(32) with value byte(0) // 3. Stop when you reach a null, or when you reach a value != byte(32) // This process should be applied to all the fields marked as size 1-4 (and its partner 0-3) // NOTES ON THE FILE DATA // There are no offsets stored, rather the user must walk through the file to find the file data offsets. // To help, there is a rough pattern in that the 4 bytes before the data starts is the length of the data. // Other than that, I don't know how to move between files, or how to determine the location of the size field. // So, at this point in time, i do not know how to get the specific file // for each file X - Unknown 4 - File Data Size X - File Data +-------------------------------------------+ | Shivers - Harvest of Souls *.sol (Type 1) | +-------------------------------------------+ // The last entry in the directory is a file with null length and offset, and the name THE_END // for each file X - Directory Name (null) X - Filename (null) 1 - End of directory marker (more to follow=null, end of directory=(byte)80) 4 - null 4 - Length 4 - Offset X - File Data +-------------------------------------------+ | Shivers - Harvest of Souls *.sol (Type 2) | +-------------------------------------------+ // The last entry in the directory is a file with null length and offset, and the name THE_END // NOTE - It is not yet possible to decrypt this archive format // for each file X - Filename (null) 1 - Unknown 0-1 - Random Padding to multiple of 2 bytes 4 - Length (encrypted) 4 - Offset (encrypted) +---------------------+ | Silent Hill 3 *.arc | +---------------------+ 4 - Unknown 4 - Number Of Files 4 - Length of blank padding after directory and before file data 4 - null // for each file 4 - Offset 4 - File ID? 4 - Length 4 - Length X - null Padding (size according to the 3rd field) X - File Data +---------------------+ | Silent Hill 3 *.afs | +---------------------+ // SAME AS Leisure Suit Larry: Manga Cum Laude *.afs +---------------------+ | Silent Hunter *.cat | +---------------------+ 2 - numFiles // for each file 13 - Filename (null) 1 - Filename Terminator (space) 4 - Unknown 4 - File Size 4 - File Offset X - File Data +--------------------------------------------+ | Simcity 2000 Special Edition *.idx + *.dat | +--------------------------------------------+ // the idx file contains the index details // for each file 4 - ID 4 - File Offset +--------------------------+ | Simcity 3000 *.ixf *.dat | +--------------------------+ 4 - Header // for each file 4 - Type ID? 4 - Group ID? 4 - Instance ID? 4 - Data Offset 4 - File Length 20 - null X - File Data +--------------------+ | Simcity 3000 *.pak | +--------------------+ 4 - numFiles // for each file 4 - Filename Length X - Filename 4 - Offset X - File Data +-----------------+ | Simcity 4 *.dat | +-----------------+ // Some files use compression 4 - Header (DBPF) 4 - Version (1) 16 - null 4 - Archive ID? 4 - Archive Type 4 - Unknown (7) 4 - Number Of Files 4 - Directory Offset 4 - Directory Size 48 - null X - File Data X - Directory // go to dirOffset // for each file 4 - Type ID 4 - Group ID 4 - Instance ID 4 - Offset 4 - Size +------------------------------------------+ | Sim Golf for Windows 95 *.rf *.flg *.tlp | +------------------------------------------+ 4 - Header (RCNT) 4 - Unknown 4 - Directory Offset 4 - null X - File Data X - Directory // Directory starts here // for each file 12 - Filename 4 - Offset 4 - Length 4 - Unknown (2) +----------------------+ | Sim Theme Park *.wad | +----------------------+ 4 - Header (DWFB) 4 - Version (2) 64 - Pading 4 - Number Of Files 4 - Filename Directory Offset 4 - Filename Directory Length 4 - Unknown // for each file 4 - Unknown 4 - Filename Offset 4 - Filename Length 4 - Data Offset 4 - File Length 20 - Unknown // for each file X - Filename (length according to the "Filename Length" field) X - File Data +-----------+ | Sin *.sin | +-----------+ 4 - Header (SPAK) 4 - Directory Offset 2 - Number Of Files X - File Data // Directory // for each file 120 - Filename (null) 4 - Data Offset 4 - File Length +----------------------------------+ | Skunny: Back To The Forest *.lid | +----------------------------------+ // SAME AS Desert Raid *.lid +-------------------+ | Skunny Kart *.lid | +-------------------+ // SAME AS Desert Raid *.lid +-----------------------------+ | Sniper Elite *.asr (Type 0) | +-----------------------------+ // Text Strings File 8 - Header 1 (Asura ) 4 - Header 2 (HTXT) 4 - Archive Length [+24] 8 - Version (0) 4 - Number Of Text Strings // for each string 4 - Unknown 4 - String Length [*2 for unicode] (including null terminators) X - Text String (unicode text) 2 - null Filename Terminator 16 - null +-----------------------------+ | Sniper Elite *.asr (Type 1) | +-----------------------------+ // Text Strings File 8 - Header 1 (Asura ) 4 - Header 2 (RUDE) 4 - Archive Length [+24] 8 - Version (1) 8 - Number Of Text Strings // for each string X - Text String 1 - null Text String Terminator 0-3 - null Padding to a multiple of 4 bytes 16 - null +------------------------------+ | Sniper Elite *.asr (Type 1b) | +------------------------------+ 8 - Header 1 (Asura ) // for each file 4 - Header 2 (RSCF) 4 - File Length (including all these fields) 8 - Version (1) 4 - Unknown (3) 4 - File ID? 4 - File Data Length X - Filename 1 - null Filename Terminator 0-3 - null Padding so filenameLength+1null is a multiple of 4 bytes X - File Data +-----------------------------+ | Sniper Elite *.asr (Type 3) | +-----------------------------+ // Text Strings File // Can have empty strings (ie StringLength(includingNulls) = 1) 8 - Header 1 (Asura ) 4 - Header 2 (LTXT) 4 - Archive Length [+24] 8 - Version (3) 4 - Unknown 4 - Number Of Text Strings // for each string 4 - String Length [*2 for unicode] (including null terminators) X - Text String (unicode text) 2 - null Filename Terminator 16 - null +-----------------------------+ | Sniper Elite *.asr (Type 5) | +-----------------------------+ // Text Strings File 8 - Header 1 (Asura ) 4 - Header 2 (PTXT) 4 - Archive Length [+24] 8 - Version (5) 4 - Unknown 8 - Number Of Text Strings X - Description String 1 - null Description Terminator 0-3 - null Padding to a multiple of 4 bytes // for each string 4 - String Length [*2 for unicode] (including null terminators) X - Text String (unicode text) 2 - null Filename Terminator 16 - null +-------------------------+ | Sno-Cross Extreme *.sfp | +-------------------------+ // for each file 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Length (including these header fields) 4 - File Type ID? X - File Data +---------------------------------+ | SOCOM US Navy Seals (PS2) *.zar | +---------------------------------+ // ARCHIVE HEADER 4 - null 4 - Number Of Type Names [/2 +-1] 4 - Length Of Type Names Directory 4 - Hash? 4 - Padding Length (16) 64 - null 4 - File Data Length (length of everything in //FILE DATA) 4 - null 4 - Padding (null OR all 255's) 2 - Unknown (2) 2 - Unknown (2) // TYPE NAMES DIRECTORY // for each type X - Type Name 1 - null Type Name Terminator // DIRECTORY 12 - null 4 - Number Of Files // for each file (64-bytes per entry) 4 - Hash? 4 - File Offset (relative to the start of the file data) 4 - File Length 4 - Number Of Descriptors (0/3) // for each descriptor 4 - Hash? 4 - Descriptor Offset 4 - Descriptor Length (4) 4 - null 0-15 - Padding to a multiple of 16 bytes (Padded with letter "P") // FILE DATA // for each file X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - File Data 0-15 - Padding to a multiple of 16 bytes (Padded with letter "P") +------------------------------------------+ | SOCOM US Navy Seals (PS2) *.zar (type 2) | +------------------------------------------+ // ARCHIVE HEADER 4 - null 4 - Number Of Type Names [/2 +-1] 4 - Length Of Type Names Directory 4 - Hash? 4 - Padding Length (2048) 76 - null 2 - Unknown (2) 2 - Unknown (2) // TYPE NAMES DIRECTORY // for each type X - Type Name 1 - null Type Name Terminator // DIRECTORY 12 - null 4 - Number Of Files // for each file (32-bytes per entry) 4 - Hash? 4 - File Offset (relative to the start of the file data) 4 - File Length 4 - null 0-2047 - Padding to a multiple of 2048 bytes (Padded with letter "P") // FILE DATA // for each file X - File Data 0-2047 - Padding to a multiple of 2048 bytes (Padded with letter "P") +---------------------------------------+ | Soldiers: Heroes Of World War 2 *.pak | +---------------------------------------+ // Generic PK_ZIP Archive +-----------------------+ | Southpark *.dat *.mrg | +-----------------------+ 4 - Number Of Files //for each file 4 - Filename Length (including null byte) X - Filename (null) 4 - File Offset 4 - Raw File Size 4 - Compressed File Size X - File Data +------------------+ | Spec Ops 2 *.zrs | +------------------+ 4 - Unknown (25) 4 - Archive Number? (0/1) 4 - Number Of Files [-1] 4 - Unknown (all 255) 4 - Unknown (22) // for each file 4 - Unknown 4 - File Length [+16 on every file EXCEPT the first file] X - File Data +------------------+ | Spellforce *.pak | +------------------+ 4 - Version (4) 22 - Header (MASSIVE PAKFILE V 4.0 + (bytes)13,10) 44 - Unknown 4 - Unknown 4 - Number Of Files 4 - Unknown 4 - First File Offset 4 - Archive Length // for each file 4 - File Length 4 - Data Offset [+firstFileOffset] 4 - Filename Offset [+94 + numFiles*16] 4 - Unknown // for each file X - Filename (reversed) 1 - null Filename Terminator X - File Data +-----------------+ | Spiderman *.pkr | +-----------------+ // some files are compressed with ZLIB? 4 - Header (PRK3) 4 - dirOffset // go to dirOffset 4 - Unknown (4) 4 - numDirectories 4 - total number of files in all directories // for each directory 32 - dirName 4 - subDirOffset [x52 + dirOffset] 4 - numFiles in the directory // for each file 32 - filename 4 - Unknown 4 - Unknown 4 - File Offset 4 - Raw File Size 4 - Compressed File Size +-------------------+ | Spiderman 2 *.wbk | +-------------------+ 8 - Header (WAVEBK11) 8 - null 4 - First File Offset 4 - File Data Length 4 - Archive Length 4 - null 32 - Archive Name (null) (upper-case, not including extension) 4 - Number Of Files 4 - Directory Offset (256) 8 - null 4 - Misc Directory Length 4 - Misc Directory Offset 4 - null 4 - Padding (all 255's) 4 - Filename Directory Length 4 - Filename Directory Offset 152 - null Padding to a multiple of 256 bytes // DIRECTORY // for each file 4 - File ID? 4 - File Type ID? 4 - File Length 4 - Decompressed File Length? 4 - Unknown (20) 4 - Unknown (0/40/80) 4 - Padding (all 255's) 4 - File Offset [+FirstFileOffset] 4 - Unknown (12000) 4 - null 0-63 - null Padding to a multiple of 64 bytes // MISC DIRECTORY X - Unknown // FILENAME DIRECTORY // for each file X - Filename 1 - null Filename Terminator 0-4095 - null Padding a multiple of 4096 bytes // FILE DATA // for each file X - File Data 0-4095 - null Padding a multiple of 4096 bytes +---------------------+ | Splinter Cell *.LS0 | +---------------------+ // This is not really complete, and there has to be a better way of working it all out! // for each file 4 - File Start Tag (8) 4 - File Size [/2 + (1562 || 1939 || 2100)] (not including this 20-byte header) 4 - Number Of Chunks In This File 4 - Unknown (1280) 4 - Chunk Size (1536) [+2] // for each chunk in this file 4 - Chunk Start Tag (2) 4 - Unknown (36000 for first chunk) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown if (firstChunk){ 28 - null } X - Chunk File Data (length = chunkSize) } } +--------------------------------------+ | Splinter Cell: Pandora Tomorrow *.u* | +--------------------------------------+ // Generic Unreal Engine Format +----------------------------------------------------------+ | Spongebob Squarepants: Lights Camera Pants! (XBox) *.pak | +----------------------------------------------------------+ 4 - Header (kcap) 4 - Version (1) 4 - Offset to the End of the Filename Directory 4 - Archive Length 4 - Offset To Filename Directory 4 - Number Of Files // for each file 4 - Offset To Filename (relative to the start of the filename directory) 4 - File Offset 4 - File Length // for each file X - Filename 1 - null Filename Terminator // null Padding to a multiple of 2048 bytes // for each file X - File Data X - null Padding to a multiple of 2048 bytes +--------------------------------------------------------------+ | Spongebob Squarepants - The Movie (XBox) *.hip *.hop (chunk) | +--------------------------------------------------------------+ // Same as The Incredibles *.hip ??? +-------------------------------------+ | Stardust Screen Saver Toolkit *.msf | +-------------------------------------+ // ARCHIVE HEADER 4 - Header? (msto) 4 - Unknown 4 - Unknown 4 - Directory Offset // FILE DATA // for each file X - File Data // DIRECTORY 4 - Number Of Files // for each file (96 bytes for each entry) 41 - File Extension? File Type Code? (null terminated) (eg 000, 100, 103, 106, etc.) 43 - Filename (null terminated) 4 - File Offset 4 - File Length 4 - null +--------------------+ | Starmageddon *.dpk | +--------------------+ // Uses ZLib compression 4 - Header (DPK4) 4 - Archive Length 4 - Header Length 4 - Number Of Files // for each file 4 - Entry Length 4 - Decompressed Length 4 - Compressed Length 4 - Data Offset X - Filename 1 - null Filename Terminator X - Unknown +--------------------------+ | Star Siege *.vol (chunk) | +--------------------------+ 4 - Header (PVOL) 4 - Filename Directory Offset X - File Chunks X - Directory // go to filename directory 4 - Header (vols) 4 - Filename Directory Size [+8] // for each file X - Filename (null) 0-1 - Padding to a multiple of 2 bytes 4 - Header (voli) 4 - Offset Directory Size [+8] // for each file 4 - null 4 - File ID? 4 - File Offset 4 - File Size 1 - null // at each file offset 4 - Chunk Header (VBLK) 2 - File Size 2 - Unknown X - File Data +-------------------------+ | Starsky And Hutch *.wad | +-------------------------+ 4 - Header (AFHI) 4 - Number Of Files 4 - Number Of Files 4 - null 4 - Version (1) 4 - Version (1) 4 - null 4 - File Data Length? [+1140] 4 - File Data Length? [+1140] 4 - null 4 - Directory Offset (112) 4 - Directory Length (numFiles*48) 4 - Length of the Directory Entries (48) 4 - Filename Directory Offset 4 - Length Of Filename Directory 4 - First File Offset 4 - Length Of File Data 4 - Sound Quality Directory Offset 4 - Length Of Sound Quality Directory 4 - ID Directory Offset 4 - Length Of ID Directory 4 - Unknown (65536) 4 - Unknown (32768) 4 - Unknown (14) 4 - Unknown 12 - null // DIRECTORY // For each file 4 - File ID? 4 - Unknown 4 - Unknown 4 - Unknown 4 - File ID? 4 - File Offset [+FirstFileOffset] 4 - File Length 4 - File ID? 4 - Unknown (18) 2 - File Type ID? 2 - File Type ID? 8 - null // ID DIRECTORY // for each file 2 - Unknown 2 - Unknown // FILENAME DIRECTORY // for each file X - Filename 1 - null Filename Terminator // SOUND QUALITY DIRECTORY // for each file 2 - Unknown (1) 2 - Unknown (1) 4 - Sound Quality (11025/22050) 4 - Sound Quality*2 (22050/44100) 2 - Mono/Stereo (2) 4 - Sound Channel Bit Rate (16) // FILE DATA // For each file X - File Data 0-15 - null Padding to a multiple of 16 bytes +--------------------------+ | Starship Troopers *.slak | +--------------------------+ // Uses ZLib compression // ARCHIVE HEADER 16 - Header ("SlackPackFile " + null) 4 - Directory Offset 4 - File Entry Length (40) 4 - Unknown 4 - Unknown 4 - Number Of Files 4 - Filename Directory Length 4 - Unknown // DIRECTORY // for each file (40 bytes for each entry) 4 - Filename Offset (relative to the start of the filename directory) 4 - Unknown 8 - Hash? 4 - Compressed File Length 4 - Decompressed File Length 4 - File Offset 4 - null 4 - Unknown (1) 4 - Unknown // FILENAME DIRECTORY // for each file X - Filename 1 - null Filename Terminator // FILE DATA // for each file X - File Data +--------------------------------------------+ | Star Trek - 25th Anniversary *.dir + *.001 | +--------------------------------------------+ // The *.dir file contains the directory, the *.001 file contains the file data // Compression uses the LZSS Algorithm // *.dir File // for each file 8 - Filename (null) 3 - Filename Extension (null) 3 - File Offset // *.001 File // for each file 4 - Decompressed Size 4 - Compressed Size X - Compressed File Data +------------------------------------------+ | Star Trek: Birth Of The Federation *.snd | +------------------------------------------+ 4 - Directory Offset X - File Data // Directory // for each file 4 - File Offset 4 - File Length 4 - Unknown 4 - Unknown +-------------------------------------------+ | Star Trek - Judgment Rights *.dir + *.001 | +-------------------------------------------+ // Same as Star Trek 25th Anniversary // The *.dir file contains the directory, the *.001 file contains the file data // Compression uses the LZSS Algorithm // *.dir File // for each file 8 - Filename (null) 3 - Filename Extension (null) 3 - File Offset // *.001 File // for each file 4 - Decompressed Size 4 - Compressed Size X - Compressed File Data +-------------------------------------------+ | Star Trek Shattered Universe (XBox) *.xwb | +-------------------------------------------+ Same as Full Spectrum Warrior *.xwb +-----------------------------+ | Star Wars: Battle For Naboo | +-----------------------------+ 4 - Directory Offset 4 - Directory Length X - File Data // Directory // for each file 4 - File Offset 4 - File Length 4 - Unknown 4 - Unknown 16 - Filename (null) +-----------------------------+ | Star Wars Battlefront *.lvl | +-----------------------------+ // NOTE - It appears as though the Filename Header field and the Information Header field may // not be read by the game because they are sometimes the Filename header says INFO and the // Information Header says NAME. However, the fields following the Filename Header is the // filename regardless of the actual value of Filename Header. (ie sometimes the Filename Header // has the wrong value, but the filename still follows as in the spec) // // Also, the files all seem to have their own archive-like structure 4 - Header (ucfb) 4 - Archive Size [+8] 4 - File Extension (lvl_) 4 - Archive Size [+16] 4 - Unknown 4 - Archive Size [+24] // for each file 4 - File Type Code/Extension ("coll","entc","gmod","modl","tex_","skel","wpnc","zaa_","zaf_" etc.) 4 - File Size (not including this and the previous field) 4 - Filename Header (NAME) 4 - Filename Length (including 1 null) X - Filename (not including extension) 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - File Data { // for each group 4 - Group Name 4 - Group Length X - Group Data } +--------------------------------------+ | Star Wars Battlefront *.lvl (Type 2) | +--------------------------------------+ 4 - Header (ucfb) 4 - Archive Size [+8] // for each file 4 - Unknown (1538883361) (null for Padding files) 4 - File Size (including all these fields) (null for Padding files) 4 - File Type Code/Extension ("emo_","_pad") 4 - File Size (not including the 2 fields above) (null for Padding files) X - File Data (does not exist for Padding files) 8 - null +------------------------------+ | Star Wars: Dark Forces *.gob | +------------------------------+ 4 - Header (GOB + (byte)10) 4 - Directory Offset X - File Data // Directory 4 - Number Of Files // for each file 4 - File Offset 4 - File Length 13 - Filename (null) +---------------------------------------+ | Star Wars Episode 1 Racer *.bin (big) | +---------------------------------------+ // BIG ENDIAN ORDERING! 4 - Number Of Files // for each file 4 - File Offset 4 - Unknown 4 - Archive Size X - File Data +-----------------------------------------------+ | Star Wars Episode 1: The Phantom Menace *.lab | +-----------------------------------------------+ 4 - Header (LABN) 4 - Unknown (65644) 4 - Number Of Files 4 - Filename Directory Length 4 - null // for each file 4 - Offset 4 - Size 4 - Type/Extension 4 - Filename Length X - File Data +---------------------------+ | Star Wars Episode 3 *.pak | +---------------------------+ // Keep reading the directory until you reach the EndFileOffset1 4 - Number Of Files? 4 - End File 1 Offset 4 - End File 2 Offset 4 - End File 1 Length 4 - End File 2 Length 4 - Unknown 4 - Number of Misc Fields // for each Misc Field 4 - Unknown Offset X - null Padding to offset 796 // for each Misc Field 2 - Unknown ID X - null Padding to offset 2048 // DIRECTORY // for each file 36 - Filename (null) 4 - Next File Offset 4 - File Length (including null padding and this header) 2 - Unknown (180) 2 - File ID? X - File Data 0-2047 - null Padding to a multiple of 2048 bytes // END FILE 1 X - File Data // END FILE 2 X - File Data +-----------------------------------------+ | Star Wars: Galactic Battlegrounds *.drs | +-----------------------------------------+ 80 - Unknown 4 - Archive Length 4 - Unknown 4 - Directory Offset X - File Data // Directory // for each file 4 - Unknown 4 - File Offset 4 - File Length +------------------------+ | Star Wars Galaxy *.pak | +------------------------+ // BIG ENDIAN FORMAT 4 - Header ("EERT") 4 - Version ("6000") 28 - null // for each group 4 - Group Header (FORM) 4 - Group Length (not including these 2 fields) 4 - Group Type Code if (type == "0000"){ // File Tag 4 - Tag Header (TAG + (byte)4) 4 - Tag Length 4 - Tag Main Header (NIAM) 4 - File Type (MATL) 4 - Tag Data Length (68) X - Tag Data } else if (type == "0001"){ // Filename 4 - Filename Header (NAME) 4 - Filename Length (including null) X - Filename 1 - null } else if (type == "0002"){ // File Data Details 4 - Data Header (DATA) 4 - Data Length (Decompressed Length?) 4 - Data Main Header (NIAM) 4 - null 4 - File Length (Little Endian!) 4 - Filename Header (NAME) 4 - Filename Length (including null) X - Filename 1 - null } else if (type == "TCSS"){ // Padding? 4 - Padding Header (0000) 4 - Padding Length (5) 4 - Padding Main Header (NIAM) 1 - null } else if (type == "ARVS"){ // File Data? 4 - Padding Header (0000) 4 - Padding Length (5) 4 - Padding Main Header (NIAM) 1 - null X - Compressed File Data (ZLib Compression?) } else { // File Type Code? (SSHT, TXMS, TXM+(byte)4) // repeat from "Group Header (FORM)" } +------------------------------------------------+ | Star Wars: Knights Of The Old Republic 2 *.bif | +------------------------------------------------+ // A BIF_BIFFV1 Archive used in games like Baldurs Gate +-------------------------------------+ | Star Wars Jedi Academy (XBox) *.gfc | +-------------------------------------+ // NOTE: BIG ENDIAN FORMATTING // The structure of the end loop contains junk data to pad the filename // The junk data is unusual though because it contains many instances of // the letters 'JA' which convert to 'PK' when xor with 26 and 10. // Note that 26 and 10 only differ in 1 bit value 4 - Unknown 4 - Unknown 4 - Number Of Files In Loop 1,2 4 - Number Of Files In Loop 3,4 // for each file in Loop 1,2 4 - File Size 4 - File Offset (needs some adjustment?) 4 - Unknown // for each file in Loop 1,2 4 - Unknown // for each file in Loop 3,4 4 - Hash? 4 - File Size? 4 - File ID (incremental, starting at 14620) // for each file in Loop 3,4 96 - Filename (null) (filled with junk) 8 - Checksum? +-------------------------------------+ | Star Wars Jedi Academy (XBox) *.gob | +-------------------------------------+ // Compressed files use ZLib compression // for each file 4 - File Start Header (STBL) 1 - Compression tag (z=Compressed, 0=uncompressed) // note the 0 is the number 'zero' X - File Data 4 - File End Header (ENBL) 0-2047 - null Padding to a multiple of 2048 bytes +----------------------------------------------------------------+ | Star Wars: Republic Commando *.ctm *.u *.uax *.ukx *.usx *.utx | +----------------------------------------------------------------+ // Unreal-Engine format +-----------------------------------+ | Star Wars Rogue Squadron 3D *.dat | +-----------------------------------+ 4 - Directory Offset 4 - Directory Length X - File Data X - Directory X - Unknown // go to dirOffset // for each file 4 - Offset 4 - Length 4 - Padding (all 255's) 2 - Unknown ID 2 - Unknown 16 - Filename (null) (replace "_" with ".") // FILE DATA IS SET OUT LIKE THIS... // for each file X - File Data 0-31 - null Padding to multiple of 32 bytes +-----------------------------------+ | Star Wars Rogue Squadron 3D *.000 | +-----------------------------------+ // NOTE: This archive uses BIG ENDIAN format! 4 - Header (BUND) 4 - Archive Size [+8] 4 - Bundle Header (BNHD) 4 - Bundle Header Length X - Bundle Header { 65570 - Padding Data // for each file { 200 - Encrypted Filename (null) (decrypt with xor 170?) 4 - Length? 4 - Offset? 44 - null } } 4 - File Data Header (BNDT) 4 - File Data Length X - File Data +----------------------+ | Steel Panthers *.lbm | +----------------------+ // Same as Allan Border Cricket *.lbm +-----------------+ | Still Life *.sl | +-----------------+ 4 - Header (VXBG) 4 - Directory Length [+8 for these fields] // for each file X - Filename (null) 4 - File Length X - File Data +--------------+ | Stolen *.bcb | +--------------+ 4 - Number Of Files // for each file 4 - File Size? // for each file 1 - Filename Length X - Filename X - Padding with (byte)241 to a multiple of 2048 bytes X - File Data +--------------+ | Stolen *.rwv | +--------------+ // 16-bit PCM Audio +--------------+ | Stonekeep *. | (ie, no extension) +--------------+ 4 - Number Of Files 4 - Archive Header Length (12) 4 - First File Offset (32768) // for each file 8 - Unknown (sound timings?) X - null padding to offset 32768 X - File Data +--------------------+ | Stratosphere *.zpr | +--------------------+ 2 - Version (1) 2 - numFiles? // for each file 129 - Filename (null) 4 - Unknown 4 - Compressed Size 4 - Uncompressed Size 4 - Unknown 4 - Offset (relative to end of directory) X - File Data +---------------------+ | Sudden Strike *.ani | +---------------------+ 4 - Unknown 4 - Number Of Files // for each file 4 - File Offset 4 - Archive Size X - File Data +---------------------------------+ | Sudden Strike *.dat *.rus *.rs2 | +---------------------------------+ // Note: Some files (in *.rs2 only?) are the archive size, and some are repeats // All files of size 0 should be discarded? 4 - Number Of Files // for each file 4 - File Offset 4 - Archive Size X - File Data +---------------------------+ | Sudden Strike *.edt *.pck | +---------------------------+ // for each file 4 - File Offset 4 - Archive Size X - File Data +----------------------------------+ | Surface Tension *.tc *.vtc *.spf | +----------------------------------+ 4 - Header (SPRF) 4 - Number Of Files // for each file 32 - Filename (null) 4 - Length 4 - Offset X - File Data +--------------------------------+ | Survival Project *.idx + *.pak | +--------------------------------+ // The *.idx file contains the directory, the *.pak file contains the file data // *.idx File 8 - Header (200472 + null x2) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown (1026) 2 - Number Of Files 4 - Index File Length 4 - Number Of Files // for each file 4 - Unknown 255 - Filename (null Terminated, filled with junk) 4 - File Length 4 - File Offset // *.pak File 8 - Header (200472 + null x2) 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 2 - Number Of Files 4 - Archive File Length 4 - Number Of Files // for each file X - File Data +------------------------------------------------+ | SWAT 4 *.s4m *.pkg *.u *.uax *.ukx *.usx *.utx | +------------------------------------------------+ // Unreal-Engine format +----------------------------------------+ | SWAT - Global Strike Team (XBox) *.wad | +----------------------------------------+ // ZLib Compression 4 - Number Of Files? // for each file 2 - Filename Length X - Filename 4 - File Offset (ignore negatives?) 4 - File Data Header ("WAD>") // for each file 4 - Decompressed Length X - Compressed File Data +------------------+ | S.W.I.N.E. *.swn | +------------------+ 4 - Header 1 4 - Unknown 4 - Header 2 (PACK) 4 - Directory Size // for each file 1 - Unknown 1 - Filename Length X - Filename 4 - Offset (relative to end of directory) 4 - Size 5 - Unknown // File offset = 16 + dirSize + offset X - File Data +---------------+ | Syberia *.syb | +---------------+ // Same as Still Life *.sl 4 - Header (VXBG) 4 - Directory Length [+8 for these fields] // for each file X - Filename (null) 4 - File Length X - File Data +----------------------------------------------+ | Syphon Filter - The Omega Strain (PS2) *.hog | +----------------------------------------------+ 4 - Unknown 4 - Number Of Files 4 - Archive Header Length (20) 4 - Offset To Filename Directory 4 - First File Offset (2048) // for each file 4 - File Offset [+firstFileOffset] 4 - Archive Size [+2048] // for each file X - Filename 1 - null Filename Terminator X - null Padding to a multiple of 2048 bytes X - File Data +-----------------------------------------------+ | Tak 3 - The Great Juju Challenge (XBox) *.hog | +-----------------------------------------------+ // Same as Disney's Chicken Little (XBox) *.hog ??? +-------------------------+ | Take No Prisoners *.sfd | +-------------------------+ 4 - Number Of Files // for each file 4 - Offset X - File Data +-------------------------+ | Take No Prisoners *.vbm | +-------------------------+ 4 - Header (VBM ) 2 - Unknown (10) 2 - Unknown (5) 4 - Archive Size 4 - Unknown 4 - Directory Offset (108) 4 - Unknown 4 - Unknown 4 - Unknown 4 - First File Offset 4 - Unknown 4 - Unknown 4 - Unknown 4 - Offset to X's 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - null 4 - Offset to X's 4 - null 4 - Offset to X's (same as 2 fields above) 4 - Padding (all 255's) // for each file 32 - Filename (null) +----------------------------------------+ | Terminator - Dawn Of Fate (XBox) *.mpk | +----------------------------------------+ 4 - Header (MPAK) 4 - Unknown 4 - Number Of Files 4 - Filename Directory Length // for each file 4 - File Offset 4 - File Length 4 - File ID // for each file X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - File Data +---------------------+ | The 11th Hour *.gjd | +---------------------+ // for each file 4 - Unknown 4 - File Offset 4 - File Size 2 - File ID? 18 - Filename (null) X - File Data +---------------------------------------------------------+ | The Incredible Hulk - Ultimate Destruction (XBox) *.rcf | +---------------------------------------------------------+ // ARCHIVE HEADER 32 - Header ("ATG CORE CEMENT LIBRARY" + nulls to fill) 4 - Unknown 4 - Directory Offset (60) 4 - Directory Length 4 - Offset To Filename Directory 4 - Filename Directory Length 4 - null 4 - Number Of Files // DIRECTORY // for each file 4 - Hash? 4 - File Offset 4 - File Length X - null Padding to a multiple of 2048 bytes // FILENAME DIRECTORY 4 - File Data Padding Multiple (2048) 4 - null // for each file 4 - Unknown 4 - File Data Padding Multiple (2048) 4 - null 4 - Filename Length (including null terminator) X - Filename 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes X - null Padding to a multiple of 2048 bytes // FILE DATA // for each file X - File Data X - null Padding to a multiple of 2048 bytes +-------------------------------+ | The Incredibles *.hip (chunk) | +-------------------------------+ // BIG ENDIAN ORDERING!!! // Note: The order of the files in the directory are different to the order of the files // in the archive. ie. File#1 in the directory may be File#2938 in the archive 4 - Archive Header (HIPA) 4 - null 4 - Pack Header (PACK) 4 - Pack Header Length (144) 4 - Version Header (PVER) 4 - Version Header Length (12) 4 - Version (2) 2 - Unknown (10) 2 - Unknown (15) 4 - Unknown (1) 4 - Flags Header (PFLG) 4 - Flags Header Length (4) 4 - Flags 4 - Count Header (PCNT) 4 - Count Header Length (20) 4 - Number Of Files? 4 - Unknown 4 - Unknown 4 - Length of the File Data 4 - Unknown 4 - Creation Date Header (PCRT) 4 - Creation Date Header Length (30) 4 - AD/BC ("AD" + (bytes)226,254) 4 - Day (Sun ) 4 - Month (Sep ) 3 - Date (12 ) 9 - 24-Hour Time (16:59:58 ) 4 - Year (2004) 2 - null 4 - Modification Date Header 4 - Modification Date Header Length (4) 4 - AD/BC ("AD" + (bytes)226,254) 4 - Platform Header? (PLAT) 4 - Platform Header Length (26) 4 - BX Field ("BX" + 2 nulls) 4 - Language ("US" + 2 nulls) 4 - Graphics Format (NTSC) 2 - null X - Game Name (Incredibles) 1 - null 4 - Directory Header (DICT) 4 - Directory Length 4 - Table Of Contents Header (ATOC) 4 - Table Of Contents Length 4 - Information Header (AINF) 4 - Information Header Length (4) 4 - null // for each file 4 - File Entry Header (AHDR) 4 - File Entry Length 4 - Unknown 4 - File Type Code (filled to length with (byte)32 - "spaces") 4 - File Offset 4 - File Length 4 - File Type ID? (12=SCRP) 4 - Unknown (2) 4 - File Details Header (ADBG) 4 - File Details Header Length 4 - null X - Filename (null) X - null Padding (use the FileDetailsHeaderLength to determine the size of this field) 4 - Unknown (Hash or something?) 4 - L Table Of Contents Header (LTOC) 4 - L Table Of Contents Header Length 4 - L Information Header (LINF) 4 - L Information Header Length (4) 4 - null // for each item in the LTOC 4 - L Header (LHDR) 4 - L Header Length (20) 4 - Unknown (1) 4 - null 4 - L File Details Header (LDBG) 4 - L File Details Header Length (4) 4 - Padding (all (byte)255's) X - File Data +-----------------------------+ | The Mark Of Kri (PS2) *.wad | +-----------------------------+ 4 - Number Of Files // for each file 4 - Hash? 4 - File Length 4 - null 4 - Unknown X - null Padding to a multiple of 2048 bytes X - File Data +---------------------------------------------------+ | The Moment Of Silence resource.map + resource.### | +---------------------------------------------------+ // The resource.map file lists the file details for all archives named resource.### 4 - Number Of Files // for each file 64 - Filename (null-terminated) 4 - File Type ID? (1/3) 3 - Archive Extension (String - eg "000","007","012") 1 - null 4 - File Offset? 4 - File Length? 4 - null +----------------------------+ | The 7th Guest *.gjd + *.rl | +----------------------------+ // RL has the directory, GJD has the file data // RL FILE // for each file 12 - Filename (null) 4 - File Offset 4 - File Size // GJD FILE // for each file X - File Data 1 - null Padding between files +-----------------------------------------------------------------+ | The Chronicles of Riddick - Escape From Butcher Bay *.xwc *.xtc | +-----------------------------------------------------------------+ 16 - Header (MOS DATAFILE2.0 + null) 8 - null 4 - Tail Directory offset 20 - null //Only XWC's pad to offset 2048 X - Padding to offset 2048 (padded using repeats of 1234567890123456) // for each file 4 - Unknown (768) 4 - Unknown (36864) 4 - Length (excluding all header data - ie the length of the file data only) 4 - Unknown (1) 4 - Unknown 4 - Unknown (32768) 4 - null X - File Data **** XWC tail directory data - 48 byte headers 24 - String value (VERSION,WAVEDATA,WAVEINFO,WAVEDESC,SFXDESC,LIPSYNC, etc...) 4 - Next header offset 4 - null 4 - Structure offset location in file 4 - unknown (maybe table data pointer location) 4 - Number of entries at that location 4 - null WAVEINFO structure - (Filenames) 4 - starting offset in file 4 - size including header 4 - length of file name x - actual filename (may be padded with spaces) WAVEDESC structure - (who cares) 4 - unknown (len again? or samples per sec?) 1 - either 64, or 128 1 - either 08 or 88 2 - sample size (5512, 11025 maybe 22050, 44100) 4 - unknown (len again? or samples per sec?) filenames are in the waveinfo structure all of the files share this type of structure for the header names... XTC is similar but: Main header leads to tail directory data - 48 byte headers (gotta scan for name) each name had diff structs IMAGEDIRECTORY5 structure - (filenames) 4 - FF FF FF FF 4 - null 4 - length of filename x - actual filename (may be padded with spaces) 4 - unknown 4 - unknown 4 - unknown 4 - unknown (768) 4 - unknown (00 05 00 00) 4 - unknown (10 00 04 00) flags? 4 - unknown (00 04 00 00) flags? 4 - unknown (00 02 00 00) flags? 4 - unknown (00 08 00 00) flags? 4 - null 4 - Offset of data in file 4 - unknown 4 - null 4 - 00 00 00 07 (1792) 2 - null IMAGEDIRECTORY4 structure - (filenames) 4 - FF FF FF FF 4 - null 4 - length of filename x - actual filename (may be padded with spaces) 4 - unknown 4 - unknown 4 - unknown (768) 4 - unknown (00 05 00 00) 4 - unknown (10 00 04 00) flags? 4 - unknown (00 04 00 00) flags? 4 - unknown (00 02 00 00) flags? 4 - unknown (00 08 00 00) flags? 4 - null 4 - Offset of data in file 4 - unknown 4 - data offsets (series of these, depends on entries in Tail dir names. (basically keep reading until you hit a 4 byte null) 4 - null 4 - 00 00 00 07 (1792) 4 - null 2 - null +------------------------+ | The Lost Vikings *.dat | +------------------------+ // for each file 4 - File Offset X - File Data +--------------------+ | The OutForce *.box | +--------------------+ X - File Data // Directory 4 - Number Of Files // for each file X - Filename 1 - null Filename Terminator 4 - File offset 4 - File Size 4 - Directory Offset +--------------------+ | The Punisher *.ceg | +--------------------+ // Some CEG archives are completely ZLib compressed, but when decompressed have the // following structure, which is the same for non-compressed CEG archives 4 - Header (GEKV) 4 - Version (1) 4 - Directory Size (first file offset = dirSize + 32) 4 - File Data Size 4 - numFiles 4 - null 4 - numFiles 4 - Unknown (128) // for each file 4 - File Offset 4 - Unknown 4 - Unknown 4 - Unknown 24 - Filename (null) 4 - File Length 4 - null X - File Data +--------------------+ | The Punisher *.vpp | +--------------------+ // The archive is based on multiples of 2048 4 - Header (206 10 137 81) 4 - Version (3) 4 - Number Of Files 4 - Archive Size 4 - Unknown (64) 2028 - Filler (ie filled to position 2048 using nulls) // for each file 24 - Filename (null) 4 - File Size 4 - File Size X - padding to a multiple of 2048 bytes X - File Data // The file offsets start at (numFiles * 32) + 2048 + (2048-((numFiles*32) % 2048)) // Where % is the mod function (remainder) // Also, each file is padded to a multiple of 2048, which must be taken into account when // calculating the offset to each file. +---------------------------+ | The Red Star (XBox) *.tre | +---------------------------+ // The order of the files in the directory is different to the order of the files in the archive 4 - Number Of Files // for each file 4 - File Offset 4 - File Length 4 - Unknown Offset 4 - Hash? X - File Data +---------------------------------------+ | The Riddle of Master Lu *.has + *.hag | +---------------------------------------+ // The *.has file contains the directory for all *.hag files, the *.hag files contain the file data 4 - Number Of Files // for each file 33 - Filename (null Terminated) 1 - Archive Name ID 1 - Entry Type (0 for a blank file) 4 - File Offset 4 - File Size 4 - Entry Offset (if not =FileOffset, then ignore?) // for each section (ie until end of file) 33 - Archive Name (null Terminated) (without extension) 1 - Archive Name ID +----------------+ | The Sims *.far | +----------------+ // no compression is used in this archive, so the raw and compressed file sizes are the same 8 - Header (FAR!byAZ) 4 - Version (1) 4 - Directory Offset X - File Data X - Directory // go to dirOffset 4 - Number Of Files // for each file 4 - Raw File Size 4 - Compressed File Size 4 - Offset 4 - Filename Length X - Filename +----------------------------+ | The Sims *.iff *.flr *.wll | +----------------------------+ 60 - Header (IFF FILE 2.5:TYPE FOLLOWED BY SIZE JAMIE DOORNBOS & MAXIS 1) 4 - Offset to directory file (sometimes is 0) // for each file 4 - Extension/Type 4 - Size (including 76 header) 2 - File ID 2 - Unknown 64 - Filename (null) X - File Data +----------------------+ | The Sims 2 *.package | +----------------------+ 4 - Header (DBPF) 4 - Version (1) 16 - null 4 - Creation Date 4 - Modification Date 4 - Unknown (7) 4 - Number Of Files 4 - Directory Offset 4 - Directory Size 48 - Unknown X - File Data // Directory // for each file 4 - Type ID 4 - Group ID 4 - Instance ID 4 - Class ID 4 - Data Offset 4 - File Length +-----------------------+ | The Sims Online *.far | +-----------------------+ 8 - Header (FAR!byAZ) 4 - Version (1) 4 - Directory Offset X - File Data X - Directory // go to dirOffset 4 - Number Of Files // for each file 4 - Raw File Size 4 - Compressed File Size 4 - Offset 2 - Filename Length X - Filename +-----------------------------------------+ | The Sims Online *.iff *.flr *.wll *.spr | +-----------------------------------------+ // THE SAME AS THE SIMS *.iff +------------------------------+ | The Sims Online *.dat (DBPF) | +------------------------------+ // THE SAME AS SIMCITY 4 *.dat +----------------------------------+ | The Sims Online *.dat (FAR!byAZ) | +----------------------------------+ // The compression is the same as that used in the Simcity 4 DAT_DBPF archives 8 - Header (FAR!byAZ) 4 - Version (3) 4 - dirOffset X - File Data X - Directory // go to dirOffset 4 - Number Of Files // for each file 4 - Original File Size 2 - Compressed Specifics (see below) 1 - Power Value (see below) 1 - Unknown (0 or 128) 4 - Offset 2 - Unknown (1) 2 - Filename Length 4 - Type ID (see below) 4 - File ID X - Filename // TO CALCULATE FILE SIZES // * If the powerValue=0, the file size is the value of compressedSpecifics // * If the compressedSpecifics is negative, do (((powerValue+1)*65536) + compressedSpecifics) // * If the compressedSpecifics is positive, do ((powerValue * 65536) + compressedSpecifics) // // if (compressedSpecifics < 0){ // fileSize = (65536 * (powerValue_l + 1)) + compressedSpecifics; // } // else { // if (powerValue_l > 0){ // - fileSize = (65536 * powerValue_l) + compressedSpecifics; // - } // else { // - fileSize = compressedSpecifics; // - } // } // THE TYPE ID NUMBERS // 1 - BMP image - (compressed) // 2 - TGA image - (compressed) // 5 - SKEL skeleton - (compressed) // 7 - ANIM animation - (compressed) // 9 - MESH model - (compressed) // 11 - BND binding - (uncompressed) // 12 - APR appearance - (uncompressed) // 13 - OTF outfit - (uncompressed) // 14 - PNG image - (uncompressed) // 15 - PO purchasable object (uncompressed) // 16 - COL collection - (compressed) // 18 - HAG group - (compressed) // 19 - JPEG image - (compressed) // 20 - JPEG image - (uncompressed) +---------------------+ | The Suffering *.sdu | +---------------------+ 4 - Header (SRSC) 2 - Version ((bytes)1,1) 4 - Directory Offset 4 - Number Of Files [-1] X - File Data X - Directory // go to Directory Offset 4 - Unknown (1026) 2 - null 4 - File Data Length 4 - Unknown (10) // for each file 4 - Unknown 2 - File Type ID? 4 - File Offset 4 - File Size +--------------------------+ | Theme Park *.dat + *.tab | +--------------------------+ // *.tab has the details, *.dat has the file data 24 - null 4 - Unknown 4 - Unknown // for each file 18 - Filename 4 - Offset 4 - null 4 - Size 2 - Type? +----------------------------+ | Thief - The Dark Age *.crf | +----------------------------+ // Generic ZIP_PK Archive +-------------------------------+ | Thief 3: Deadly Shadows *.gmp | +-------------------------------+ 4 - Header 2 - Unknown 2 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 8 - Unknown 8 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown // for each file 1 - Filename Length (including null) X - Filename (null) 1 - Unknown (16) 1 - Unknown (0) or (4) 1 - Unknown (7) 1 - Unknown (0) or (4) // ends with filename length = 1 and all other fields = null +-------------------------------+ | Thief 3: Deadly Shadows *.ibt | +-------------------------------+ 2 - Version (1) 4 - Unknown 2 - Unknown (null) 4 - First File Offset (dirSize) 4 - File Data Size 4 - Unknown 4 - Unknown 4 - Number Of Files 4 - Unknown 8 - Unknown 8 - Unknown // for each file 4 - ID or Group type? 4 - File Offset 4 - File Size 4 - Size of padding after the file (this is not included in the file size) 4 - File ID? 4 - File Type? (66) 4 - Unknown 8 - Unknown 8 - Unknown 1 - Unknown (8) X - Filename X - Padding to a length of 308 (using nulls) // continues until offset = 1 X - Unknown X - Files +-------------------------------+ | Thief 3: Deadly Shadows *.bik | +-------------------------------+ 4 - Header (BIKi) 4 - archiveSize? (a little too big) 4 - Number Of Files 4 - Unknown 4 - Number Of Files 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Version? (1) 4 - Unknown 4 - Unknown 4 - Unknown // for each file 4 - File Offset +--------------------------+ | Throne Of Darkness *.lot | +--------------------------+ X - File Data X - Directory 4 - Unknown (17) 4 - Directory Length [+4] // go to ArchiveSize - DirectoryLength X - Unknown (seems to vary in size) 1 - null 1 - Unknown 4 - Unknown (-1091568946) 4 - null 4 - Number Of Directories // for each directory 1 - Directory Name Length X - Directory Name 1 - Number Of Files In Directory 1-X - Unknown (minimum 1 bytes?) 1 - null // for each file in this directory 1 - Unknown 1 - Filename Length [-1] X - Filename 1 - Unknown 1 - Unknown 4 - File Size X - Unknown 1 - null +-------------------+ | Tie Fighter *.lfd | +-------------------+ // for each file 12 - filename (null to fill) 4 - offset X - File Data // the header can be read as RMAPresource, which is actually the first filename in every archive +-------------------------------------------+ | TimeSplitters Future Perfect (XBox) *.pak | +-------------------------------------------+ 4 - Header (P5CK) 4 - Directory Offset? 4 - Directory Length 2036 - null Padding to offset 2048 // Filename Directory 2 - Number Of Files // for each file 1 - Filename Length X - Filename 0-2047 - null Padding to a multiple of 2048 bytes // File Data // for each file X - File Data 0-2047 - null Padding to a multiple of 2048 bytes // Directory 4 - Unknown 4 - Filename Directory Offset 4 - Filename Directory Length 4 - null // for each file 4 - Unknown 4 - File Offset 4 - File Length 4 - null +-------------------------------------+ | TOCA Touring Car Championship *.bfp | +-------------------------------------+ 4 - Number Of Files 4 - First File Offset [+12] 4 - Unknown // for each file 16 - Filename (null) 4 - Offset (relative to the end of the directory) 4 - Length X - File Data +---------------------+ | Tomb Raider 3 *.wad | +---------------------+ 536 - Unknown // for each file 260 - Filename (null) 4 - File Length 4 - File Offset X - File Data +-------------------------------+ | Tony Hawk: Pro Skater 2 *.pkr | +-------------------------------+ // No compression is used, so the compressed and uncompressed sizes are the same 4 - Header (PKR2) 4 - Version (1) 4 - Number Of Directories 4 - Number Of Files // for each directory 32 - Directory Name 4 - File Entry Offset 4 - Number Of Files // for each file 32 - Filename 4 - Unknown (-2) 4 - Offset 4 - Uncompressed Size 4 - Compressed Size X - File Data +-----------------------------+ | Tony Hawk Underground *.prx | +-----------------------------+ // not quite right 4 - Number Of Files? 2 - Unknown (3) 4 - Archive Size? 2 - null // for each file 4 - Decompressed File Size 4 - Compressed File Size 4 - File Type ID? 4 - Unknown 35 - Filename (null) X - File Data +-------------------------------+ | Tony Hawk Underground 2 *.prx | +-------------------------------+ // not quite right 4 - Number Of Files? 2 - Unknown (3) 4 - Archive Size? 2 - null // for each file 4 - Decompressed File Size 4 - Compressed File Size 4 - File Type ID? 4 - Unknown 41 - Filename (null) X - File Data +--------------------------------------------+ | Total Annihilation *.hpi *.ufo *.ccx *.pck | +--------------------------------------------+ 4 - Header (HAPI) 4 - Unknown 4 - Directory Length 4 - Directory Key 4 - Main Directory Offset X - File Data // Main Directory 4 - Number Of Files In This Directory 4 - Directory Offset // go to this Directory Offset // for each file in this directory 4 - Filename Offset 4 - File Offset 1 - Directory/File ID if (directoryFileID == 1){ // go to the name offset X - Directory Name 1 - null Directory Name Terminator // go to the offset and repeat from "4 - Number Of Files In This Directory" } else { // go to the name offset X - Filename 1 - null Filename Terminator // go to the offset 4 - Offset 4 - Length 1 - Flag } +--------------------------+ | Total Annihilation *.zrb | +--------------------------+ 4 - Header (SMK2) 4 - Unknown 4 - Unknown 4 - Number Of Files 88 - Unknown // for each file 4 - File Length // for each file 1 - Unknown X - File Data +------------------------------------+ | Total Annihilation: Kingdoms *.hpi | +------------------------------------+ 4 - Header (HAPI) 4 - Unknown 4 - Directory Offset 4 - Directory Size 4 - Filename Directory Offset 4 - Unknown (32) 4 - Archive Size? [+78] X - File Data // go to directory offset 4 - null 4 - First Directory Offset // for each directory 4 - Directory Filename Offset [+filenameDirectoryOffset] 4 - Directory Offset [+dirOffset] 4 - null // go to each dirOffset 4 - Filename? (starts at 1) 4 - Directory Size 4 - null 4 - Unknown (40) 4 - numFiles in Directory // for each file 4 - Filename Offset [+filenameDirectoryOffset] 4 - File Offset 4 - File Size 4 - Unknown 4 - Unknown 4 - Unknown // go to filename directory offset X - Filename (null) +--------------------+ | Tower Assult *.epf | +--------------------+ // THE SAME AS Overdrive EPF_EPFS +-------------------+ | Track Mania *.dat | +-------------------+ // go to end of file 4 - Archive Size +---------------------+ | Traffic Giant *.obe | +---------------------+ // for each file 4 - Number Of Files (at start only - all other files have value null) 4 - File ID X - filename (null) X - data and padding to size 136 bytes +---------------------+ | Traffic Giant *.obh | +---------------------+ 4 - Number Of Files 4 - Unknown // for each file X - filename (null) X - data and padding to size 144 bytes +----------------------------+ | Traffic Giant *.jfl (maps) | +----------------------------+ // for each file 4 - Number Of Files (at start only - all other files have value null) 4 - File ID 4 - Version? (1) 4 - Unknown ID 4 - Unknown ID X - filename (null) X - null padding to size 216 bytes +------------------------+ | Transport Tycoon *.001 | +------------------------+ // THIS IS A NORMAL ZIP ARCHIVE +------------------------+ | Transport Tycoon *.cat | +------------------------+ 4 - Number Of Files [/8] // for each file 4 - File Offset 4 - File Length // for each file 1 - Filename Length X - Filename X - File Data +-------------------------------+ | Transworld Snowboarding *.hpf | +-------------------------------+ 32 - Header ("HMG_PACKED_FILE" + null + spaces to fill) 256 - Absolute Archive Path (null terminated, spaces to fill) 4 - Number Of Files // for each file (80 bytes for each entry) 4 - File/Directory Identifier (0/3) if (FileDirID == 0){ // file 4 - null 4 - File Offset (relative to the start of the file data) 4 - File Length 64 - Filename (null terminated, filled with spaces after the null) } else if (FileDirID == 3){ // directory 4 - null 4 - File ID (incremental from 48) -OR- Root Directory Identifier (=(byte)1) if (fileID == (byte)1){ 4 - File ID (incremental from 48) } else { 4 - Unknown (1) } 64 - Directory Name (null terminated, filled with spaces after the null) } X - File Data +------------------------------+ | Tribes Vengeance *.pkg *.tvm | +------------------------------+ // NOTE: Can't read these yet - not sure where the file offsets and/or file sizes are 8 - Header ((bytes)193,131,42,158,130,0,27,0) 4 - Version (1) 4 - Number Of Files 4 - Unknown (64) 4 - Unknown #2 4 - File Data Size? 4 - Unknown 4 - Same as 2 fields above +14 16 - Unknown 4 - Unknown (1) 4 - Same As Unknown Field #2 4 - Number Of Files // for each file 1 - Filename Length (including null) X - Filename 1 - null 1 - Unknown (16) 1 - Unknown (0/4) 1 - Unknown (7) 1 - Unknown (0/4) X - File Data +--------------------------------------------------+ | Triple Play 98: Home Run Derby *.big *.viv (big) | +--------------------------------------------------+ // BIG ENDIAN FORMAT 2 - Header (192,251) 2 - Directory Size [+ 0-7] 2 - Number Of Files 1 - null // for each file 2 - Offset 2 - Length 1 - Unknown X - Filename (null) 1 - Unknown X - File Data +---------------+ | Tropico *.pk2 | +---------------+ 4 - Header 4 - Number Of Files // for each file 4 - Unknown 4 - File Length 4 - Data Offset [+FirstFileOffset] 1 - Unknown X - File Data +----------------+ | Twilight *.001 | +----------------+ 4 - Header (TCLF) // for each file 32 - Filename (null) 4 - File Length 4 - Unknown X - File Data +----------------------------+ | Tyrian 2 *.mus *.shp *.lvl | +----------------------------+ 2 - Number Of Files // for each file 4 - Offset X - File Data +-----------------------------+ | Ultima 7 *.dat (chunk)(big) | +-----------------------------+ // SAME AS Allan Border Cricket LBM_FORM +----------------------------------------+ | Ultima 7 *.dat *.vga *.flx *.tim *.spc | +----------------------------------------+ 80 - Header (Ultima Vil Data File (C) 1992 Origin Inc.) + nulls to fill *OR* (Ultima Vil initial game) + nulls to fill *OR* all null 4 - Unknown 4 - numFiles 4 - Unknown 12 - null 4 - Unknown 4 - Unknown 16 - null // for each file 4 - File Offset 4 - File Size X - File Data // Some directory entries are size and offset 0 - these should be ignored // However, these entries DO count in the numFiles field +----------------+ | Ultima 7 *.shp | +----------------+ 4 - Archive Size // for each file 4 - File Offset X - File Data +-------------------------+ | Ultimate Race Pro *.bin | +-------------------------+ 16 - Header (LIBSYSHEADER1.0 + null) 4 - Number Of Files [-1] // for each file 120 - Filename 4 - File Offset 4 - null 120 - null 4 - Archive Size? 4 - null X - File Data +----------------------------------------+ | Universal Combat - A World Apart *.zip | +----------------------------------------+ // Generic ZIP archive +-----------------------------------------------------------+ | Unreal Championship 2 - The Liandri Conflict (XBox) *.xwb | +-----------------------------------------------------------+ Same as Full Spectrum Warrior *.xwb +--------------------------------------------+ | Unreal Championship 2 (XBox) *.xwb + *.xsb | +--------------------------------------------+ // The XSB file contains the directory, the XWB file contains the file data // XSB FILE // ARCHIVE HEADER 4 - Header (SDBK) 2 - Number Of Files 2 - Unknown 4 - Offset To Filename Directory 4 - Offset To Directory 4 4 - Offset To Directory 3 4 - Archive Length 2 - null 2 - Unknown (16) 2 - Number Of Files In Directory 1 2 - Number Of Files In Directory 2 2 - null 4 - Unknown (1) 2 - null 16 - Archive Filename (null) (without extension) // DIRECTORY 1 // for each file in Directory 1 2 - null 2 - File ID (incremental from 0) 4 - Offset to Filename in the Filename Directory (relative from the start of the archive) 4 - Padding (all 255's) 2 - null 2 - File Type ID? 4 - Padding (all 255's) // DIRECTORY 2 // for each file in Directory 2 4 - Offset to File Entry in Directory 4 (relative from the start of the archive) 4 - Unknown 4 - Padding (all 255's) 2 - Unknown 2 - Unknown (255/511) 4 - null // FILENAME DIRECTORY // for each file X - Filename (the first filename is the archive filename without the extension) 1 - null Filename Terminator 0-3 - null Padding to a multiple of 4 bytes // DIRECTORY 3 X - Unknown // DIRECTORY 4 // for each file 4 - File Offset? X - Unknown // XWB FILE 4 - Header (WBND) 4 - Version (3) 4 - Size Of Header 1 (40) 4 - Size Of Header 2 (40) 4 - Offset To Details Directory (80) 4 - Length Of Details Directory 8 - null 4 - First File Offset (512) 4 - Unknown 2 - Unknown (1) 2 - Unknown (1) 4 - Number Of Files 16 - Archive Filename (null) (without extension) 4 - Length Of Each Details Entry (24) 4 - Length Of Each Filename Entry (64) 4 - Max padding size between each file (512) 4 - null X - Unknown Data X - null Padding to the first file offset // for each file X - File Data 0-512 - null Padding so the file length is a multiple of 512 bytes +------------------+ | USAF *.ptt *.dem | +------------------+ 12 - Header (Pixel - Strm) 1 - null 5 - Version (01.10 as a string) 2 - null 4 - Version (1) 4 - null 4 - Number Of Files 2 - null 4 - Unknown 14 - null // for each file 32 - Filename (null) 4 - Unknown 4 - Unknown 4 - Unknown 2 - Unknown 2 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - Unknown 4 - File Offset X - null padding to 74384 X - File Data +------------------------+ | US Navy Fighters *.lib | +------------------------+ 5 - Header (EALIB) 2 - Number Of Files // for each file 1 - ID? 13 - filename 4 - offset 18 - nullBytes X - file data +--------------------------+ | US Marine Fighters *.lib | +--------------------------+ // SAME AS US NAVY FIGHTERS *.lib +-------------------+ | Versailles 2 *.bf | +-------------------+ // Same as Return to Mystery Island *.bf +----------------+ | Vietcong *.cbf | +----------------+ 8 - Header (BIGF + (char)1 + ZBL) 8 - Archive Size 4 - Number Of Files 8 - Directory Offset 8 - Directory Size 8 - First File Offset (header size) (64) 4 - Unknown 8 - Unknown 8 - null // go to dirOffset // for each file 2 - Entry Size (not including these 2 bytes) X - Entry // THIS FORMAT MIGHT USE A TECHNIQUE SIMILAR TO THE INDEXING TECHNIQUE USED IN UNREAL TOURNAMENT !? // Notes: // // The most probable explaination of the archive format is that the directory entries // are encrypted, and that each directory entry stores the filename of the file. This // would explain the different sized directory entries. // // There is a repeating pattern of bytes that appear in the directory, in the arrangement // 33,243,6,50,30. It is possible that this is a repeating key - if so then it probably // repeats over and over, but pauses when reading the entry size field. // // Also, by looking at some of the files, it is probable that some files are encrypted // using byte 90 (Z) +---------------------+ | Vinyl Goddess *.lbr | +---------------------+ 2 - numFiles // for each file 2 - Unknown 4 - File Offset X - File Data +----------------------------------------------+ | Virtual Pool Tournament Edition (XBox) *.ark | +----------------------------------------------+ 4 - Number Of Files // for each file 256 - Filename (null terminated) 4 - File Offset 4 - File Length X - File Data +---------------------------------+ | Virtual Soccer 96 *.dat + *.off | +---------------------------------+ // Same as Actua Soccer *.dat + *.off +-------------+ | Voyage *.bf | +-------------+ // Same as Return to Mystery Island *.bf +--------------------+ | Wacky Wheels *.dat | +--------------------+ 2 - Number Of Files (add 1 ?) // for each file 14 - filename (null, padded with junk after the null, up to a second null at position 14) 4 - File Size 4 - File Offset X - File Data +----------------------------------------------------------------+ | Wallace And Gromit - The Curse Of The Were-Rabbit (XBox) *.zap | +----------------------------------------------------------------+ 4 - Header ("ZAP" + null) 4 - Padding Size (512) 4 - Number Of Files? 4 - Unknown Length // for each file 4 - Hash? (2573=directory) 2 - File Type ID (0=directory) if (directory){ 2 - Directory Name Length (including null) X - Directory Name 1 - null Directory Name Terminator } else if (file){ 2 - Filename Length (including null) X - Filename 1 - null Filename Terminator } X - null Padding to a multiple of 512 bytes X - File Data +-------------------+ | Wanted Guns *.pkf | +-------------------+ 4 - Number Of Files // for each file 256 - Filename (null) (including full path) 256 - Filename (null) 4 - File Offset 4 - null 4 - File Length 4 - File Length X - File Data +----------------------+ | Warcraft *.war *.sud | +----------------------+ 4 - Unknown 2 - Number Of Files 2 - Unknown // for each file 4 - File Offset X - File Data +----------------------------------+ | Warhammer 40k: Dawn Of War *.sga | +----------------------------------+ // Also called Dawn Of War // SOME FILES ARE ZLIB COMPRESSED // ARCHIVE HEADER 8 - Header (_ARCHIVE) 4 - Version (2) 16 - Unknown 128 - Archive Name (unicode) 16 - Unknown 4 - File Data Offset [+200] 4 - File Data Offset [+20] 4 - Descriptions Directory Offset (24) [+180] 2 - Number Of Descriptions (1) 4 - Folders Directory Offset [+180] 2 - Number Of Folders 4 - Files Directory Offset [+180] 2 - Number Of Files 4 - Filename Directory Offset [+180] 2 - Number Of Filenames // DESCRIPTION DIRECTORY // for each description 64 - Category / Directory 64 - Archive Name 2 - Unknown 4 - Unknown 4 - Unknown // FOLDERS DIRECTORY // THIS DIRECTORY HOLDS REFERENCES TO FOLDERS THAT CONTAIN SUB-FOLDERS IN THEM // for each folder 4 - Folder Name Offset (relative to filename directory offset) 2 - First Sub-Folder Number 2 - Last Sub-Folder Number // NOTE - IF THE 2 FIELDS ABOVE =36, THEY CONTAIN NO SUB-FOLDERS 2 - First Filename Number 2 - Last Filename Number // FILES DIRECTORY // for each file 4 - Filename Offset (relative to the start of the // FILENAME DIRECTORY) 4 - Unknown 4 - File Offset (relative to start of the // FILE DATA) 4 - Decompressed File Size 4 - Compressed File Size // FILENAMES DIRECTORY // for each folder and file X - Filename 1 - null Filename Terminator // FILE DATA // for each file 236 - Filename (null) 8 - Hash? X - File Data +---------------------------------------------------+ | Warhammer 40k - Dawn of War: Winter Assault *.sga | +---------------------------------------------------+ // Same as Dawn of War *.sga except for different compression type +------------+ | Wari *.pak | +------------+ 2 - Unknown 2 - Unknown 4 - Unknown // for each file 2 - Unknown 1 - Filename Length X - Filename 4 - File Size 1 - Unknown 2 - Unknown 2 - Unknown 4 - Unknown 4 - Unknown 1 - Unknown X - File Data +---------------------------+ | Warlords: Battlecry *.xcr | +---------------------------+ 13 - Header (xcr File 1.00) 7 - null 4 - Number Of Files 4 - Archive Length // for each file 256 - Filename (null) 256 - Directory Name (null) 4 - Data Offset 4 - File Length 12 - Unknown X - File Data +-----------------------------+ | Warlords: Battlecry 2 *.xcr | +-----------------------------+ // Same as Warlords Battlecry *.xcr 13 - Header (xcr File 1.00) 7 - null 4 - Number Of Files 4 - Archive Length // for each file 256 - Filename (null) 256 - Directory Name (null) 4 - Data Offset 4 - File Length 12 - Unknown X - File Data +-----------------------------+ | Warlords: Battlecry 3 *.xcr | +-----------------------------+ // Same as Warlords Battlecry *.xcr 13 - Header (xcr File 1.00) 7 - null 4 - Number Of Files 4 - Archive Length // for each file 256 - Filename (null) 256 - Directory Name (null) 4 - Data Offset 4 - File Length 12 - Unknown X - File Data +-----------------------+ | Warning Forever *.bin | +-----------------------+ 4 - Number Of Files 4 - Filename Directory Length // for each file 4 - Filename Offset (relative to the start of the filename directory) 4 - File Offset 4 - File Length // for each file X - Filename (null) X - File Data +-------------------------------+ | Warrior Kings - Battles *.bcp | +-------------------------------+ // The filenames are stored as unicode text, which means that each character // is stored as 2 bytes instead of 1. For ASCII text, it is sufficient to read only // the first chartacter in each pair, as the second byte will be null 44 - Header (PAK File 2.01 (c) Black Cactus Games Limited) 4 - Unknown 4 - Directory Offset 4 - Directory Length X - File Data 4 - Number Of Files // for each file 4 - File Offset 4 - Offset To Next File 4 - File Size 4 - Unknown (Hash?) 4 - File Type ID? // for each directory { // NOTE: The next 3 fields don't appear in the first directory! 4 - Number Of Sub-Directories In This Directory 1 - Directory name Length [*2 for unicode] X - Directory name (unicode text - 2-bytes per letter) 4 - Number Of Files In Directory (not including sub-directories) // for each file in the directory { 4 - File ID (incremental, starting from 0) 8 - Unknown 1 - Filename Length [*2 for unicode] X - Filename (unicode text - 2-bytes per letter) } // for each sub-directory in this directory { // REPEAT FROM "//for each directory" } +-------------------------+ | WarWind *.000 --> *.005 | +-------------------------+ 4 - Number Of Files // for each file 4 - File Offset 4 - Unknown (Archive Size?) X - File Data +-----------------------------------+ | War World - Tactical Combat *.pim | +-----------------------------------+ // Direct-X DDS Image +--------------------+ | Warzone 2100 *.wdg | +--------------------+ 4 - Header (WDG4) 4 - Number Of Files // for each file 4 - Unknown 4 - File Offset 4 - Unknown +-------------------------------------+ | Wheel Of Time *.u *.uax *.utx *.wot | +-------------------------------------+ // Unreal engine format files +-----------------+ | Wild West *.lid | +-----------------+ // SAME AS Desert Raid *.lid +------------------------------------------------+ | Wing Commander 2 *.s00 *.v00 *.v04 *.v08 *.r00 | +------------------------------------------------+ 4 - Archive Size // for each file 2 - File Offset 2 - Type? X - File Data // this is still buggy, some file offsets are negative, etc. +-------------------------------+ | Wing Commander Prophecy *.tre | +-------------------------------+ // The files in the archive are a different order to the files in the directory 4 - Number Of Files 12 - null // for each file 4 - Hash? 4 - File Length 4 - File Offset 4 - null 256 - Filename (null) X - File Data +--------------------+ | Wipeout Pure *.wad | +--------------------+ 4 - Version (1) 4 - Number Of Files // for each file 4 - Hash? 4 - File Offset 4 - File Length 4 - File Length 0-63 - null Padding to a multiple of 64 bytes // for each file X - File Data 0-63 - null Padding to a multiple of 64 bytes +---------------------------------+ | World Tour Soccer *.con + *.toc | +---------------------------------+ // The *.toc file contains the directory, the *.con file contains the file data // TOC FILE 4 - Version (1) 4 - Unknown (22) 4 - null 4 - Number Of Files 2 - Maximum Padding Size (64) 2 - Unknown (18) // for each file 4 - Unknown 4 - File Length // CON FILE // for each file X - File Data 0-63 - null Padding to a multiple of 64 bytes +--------------------------------------------+ | World War 2 Sniper - Call To Victory *.rez | +--------------------------------------------+ // Same as Blood 2 *.rez +-------------+ | Worms *.sfx | +-------------+ // for each file 4 - File Offset 0-2048 - null Padding to an offset of 2048 bytes X - File Data +------------------------+ | Worms Armageddon *.dir | +------------------------+ 4 - Header (DIR + (char)26) 4 - Archive Length 4 - Directory Offset [+4104] X - File Data // Directory // for each file 4 - Data Offset 4 - File Length X - Filename 1 - null Filename Terminator 0-3 - nullPadding to a multiple of 4 bytes 4 - null +------------------------+ | Worms Armageddon *.bww | +------------------------+ // THIS IS A BITMAP IMAGE *.bmp +---------------------------+ | WWII: Panzer Claws 2 *.wd | +---------------------------+ // It seems like it uses ZLib throughout the archive, but the ZLib decompressor doesn't // think so. Also, some/all the files don't seem to be compressed, as there is raw text // in some archives etc. X - Compressed Header X - File Data X - Compressed Directory 4 - Length Of Compressed Directory (including this field) // go to ArchiveLength - LengthOfCompressedDirectory // decompress/decrypt directory using ??? for LengthOfCompressedDirectory-4 +---------------------------+ | WWII Tank Commander *.pck | +---------------------------+ // ARCHIVE HEADER 4 - Header (0KCP) 4 - Version? Number Of Directories? (4) 4 - Offset To The "// FILE DATA" section // DIRECTORIES // for each file/directory 4 - Type Header (_RID, ELIF) if (type == _RID){ 4 - Number Of Files and/or subdirectories 2 - Directory Name Length X - Filename // for each file/subdirectory in this directory // repeat from "// DIRECTORIES" 4 - Directory End Header (DNED) 4 - null } else if (type == ELIF){ 4 - Length Of File Entry (not including the 4-byte header or this field) 4 - File Offset (Relative to the start of the File Data (**)) 4 - File Length 2 - Filename Length X - Filename } // FILE DATA 4 - Data Header (DATA) 4 - File Data Length X - File Data (**) +----------------------------+ | WWE Day Of Reckoning *.tex | +----------------------------+ 4 - Number Of Files 4 - Color Depth? (256) 4 - null 4 - Padding Size? // for each file 16 - Filename (null, filled with junk) 4 - File Extension 4 - File Size 4 - File Offset 4 - null 16 - null Padding X - File Data +-----------------+ | WWE Raw 2 *.fpk | +-----------------+ 4 - Unknown 4 - Unknown 4 - Unknown 4 - Number Of Directories 4 - Number Of Files 4 - Length Of File Data 4 - Unknown 4 - Unknown // for each directory { 20 - Directory Name (null) (first directory name is "___RootDirectory___") 2 - Number Of Sub-Directories in this directory 2 - Number Of Files in this directory 4 - Unknown (null if no subdirectories) 4 - Unknown (null if no files) // for each sub-directory in this directory { repeat from "//for each directory" } } // for each file { 20 - Filename (null) 4 - Offset (relative to the end of the directory) 4 - Length } X - File Data +-----------------+ | WWE WMXXI *.wad | +-----------------+ // The files in the directory are in a different order to the files in the archive // The file data is compressed using ZLib 3 - Header (WAD) 4 - Version (1) 4 - null 4 - Number Of Files // for each file 4 - Unknown (Hash?) 4 - File Offset 4 - null // for each file 2 - Length of file header [+2 for this field] 4 - Decompressed Length (or null) 4 - null 1 - Unknown (1) X - Filename (determine the filename length from the LengthOfFileHeader field) X - File Data +--------------+ | Xargon *.xr1 | +--------------+ // This is only for some files // for each file 4 - File Offset // continue until offset == 0, or offset > filesize X - Unknown X - File Data +-------------+ | Xatax *.res | +-------------+ 2 - Number Of Files // for each file 1 - Filename Length 12 - Filename (null) 4 - Data Offset 4 - File Length 1 - Unknown (2) X - File Data +-----------------------------+ | X-Men: Legends (XBox) *.zsm | +-----------------------------+ // The first 3 directories probably always exist in each archive, and contain the same // number of files in each of these 3 directories. The other directories appear to be // optional, and contain random numbers of files // The file ID's in each HASH directory always go between 0 and numFilesInDir-1, but they // are not in order. Also, the Hash values in the HASH directories are non the same in each // HASH directory, so they may be calculated on different data if they are a Hash. 8 - Header (ZSNDXBOX) 4 - Archive Size [+/- a few bytes] 4 - Directory Length 4 - Number Of Items In Directory 1 4 - Offset To Hash Directory 1 4 - Offset To Directory Data 1 4 - Number Of Items In Directory 2 4 - Offset To Hash Directory 2 4 - Offset To Directory Data 2 (Sound Details) 4 - Number Of Items In Directory 3 4 - Offset To Hash Directory 3 4 - Offset To Directory Data 3 (Filenames/Offsets) 4 - Number Of Items In Directory 4 (null) 4 - Offset To Hash Directory 4 4 - Offset To Directory Data 4 4 - Number Of Items In Directory 5 (sometimes null) 4 - Offset To Hash Directory 5 4 - Offset To Directory Data 5 4 - Number Of Items In Directory 6 (null) 4 - Offset To Hash Directory 6 4 - Offset To Directory Data 6 4 - Number Of Items In Directory 7 (null) 4 - Offset To Hash Directory 7 4 - Offset To Directory Data 7 // HASH DIRECTORY 1 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 1 DATA // for each file in this directory 2 - File ID (incremental from 0) 2 - Unknown (4096) 2 - Unknown (127) 2 - Unknown (50/255) 2 - Unknown (32512) 2 - Unknown (32512) 12 - null // HASH DIRECTORY 2 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 2 DATA // for each file in this directory 4 - File ID (incremental from 0) 4 - Sound Quality (22050) 20 - null // HASH DIRECTORY 3 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 3 DATA // for each file in this directory 4 - File Offset 4 - File Length 4 - Unknown (1) 8 - null 64 - Filename (null terminated) // HASH DIRECTORY 5 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 5 DATA // for each file in this directory 2 - Unknown (127) 4 - Unknown (65535) 2 - null 4 - Unknown 4 - null X - Junk? X - null Padding to a multiple of 2048? bytes X - File Data +--------------------------------------------------+ | X-Men Legends 2 - Rise Of Apocalypse *.zsm *.zss | +--------------------------------------------------+ // The first 3 directories probably always exist in each archive, and contain the same // number of files in each of these 3 directories. The other directories appear to be // optional, and contain random numbers of files // The file ID's in each HASH directory always go between 0 and numFilesInDir-1, but they // are not in order. Also, the Hash values in the HASH directories are non the same in each // HASH directory, so they may be calculated on different data if they are a Hash. 8 - Header (ZSNDPC ) 4 - Archive Size [+/- a few bytes] 4 - Directory Length 4 - Number Of Items In Directory 1 4 - Offset To Hash Directory 1 4 - Offset To Directory Data 1 4 - Number Of Items In Directory 2 4 - Offset To Hash Directory 2 4 - Offset To Directory Data 2 (Sound Details) 4 - Number Of Items In Directory 3 4 - Offset To Hash Directory 3 4 - Offset To Directory Data 3 (Filenames/Offsets) 4 - Number Of Items In Directory 4 (null) 4 - Offset To Hash Directory 4 4 - Offset To Directory Data 4 4 - Number Of Items In Directory 5 (sometimes null) 4 - Offset To Hash Directory 5 4 - Offset To Directory Data 5 4 - Number Of Items In Directory 6 (null) 4 - Offset To Hash Directory 6 4 - Offset To Directory Data 6 4 - Number Of Items In Directory 7 (null) 4 - Offset To Hash Directory 7 4 - Offset To Directory Data 7 // HASH DIRECTORY 1 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 1 DATA // for each file in this directory 2 - File ID (incremental from 0) 2 - Unknown (4096) 2 - Unknown (127) 2 - Unknown (50/255) 2 - Unknown (32512) 2 - Unknown (32512) 12 - null // HASH DIRECTORY 2 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 2 DATA // for each file in this directory 4 - File ID (incremental from 0) 4 - Sound Quality (22050) 20 - null // HASH DIRECTORY 3 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 3 DATA // for each file in this directory 4 - File Offset 4 - File Length 4 - Unknown (106) 64 - Filename (null terminated) // HASH DIRECTORY 5 // for each file in this directory 4 - Hash? 4 - File ID (starts from 0, incremental, but not in order) // DIRECTORY 5 DATA // for each file in this directory 2 - Unknown (127) 4 - Unknown (65535) 2 - null 4 - Unknown 4 - null X - Junk? X - null Padding to a multiple of 2048? bytes X - File Data +--------------+ | X-Wing *.lfd | +--------------+ // SAME AS TIE FIGHTER *.lfd +-----------------------+ | X-Wing Alliance *.imc | +-----------------------+ 4 - Header (MCMP) 1 - null 4 - Number Of Files [-1] 4 - Unknown // for each file 1 - null 4 - Offset? 4 - Flags? X - File Data +---------------------------------+ | You Don't Know Jack *.srf (big) | +---------------------------------+ // This format is probably not an archive! // BIG Endian format! 4 - Header (srf1) 4 - Archive Size // For each file 4 - File Size (including these two 4-byte fields) 4 - File Type/Extension (32 terminated) X - File Data +---------+ | Z *.rsc | +---------+ 2 - Number Of Files // for each file 4 - File Offset X - File Data +----------------+ | Zanzarah *.pak | +----------------+ // NOTE: The files in the directory are NOT in the same order as the files in the archive // ie. file 1 in the directory may actually be file 3827 in the archive, etc. 4 - null 4 - Number Of Files? // for each file 4 - Filename Length X - Filename (including ..\ at the front of the filename) 4 - Offset (relative to the end of the archive +4) 4 - Length X - File Data +-----------------------------+ | Zero Population Count *.sce | +-----------------------------+ // This archive uses BIG_ENDIAN numbering !! 2 - Unknown (2) 2 - Unknown (1) 64 - File Description? (MAP) (null) 4 - Unknown 4 - Directory Offset 2 - Number Of Files 2 - Unknown 2 - Unknown 2 - Unknown 44 - null // Go to dirOffset // for each file 4 - File Offset 4 - File Length 2 - File ID (Incremental, starting at 0) 2 - Unknown (0/2/4) 2 - Unknown (0/4) 4 - Unknown (0/1/3/20/28) 66 - Filename (null) +-----------------------------+ | Zero Population Count *.shp | +-----------------------------+ // This archive uses BIG_ENDIAN numbering !! // The first file offset is 2048 // Keep reading through the directory until the Offset is all 255's and the size is 0. // All dir entries from this point onwards follow the same pattern. // for each file 4 - null 4 - File Offset 4 - File Size 4 - Padding (all 255's) 16 - null X - File Data +-----------------------------+ | Zero Population Count *.snd | +-----------------------------+ // This archive uses BIG_ENDIAN numbering !! // Continue reading until File ID == 0 4 - Version (1) 4 - Header (snd2) 4 - Unknown 246 - null // for each file 4 - File ID (incrementing by +10, starting at 1000) 2 - Stereo/Mono? (1) 2 - Bitrate? (32) 8 - null 4 - File Type (0=?, 1=File, 4=?) 2 - null 4 - File Offset 4 - File Size 4 - File Size 30 - null X - File Data +-------------+ | Zorro *.gxl | +-------------+ 2 - Unknown 50 - Header (Copyright (c) Genus Microprogramming, Inc. 1998-94) or (Copyright (c) Genus Microprogramming, Inc. 1998-90) 2 - Unknown (100) 74 - Unknown // for each file 1 - null 8 - Filename (terminated by spaces) 4 - File Extension (including the .) 1 - null 4 - File Offset 4 - File Size 2 - Unknown 2 - Unknown X - File Data