Page 1 of 1

.tm2 compressed

Posted: Tue Jun 06, 2023 12:25 am
by Ruri
Hello I need help to unzip this file :] I have already tried with many programs and viewers and I cannot visualize it,the game is
zero no tsukaima, I also investigated what could be with this FF4LZTX_unpack program but I can't find it, someone here viewtopic.php?t=17872 unzipped a similar file but there is no more information

file .tm2
https://drive.google.com/file/d/1UYk3e8 ... sp=sharing

I hope someone can guide me, thanks :)

Re: .tm2 compressed

Posted: Thu Jun 15, 2023 5:44 pm
by travistrue
I think I can help. I started a project back in 2020 where a friend and I attempted to write an open source clone of the PSP version of FF4 which uses the .tm2 format for its textures. That game has a lot of .tm2 texture files that have LZTX compression built into them. Ironically, I dug up that old project's code, and started it back up again. I've been retracing my steps since it's been 3 years since I've touched the project. Ironically, I'm on these forums to try to get more in-depth information on the .tm2 format at the moment.

I also struggled with LZTX compression on those textures, and I remember it taking about a week to figure out the precise amount of bits that were used to describe the decoding window (I might have said that wrong cuz it's been a while lol). Although you're working with "Zero no Tsukaima" instead of Final Fantasy IV, these links might be helpful:

Here's the thread that I started on LZTX compression. It should give you some insight on how to decompress your file.

Here's my GitHub repo for my FF4 project that implements LZTX compression. The particular file that you'd be interested in is here.

Just a heads-up: this project is written in Rust instead of C/C++. Rust is still pretty niche, so I'd be happy to help you read through the syntax if you're unfamiliar with it. The extraction sub-project doesn't completely work on Windows right now because my project doesn't handle Windows' paths very well right now, so keep that in mind if you try running the project that extracts files from the ISO, its underlying binary archives, and the LZS files. It works on macOS and it should still work on Linux though.

Re: .tm2 compressed

Posted: Wed Jun 21, 2023 5:44 pm
by Ruri
I have compiled the programs but I have not had any results, only an unknown format message (: