The VG Resource
Hacking PS2 game files - Extracting images? - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Spriters Resource (https://www.vg-resource.com/forum-110.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-114.html)
+---- Thread: Hacking PS2 game files - Extracting images? (/thread-25884.html)



Hacking PS2 game files - Extracting images? - supercom32 - 09-16-2014

Hey Everyone,

I've been asked by a friend to help them rip some graphics from a PS2 game so I've given it my best shot.

From what I can tell, the game stores images in non-discript *.BIN files concatinated together, which appears (to laymen eyes) to contain palette information + raw BMP data. I can see this because if I view the data using something like GIMP I can see the graphics (though they look corrupt).

Here is an example of what I mean:

[Image: example.png]

As you can see, the raw BMP data can be seen for the first image, but the palette information is all wrong. To make matters more complicated, no matter what I do, I can't seem to unscramble the other images under it as they always come out jumbled regardless of any width I set for them. Maybe they are stored in a diffrent format? Even if I got these images to show up, I'm not even sure what a reliable way would be to seperate them since there doesn't appear to be any headers/footers for each image to cut with.

Here is the Sample file in question for those who think they might know more than me!

Any experienced people have any ideas?


RE: Hacking PS2 game files - Extracting images? - Dazz - 09-16-2014

Your sample file just links to the above image. :\


RE: Hacking PS2 game files - Extracting images? - supercom32 - 09-16-2014

(09-16-2014, 11:19 AM)Dazz Wrote: Your sample file just links to the above image. :\

Ah, thanks for the catch. I fixed the link for those interested in taking a look! Cheers!


RE: Hacking PS2 game files - Extracting images? - supercom32 - 09-17-2014

(09-16-2014, 12:07 PM)supercom32 Wrote:
(09-16-2014, 11:19 AM)Dazz Wrote: Your sample file just links to the above image. :\

Ah, thanks for the catch. I fixed the link for those interested in taking a look! Cheers!

It was just found out that if you take the remaining 256 width images and lay them out into 768 wide strips, you get the following images:

[Image: attachment.php?attachmentid=11895&d=1410971294]

it still looks messed up, but at least now you can start to make out what it is. Probably something we're missing for sure.


RE: Hacking PS2 game files - Extracting images? - supercom32 - 09-18-2014

For the first image, it is 8bit indexed with 32bit RGBA pallete. Pallete size is 1024 and starts before image data. Apparently it should look like this:

   

Another person was able to get this, but failed to elaborate more as to what they did. I tried to reproduce this but for some reason it doesn't work and I get something like this:

   

Ether I am reading the bmp data wrong and pointing to the wrong palette indexes, or my palette is loaded with the wrong colors.

Inside the sample file, I see the first color in the palette to be '00 00 00 00' and the 2nd one to be '6C 91 99 80'. I assume (lets take the 2nd palette color) R = 6C, G = 91, B = 99, and Alpha = 80? I tried re-arranging them around incase that was the issue, but it seems if I do something like ARGB instead of RGBA, the colors just get worse.

So I don't know. In the clean image, the first pixel is clearly almost black (0, 0, 8). However, if I read the BMP data the first palette index is '17' hex, which as an unsigned int is 23. And at that palette index, the color is #57348a which is purple?

Anyways I'm pretty lost. I don't understand why it's coming up so strange. And I don't see a problem with my parsing of the BMP data or Palette data. Hopefully someone else can see a problem, or use the given information to properly reproduce the original image and see where the trouble lies?