5,389
edits
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
*a '''SYSTEM''' folder containing fifteen ELF binaries ('''*.IRX''') and a file called '''IOPRP255.IMG''' | *a '''SYSTEM''' folder containing fifteen ELF binaries ('''*.IRX''') and a file called '''IOPRP255.IMG''' | ||
*the three "binary data" files '''BANKS.DAT''', '''RB.DAT''' and '''STREAMS.DAT''' | *the three "binary data" files '''BANKS.DAT''', '''RB.DAT''' and '''STREAMS.DAT''' | ||
==DAT file format (file table)== | |||
The common format of the three "binary data" files is as follows (illustrated on the example of '''RB.DAT'''). | The common format of the three "binary data" files is as follows (illustrated on the example of '''RB.DAT'''). | ||
Line 12: | Line 12: | ||
{{OBDtr| 0x00 | 4CC | FF0000 | 44 41 56 45 | "DAVE" | a control code }} | {{OBDtr| 0x00 | 4CC | FF0000 | 44 41 56 45 | "DAVE" | a control code }} | ||
{{OBDtr| 0x04 | int32 | FFFF00 | 18 41 00 00 | 16664 | number of file table entries (files or folders) }} | {{OBDtr| 0x04 | int32 | FFFF00 | 18 41 00 00 | 16664 | number of file table entries (files or folders) }} | ||
{{OBDtr| 0x08 | | {{OBDtr| 0x08 | offset | 00FF00 | 00 18 04 00 | 0x41800 | offset to start of file name block, from 0x800, in bytes }} | ||
{{OBDtr| 0x0C | | {{OBDtr| 0x0C | offset | 00FFFF | 00 30 0A 00 | 0xA3000 | offset to start of file data block, from 0x800, in bytes }} | ||
{{OBDtr| 0x10 | char[2032] | FFFFFF | 00 ... |0|padding}} | {{OBDtr| 0x10 | char[2032] | FFFFFF | 00 ... |0|padding}} | ||
{{OBDtrBK|File table, first entry}} | {{OBDtrBK|File table, first entry}} | ||
{{OBDtr| 0x800 | | {{OBDtr| 0x800 | offset |FFC8C8| 00 00 00 00 | 0x00 | offset to file name, from start of file name block, in bytes | ||
*in this case it points to <nowiki>0x800+0x41800+0x00=0x42000</nowiki> | *in this case it points to <nowiki>0x800+0x41800+0x00=0x42000</nowiki> | ||
*the string at that address is '''actlog.txt''' (null-terminated) }} | *the string at that address is '''actlog.txt''' (null-terminated) }} | ||
{{OBDtr| 0x804 | | {{OBDtr| 0x804 | offset |FFFFC8| BC D9 1F 02 | 0x21FD9BC | absolute offset to file data, from start of DAT file, in bytes }} | ||
{{OBDtr| 0x808 | int32 |C8FFC8| 00 08 00 00 | 2048 | uncompressed file size, in bytes }} | {{OBDtr| 0x808 | int32 |C8FFC8| 00 08 00 00 | 2048 | uncompressed file size, in bytes }} | ||
{{OBDtr| 0x80C | int32 |C8FFFF| 94 00 00 00 | 148 | compressed file size, in bytes }} | {{OBDtr| 0x80C | int32 |C8FFFF| 94 00 00 00 | 148 | compressed file size, in bytes }} | ||
{{OBDtrBK|File table, second entry}} | {{OBDtrBK|File table, second entry}} | ||
{{OBDtr| 0x810 | | {{OBDtr| 0x810 | offset |FFC8C8| 0B 00 00 00 | 0x0B | offset to file name, from start of file name block, in bytes | ||
*in this case it points to <nowiki>0x800+0x41800+0x0B=0x4200B</nowiki> | *in this case it points to <nowiki>0x800+0x41800+0x0B=0x4200B</nowiki> | ||
*the string at that address is '''Audio/''' (null-terminated) }} | *the string at that address is '''Audio/''' (null-terminated) }} | ||
{{OBDtr| 0x814 | | {{OBDtr| 0x814 | offset |FFFFC8| 22 D3 1D 02 | 0x21DD322 | absolute offset to file data, from start of DAT file, in bytes | ||
*the address 0x21DD322 points to no actual data in this case | *the address 0x21DD322 points to no actual data in this case | ||
*is it common to folders (as in this case) and empty files }} | *is it common to folders (as in this case) and empty files }} | ||
{{OBDtr| 0x818 | int32 |C8FFC8| 00 00 00 00 | 0 | uncompressed file size (zero; it's a folder) }} | {{OBDtr| 0x818 | int32 |C8FFC8| 00 00 00 00 | 0 | uncompressed file size (zero; it's a folder) }} | ||
{{OBDtr| 0x81C | int32 |C8FFFF| 00 00 00 00 | 0 | compressed file size (also zero) }} | {{OBDtr| 0x81C | int32 |C8FFFF| 00 00 00 00 | 0 | compressed file size (also zero) }} | ||
{{OBDtrBK|File table, third entry}} | {{OBDtrBK|File table, third entry}} | ||
{{OBDtr| 0x820 | | {{OBDtr| 0x820 | offset |FFC8C8| 12 00 00 00 | 0x12 | offset to file name, from start of file name block, in bytes | ||
*in this case it points to <nowiki>0x800+0x41800+0x0B=0x42012</nowiki> | *in this case it points to <nowiki>0x800+0x41800+0x0B=0x42012</nowiki> | ||
*the string at that address is '''Audio/banks/''' (null-terminated) }} | *the string at that address is '''Audio/banks/''' (null-terminated) }} | ||
{{OBDtr| 0x824 | | {{OBDtr| 0x824 | offset |FFFFC8| 22 D3 1D 02 | 0x21DD322 | absolute offset to file data, from start of DAT file, in bytes | ||
*the address 0x21DD322 points to no actual data in this case | *the address 0x21DD322 points to no actual data in this case | ||
*is it common to folders (as in this case) and empty files }} | *is it common to folders (as in this case) and empty files }} | ||
{{OBDtr| 0x828 | int32 |C8FFC8| 00 00 00 00 | 0 | uncompressed file size (zero; it's a folder) }} | {{OBDtr| 0x828 | int32 |C8FFC8| 00 00 00 00 | 0 | uncompressed file size (zero; it's a folder) }} | ||
{{OBDtr| 0x82C | int32 |C8FFFF| 00 00 00 00 | 0 | compressed file size (also zero) }} | {{OBDtr| 0x82C | int32 |C8FFFF| 00 00 00 00 | 0 | compressed file size (also zero) }} | ||
{{OBDtrBK|File table, fourth entry}} | {{OBDtrBK|File table, fourth entry}} | ||
{{OBDtr| 0x830 | | {{OBDtr| 0x830 | offset |FFC8C8| 1F 00 00 00 | 0x1F | offset to file name, from start of file name block, in bytes | ||
*in this case it points to <nowiki>0x800+0x41800+0x1F=0x4201F</nowiki> | *in this case it points to <nowiki>0x800+0x41800+0x1F=0x4201F</nowiki> | ||
*the string at that address is '''Audio/banks/attack.bd''' (null-terminated) }} | *the string at that address is '''Audio/banks/attack.bd''' (null-terminated) }} | ||
{{OBDtr| 0x834 | | {{OBDtr| 0x834 | offset |FFFFC8| 00 00 53 06 | 0x6530000 | absolute offset to file data, from start of DAT file, in bytes }} | ||
{{OBDtr| 0x838 | int32 |C8FFC8| 90 09 03 00 | 199056 | uncompressed file size, in bytes }} | {{OBDtr| 0x838 | int32 |C8FFC8| 90 09 03 00 | 199056 | uncompressed file size, in bytes }} | ||
{{OBDtr| 0x83C | int32 |C8FFFF| 13 85 02 00 | 165139 | compressed file size, in bytes }} | {{OBDtr| 0x83C | int32 |C8FFFF| 13 85 02 00 | 165139 | compressed file size, in bytes }} | ||
{{OBDtrBK|...etc (rest of the file table)}} | {{OBDtrBK|...etc (rest of the file table)}} | ||
|} | |} | ||
Line 70: | Line 70: | ||
With proper decompression, the DAT files extract as follows: [http://geyser.oni2.net/BANKS.DAT.ZIP BANKS.DAT] [http://geyser.oni2.net/RB.DAT.ZIP RB.DAT] [http://geyser.oni2.net/STREAMS.DAT.ZIP STREAMS.DAT] | With proper decompression, the DAT files extract as follows: [http://geyser.oni2.net/BANKS.DAT.ZIP BANKS.DAT] [http://geyser.oni2.net/RB.DAT.ZIP RB.DAT] [http://geyser.oni2.net/STREAMS.DAT.ZIP STREAMS.DAT] | ||
*'''STREAMS.DAT''' holds 22 '''*.stm''' files (21 vocalization sounds and 1 musical piece). See below for the STM format and a link to the converted sound files. | |||
*'''BANKS.DAT''' holds 13 sound sets, each of which is a pair of a '''*.hd''' file (similar to Oni's [[OSGr]]?) and a corresponding '''*.bd''' file (similar to a group of Oni's [[SNDD]] bundled together). The '''*.bd''' files in '''BANKS.DAT''' are identical to the ones stored in '''RB.DAT''' (in the '''Audio/banks/''' folder), and possibly redundant. The '''*.hd''' files are not duplicated in '''RB.DAT''', which instead has plain-text '''*.td''' files (apparently all three file types are supposed to work together, but perhaps '''*.hd''' is just a binary version of '''*.td''' with some additional features) | |||
*'''RB.DAT''' holds all the rest of the game data: textures, levels, characters, animations, scripts, etc. | |||
==Commonplace file formats== | |||
Some of the files in '''RB.DAT''' are either in plain text or in otherwise widely known formats that can be opened by third-party programs. Here is the list of such commonplace formats used in Oni2. | |||
*'''*.txt''' : [[wp:Text_file|Text file]]s. Some in Windows format (CR+LF at EOL), some in Unix format (only LF at EOL) | |||
*'''*.mb''' : binary file used by Maya 3D program (work-in-progress models of some characters and props) | |||
*'''*.wav''' : [[wp:WAV]]. a common format for the uncompressed storage of sounds (through pulse-code modulation) | |||
*'''*.tga''' : [[wp:Truevision_TGA]]. a versatile texture format that supports RLE compression, MIP map storage, indexed as well as RGB color schemes, transparency (and therefore is widely used in games). | |||
*'''*.xml''' : [[wp:XML]]. | |||
*'''*.cue''' : [[wp:Cue_sheet_(computing)]]. Occurs only once, as '''rb.cue''' at the root of '''RB.DAT''' | |||
*'''*.m2v''' : [[wp:MPEG-2]]. Video files. Occur in the form of '''movies/angel.m2v''' and '''movies/rockstarlogo.m2v''' | |||
==Plain text file formats== | |||
Apart from XML files (and some TXT files; mostly debug logs), Oni2 has many custom plain-text files, listed below. | |||
'''Save files -''' occurs only in the form of '''sample.oni2save''' at the root of '''RB.DAT''' | |||
'''Template files -''' occurs only in the form of '''template/rb.template''' and a couple of '''layout.template''' files (see '''Layout files''' below) | |||
'''Layout files -''' files that specify the layout of a level. They're called names like '''layout.et''' (entities), '''layout.graphs''', '''layout.lights''', '''layout.paths''' | |||
'''Script files -''' files ending in '''.oni''', rather similar to [[BSL]]. Can be compiled into binary '''*.onc''' files. | |||
'''Model files -''' files ending in '''.mod''' or '''.xmod'''. Version 1 format is plain-text, version 2 is binary (see below for both). | |||
'''Pathfinding files -''' files ending in '''.room''', '''.bsp''' or '''.mesh''' (collection of interconnected pathfinding meshes) | |||
'''Fighting state machines -''' files ending in '''.fsm''', found in '''Statemachine/''' | |||
'''Attack patterns -''' files ending in '''.atk''', found in '''Statemachine/''' and '''layout/fightai_grapple/statemachine_backup/''' | |||
... | |||
==STM file format (sound stream)== | |||
There are some regular WAV files in '''Audio/banks/wav/ ''' [and some audio streams encoded in the ''*.bd''' files, not yet reverse engineered at the time of writing [[User:Geyser|geyser]] ([[User talk:Geyser|talk]]) 01:40, 6 February 2018 (CET) ], but there is also a WAV-like format called STM (unrelated to the MIDI-like STM file mentioned on Wikipedia). | |||
... | |||
==TEX file format (texture)== | |||
A texture format similar to Oni's [[TXMP]]. | |||
... | |||
==MOD file format (plain text)== | |||
Most of Oni2's models are in a plain text format identified as "version: 1.10". | |||
... | |||
==MOD file format (binary)== | |||
The more recent model format is a binary format identified as "version: 2.10". Apart from the more compact binary storage, it seems equivalent to the plain-text 1.10 format described above. | |||
... | |||
==ANIM file format== | |||
... |