Oni (PlayStation 2): Difference between revisions

conciser wording, a couple corrections, and wiki formatting touch-up
(→‎Binary differences: tablification etc)
(conciser wording, a couple corrections, and wiki formatting touch-up)
Line 34: Line 34:
* The text of the PS2 credits is somewhat different; see [[Quotes/Credits#PS2_outro_differences|HERE]] for details.
* The text of the PS2 credits is somewhat different; see [[Quotes/Credits#PS2_outro_differences|HERE]] for details.


==Data storage: similarities, discrepancies, anomalies==
==Data storage==
The root directory of the PS2 Oni CD is roughly equivalent to the [[Oni_(folder)|Oni folder]] of a PC or Mac installation. This isn't clear at first, though, as the names of most files and folders are reduced to single- or double-digit codes. Actual names are reconstituted at runtime (by the game engine SLUS_200.64) using binary lookup tables named INDEX.DIR, which are present in every directory that has been subjected to reindexation. Possibly this was done to accommodate a file system such as MS-DOS on one of the machines involved in making the CD (MS-DOS filenames are case-insensitive, with a maximum of 8 characters for the filename and 3 characters for the "extension"). After decoding, the directory tree is as follows.
The root directory of the PS2 CD-ROM is roughly equivalent to the [[Oni (folder)|Oni folder]] of a Windows or Mac installation. This isn't clear at first, as the names of the files and folders that would be found in a PC installation are represented by numbers due to the PS2 file system being limited to [[wp:8.3 filename|8+3 naming]]. The actual names for these files are given in plain-text directory listings named INDEX.DIR alongside the renamed files. After assigning these names, the directory tree is as follows.
{|border=1 cellspacing=0 style="font-size:75%"
{|border=1 cellspacing=0 style="font-size:75%"
|-
|-
!Actual name on disk
!Name on disk
!Decoded name if any
!Indexed name
!Notes
!Notes
|-valign=top
|-valign=top
Line 71: Line 71:
***(see [[IGMD]] for an expanded list)
***(see [[IGMD]] for an expanded list)
*Palette folder
*Palette folder
**Palette files referenced by a level's [[OBD:TXMP|TXMP]]
**Palette files referenced by a level's [[TXMP]]
*Raw data folder
*Raw data folder
**.raw files referenced from the respective .dat
**.raw files referenced from the respective .dat
*Separate data folder
*Separate data folder
**.sep files referenced from the respective .dat
**.sep files referenced from the respective .dat
*[[Intro]] and [[Outro]] sequences in Bink video format (unused)
*[[Intro]] and [[outro]] sequences in Bink video format (unused)
*[[OBD:Instance_file_format|Instance files]] (main game data structures, c.f. [[OBD:Oni_Binary_Data|OBD]])
*[[OBD:Instance file format|Instance files]] (game data files)
|-valign=top
|-valign=top
|colspan=2|
|colspan=2|
Line 84: Line 84:
*MODULES/
*MODULES/
**IOPRP16.IMG
**IOPRP16.IMG
**LIBSD.IRX, MCMAN.IRX, MCSERV.IRX,<br />PADMAN.IRX, SDRDRV.IRX, SIO2MAN.IRX
**LIBSD.IRX, MCMAN.IRX, MCSERV.IRX, PADMAN.IRX,<br>SDRDRV.IRX, SIO2MAN.IRX
**ONISS2.IRX  
**ONISS2.IRX  
*SOUNDS/
*SOUNDS/
Line 94: Line 94:
*PERSIST.DAT
*PERSIST.DAT
|
|
*Icons folder. The 18.12.2000 dev build has an additional "icons" folder (empty)
*Icons folder (the 18.12.2000 dev build also has an empty "icons" folder)
**Oni icon. The 18.12.2000 dev build instead has SLIME#.ICO (#=1,2,3)
**Oni icon (the 18.12.2000 dev build instead has SLIME[1-3].ICO)
*Standard folder for application modules (hardware drivers etc)
*Standard folder for application modules (hardware drivers, etc.)
**An "image" module (the 18.12.2000 dev build also has IOPRP165.IMG)
**An "image" module (the 18.12.2000 dev build also has IOPRP165.IMG)
**Six standard modules typical of PS2 games (the 18.12.2000 dev build<br />has ten more such modules, and one more in a separate OLD folder)
**Six standard modules typical of PS2 games (the 18.12.2000 dev build has ten more modules,<br>plus one in an OLD folder)
**A custom module specific to the game (Oni's "Sound System 2")
**A custom module specific to the game (Oni's "SoundSystem2")
*A separate folder containing the waveform data of all the sounds.
*A separate folder containing the sound data
**Per-level folders
**Per-level folders
***SOUND.DAT referenced from level#_Final.dat, .SEP looked up from .DAT
***SOUND.DAT referenced from level#_Final.dat, .SEP looked up from .DAT
**Three short sounds of unclear purpose.
**Three short sounds of unclear purpose
*Intro and outro video sequences (18.12.2000 dev build has INTRO.PSS and OUTRO.PSS).
*Intro and outro video sequences (18.12.2000 dev build has INTRO.PSS and OUTRO.PSS)
*Some data for the loading screen interface (absent for the 18.12.2000 dev build).
*Game data for the loading screen interface (absent for the 18.12.2000 dev build)
*A savegame/preference file inherited from a PC build (unused).
*A savegame/preference file (unused; see "File notes" below)
|-valign=top
|-valign=top
|
|
Line 115: Line 115:
*Preferences.txt
*Preferences.txt
|
|
:A duplicate of PERSIST.DAT (also unused).
*A duplicate of PERSIST.DAT (also unused, see "File notes" below)
:A vestigial file listing hard drive locations (absent for 18.12.2000 dev build).
*A vestigial file listing locations for the game data (absent in 18.12.2000 dev build)
|-
|-
|colspan=2|
|colspan=2|
Line 122: Line 122:
*SYSTEM.CNF
*SYSTEM.CNF
|
|
:The game binary (a.k.a. executable a.k.a. engine)
*The game binary (a.k.a. executable)
:Standard boot information for a PS2 game.
*Standard boot information for a PS2 game
|}
|}
;Notes
 
*We find the familiar [[GameDataFolder]] at the expected location, as well as the [[IGMD]] subtree (level logic scripts) and the instance files ('''level#_Final.dat'''). Raw and separate files ('''level#_Final.raw''' and '''level#_Final.sep''') are fundamentally the same as for Mac and PC demo, except that they are tucked away into '''raw''' and '''sep''' directories. There is also a '''pal''' directory holding a set of '''level#_palette.pal''' files (one per level); in PS2 Oni, all the textures (TXMP files) use compact 8-bit storage (i.e., each pixel is an index into a palette of 256 colors), as opposed to PC and Mac TXMPs which typically use 16- or 24-bit color.
 
*'''intro.bik''' and '''outro.bik''' are not used by the engine (they're superseded by '''INTRO2.PSS''' and '''OUTRO.PSS'''); mostly they are just taking up 56 MB of storage space for nothing (the .PSS versions take up 188 MB).
;File notes
*persist.dat and PERSIST.DAT are [[Oni_(folder)/persist.dat|savegame/preference files]] of the Little Endian variety (i.e., created by a PC version of Oni), abnormally small. The PS2 engine doesn't use them, and relies on memory cards instead.
*We find the familiar [[GameDataFolder]] at the expected location, as well as the [[IGMD]] subtree (level logic scripts) and the instance files ('''level#_Final.dat'''). Raw and separate files ('''level#_Final.raw''' and '''level#_Final.sep''') are fundamentally the same as for Mac and Windows demo, except that they are tucked away into '''raw''' and '''sep''' directories. There is also a '''pal''' directory holding a set of '''level#_palette.pal''' files (one per level); in PS2 Oni, all the textures (TXMP files) use compact 8-bit storage (i.e., each pixel is an index into a palette of 256 colors), as opposed to Windows and Mac TXMPs which typically use 16- or 24-bit color.
*Sounds are encoded using Sony's VAG format/codec, and (unlike for other Oni versions) their waveform data isn't stored in '''level#_Final.raw''' (see [[OBD:SNDD#PS2_implementation|SNDD]]). Instead the SNDD instances in '''level#_Final.dat''' contain links to '''SOUNDS/LEVEL#/SOUND.DAT''', which in turn references waveform data stored in '''SOUNDS/LEVEL#/SOUND.SEP''' (which contain raw VAG data without a header). The purpose of '''SOUNDS/LEVEL#/SOUND.RAW''' is not known (it is raw VAG data as well, with a size of about 1MB per chapter). Both the '''SOUND#.RAW''' files and the '''BINK#.VAG''' files are referenced from '''ONISS2.IRX''' directly, without involving the SNDD entries from '''level#_Final.dat''' files.
*'''intro.bik''' and '''outro.bik''' are not used by the engine (they're superseded by '''INTRO2.PSS''' and '''OUTRO.PSS'''); they're just taking up 56 MB of storage space for nothing (the .PSS versions take up another 188 MB).
*LOADING.RAW (absent for the 18.12.2000 dev build) appears to hold data for the loading screen.
*persist.dat and PERSIST.DAT are [[persist.dat|savegame/preference files]] of the little-endian variety (i.e., created in Windows or by the PS2) and are byte-identical to each other. Actual save data is stored in a standard PS2 format on the memory card (obviously the game cannot write to files on disc anyway). They might be a development relic of the PS2 port since they are much smaller than a PC persist.dat (also, one is named in all-caps like the other files Rockstar added to the game directory).
;Scripts
;Scripts
:The PS2 level scripts are similar to [[OBD:Localization/German|some Mac Oni versions]] or the Japanese PC version, in that they include some pre-beta folders (script logic intended for now-missing chapters and test levels).
:The PS2 level scripts are similar to [[OBD:Localization/German|some Mac Oni versions]] or the Japanese Windows version, in that they include some pre-beta folders (script logic intended for now-missing chapters and test levels).
;Binary data
;Binary data
:The internal structure of '''level#_Final.dat''' and the corresponding '''.raw''' and '''.sep''', is compliant with the "VR31" iteration of instance files, although many resources were optimized for minimal storage space (textures use indexed colors, character animations has been split into a trimmed-down TRAM and an "extra" instance TREX that only exists for combat moves and such, etc). The few discrepancies between the PS2 implementation and the previously documented PC and Mac versions are covered by the [[OBD:Oni_Binary_Database|OBD]] documentation.
:The internal structure of '''level#_Final.dat''' and the corresponding '''.raw''' and '''.sep''' is compliant with the "VR31" iteration of instance files, although many resources were optimized for minimal storage space (textures use indexed colors, character animations has been split into a trimmed-down TRAM and an "extra" instance TREX that only exists for combat moves and such, etc). The few discrepancies between the PS2 implementation and the previously documented Windows/Mac versions are covered by the [[OBD:PS2]] page.
:Sounds are encoded using Sony's VAG format/codec, and (unlike for other Oni versions) their waveform data isn't stored in '''level#_Final.raw''' (see [[OBD:SNDD#PS2 implementation|SNDD]]). Instead the SNDD instances in '''level#_Final.dat''' contain links to '''SOUNDS/LEVEL#/SOUND.DAT''', which in turn references waveform data stored in '''SOUNDS/LEVEL#/SOUND.SEP''' (which contain raw VAG data without a header). The purpose of '''SOUNDS/LEVEL#/SOUND.RAW''' is not known (it is raw VAG data as well, with a size of about 1MB per chapter). Both the '''SOUND#.RAW''' files and the '''BINK#.VAG''' files are referenced from '''ONISS2.IRX''' directly, without involving the SNDD entries from '''level#_Final.dat''' files.


==Patches==
==Patches==
Line 144: Line 145:
!TCRF wiki
!TCRF wiki
!
!
!pnach
!.pnach file
|-
|-
|0033A904<br>00000001
|0033A904<br>00000001
Line 151: Line 152:
|}
|}


The comment at the end of the .pnach line is optional, but you will definitely want to label your patches.
The comment at the end of the .pnach file's line is optional, but you will definitely want to label your patches.


An additional patch for skipping the intro movies is below, courtesy of [[User:Iritscen|Iritscen]]. Place this patch in a .pnach to disable the movie-playing function so that the game skips right to the loading screen for the Main Menu. Make sure not to have this active when finishing the game or you won't see the outro movie and credits.
An additional patch for skipping the intro movies is below, courtesy of [[User:Iritscen|Iritscen]]. Place this patch in a .pnach file to disable the movie-playing function so that the game skips right to the loading screen for the Main Menu. Make sure not to have this active when finishing the game or you won't see the outro movie and credits.


  patch=1,EE,001C726C,word,00000000 # no movies
  patch=1,EE,001C726C,word,00000000 # no movies


[[Category:Oni history]]
[[Category:Oni history]]