Final Fantasy Hacktics

Modding => War of the Lions Hacking => Topic started by: Nax on February 03, 2018, 12:39:33 am

Title: We should really base our PPF off the EBOOT-decrypted ISO
Post by: Nax on February 03, 2018, 12:39:33 am
Right now it seems most (if not all) of the PPFs on the forums are made against the retail WotL ISO.
This is rather infortunate, because patches that touch EBOOT.BIN have to decrypt it first.
This means that every single patch has the whole unencrypted EBOOT.BIN embedded as a difference.

This is troublesome because it makes conflicts virtually guaranteed on every patch.
While workarounds exists (such as rebuilding EBOOT.BIN from BOOT.BIN and hoping this one did patch properly), it's error-prone and unreliable.

I suggest we make our PPFs against an unencrypted, but otherwise clean WotL image, such as the one that can be generated from FFTPatcher.

It makes the diff much, much smaller. Also, it should make applying multiple patches work out of the box for the vast majority of them.
Of course it would require end users to actually unencrypt their ISO, but with FFTPatcher this is absolutely painless.

As an example, the famous Slowdown Fix, which is 4034291 bytes long (or about 3.84 MiB) becomes 120 bytes long using this method.
For reference, you will find this patch attached.
Title: Re: We should really base our PFF off the EBOOT-decrypted ISO
Post by: Xifanie on February 03, 2018, 05:30:55 am
Thing is, that also makes you run into the issue of Mac/Linux users being unable to use FFTPatcher
Title: Re: We should really base our PFF off the EBOOT-decrypted ISO
Post by: Nax on February 03, 2018, 09:47:56 am
Decrypting the FFT ISO is a very simple task, so I should probably make a cross-platform decryption tool then.
Title: Re: We should really base our PFF off the EBOOT-decrypted ISO
Post by: Nax on February 03, 2018, 01:18:45 pm
So I made this small tool to help with the decryption: https://github.com/Nax/FFT_Decrypt (https://github.com/Nax/FFT_Decrypt).
It's compatible with WotL E and U, and should work on any platform that support C (read: virtually any).

I will add a small Qt-based GUI and release prebuilt binaries for Linux/Mac/Windows ASAP.

Maybe we should make a custom version of ppf-o-matic that automatically decrypt the ISO if it's not already decrypted, apply the patch, and then (optionally) regenerate EBOOT.BIN from BOOT.BIN, so as to keep compatibility with the old patches and improve ease of use. Would that be useful to the community?
Title: Re: We should really base our PPF off the EBOOT-decrypted ISO
Post by: Nax on February 03, 2018, 07:46:23 pm
I created this tool (http://ffhacktics.com/smf/index.php?topic=11918.0) to work around the fact that it's problematic to run FFTPatcher on non-windows system.
I didn't have time to make a Linux build but it should be easy.