Reverse Engineering .ips Files?

Discussion in 'Sony PlayStation 1 & 2' started by Sakuyal, Aug 23, 2018.

  1. Sakuyal
    OP

    Sakuyal Newbie

    Newcomer
    1
    Nov 3, 2012
    United States
    Hello,

    I'm trying to extract the movies from the PS2 games Digital Devil Saga and Digital Devil Saga 2, most of which are in .ips format. I've done some sleuthing and the most I've discovered is that "As near as I can tell, IPS is essentially an IPU video interleaved with ADPCM audio" from a forum post.

    I found a tool called IPUDecoder which can decode video from the few .ipu files on the disks but unfortunately errors out when I try .ips files. However since the source code is available I'm considering attempting to modify it in order to extract .ips files as well. I don't care about getting the audio with these--just the video would be enough.

    Since I've never attempted reverse engineering before, I wanted to ask if anyone had some advice on where to start, particularly in finding differences between the .ipu and .ips files and how those differences may translate to code.

    Thanks in advance.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    22
    Nov 21, 2005
    United Kingdom
    Filtering out the IPS patching format from that search must have been some feat.

    Anyway no idea on these specific formats and if the usual suspects of http://wiki.xentax.com/index.php/Game_File_Format_Central and https://wiki.multimedia.cx/index.php?title=Category:Game_Formats and your own searches that have taken you thus far have come up short then you get to go from the top.

    Interleaving as it pertains to video then (which also means audio as we kind of left the silent movie thing behind some time before computer games were a thing). The general idea is you don't want random reading of an optical disc. To that end if you stick a few hundred megs of video before a few dozen megs of audio (still more than you want to put in RAM on a system that old) you will get lots of it, and as the video alone might well be pushing it to the limit... To work around that you stick a chunk of video and its matching audio, grab and decode both, grab a new chunk, decode...
    The classic example of this would be the audio video interleaved, aka AVI that some are going to tell me is a forgotten format in these days of MP4 and MKV (both superior formats which also do interleaving but enough of that). Indeed I would probably first point you at such a thing. Game formats have a habit of being a bit simpler, not to mention software patents *spits* exist in Japan and the US and meant for some it was easier to make such a format (Microsoft introduced AVI, though some of the later versions/forks/hacks/offshoots were from different parties aiming to get it to do slightly more than standard) rather than pay patent fees so you might get a tiny tiny twist to dodge that.
    https://docs.microsoft.com/en-us/windows/desktop/directshow/avi-riff-file-reference is a bit dry and there are probably nicer to read options but go with that. Alternatively you might also benefit from looking at the MPG format or the various other video formats (especially if they are from the same company*). Do also remember that you are playing with hardware of the day so you will not be expecting to see anything really really fancy like we see in full bore MKV today (no crazy subs, chapters, possibly even variable bitrate audio would be a stretch).

    *this need not be the devs of the games you mention -- many a company exists to make these media formats (you have probably seen a logo for Rad/Bink Video in the startup screens for games, of if Japanese games are more your thing then CRI Middleware) so they often buy in such tools rather than task their devs to make their own.

    By the way if it is ADPCM audio then you should be able to decode that as well -- it is about as simple as audio gets (only PCM or the raw components of that are any simpler, and ADPCM is just that with a tiny bit of data compression wound in there) and any number of decoders should be able to handle it.
     
Loading...