Extracting Game Graphics

Any information you would like to share or ask in regards to the hacking of Legend of Legaia
User avatar
dharthoorn
Level 4
Posts: 8
Joined: Sat Aug 16, 2014 6:39 am

Re: Extracting Game Graphics

Post by dharthoorn » Wed Sep 17, 2014 2:20 am

Which app do you use for psx graphics ripping?

User avatar
meth962
Level 23
Posts: 266
Joined: Tue Apr 03, 2012 8:37 am
Location: USA
Contact:

Re: Extracting Game Graphics

Post by meth962 » Wed Sep 17, 2014 4:43 pm

dharthoorn wrote:Which app do you use for psx graphics ripping?
I wrote my own because the one I used was giving distorted pictures. Later I found out it was because I used a BIN file XD You can rip them with PSicture as long as it's not BIN, not sure about ISO.

The in battle graphics aren't ripped from PSicture and are stored different. For that I had to run an emulator and save the VRAM (video ram dump) of the playstation to rip the images. I haven't found the 3D model standard that Prokion used. Most games Sony uses a standard but apparently Legaia didn't.
まさかつあがつ

User avatar
dharthoorn
Level 4
Posts: 8
Joined: Sat Aug 16, 2014 6:39 am

Re: Extracting Game Graphics

Post by dharthoorn » Tue Sep 23, 2014 4:31 am

You wrote your own ripper, that's pretty cool!

Heh, going by VRdump is pretty kinky stuff too. How do you get the proper offsets for the images? Do they have some kind of header or do you disassemble the VRam manually? The regular ripper apps probably just scan for certain headers anyhow.

If all else fails for ripping regular images you could always do the crudest thing like screenshot and copy/paste in Paint.

As for the 3D models it would be so much easier if one would know what kind development tool Prokion used for them. Ijust tried googling for PSX development tools and I can't seem to find too much info about what anybody used for developing PSX software...that's pretty weird in and of itself.

User avatar
meth962
Level 23
Posts: 266
Joined: Tue Apr 03, 2012 8:37 am
Location: USA
Contact:

Re: Extracting Game Graphics

Post by meth962 » Wed Sep 24, 2014 9:34 am

Well I'm pretty sure the ripper I wrote uses the same method. I followed the standard TIM format found online to look for "signatures" of data in the ROM. Sony used this format for many of their games so it was pretty easy. Only problem was a lot of the documentation online was wrong/inconsistent but didn't take long to figure out :)

My app didn't have to be very complex at all. The first time I ran it, it found all the images and no bad leads. You basically read all the legaia file bytes and look for a simple pattern:

Bytes 1-4 = 10 00 00 00 (this is the header of the TIM data and version)
Bytes 5-8 = one of the following
08 00 00 00
09 00 00 00
02 00 00 00
03 00 00 00
(these are the color depth of the images (bits per pixel), 24bit, 4bit, 8bit, 16bit)

I think I added in some other safety checks too like the Color Lookup Table (CLUT as everyone calls it) is greater than 0, etc. So lucky for us Legaia uses the standard TIM format for a lot of their images. Unfortunately not all of them are stored that way.

For the ones I couldn't find through this method, I run the emulator in battle, and the playstation will load all the necessary graphics. Cort's spell, for instance, is loaded into the VRAM and I will capture it during his summon. The VRAM dump looks like garbage as the images are stored with lookup values for colors. But if you look close enough, you can spot that familiar circle that shows up in the summon. At that point, I used an app to select the part of VRAM that I want (the summon circle image), and then select the Color Lookup Table in VRAM. It takes a bit of tweaking to find the right Color Lookup Table that makes the image look correct.

Yeah, screenshotting won't work for a lot of those because the playstation might be skewing the image for a 3D effect and camera angle : /

I wish we could figure out what method they used for the 3D models too. I've tried looking at some of the typical ones Sony uses but no luck so far.
まさかつあがつ

Post Reply