OBD:Instance file format: Difference between revisions

added more clarifying notes about the differences in the .oni format
(corrections for .oni and OniX formats)
(added more clarifying notes about the differences in the .oni format)
 
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}}