OBD:Instance file format: Difference between revisions

m
clarified and corrected OniSplit checksum note that has been confusing me – still not sure that all the listed types are stored in 1.1 format since the statement about TXMP was incorrect (unless this was written and true for OS 1.0?)
(corrections for .oni and OniX formats)
m (clarified and corrected OniSplit checksum note that has been confusing me – still not sure that all the listed types are stored in 1.1 format since the statement about TXMP was incorrect (unless this was written and true for OS 1.0?))
 
(One intermediate revision by the same user not shown)
Line 31: Line 31:
*0x0003BA70A8DBAE11 - templates compatible with PlayStation 2 engine
*0x0003BA70A8DBAE11 - templates compatible with PlayStation 2 engine
<!--*0x0000000000000000 (blank) - for use with [[OniX]] engine, which instead handles data versioning using the 0x3C field below-->
<!--*0x0000000000000000 (blank) - for use with [[OniX]] engine, which instead handles data versioning using the 0x3C field below-->
OniSplit's .oni files use PC 1.0 checksum by default and 1.1 checksums when holding data that is stored differently in the 1.1 format (SNDD, TXMP, AGQG, M3GM, IGSt, TSFT/TSGA, TRAM/TREX) }}
OniSplit's .oni files use PC 1.0 checksum by default and 1.1 checksum when storing data that comes from the 1.1 engine and which perceptibly differs in format for that engine (AGQG, IGSt, M3GM, SNDD, TRAM, TSFT, TSGA, but not TXMP) }}
{{OBDtr| 0x08 | uint32  | | 31 33 52 56 | '13RV'    | .dat version (meant to be read as "VR31")<br>OniSplit's .oni files use '23RV' ("VR32") instead<!--<br>OniX's [[Oni (folder)|GDFX]] uses '33RV' ("VR33") to signify that the new data versioning system is in use--> }}
{{OBDtr| 0x08 | uint32  | | 31 33 52 56 | '13RV'    | .dat version (meant to be read as "VR31")<br>OniSplit's .oni files use '23RV' ("VR32") instead<!--<br>OniX's [[Oni (folder)|GDFX]] uses '33RV' ("VR33") to signify that the new data versioning system is in use--> }}
{{OBDtr| 0x0C | uint16  | | 40 00      | 64        | size of this header }}
{{OBDtr| 0x0C | uint16  | | 40 00      | 64        | size of this header }}
Line 42: Line 42:
{{OBDtr| 0x20 | uint32  | | A0 BC 03 00 | 0x03BCA0  | data block offset }}
{{OBDtr| 0x20 | uint32  | | A0 BC 03 00 | 0x03BCA0  | data block offset }}
{{OBDtr| 0x24 | uint32  | | A0 35 25 00 | 2438560  | data block size }}
{{OBDtr| 0x24 | uint32  | | A0 35 25 00 | 2438560  | data block size }}
{{OBDtr| 0x28 | uint32  | | 40 F2 28 00 | 0x28F240  | name block offset }}
{{OBDtr| 0x28 | uint32  | | 40 F2 28 00 | 0x28F240  | name block offset; will be lower than data block offset for .oni files }}
{{OBDtr| 0x2C | uint32  | | 04 4F 02 00 | 151300    | name block size }}
{{OBDtr| 0x2C | uint32  | | 04 4F 02 00 | 151300    | name block size }}
{{OBDtr| 0x30 | uint32  | | 99 CF 40 00 | (garbage) | used by OniSplit for raw block offset }}
{{OBDtr| 0x30 | uint32  | | 99 CF 40 00 | (garbage) | used by OniSplit for raw/sep block offset }}
{{OBDtr| 0x34 | uint32  | | 90 4F 63 00 | (garbage) | used by OniSplit for raw block size }}
{{OBDtr| 0x34 | uint32  | | 90 4F 63 00 | (garbage) | used by OniSplit for raw/sep block size }}
{{OBDtr| 0x38 | uint32  | | F4 55 5F 00 | (garbage) | unused<!--used by OniX for data versioning; the three high bytes contains the highest data version (timestamp) found in any instance in this .dat; see instance descriptor table's 0x10 for format--> }}
{{OBDtr| 0x38 | uint32  | | F4 55 5F 00 | (garbage) | unused<!--used by OniX for data versioning; the three high bytes contains the highest data version (timestamp) found in any instance in this .dat; see instance descriptor table's 0x10 for format--> }}
{{OBDtr| 0x3C | uint32  | | 90 4F 63 00 | (garbage) | unused<!--used by OniX for content versioning; the three high bytes contain the highest content version (timestamp) found in any instance in this .dat; see instance descriptor table's 0x10 for format--> }}
{{OBDtr| 0x3C | uint32  | | 90 4F 63 00 | (garbage) | unused<!--used by OniX for content versioning; the three high bytes contain the highest content version (timestamp) found in any instance in this .dat; see instance descriptor table's 0x10 for format--> }}
Line 283: Line 283:


==Name block==
==Name block==
This final segment of the file stores all the instance names as C-style ASCII strings (terminated by a zero byte). We peeked at this before when we looked at the instance descriptor for SUBTsubtitles. The start of this block is 32-byte aligned but after that the strings are simply packed end to end, separated only by their null terminator. As with the data block, the name block's starting point is given in the header, in this case 0x28F240.
This final segment of the file (third-to-last in a .oni, followed by the data and raw/sep blocks) stores all the instance names as C-style ASCII strings (terminated by a zero byte). We peeked at this before when we looked at the instance descriptor for SUBTsubtitles. The start of this block is 32-byte aligned but after that the strings are simply packed end to end, separated only by their null terminator. As with the data block, the name block's starting point is given in the header, in this case 0x28F240.


{{Table}}
{{Table}}
Line 290: Line 290:
|}
|}


These names can be up to 63 characters long, counting the tag. The instance file concludes with the end of the name block.
These names can be up to 63 characters long, counting the tag. The instance file concludes with the end of the name block, or the raw/sep block in a .oni file.


{{OBD}}
{{OBD}}