Join also our Discord channel! Click here.

Final Fantasy IV Complete Collection PSP (.BIN)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Vash
mega-veteran
mega-veteran
Posts: 183
Joined: Fri Apr 29, 2005 2:39 pm
Has thanked: 5 times
Been thanked: 23 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by Vash » Sun Sep 09, 2012 8:27 pm

it's standard LZSS

lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Tue Sep 11, 2012 1:06 am

aspire wrote:Here is a quick program to unpack all the LZS files. Source included. C#/.NET 4.0

http://netload.in/dateisGlaHamsdv/FF4_L ... ct.rar.htm

1. Extract FF4 ISO
2. Use VASH's tool to unpack pac0.bin and pac1.bin
3. Use above tool to dump all files within LZS archive. Place binary in parent directory (USRDIR) and execute

I also found out there are some LZS archives which contain LZS files. The format of these files can be different too. Thus, the tool works great the first time, but it may fail on the second run, since it will pick up the newly extracted LZS files with non-standard format.

Anyone have any info on the LZTX format? Vash how did you figure out pac0.bin and pac1.bin? Can you share source or point me in the right direction?

Aspire


Thanks for the program! Definitely let me know if you figure out the LZTX compression format for the other TM2 files (seems to primarily be used for the monster and char sprites).

lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Thu Sep 13, 2012 11:56 pm

I found two TM2 files in different directories with the same name -- one is a LZTX compressed version and one is an uncompressed version. I imagine that the compression method could be examined from comparing the two versions of the files.

Code: Select all

http://www.thezorklibrary.com/history/temp/WhiteRect.rar
~Andy

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Fri Sep 14, 2012 1:43 am

Ok I will take a look. Thanks

Also, I noticed a few TM2 (non-LZTX) are not rendering in game graphic studio. It appears this software doesnt like TM2 files higher than 256 color.
The TM2 files that fail to load are easily identifiable. Just goto to offset 0x15 and if the byte is 0C, it wont load. If you change this byte to 04 (256 color), then it loads fine but the colors are missing.. The character portraits in MENU/MENU_COMMON_4 are an example of this...

Aspire

lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Fri Sep 14, 2012 3:02 am

aspire wrote: Also, I noticed a few TM2 (non-LZTX) are not rendering in game graphic studio. It appears this software doesnt like TM2 files higher than 256 color.
The TM2 files that fail to load are easily identifiable. Just goto to offset 0x15 and if the byte is 0C, it wont load. If you change this byte to 04 (256 color), then it loads fine but the colors are missing.. The character portraits in MENU/MENU_COMMON_4 are an example of this...

Aspire

That's not the problem. The problem is that those particular TM2 files contain multiple palettes. If you load both the image as both image and palette in TILEDGGD, then you can change the palettes. Any file that did not load properly, I noticed had multiple palettes.


Also, I noticed that the summons were not compressed. And some of the summons are also enemies. I am assuming that the graphics were the same (and checking the data I see the same bytes within). So try to compare the following files for the Mind Flayer summon:

The "ec" is the summon (uncompressed) and the other two are the enemies (the TM2 and lzs are almost exactly the same, but that is how they both extract from different folders (one with a few less header info)

Code: Select all

http://www.thezorklibrary.com/history/temp/Mindflayer.rar
(I am also surprised at how many files have multiple copies within the data -- they could have saved much more room when removing them and also less programming)

Andy

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Fri Sep 14, 2012 3:40 am

Got it! The LZTX format is standard LZSS and decompression starts at offset 0x08. I will update my tool shortly.

Here is what 0_bchara_ta_00.tm2 looks like decompressed...

Image

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Fri Sep 14, 2012 5:34 am


lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Fri Sep 14, 2012 3:28 pm

Great that you figured it out!

Problem with the program:

You have to have all the images in the exact same directory as on your original computer in order for it to work (the program tries to read from a different directory). And when I put all the files in there, it still doesn't work an only does the first file for some reason.

Also, it doesn't work on those .LZS monster images -- the ones where the first 4 bytes of the file are not in there (the LZTX header). I could manually edit that, but it would take a long time for each image.

Thanks,
Andy

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Fri Sep 14, 2012 6:04 pm

ugh sorry... It was late and I forgot to change the hardcoded directory. I have uploaded a new version.

You should be able to execute this now in any directory and it will traverse down.

http://netload.in/dateiHp7hYbkYMS/FF4LZ ... ck.rar.htm

This program currently only deals with LZTX on TM2 files. I can make it work with others, but I dont have the FF4 ISO extract files in front of me at the moment. Will get to that later.

Aspire

lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Fri Sep 14, 2012 11:31 pm

Thanks for the update.

If you look at the files that I have in the MindFlayer.rar that I put in a previous post -- you can see that most of the LZS monster images are exactly the same as the normal TM2 version (some are even saved as both) but the LZS monster images are really just a TM2 file missing LZTX at the beginning of the file...

Andy

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Mon Sep 17, 2012 4:29 am

Here you go:

http://netload.in/dateiit9Er8vMgS/FF4LZ ... ck.rar.htm

This version will decompress LZTX (LZSS) encoded TM2 and LSZ files. The header is different for both and so is the decompression offset (weird). The LZS files when decompressed are saved as a TM2 file. Run at parent directory.

Aspire

lordskylark
beginner
Posts: 39
Joined: Tue May 26, 2009 1:27 pm
Has thanked: 1 time

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by lordskylark » Tue Sep 18, 2012 7:20 am

The compression for the LZS might be slightly different than with the regular files -- because when I load the decompressed LZS monster images, the palettes are slightly off-color. There is no problem with this with the regular decompressed TM2.

~Andy

aspire
n00b
Posts: 18
Joined: Sun Sep 09, 2012 4:28 pm
Has thanked: 2 times

Re: Final Fantasy IV Complete Collection PSP (.BIN)

Post by aspire » Tue Sep 18, 2012 2:44 pm

I noticed this too. I can't see it being the decompression though.. every file compressed in the FF4 archive appears to use standard LZSS. It would be strange to deviate but possible I guess... Could it be that these TM2 files are swizzled?

I will play around with it more tonight.

Post Reply