Compressed Graphics in Corpse Party: Book of Shadows for PSP

Started by DarkHamsterlord, October 08, 2013, 03:36:19 PM

Previous topic - Next topic

Ryusui

It'd help if you had some access to a format specification for TIM2 - or, failing that, the tool you're using to convert the TIM2 files to graphics.

In the meantime, have a look at these:

https://dl.dropboxusercontent.com/u/74940256/test.zip

Both of these are TIM2 files. The ".bin" file is dumped directly from the hex dump you gave me; the ".tim2" was extracted from the compressed data I found in the hex dump. I was a little disturbed to discover the two outputs didn't match. Could you compare them and tell me if that's because they're two different images, or if the ".tim2" file looks messed up?
In the event of a firestorm, the salad bar will remain open.

KC

Quote from: DarkHamsterlord on October 11, 2013, 01:21:10 PM
You know, I tried CTRL+F and got a pop up box that said "Not implemented" and just assumed they hadn't implemented a search yet.
Ah, I see. I only ever tested it in the disassembly so I never noticed that. Thanks for pointing it out, once this is merged Ctrl+F will work in the memory dialog too.

DarkHamsterlord

Quote from: Ryusui on October 11, 2013, 01:57:29 PM
It'd help if you had some access to a format specification for TIM2 - or, failing that, the tool you're using to convert the TIM2 files to graphics.

In the meantime, have a look at these:

https://dl.dropboxusercontent.com/u/74940256/test.zip

Both of these are TIM2 files. The ".bin" file is dumped directly from the hex dump you gave me; the ".tim2" was extracted from the compressed data I found in the hex dump. I was a little disturbed to discover the two outputs didn't match. Could you compare them and tell me if that's because they're two different images, or if the ".tim2" file looks messed up?

They're definitely the same image, but test.tim2 comes out looking like this



If I open test.bin with the same program, it looks correct



And I don't have any format specifications for TIM2, but I can tell you that I've used both Game Graphic Studio and XnView to convert the TIM2 files to PNG. (I started with XnView, but it doesn't seem to support transparency, so I got Game Graphic Studio)

Ryusui

Annoying! So it appears my understanding of the format is indeed incomplete. Sorry to jump the gun like this. I'll look into it again and try to figure out what's wrong...
In the event of a firestorm, the salad bar will remain open.

DarkHamsterlord

Thanks! I really appreciate all the work you're putting into helping me with this.

Ryusui

Okay. The problem was that the LZ file was actually encoded as several 0x4000-byte chunks one after another. I've tested the new version, and you shouldn't have any problems with it.

https://dl.dropboxusercontent.com/u/74940256/cplz.zip

Enjoy!
In the event of a firestorm, the salad bar will remain open.

DarkHamsterlord

Oh man, you're awesome! That works perfectly, thank you!!

And thanks to KC as well, for telling me about the GE Debugger in the WIP builds of ppsspp so I could get the data Ryusui needed!

Ryusui

In the event of a firestorm, the salad bar will remain open.

MeruP

Hey, thanks for the tool. I was looking for something like this few months ago. But some files seem to have some problems... like this. This is from the same Corpse Party. I used tool posted on October 12. Source image here.

Ryusui

Thanks for getting my attention.

Unfortunately, there's not a lot I can do without the uncompressed data to compare with - if you can find it using ppsspp's debugger, that'd help immensely.
In the event of a firestorm, the salad bar will remain open.

MeruP

Quote from: Ryusui on November 19, 2013, 05:32:57 PM
Thanks for getting my attention.

Unfortunately, there's not a lot I can do without the uncompressed data to compare with - if you can find it using ppsspp's debugger, that'd help immensely.
Ah okay. I thought you already have all the info you need and this can be fixed by doing some adjustments. I'll try to get uncompressed data!

Edit:
Hey, I wonder if this is what you need. Archive contains KLZ-compressed image, memory dump starting from 1st TIM2 header (and +4MB after last TIM2 header with 3 of them in total) and a reference image.
This is a different image from the one I posted before. For the previous one I don't have sufficient savedata.

Edit2
Actually I updated the archive (by the same link). Now it only contains .klz image and uncompressed TIM2 image without all other junk.