Gabriel Knight 3 BRN: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Braddabug
imported>Ikskoks
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 17: Line 17:
uint16 {2}&nbsp;&nbsp; - Minor version of the header <font color="purple">(0)</font> <br>
uint16 {2}&nbsp;&nbsp; - Minor version of the header <font color="purple">(0)</font> <br>
uint16 {2}&nbsp;&nbsp; - Major version of the header <font color="purple">(1)</font> <br>
uint16 {2}&nbsp;&nbsp; - Major version of the header <font color="purple">(1)</font> <br>
uint32 {4}&nbsp;&nbsp; - Total size of the .brn file <br>
uint32 {4}&nbsp;&nbsp; - Total size of the archive <br>
uint32 {4}&nbsp;&nbsp; - Offset to the section directory <br>
uint32 {4}&nbsp;&nbsp; - Offset to the section directory <br>
 
<br>
<font color="blue"> ''' // If the header version is 1.0 then the .brn contains the following stuff: '''</font> <br>  
<font color="blue"> ''' // If the header version is 1.0'''</font> <br>  
 
: uint32 {4}&nbsp;&nbsp; - Executable build number <br>
uint32 {4}&nbsp;&nbsp; - Executable build number <br>
: uint32 {4}&nbsp;&nbsp; - Content build number <br>
uint32 {4}&nbsp;&nbsp; - Content build number <br>
: uint32 {4}&nbsp;&nbsp; - Random number <br>
uint32 {4}&nbsp;&nbsp; - Random number <br>
: SYSTEMTIME {16}&nbsp;&nbsp; - Archive build time <br>
SYSTEMTIME {16}&nbsp;&nbsp; - .brn build time <br>
: SYSTEMTIME {16}&nbsp;&nbsp; - Archive last modified time <br>
SYSTEMTIME {16}&nbsp;&nbsp; - .brn last modified time <br>
: char {100}&nbsp;&nbsp; - Copyright <font color="purple">("Copyright " + (byte)169 + " 1999 Sierra Studios. All rights reserved." + nulls to fill)</font> <br>  
char {100}&nbsp;&nbsp; - Copyright <font color="purple">("Copyright " + <font color="purple">(byte)</font>169 + " 1999 Sierra Studios. All rights reserved." + nulls to fill)</font> <br>  
: char {100}&nbsp;&nbsp; - Archive Build Details <font color="purple">(null terminated)</font> <br>  
char {100}&nbsp;&nbsp; - Archive Build Details <font color="purple">(null terminated)</font> <br>  
<br>
 
<font color="blue"> '''// SECTION DIRECTORY'''</font> <br>
<font color="blue"> '''// Now begins the section directory'''</font> <br>
: uint32 {4}&nbsp;&nbsp; - Number of Sections <br>
 
<br>
uint32 {4}&nbsp;&nbsp; - Number of directory entries <br>
: <font color="blue"> '''// for each section'''</font> <br>
 
:: uint32 {4}&nbsp;&nbsp; - Type of directory <br>  
<font color="blue"> '''// Next there's an array of these directory header entry things'''</font> <br>
:: uint16 {2}&nbsp;&nbsp; - Minor version of the directory <br>  
 
:: uint16 {2}&nbsp;&nbsp; - Major version of the directory <br>  
uint32 {4}&nbsp;&nbsp; - Type of directory <br>  
:: uint32 {4}&nbsp;&nbsp; - Random number <br>  
uint16 {2}&nbsp;&nbsp; - Minor version of the directory <br>  
:: uint32 {4}&nbsp;&nbsp; - Directory checksum <br>  
uint16 {2}&nbsp;&nbsp; - Major version of the directory <br>  
:: uint32 {4}&nbsp;&nbsp; - Size of the directory <br>  
uint32 {4}&nbsp;&nbsp; - Random number <br>  
:: uint32 {4}&nbsp;&nbsp; - Header Section Offset<br>  
uint32 {4}&nbsp;&nbsp; - Directory checksum <br>  
:: uint32 {4}&nbsp;&nbsp; - Directory Offset<br>  
uint32 {4}&nbsp;&nbsp; - Size of the directory <br>  
<br>
uint32 {4}&nbsp;&nbsp; - Header section offset (relative to the beginning of the .brn) <br>  
<font color="blue"> '''// HEADER SECTIONS DIRECTORY'''</font> <br>
uint32 {4}&nbsp;&nbsp; - Directory Offset (relative to the beginning of the .brn) <br>  
: <font color="blue"> '''// for each section (There's two major types, DDir and Data)'''</font> <br>
 
:: uint32 {4}&nbsp;&nbsp; - Data Header <font color="purple">(ataD)</font> <br>  
<font color="blue"> '''// Now there should be an array of all the directories. There's two major types, DDir and Data.'''</font> <br>
:: uint16 {2}&nbsp;&nbsp; - null <br>  
 
:: uint16 {2}&nbsp;&nbsp; - <font color="red"> '' Unknown <font color="purple">(1)</font> '' </font> <br>  
uint32 {4}&nbsp;&nbsp; - Data Header <font color="purple">(ataD)</font> <br>  
:: uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>  
uint16 {2}&nbsp;&nbsp; - null <br>  
:: uint32 {4}&nbsp;&nbsp; - null <br>  
uint16 {2}&nbsp;&nbsp; - <font color="red"> '' Unknown <font color="purple">(1)</font> '' </font> <br>  
:: uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>  
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>  
:: uint32 {4}&nbsp;&nbsp; - End Of Directory Offset <font color="darkgreen">[-5]</font> <br>  
uint32 {4}&nbsp;&nbsp; - null <br>  
:: uint32 {4}&nbsp;&nbsp; - End Of Directory Offset <font color="darkgreen">[-5]</font> <br>  
uint32 {4}&nbsp;&nbsp; - <font color="red"> '' Unknown '' </font> <br>  
:: byte {40}&nbsp;&nbsp;&nbsp; - null <br>  
uint32 {4}&nbsp;&nbsp; - End Of Directory Offset <font color="darkgreen">[-5]</font> <br>  
uint32 {4}&nbsp;&nbsp; - End Of Directory Offset <font color="darkgreen">[-5]</font> <br>  
byte {40}&nbsp;&nbsp;&nbsp; - null <br>  
<br>
<br>
char {4}&nbsp;&nbsp;&nbsp;&nbsp; - Core Header <font color="purple">(EROC)</font> <br>  
char {4}&nbsp;&nbsp;&nbsp;&nbsp; - Core Header <font color="purple">(EROC)</font> <br>  
Line 96: Line 93:


=== External References ===
=== External References ===
http://wiki.rednek.net/index.pl?GameInfo/GK3Barn
http://fwheel.net/bdb/game%20dev%20wiki/wiki/index.pl?GameInfo/GK3Barn
 
 
[[Category:File Format]]

Latest revision as of 13:11, 6 January 2021

Choose archive extension:

BRN


Format Specifications

char {8}     - Header (GK3!Barn)
uint16 {2}   - Minor version of GK3 (0)
uint16 {2}   - Major version of GK3 (1)
uint16 {2}   - Minor version of the header (0)
uint16 {2}   - Major version of the header (1)
uint32 {4}   - Total size of the archive
uint32 {4}   - Offset to the section directory

// If the header version is 1.0

uint32 {4}   - Executable build number
uint32 {4}   - Content build number
uint32 {4}   - Random number
SYSTEMTIME {16}   - Archive build time
SYSTEMTIME {16}   - Archive last modified time
char {100}   - Copyright ("Copyright " + (byte)169 + " 1999 Sierra Studios. All rights reserved." + nulls to fill)
char {100}   - Archive Build Details (null terminated)


// SECTION DIRECTORY

uint32 {4}   - Number of Sections


// for each section
uint32 {4}   - Type of directory
uint16 {2}   - Minor version of the directory
uint16 {2}   - Major version of the directory
uint32 {4}   - Random number
uint32 {4}   - Directory checksum
uint32 {4}   - Size of the directory
uint32 {4}   - Header Section Offset
uint32 {4}   - Directory Offset


// HEADER SECTIONS DIRECTORY

// for each section (There's two major types, DDir and Data)
uint32 {4}   - Data Header (ataD)
uint16 {2}   - null
uint16 {2}   - Unknown (1)
uint32 {4}   - Unknown
uint32 {4}   - null
uint32 {4}   - Unknown
uint32 {4}   - End Of Directory Offset [-5]
uint32 {4}   - End Of Directory Offset [-5]
byte {40}    - null


char {4}     - Core Header (EROC)
char {40}    - Archive Description ("Gabriel Knight III Demo" + nulls to fill)
uint32 {4}   - Unknown

// ENTRY DIRECTORY

// for each file
uint32 {4}   - Offset To File Entry (relative to XXX)


uint32 {4}   - Unknown (1)
uint32 {4}   - Unknown (1)


// DIRECTORY

// for each file
uint32 {4}   - File Length
uint32 {4}   - File Offset (relative to the start of the file data)
uint32 {4}   - Hash?
byte {3}     - Unknown
byte {1}     - Filename Length (not including null)
char {X}     - Filename
byte {1}     - null Filename Terminator


char {X}     - null Padding to the first file offset (multiple of 4096 bytes)


// FILE DATA

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

MultiEx BMS

Not written yet


Supported Programs


External References

http://fwheel.net/bdb/game%20dev%20wiki/wiki/index.pl?GameInfo/GK3Barn