Jump to content

Recommended Posts

  • 5 months later...
Posted

I don't know if it will help, but I tried to analyze some game files (specifically OPTIONS.BIN), and in them I found traces of zlib as well as gzip. 

52 Offset 1F 8B (.gz) - GZIP
32 Offset 78 01 (zlib No compression(no preset dictionary)
12 Offset 78 5E (zlib Best speed (no preset dictionary)
1 Offset 78 9C (zlib Default Compression (no preset dictionary)
6 Offset 78 DA (zlib Best Compression (no preset dictionary)
41 Offset 78 20 (zlib No Compression (with preset dictionary)
9 Offset 78 7D (zlib Best speed (with preset dictionary)
5 Offset 78 BB (zlib Default Compression (with preset dictionary)
4 Offset 78 F9 (zlib Best Compression (with preset dictionary)
 

which doesn't say anything exactly but you mentioned the use of ZLSS compression, I don't rule out that since i could be wrong because I didn't research much about compression types. I focused on understanding this game's.

On the other hand, I didn't have many results with the bms script (which could help a lot), it has some scripts that I tried to use without success. Maybe the files are compressed one way for the images, and another way for the compiled images, that would explain why there is no header. Something like LZMA that came out years before the game, and is also similar to the LZ77 algorithm according to reliable sources (wikipedia lol), but I hope it is possible to at least outline some alternatives.

  • 4 weeks later...
Posted (edited)
On 1/11/2025 at 11:58 PM, Angel333119 said:

Hello everyone, I am looking for a way to figure out the compression and decompress .BIN files.

Someone told me it’s LZSS. Can anyone help me, please?

TEXTURE.zip 171.55 kB · 14 downloads

I've been investigating the textures of another Tenchu game a bit, but I haven't forgotten about this one. The files are very compressed, but using the cheat engine, I was able to locate the uncompressed textures in the PCSX2 memory. I don't know if it will help, but they seem to have the same structure as Tenchu Fatal Shadows. Maybe if I investigate further, I can figure out how they are decompressed in memory. I don't know if I will be able to, to be quite honest, but I extracted one from the TITLEE.BIN file. It seems to be a Japanese control guide, similar to the one in the demo.

T3KT2x.png.d9c549b590076187964d10771f4e6390.png

Edited by hohenheim
  • Members
Posted
16 hours ago, hohenheim said:

I've been investigating the textures of another Tenchu game a bit, but I haven't forgotten about this one. The files are very compressed, but using the cheat engine, I was able to locate the uncompressed textures in the PCSX2 memory. I don't know if it will help, but they seem to have the same structure as Tenchu Fatal Shadows. Maybe if I investigate further, I can figure out how they are decompressed in memory. I don't know if I will be able to, to be quite honest, but I extracted one from the TITLEE.BIN file. It seems to be a Japanese control guide, similar to the one in the demo.

T3KT2x.png.d9c549b590076187964d10771f4e6390.png

Actually, you can see a large number of textures with text on them by using the texture dump feature in PCSX2. However, the game's original data is, in fact, compressed, and this is also true for the PSP and Xbox versions. Moreover, this game's compression format is quite difficult, and in all these years, no one has managed to successfully reverse-engineer it.

  • Engineers
Posted

The ideal is to dump the uncompressed raw image file through the PCSX2 memory, and not the whole dump, so it's easier to compare the compressed file with the uncompressed one.

 

Posted
1 hour ago, morrigan said:

Actually, you can see a large number of textures with text on them by using the texture dump feature in PCSX2. However, the game's original data is, in fact, compressed, and this is also true for the PSP and Xbox versions. Moreover, this game's compression format is quite difficult, and in all these years, no one has managed to successfully reverse-engineer it.

Compression is indeed quite difficult to understand, but it's been discovered how to decompress the textures of Fatal Shadows and the PSP versions (Tenchu San and Kurenai). After some research, I discovered that Russians have already managed to translate the game and its textures, modifying the files themselves, but accessing these sites is a pain; it seems they don't accept access from other countries.

Posted
1 hour ago, Rabatini said:

The ideal is to dump the uncompressed raw image file through the PCSX2 memory, and not the whole dump, so it's easier to compare the compressed file with the uncompressed one.

 

Indeed, here are some that I managed to extract.

Uncompressed.zip

Posted (edited)
17 minutes ago, Rabatini said:

Both files are decompressed?

Yes, these are the format the game use, it is essentially a tim2 texture, doesn't seems to be much different than one of them. I was able to read the texture using the Console Texture Explorer

Edited by hohenheim
  • Engineers
Posted
2 hours ago, hohenheim said:

Yes, these are the format the game use, it is essentially a tim2 texture, doesn't seems to be much different than one of them. I was able to read the texture using the Console Texture Explorer

My notebook is broken, so I'm using a corporate notebook. I can't use a hexadecimal viewer to compare the files. It would be helpful if the compressed and decompressed files were in the same file.

Posted
4 hours ago, Rabatini said:

My notebook is broken, so I'm using a corporate notebook. I can't use a hexadecimal viewer to compare the files. It would be helpful if the compressed and decompressed files were in the same file.

Sure.

Comp-Uncomp.zip

Posted

Tenchu Fatal Shadows for PS2 and PSP doesn't use texture compression, it's a simple container.. I made a program capable of viewing, exporting, and importing textures into the containers. Now I want to learn how to extract the compression from Tenchu Wrath of Heaven so I can add support for it to the tool.

If you'd like to take a look at my tool, it's available at the following link:

https://github.com/angel333119/tenchutool/releases/tag/test


It's not complete yet, it still needs many adjustments. I want to create a tool that makes it easier for translators to modify the game for their own languages.

And...

On 7/14/2025 at 4:49 PM, hohenheim said:

Indeed, here are some that I managed to extract.

Uncompressed.zip 275.7 kB · 2 downloads


Could you explain to me how you got to this result?

Posted
On 7/16/2025 at 1:44 PM, Angel333119 said:

Could you explain to me how you got to this result?

Sure, it was actually quite simple (so to speak). In PPSSPP, I was able to identify Tenchu Time of the Assasins' texture offsets and palettes by viewing the memory on the emulator GE debugger, and on the memory visualizer, and extracted them from the game files with the help of the Console Texture Explorer, so why not do the same in PCSX2? But then I discovered that you can't dump its memory, which is possible in PPSSPP. So, I just used Cheat Engine to read the emulator's memory, dumped it, copied the files, and separated them. A maximum of four came out in good quality; the others... well, they seem incomplete; the dumping isn't perfect, but I was still able to read them with ImageHeat and the Console Texture Explorer.

I'm thinking of replacing the compressed textures with the uncompressed ones to see if the game reads them. If that works, great, but I don't have much hope for it.

Anyway, as I already mentioned, maybe the "key" to decompressing the files is in the memory too, it's just a matter of debugging, but that's a lot of work, and I don't think I would be able to do it, but who knows.

  • Like 1
Posted
On 7/16/2025 at 8:44 AM, Angel333119 said:

Tenchu Fatal Shadows for PS2 and PSP doesn't use texture compression, it's a simple container.. I made a program capable of viewing, exporting, and importing textures into the containers. Now I want to learn how to extract the compression from Tenchu Wrath of Heaven so I can add support for it to the tool.

If you'd like to take a look at my tool, it's available at the following link:

https://github.com/angel333119/tenchutool/releases/tag/test


It's not complete yet, it still needs many adjustments. I want to create a tool that makes it easier for translators to modify the game for their own languages.

And...


Could you explain to me how you got to this result?

I tried downloading it but i think i got a false positive of trojan, maybe there's something wrong with the code or maybe is just windows being a bummer

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...