First of all, the main header:
Code: Select all
char signature[4] //DPAC
long Offset? //Always 0x100
long NumDList //The number of entries this file has
long DListSiz //The size of the directory list that is being used. Always NumDList*0x10
long DirSize //The total size of data the directory holds
long NumDListBlk //The total number of possible directories by multiplying it by 0x800
Next is the directory listing, which, simply put, consists of this
Code: Select all
char label[12] //The directory label
short Offset //The offset of the directory by multiplying it by 0x800.
short size //The size of the directory by multiplying it by 0x800.
Code: Select all
char signature[4] // PAC/20
long NumEntries // Theory #2
Immediately following it is the entry group, which is 8 bytes, and consists of
short EntryNum //An ID of sorts. usually subsequent starting from 0
uint24_t Offset //The offset from the beginning of the data where the file is located
uint24_t Size //The size of the file.
Keep in mind that files are not immediately following the next. There may be zero padding in the case of PACs within PACs
