Psychonauts PKG

From XentaxWiki
Revision as of 05:45, 12 December 2005 by imported>WATTO
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PKG


Format Specifications

// XBOX ONLY
In the xbox version the .pkg file is zlib compressed. There is a 16 byte header then a compressed zlib archive. The format of this header is:

uint32 {4}   - Header (ZLIB)
uint32 {4}   - Version (1)
uint32 {4}   - Size of decompressed file
uint32 {4}   - Size of compressed file (minus the 16 byte header)


// ARCHIVE HEADER

char {4}   - Header (ZPKG)
uint32 {4}   - Version (1)
uint32 {4}   - First File Offset
uint32 {4}   - Number Of Files In Directory 1
uint32 {4}   - Directory 2 Offset
uint32 {4}   - Number Of Files In Directory 2
uint32 {4}   - Filename Directory Offset
uint32 {4}   - Extension Directory Offset
byte {480}   - null Padding to offset 512


// DIRECTORY 1

// for each file in dir 1
byte {1}     - null
uint16 {2}   - File Extension Offset (relative to the start of the Extension Directory)
byte {1}     - null
uint32 {4}   - Filename Offset (relative to the start of the Filename Directory)
uint32 {4}   - File Offset
uint32 {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
byte {1}     - Junk char
byte {1}     - null
uint32 {4}   - Unknown
uint16 {2}   - File ID (incremental from 1)
uint32 {4}   - Unknown


// FILENAME DIRECTORY

byte {1}     - null


// for each filename
char {X}     - Filename
byte {1}     - null


// EXTENSION DIRECTORY

byte {1}     - null


// for each extension
char {X}     - Extension Name
byte {1}     - null


// FILE DATA

// for each file
byte {X}     - File Data

MultiEx BMS

Not written yet

Supported Programs