marco-calautti / Rainbow

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

[PS2] "Illegal bit depth!" error for 2 TIM2 files #14

Closed Risae closed 5 years ago

Risae commented 5 years ago

Hi,

using Rainbow i was able to browse almost all of the TIM2 files of Growlanser 6. But there are 2 files which throw out this error:

https://i.imgur.com/RqIiUjq.png

Here are the 2 files that don't work, and also 2 additional files that work without a problem:

https://www17.zippyshare.com/v/csTifR9S/file.html

Does anybody know why those 2 are not working?

marco-calautti commented 5 years ago

The reason is simple. Both these files contain a wrong tm2 header. I don't understand why Devs enjoyed so much changing the format all the time.

The issue with your files is that there it seems to be 0x70 bytes of padding (zeroes) in the header, that needs to be removed, if you want rainbow to be able to open the files. Just open the file with an hex editor and remove all the zeroes from offset 0x10 to offset 0x80 (excluded).

This might be an indication that these files are dummy, and are leftovers not used by the game.

Risae commented 5 years ago

Thank you so much for the fast reply, that solved it! It works now. Thank you for creating this tool, this makes the job of translating a PS2 game so much easier.