Difference between revisions of "Desert Strike DAT"

From XentaxWiki
Jump to: navigation, search
m (MultiEx BMS Script)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* [[GRAFs|Return to the list of games]]
 
 
Choose archive extension:
 
 
 
== DAT ==  
 
== DAT ==  
  
Line 24: Line 20:
 
<br>
 
<br>
 
</b></tt>
 
</b></tt>
 +
 +
Also consider:
 +
 +
<pre>// MexCom - Recreation of D:\Code\All Official MexFormats\Jungle Strike\dat.bms
 +
// THIS IS AN AUTOMATED SPECIFICATION
 +
// READ WITH CARE
 +
// ----------------------------
 +
// LEGEND
 +
// ----------------------------
 +
// ==> (Jump to offset)
 +
// #DECLARE (Set variable to value)
 +
// $$ CALCULATE (Calculate a new value)
 +
// ** (Section that repeats itself on condition)
 +
// // (Comment)
 +
// uint32{4} (Unsigned 32-bit value, 4 bytes)
 +
// uint16{2} (Unsigned 16-bit value, 2 bytes)
 +
// ubyte{1} (Unsigned 8-bit value, 1 byte)
 +
// char{n} (String value, n bytes in length
 +
// ----------------------------
 +
 +
 +
// Format Specification
 +
 +
 +
uint32{4} FC
 +
#DECLARE CP = CURRENT OFFSET
 +
$$ CALCULATE CP + 12
 +
$$ CALCULATE FC - 1
 +
 +
 +
==>CP
 +
 +
 +
** Start Repeated entry (T) {FC}
 +
#DECLARE FOO = CURRENT OFFSET
 +
char{8}  Filename of resource (FN)
 +
uint32{4} Offset of resource (FO)
 +
uint32{4} DUM
 +
#DECLARE CP = CURRENT OFFSET
 +
char{8}  FD
 +
uint32{4} FS
 +
$$ CALCULATE FS - FO
 +
 +
 +
// Resources have a name (FN), are located at FO and have a size of FS
 +
 +
 +
==>CP
 +
** End Repeated entry (T)
 +
 +
==> End of Archive
 +
#DECLARE FS = CURRENT OFFSET
 +
 +
 +
==>CP
 +
char{8}  Filename of resource (FN)
 +
uint32{4} Offset of resource (FO)
 +
uint32{4} DUM
 +
$$ CALCULATE FS - FO
 +
 +
 +
// Resources have a name (FN), are located at FO and have a size of FS
 +
// ----------------------------
 +
// MexCom - Recreation complete
 +
</pre>
  
 
=== MultiEx BMS Script ===  
 
=== MultiEx BMS Script ===  
Line 56: Line 117:
 
=== Compatible Programs ===  
 
=== Compatible Programs ===  
  
 +
* [[MultiEx_Commander|MultiEx Commander]]
 
* [[Game Extractor|Game Extractor]]<br>
 
* [[Game Extractor|Game Extractor]]<br>
 
<br>
 
<br>
 +
 
=== Other Games ===  
 
=== Other Games ===  
  
 
These games also use this file format<br>
 
These games also use this file format<br>
* [[Desert Strike|Desert Strike]]
+
* Desert Strike *.dat
* [[Jungle Strike|Jungle Strike]]
+
* Jungle Strike *.dat
 +
 
 +
 
 +
[[Category:File Format]]

Latest revision as of 12:56, 4 January 2021

DAT


Format Specifications

uint64 {8}   - Number Of Files [-1]
byte {16}    - null

// for each file

uint32 {4}   - Offset
uint16 {2}   - File ID?
uint16 {2}   - Unknown
char {8}     - Filename


byte {X}     - File Data

Also consider:

// MexCom - Recreation of D:\Code\All Official MexFormats\Jungle Strike\dat.bms
// THIS IS AN AUTOMATED SPECIFICATION
// READ WITH CARE
// ----------------------------
// LEGEND
// ----------------------------
// ==> (Jump to offset)
// #DECLARE (Set variable to value)
// $$ CALCULATE (Calculate a new value)
// ** (Section that repeats itself on condition)
// // (Comment)
// uint32{4} (Unsigned 32-bit value, 4 bytes)
// uint16{2} (Unsigned 16-bit value, 2 bytes)
// ubyte{1} (Unsigned 8-bit value, 1 byte)
// char{n} (String value, n bytes in length
// ----------------------------


// Format Specification


uint32{4}		FC
#DECLARE CP = CURRENT OFFSET
$$ CALCULATE CP + 12
$$ CALCULATE FC - 1


==>CP


** Start Repeated entry (T) {FC}
#DECLARE FOO = CURRENT OFFSET
char{8}  		Filename of resource (FN)
uint32{4}		Offset of resource (FO)
uint32{4}		DUM
#DECLARE CP = CURRENT OFFSET
char{8}  		FD
uint32{4}		FS
$$ CALCULATE FS - FO


// Resources have a name (FN), are located at FO and have a size of FS


==>CP
** End Repeated entry (T)

==> End of Archive
#DECLARE FS = CURRENT OFFSET


==>CP
char{8}  		Filename of resource (FN)
uint32{4}		Offset of resource (FO)
uint32{4}		DUM
$$ CALCULATE FS - FO


// Resources have a name (FN), are located at FO and have a size of FS
// ----------------------------
// MexCom - Recreation complete 

MultiEx BMS Script

Get FC Long 0 ;
SavePos CP 0 ;
Math CP += 12 ;
Math FC -= 1 ;
GoTo CP 0 ;
For T = 1 To FC ;
SavePos FOO 0 ;
GetDString FN 8 0 ;
Get FO Long 0 ;
Get DUM Long 0 ;
SavePos CP 0 ;
GetDString FD 8 0 ;
Get FS Long 0 ;
Math FS -= FO ;
Log FN FO FS FOO 0 ;
GoTo CP 0 ;
Next T ;
GoTo EOF 0 ;
SavePos FS 0 ;
GoTo CP 0 ;
GetDString FN 8 0 ;
Get FO Long 0 ;
Get DUM Long 0 ;
Math FS -= FO ;
Log FN FO FS FOO 0 ;

Compatible Programs


Other Games

These games also use this file format

  • Desert Strike *.dat
  • Jungle Strike *.dat