marco-calautti / Rainbow

A texture format converter for different consoles' graphics formats.
GNU General Public License v2.0
81 stars 8 forks source link

TIM2 files from GioGIo PS2 game not working, Rainbow says they're MipMapped #9

Open num421337 opened 6 years ago

num421337 commented 6 years ago

I have confirmed that almost every .PZZ file includes at least one TIM2 file and only a few can be read by Game Graphic Studio. Rainbow doesn't seem to read any giving me errors about invalid bytes or potentially the tim2's being mipmapped. Even when I stripped all the irrelevant data in a hex editor leaving only the tim2 data (at least to my knowlede

image These contain images that work, but aren't useful towards my efforts to translate the game into english. If you could provide me with any assistance that would be amazing

https://mega.nz/#F!4ZBWlQwA!fzeVvfMlc_ZrrLiWCMb8ew - example files

num421337 commented 6 years ago

I don't necessarily need any mipmapped textures, but I would love to be able to get the ones partaining to menus, cutscenes, title screens, and things that I can have translated

marco-calautti commented 6 years ago

I had a quick look at your files and the reason why neither Rainbow nor Game Graphics Studio (which should support every TIM2 variation) is because they are not TIM2 files. More specifically, it seems that the TIM2 files contained in these pzz files are either compressed, or rearranged in some other way. In fact, there is nothing resembling a proper TIM2 header in the pzz files I had a look on, apart from the very first 4-6 bytes. The reason why Rainbow says the TIM2 files are mipmapped is just because it happens that at the position where the mipmap counts should occur, there is another value greater than 1. Rainbow is tricked to think they are valid TIM2 files, just because the first 4 bytes (containing the magic word TIM2) are still intact. I fear there is some kind of compression going on there, and you should first find a way to decompress these files first.

num421337 commented 6 years ago

I appreciate you taking a look at my files. At least I have an idea of what I should try next....any idea at all on how I can go about decompressing them i'm completely lost

marco-calautti commented 6 years ago

There is not much you can do apart from running your game in an emulator with a debugger (pcsx2) and trace down the code that opens these pzz files.

num421337 commented 6 years ago

sadly I have no clue how to do that. the only thing I've found is some code referencing TIM2 files in what looks like the elf file SLPM_651.zip

num421337 commented 6 years ago

image

num421337 commented 6 years ago

I was having some hope to crack this game open considering a few of the .pzz files have proper tim2's in them like this one found in sd0a0.pzz image

marco-calautti commented 6 years ago

Unfortunately that's the only way, and I don't have much free time left for looking at that, sorry.

num421337 commented 6 years ago

I appreciate the responses. I guess I'll either deal with not being able to get it working or try to find help elsewhere. Thanks again

marco-calautti commented 6 years ago

Good luck with your project!

penguino118 commented 4 years ago

We found a way to get textures uncompressed while the game is running, when the title screen loads up, the textures in demo.pzz get uncompressed and stay in the game's memory, by putting other textures inside demo.pzz and then getting them out with cheat engine we get the uncompressed versions. Here I compiled several textures from different pzz files and their uncompressed version, inside some pzz files there are multiple TM2 files stacked together. Maybe we can compare the compressed and decompressed versions to try and figure out the format? samples.zip

infval commented 4 years ago

Maybe we can compare the compressed and decompressed versions to try and figure out the format?

These samples helped me to write decompression: https://github.com/infval/pzzcompressor_jojo :smiley_cat:

num421337 commented 4 years ago

that is amazing thanks so much