GRAF:Act Of War DAT: Difference between revisions
Jump to navigation
Jump to search
imported>Mr.Mouse m (Act Of War moved to GRAF:Act Of War) |
imported>Ikskoks No edit summary |
||
| (20 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{GRAFPageHeader}} | |||
== DAT == | |||
{{GRAFPageMisc}} | |||
== | === Format Specifications === | ||
{{GRAFPageFormat|1=char {4} - Header {{Constant|(edat)}}<br> | |||
uint32 {4} - Length of header after the 10 nulls {{Constant|(18)}}<br> | |||
uint32 {4} - {{Unknown}}<br> | |||
byte {10} - null<br> | |||
uint16 {2} - {{Unknown}} {{Constant|(1)}}<br> | |||
byte {1} - null<br> | |||
uint32 {4} - Directory Offset<br> | |||
uint32 {4} - Directory Length<br> | |||
byte {7} - null | |||
{{BlockDescription| // For each file }} | |||
: byte {X} - File Data | |||
{{BlockDescription| // Directory }} | |||
: {{BlockDescription| // for each group }} | |||
:: uint32 {4} - Group/File Indicator {{InlineComment|(0=file, #=length of this group entry, -#=offset to a previous file entry)}} | |||
:: {{BlockDescription| if (group){ }} | |||
::: uint32 {4} - Length of this group, including the file entries {{InlineComment|(ie relative offset to next group or null)}} | |||
::: char {X} - Group Name | |||
::: byte {X} - null Group Name Terminator | |||
::: byte {0-1} - null Padding to a multiple of 2 bytes {{InlineComment|(ie only exists if groupnameLength+1 is odd)}} | |||
::: {{BlockDescription| } }} | |||
:: {{BlockDescription| else if (file){ }} | |||
::: uint32 {4} - Last File Indicator {{InlineComment|(0=last file in this group, #=length of this file entry)}} | |||
::: uint32 {4} - File Offset | |||
::: uint32 {4} - File Length | |||
::: byte {1} - {{Unknown}} {{Constant|(0)}} {{InlineComment|(something to do with the Filename position?)}} | |||
::: char {X} - Filename | |||
::: byte {X} - null Filename Terminator | |||
::: byte {0-1} - null Padding to a multiple of 2 bytes {{InlineComment|(ie only exists if filenameLength+2 is odd)}} | |||
::: {{BlockDescription| } }} | |||
: | |||
:: uint32 {4} | |||
::: uint32 {4} | |||
::: uint32 {4} | |||
::: byte {1} | |||
::: char {X} | |||
::: byte {X} | |||
::: byte {0-1} | |||
::: | |||
:: {{BlockDescription| else if (previous offset (negative number)){ }} | |||
::: uint32 {4} - Last File Indicator {{InlineComment|(0=last file in this group, #=length of this file entry)}} | |||
::: uint32 {4} - File Offset | |||
::: uint32 {4} - File Length | |||
::: uint16 {2} - null | |||
::: {{BlockDescription| } }}}} | |||
=== Notes and Comments === | |||
* 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 joining 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. | : 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. | : 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. | ||
* [[ | === MultiEx BMS Script === | ||
{{NoBMSScript}} | |||
=== Supported by Programs === | |||
* {{ProgramSupportGameExtracter}} | |||
=== Links === | |||
None | |||
=== Games === | |||
* [[Act Of War]] [[DAT|*.dat]] | |||
{{GRAFPageFooter}} | |||
[[Category: | [[Category:Platform PC|Act Of War DAT]] | ||
[[Category:Complete Almost Done|Act Of War DAT]] | |||
[[Category:Format Conditional Structure|Act Of War DAT]] | |||
[[Category:BMS None|Act Of War DAT]] | |||
[[Category:CE None|Act Of War DAT]] | |||
[[Category:File Format]] | |||
Latest revision as of 00:43, 3 January 2021
Back to index | Edit this page
DAT
- Format type: Archive
- Endianness: Little-endian
Format Specifications
char {4} - Header (edat)
uint32 {4} - Length of header after the 10 nulls (18)
uint32 {4} - Unknown
byte {10} - null
uint16 {2} - Unknown (1)
byte {1} - null
uint32 {4} - Directory Offset
uint32 {4} - Directory Length
byte {7} - null
// For each file
- byte {X} - File Data
// Directory
- // for each group
- uint32 {4} - Group/File Indicator (0=file, #=length of this group entry, -#=offset to a previous file entry)
- if (group){
- uint32 {4} - Length of this group, including the file entries (ie relative offset to next group or null)
- char {X} - Group Name
- byte {X} - null Group Name Terminator
- byte {0-1} - null Padding to a multiple of 2 bytes (ie only exists if groupnameLength+1 is odd)
- }
- if (group){
- else if (file){
- uint32 {4} - Last File Indicator (0=last file in this group, #=length of this file entry)
- uint32 {4} - File Offset
- uint32 {4} - File Length
- byte {1} - Unknown (0) (something to do with the Filename position?)
- char {X} - Filename
- byte {X} - null Filename Terminator
- byte {0-1} - null Padding to a multiple of 2 bytes (ie only exists if filenameLength+2 is odd)
- }
- else if (file){
- else if (previous offset (negative number)){
- uint32 {4} - Last File Indicator (0=last file in this group, #=length of this file entry)
- uint32 {4} - File Offset
- uint32 {4} - File Length
- uint16 {2} - null
- }
- else if (previous offset (negative number)){
Notes and Comments
- 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 joining 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.
MultiEx BMS Script
None written yet.
Supported by Programs
Links
None