[FEditor] Rewritten EA Autopatches

Seems like I never started a thread for this. This is a project to rewrite all of the FEditor autopatches to be EA installers instead. I’ll also post the code in subsequent posts if you don’t want to download a file or something.

The goal is to make them all #define Inline-able in BL space.

FE7, FE8: Anti-Huffman Patch

Anti-Huffman Patch:

//Patches by Hextator, 
//Concept by Nintenlord,
//EA Installer by Crazycolorz5.

#ifdef _FE7_
#include "Extensions/Hack Installation.txt"

//Anti-Huffman Patch, by Hextator and Nintenlord
{
  PUSH
  
  ORG 0x12C6C
  BYTE 0x02 0x49 0x28 0x1C 
  BL(0x12C9C) //0x00 0xF0 0x14 0xF8
  BYTE 0x35 0x60 0x0C 0xE0
  WORD 0x0202A5B4
  
  ORG 0x12C7C
  Unencoded:
  BYTE 0x80 0x23 1B 0x06 0xC0 0x1A 0x02 0x78 0x0A 0x70 0x01 0x31 0x01 0x30 0x00 0x2A 0xF9 0xD1 0x70 0x47
  
  ORG 0x4364
  BYTE 0x00 0xB5 0xC2 0x0F 0x00 0x2A 0x02 0xD0
  BL(Unencoded) //0x0E 0xF0 0x86 0xFC
  BYTE 0x03 0xE0 0x02 0x4A 0x12 0x68 
  BL(0xBFC54) //Goto r2; Encoded; 0xBB 0xF0 0x6D 0xFC 
  SHORT 0xBD00
  WORD 0x03003940
  
  POP
}


#endif

#ifdef _FE8_
#include "Extensions/Hack Installation.txt"
//Anti-Huffman Patch, by Hextator and Nintenlord
{
  PUSH
  ORG 0x2BA4 //Pointer Tester
  BYTE 0x00 0xB5 0xC2 0x0F 0x02 0xD0 
  BL(uncompHelper) /*0x07 0xF0 0x63 0xFB*/
  SHORT 0xE001
  BL(compressedHelper) /*0x07 0xF0 0x58 0xFB*/
  SHORT 0xBD00
  
  ORG 0xA24A
  BYTE 0x05 0xD0 0x04 0x49 0x28 0x1C 0x00 0xF0 0x16 0xF8 0x35 0x60 0x00 0xE0 0x01 0x48 0x70 0xBC 0x00 0xBD 0x00 0x00 
  WORD 0x0202A6AC
  
  compressedHelper:
  SHORT 0xB500 0x4A02 0x6812
  BL(0xD18C8) //In-game unencoding routine, I assume
  SHORT 0xBD00 
  WORD 0x03004150
  
  uncompHelper:
  jumpToHack(AntiHuffmanFreeSpace) //FEditor uses r2 instead of r3, but it shouldn't matter.
  
  
  #ifndef INLINE
    ORG 0x464470
  #else
    POP
  #endif
  
  AntiHuffmanFreeSpace: //Can be relocated as necessary.
  BYTE 0x80 0x23 0x1B 0x06 0xC0 0x1A 0x02 0x78 0x0A 0x70 0x01 0x31 0x01 0x30 0x00 0x2A 0xF9 0xD1 0x70 0x47
  
  #ifndef INLINE
    POP
  #endif
}

#endif