Resident Evil 3 DAT: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>PmData
m (Formatting)
imported>Ikskoks
No edit summary
 
(22 intermediate revisions by 3 users not shown)
Line 2: Line 2:


== DAT ==
== DAT ==
{{GRAFPageMisc|
{{GRAFPageMisc}}
endian=Little Endian|
date_posted=16:37, 18 May 2007 (CDT)}}


=== Format Specifications ===
=== Format Specifications ===
{{GRAFPageFormat|1=
{{GRAFPageFormat|1=


{{BlockDescription|Header data}}
{{BlockDescription|// Header data}}
uint32 {5} &nbsp; - Unknown1<br>
: uint32 {5} &nbsp; - Unknown1
char   {1} &nbsp; - Unknown2<br>
: char {1} &nbsp;&nbsp;&nbsp; - Unknown2


byte   {x} &nbsp; - Top level directory filename {{InlineComment|(null padded)}}<br>
: byte {x} &nbsp;&nbsp;&nbsp; - Top level directory filename {{InlineComment|(null padded)}}


uint32 {1} &nbsp; - Absolute offset to subdirectory data {{InlineComment|(value read here must be multiplied by 8)}}<br>
: uint32 {1} &nbsp; - Absolute offset to subdirectory data {{InlineComment|(value read here must be multiplied by 8)}}
uint32 {1} &nbsp; - Length in bytes of subdirectory data<br>
: uint32 {1} &nbsp; - Length in bytes of subdirectory data
byte   {x} &nbsp; - Subdirectory filename {{InlineComment|(null padded)}}
: byte {x} &nbsp;&nbsp;&nbsp; - Subdirectory filename {{InlineComment|(null padded)}}


{{BlockDescription|Subdirectory data}}
{{BlockDescription|// Subdirectory data}}
 
: uint32 {5} &nbsp; - Number of files
{{BlockDescription|File data}}
:{{BlockDescription|// For each file}}
:: uint32 {1} &nbsp; - Absolute offset to file data {{InlineComment|(value read here must be multiplied by 8)}}
:: uint32 {1} &nbsp; - Length in bytes of file data
:: byte {x} &nbsp;&nbsp;&nbsp; - Filename {{InlineComment|(null padded)}}


{{BlockDescription|// File data}}
: uint16 {1} &nbsp; - Relative offset to file content
: uint16 {1} &nbsp; - Number of blocks
: uint32 {1} &nbsp; - Length in bytes of file content {{InlineComment|(length of decompressed file if compression is set)}}
: char {8} &nbsp;&nbsp;&nbsp; - XOR encrypted string {{InlineComment|Null padded string. The latest byte is the value to use to 'decrypt' the other bytes of this string using XOR. The string is either "NotComp\0" (non compressed file) or "Hi_Comp\0" (compressed file).}}
:{{BlockDescription|// File block data}}
::uint32 {number of blocks} &nbsp; - Start value for decryption
::uint32 {number of blocks} &nbsp; - Length in bytes of a file block
: byte {x} &nbsp;&nbsp;&nbsp; - Crypted and compressed file content {{InlineComment|To read the file content: for each block, decryption must be performed first, then optional decompression.}}
}}
}}


=== Notes and Comments ===
=== Notes and Comments ===
None
 
* Decryption is done using a simple XOR, byte per byte. The tricky part is to know which byte to use as a key.
* Decompression is a modified LZSS routine.


=== MultiEx BMS Script ===
=== MultiEx BMS Script ===
Line 38: Line 50:


=== Games ===
=== Games ===
Resident Evil 3 (PC)
* Resident Evil 3 (PC)
<br><br>
 
 


=== See Also ===
None


{{GRAFPageFooter}}
[[Category:XOR encryption]]
[[Category:File Format]]

Latest revision as of 14:22, 4 April 2021

Back to index | Edit this page

DAT

Format Specifications

// Header data
uint32 {5}   - Unknown1
char {1}     - Unknown2
byte {x}     - Top level directory filename (null padded)
uint32 {1}   - Absolute offset to subdirectory data (value read here must be multiplied by 8)
uint32 {1}   - Length in bytes of subdirectory data
byte {x}     - Subdirectory filename (null padded)

// Subdirectory data

uint32 {5}   - Number of files
// For each file
uint32 {1}   - Absolute offset to file data (value read here must be multiplied by 8)
uint32 {1}   - Length in bytes of file data
byte {x}     - Filename (null padded)

// File data

uint16 {1}   - Relative offset to file content
uint16 {1}   - Number of blocks
uint32 {1}   - Length in bytes of file content (length of decompressed file if compression is set)
char {8}     - XOR encrypted string Null padded string. The latest byte is the value to use to 'decrypt' the other bytes of this string using XOR. The string is either "NotComp\0" (non compressed file) or "Hi_Comp\0" (compressed file).
// File block data
uint32 {number of blocks}   - Start value for decryption
uint32 {number of blocks}   - Length in bytes of a file block
byte {x}     - Crypted and compressed file content To read the file content: for each block, decryption must be performed first, then optional decompression.

Notes and Comments

  • Decryption is done using a simple XOR, byte per byte. The tricky part is to know which byte to use as a key.
  • Decompression is a modified LZSS routine.

MultiEx BMS Script

Not written yet

Supported by Programs

None

Links

Decryption and decompression routines are available on the associated REwiki page.

Games

  • Resident Evil 3 (PC)