News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Compressed Graphics in Corpse Party: Book of Shadows for PSP  (Read 11047 times)

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #20 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?
In the event of a firestorm, the salad bar will remain open.

KC

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #21 on: October 11, 2013, 02:39:06 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

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #22 on: October 11, 2013, 03:02:36 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

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #23 on: October 11, 2013, 04:33:52 pm »
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

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #24 on: October 11, 2013, 05:50:05 pm »
Thanks! I really appreciate all the work you're putting into helping me with this.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #25 on: October 12, 2013, 12:25:04 am »
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

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #26 on: October 12, 2013, 01:41:16 am »
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

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #27 on: October 12, 2013, 02:00:16 am »
You're welcome. :3
In the event of a firestorm, the salad bar will remain open.

MeruP

  • Guest
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #28 on: November 17, 2013, 07:22:58 pm »
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

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #29 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.
In the event of a firestorm, the salad bar will remain open.

MeruP

  • Guest
Re: Compressed Graphics in Corpse Party: Book of Shadows for PSP
« Reply #30 on: November 19, 2013, 08:52:07 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.
« Last Edit: November 19, 2013, 11:13:58 pm by MeruP »