FFHEX-Annotated Assembly


Mon Jun 06 2022 17:00:00 GMT-0700 (Mountain Standard Time)

Creating the FFHEX-Annotated Disch Assembly

The general steps needed to create the Annotated Assembly zip file:

  1. Download the FFHEX-Annotated Disch Assembly v1.0.6 patch.
  2. Locate and download v1.0 (2015) of the Disch FF1 Disassembly zip.
  3. Make a copy of the v1.0 disassembly to act as the patch target (for tools that overwrite).
  4. Use a patching utility to apply the patch to the target disassemblky zip file.
  5. Keep the newly created zip for use in creating new FFHEX assembly projects.

There are many tools available to create patches, and they work with many different file types besides ROMs and executables. In no particylar order, we'll walk through how to generate the patched zip with multiple tools, including an online option and an open source utility.
Each method below assumes that you've downloaded the v1.0 disassembly and the v1.0.6 patch already.

Lunar IPS (LIPS) GUI

While geared toward ROM patching (with special built-in support for handling SNES headers),LIPS is an IPS patching utility that's fairly well known and provides a minimalist interface.

  1. Make a copy of the v1.0 Disch Disassembly zip, and rename it to have v1.0.6 in the filename.
    This is crucial because LIPS overwrites the target file instead of creating a new file and patching to that. The copy helps avoid overwriting the original file.
  2. Start LIPS.
    WARNING
    Be sure that the the "Register File Type" check box is NOT checked to avoid having LIPS modify your registry to support the file type during patch creation.
    Click Apply IPS Patch.
  3. Select the v1.0.6 patch, click Open.
  4. Click the file type drop-down at bottom right, select All Files (*.*).
    Select the v1.0 Disch assembly zip file to patch, then click Open.
  5. You should see the sucess dialog pop up. The patched zip is now ready to use.
  6. You can check the zip to ensure that it now contains a file named disch-annotated.asmtype.
    First, close Lunar IPS to ensure it doesn't still have a lock on the newly created IPS file.
    This file should contain the version number 1.0.6.0.

Lunar IPS (LIPS) 1.03 Command Line

LIPS can also work on the command line starting with version 1.03.
Assuming that you don't go through the trouble of putting LIPS in the system path, you can follow the instructions below to create the patched v1.0.6 Assembly zip.

  1. Make a copy of the v1.0 Disch Disassembly zip, and rename it to have v1.0.6 in the filename.
    This is crucial because LIPS overwrites the target file instead of creating a new file and patching to that. The copy helps avoid overwriting the original file.
  2. Note the locations of LIPS v1.03+, the patch we want to apply, and the copy of the v1.0 disassembly that we renamed to v1.0.6. For this example, those paths are:
    • C:\TOOLS\lips103\Lunar IPS.exe
    • C:\PROJ\FF1\WIP\Disch.ffhex-annotated-1.06.ips
    • C:\PROJ\FF1\WIP\Disch-FinalFantasyDisassembly_v1.0.6.zip
  3. Open a command prompt, then enter the following command line (all on one line):
    "C:\TOOLS\lips103\Lunar IPS.exe" -ApplyIPS "C:\PROJ\FF1\WIP\Disch.ffhex-annotated-1.06.ips" "C:\PROJ\FF1\WIP\Disch-FinalFantasyDisassembly_v1.0.6.zip"
    Press Enter to run the command and create the patched ZIP.
  4. You can examine the zip to ensure that it now contains a file named disch-annotated.asmtype.
    This file should contain the version number 1.0.6.0.

Floating IPS (FLIPS) GUI

Floating IPS is an emulator-focused patcher that supports IPS and BPS formats. It can be much the same way as Lunar, and it's a small dialog-based app with a similarly minimalist GUI.

WARNING
When I ran this, I discovered that IPS files were suddenly assigned to Floating IPS in Windows File Explorer. If you don't want apps to mess with the registry, then use Hack64 Web Patcher instead.
The mapping can be removed using system settings, for example in Windows 10:
https://www.partitionwizard.com/partitionmanager/remove-file-association-windows-10.html
https://techcult.com/how-to-remove-file-type-associations-in-windows-10/

  1. Unlike Lunar, FLIPS doesn't overwrite the original file, so there's no need to copy the zip first.
    Start FLIPS, then click Apply IPS Patch.
  2. Select the v1.0.6 patch, click Open.
  3. Click the file type drop-down at bottom right, select All Files (*.*).
    Select the v1.0 Disch assembly zip file to patch, then click Open.
  4. Click the file type drop-down at bottom right, select All Files (*.*).
    Select the v1.0 Disch assembly zip file to patch, then click Open.
  5. You should see the sucess dialog pop up. The patched zip is now ready to use.
  6. You can check the zip to ensure that it now contains a file named disch-annotated.asmtype.
    First, close Lunar IPS to ensure it doesn't still have a lock on the newly created IPS file.
    This file should contain the version number 1.0.6.0.

Floating IPS (FLIPS) Command Line

Floating IPS also supports command line processing.

  1. Make a copy of the v1.0 Disch Disassembly zip, and rename it to have v1.0.6 in the filename.
  2. Note the locations of FLIPS, the patch we want to apply, and the source zip to which we'll apply it.Also specifiy the filename of the output zip we'll created (since it doesn't overwrite).
    For this example, those paths are:
    • C:\TOOLS\floating\flips.exe
    • C:\PROJ\FF1\WIP\Disch.ffhex-annotated-1.06.ips
    • C:\PROJ\FF1\WIP\Disch-FinalFantasyDisassembly_v1_0.zip
    • C:\PROJ\FF1\WIP\Disch-ff1-ffhex-annotated-1.0.6.zip
  3. Open a command prompt, then enter the following command line (all on one line):
    "C:\TOOLS\floating\flips.exe" --apply "C:\PROJ\FF1\WIP\Disch.ffhex-annotated-1.06.ips" "C:\PROJ\FF1\WIP\Disch-FinalFantasyDisassembly_v1_0.zip" "C:\PROJ\FF1\WIP\Disch-ff1-ffhex-annotated-1.0.6.zip"
    Press Enter to run the command and create the patched ZIP.
  4. You can examine the zip to ensure that it now contains a file named disch-annotated.asmtype.
    This file should contain the version number 1.0.6.0.

Hack64 Web Patcher (online)

Hack64 Web Patcher is an online patcher that supports multiple formats. It allows patching without the need to download and install software on your computer.

  1. Visit Hack64 Web Patcher at the link above.
  2. On the web page, click the Choose File button next to the ROM label. Select the v1.0 zip and click Open.
  3. Click the Choose File button next to the Patch label. Select the v1.0.6 patch, then click Open.
  4. Both files will be displayed on the form. The Save as filename auto-fills using the file title of the patch file and extension of the file to patch (in this case, zip).
    Click the Patch button.
  5. The patch file downloads into your Downloads folder.
    Move the file to the desired directory, where it can serve as the base for new assembly projects.
  6. You can check the zip to ensure that it now contains a file named disch-annotated.asmtype.
    This file should contain the version number 1.0.6.0.

ROMPatcher.js (online)

ROMPatcher.js is an online, pure JavaScript patcher that supports multiple formats. It allows patching without the need to download and install software on your computer. Like others on this list, it supports applying and creating patches, and it supports a broad list of formats.
This one's a bit of a wildcard because it doesn't directly support zip files, but can indirectly support them through a loophole in its processing. That's not reliable because an update could close that loophole at any time. If you just want online patching of zips out of the box, then use Hack64 Web Patcher instead.
However, I included it in this list for a slightly different reason.
RomPatcher.js is open source under a permissive license (MIT/Expat). If you're so inclined you could get the source code and run it locally. You could also stand up your own server and host it there.

It might not be too difficult to modify it to conditionally allow zip files as direct, supported inputs.
ROMPatcher.js GitHub repo