Skip to content

About

FFTA (AFXE) decomp workspace: ROM analysis, byte-exact split, disassembly

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,091 Commits

Folders and files

Repository files navigation

Final Fantasy Tactics Advance decompilation

A matching C decompilation of Final Fantasy Tactics Advance for the Game Boy Advance. Each recovered function is compiled and compared byte for byte with the USA and Australia cartridge.

Build the project · Match a function · Source map · Cartridge notes

Decompilation progress

Metric Matched / indexed Progress
Functions matched 5,166 / 5,600 92.25%
Bytes matched 951,392 / 1,341,981 70.89%

Each match reproduces the original ROM bytes. Byte coverage counts overlapping function spans once.

ROM regions and library units

The main index covers functions starting below 0x08150000. Its totals can change as function boundaries are recovered.

Additional verified late-ROM spans: 21 functions; 3,236 complete-body bytes. These are counted separately.

Functions badge · Bytes badge

Matched bytes by 64 KiB ROM region

0x08000000  ███████████████░░░░░   77.3%    458/494 fns
0x08010000  ███████████████░░░░░   75.4%    400/424 fns
0x08020000  ████████████████░░░░   82.0%    375/398 fns
0x08030000  ███████████░░░░░░░░░   55.9%    160/173 fns
0x08040000  ████████████░░░░░░░░   61.2%    184/203 fns
0x08050000  █████████████████░░░   85.0%    184/194 fns
0x08060000  ████████████████░░░░   80.3%    269/280 fns
0x08070000  ███████████████░░░░░   74.5%      68/79 fns
0x08080000  █████████████░░░░░░░   62.8%    156/172 fns
0x08090000  ████████████████░░░░   80.7%    264/284 fns
0x080A0000  ████████░░░░░░░░░░░░   41.4%    122/144 fns
0x080B0000  █████████░░░░░░░░░░░   44.1%    140/155 fns
0x080C0000  ███████████████░░░░░   73.7%    471/486 fns
0x080D0000  █████████████████░░░   83.4%    412/432 fns
0x080E0000  ███████████████░░░░░   76.0%    134/152 fns
0x080F0000  ███████████████░░░░░   72.6%    104/127 fns
0x08100000  █████████████░░░░░░░   64.6%     92/114 fns
0x08110000  ███████████████░░░░░   73.9%    117/137 fns
0x08120000  ████████████████░░░░   81.1%    395/414 fns
0x08130000  ██████████████░░░░░░   69.4%    415/435 fns
0x08140000  ███████████████░░░░░   76.0%    246/303 fns
0x08150000+ assets and data; 1,400 index entries

Library functions below 0x08150000 are included in the totals above; those at or above it are among the additional late-ROM spans.

Unit Range Toolchain Functions matched Bytes matched
boot -O0 0x08000438-0x080007C8 agbcc-O0-v1 10 / 10 910 / 910
DMA channel control -O0 0x08003A08-0x08003A6C agbcc-O0-v1 2 / 2 98 / 98
agb_flash FLASH512_V130 0x0814189C-0x0814220C agbcc-O1-v1 24 / 24 2,406 / 2,406
libgcc dp-bit 0x08142BE8-0x081439C8 old-agbcc-O2-v1 20 / 20 3,538 / 3,538
libgcc fp-bit, _cmpdi2, _lshrdi3 0x081439C8-0x081443AE old-agbcc-O2-v1 22 / 22 2,514 / 2,514
m4a.c (MusicPlayer2000) 0x08145098-0x081465E6 old-agbcc-O2-v1 57 / 58 5,424 / 5,428
debug monitor -fprologue-bugfix 0x08FE1638-0x08FE1FF8 agbcc-O2-prologue-bugfix-v1 4 / 8 1,080 / 2,492
Everything outside library units default 5,031 / 5,464

Build the project

Clone the game and its toolkit side by side. You'll need Python 3, Make, Capstone, and your own copy of the game.

git clone https://github.com/shubshub/fftadecomp.git
git clone https://github.com/shubshub/fftadecomp-kit.git
cd fftadecomp
python3 -m pip install capstone

Place your ROM in the project root as baserom.bin, then run make split check. This splits the ROM using the tracked index, rebuilds it, and checks that every byte agrees.

Cartridge Size SHA-1
USA / Australia · AFXE 16 MiB 4ac05441f4de70a4ec3dd932116346c61b8783d9

Match a function

  1. Set up agbcc and the ARM toolchain. Try make match ADDR=0x08017514 to reproduce an existing match.
  2. Pick an open address from the function index. Check and claim it with the reservation tool before writing C.
  3. Run the match command with the address you claimed. A byte-identical function goes in src with its match report. Keep partial recoveries and notes in Parked, then release the address.

The contributor guide covers source placement and the publication checks. The module map groups recovered code by the game state it uses.

About

FFTA (AFXE) decomp workspace: ROM analysis, byte-exact split, disassembly

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages