User Tools

Site Tools


mission_impossible:sool_engine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mission_impossible:sool_engine [2019/06/19 17:56]
shygoo fix 0B, 0C, 0D
mission_impossible:sool_engine [2019/07/01 18:25] (current)
shygoo last minute notes on sool file structure
Line 1: Line 1:
 ====== SOOL Engine ====== ====== SOOL Engine ======
-Scenaric Object Oriented Language+SOOL (Scenaric Object Oriented Language) is a proprietary scripting language and engine used by Mission Impossible.
  
-  * [[https://​hackmd.io/​D7_UZ5kGSWCAZb_nM2-xHg?edit|Rough decompilation ​of the SOOL Engine]]+  * [[https://​hackmd.io/​@shygoo/​Byq2TYWkr|SOOL Interpreter partial decomp]] 
 + 
 +---- 
 +===== SOOL File structure ===== 
 + 
 +==== File header ==== 
 +^Offset^Type^Name^Description^ 
 +|0x00|char|signature[4] ​   |"​SOOL"​| 
 +|0x04|u32 |fileSize ​       |Size of the sool file.| 
 +|0x08|u16 |numSections ​    ​|Number of interactor sections.| 
 +|0x0A|u8 ​ |padding[2] ​     |Alignment padding.| 
 +|0x0C|u32 |sectionOffsets[]|Array of interactor section offsets. The length of this array is defined by the ''​numSections''​ field.| 
 +|....|u32 |unknownData[] ​  ​|Unknown data. Always the same size as ''​sectionOffsets''​.| 
 + 
 +==== Interactor sections ==== 
 +^Offset^Type^Name^Description^ 
 +|0x00|u16 |offsVars ​       |Offset of the interactor'​s variables.| 
 +|0x02|u16 |offsVarsEnd ​    |End offset of the interactor'​s variables.| 
 +|0x04|u16 |offsElements ​   |Offset of the interactor'​s elements. 0xFFFF if ''​numElements''​ is zero.| 
 +|0x06|u16 |numElements ​    ​|Number of elements.| 
 +|0x08|u16 |unk08 ​          ​|Unknown - always 0xFFFF?| 
 +|0x0A|u16 |specialMethodIdx|An index of ''​methodOffsets''​. Unknown purpose.| 
 +|0x0C|u16 |offsMethodsEnd ​ |End offset ​of the method code.| 
 +|0x0E|u16 |numMethods ​     |Number of methods.| 
 +|0x10|u16 |methodOffsets[|Array of method offsets. The length of this array is defined by the ''​numMethods''​ field.| 
 +|....|u16 |variables[    |Variable definitions. The position and length of this array are defined by the ''​offsVars''​ and ''​offsVarsEnd''​ fields.| 
 +|....|u8 ​ |methodCode[] ​   |Method bytecode. See commands below.| 
 +|....|u8 ​ |garbage[] ​      |If ''​offsMethodsEnd''​ is uneven, there will be one padding byte of an arbitrary value here for alignment.| 
 +|....|elem|elements[] ​     |Element lookup table. Each entry contains two u16 fields for the key and value.|
  
 ---- ----
mission_impossible/sool_engine.1560966974.txt.gz · Last modified: 2019/06/19 17:56 by shygoo