Game Boy Advance disassembler
Find a file
Zhengwen Jiang 940def2c91 update readme
2023-07-14 21:53:56 -05:00
config add another cfg example 2022-07-06 18:40:46 -05:00
.gitignore Add script to replace known addresses with symbols, slightly fix Makefile. 2020-06-12 13:49:14 -04:00
add_syms_to_asm.py Add script to replace known addresses with symbols, slightly fix Makefile. 2020-06-12 13:49:14 -04:00
capstone-3.0.5-rc2.tar.gz Initial commit 2017-10-09 20:07:23 -05:00
disasm.c support jumptable in Bionicle: Matoran Adventures 2022-08-27 18:24:45 -05:00
fireemblem8.cfg improve accuracy of far branch detection and fix adr instruction 2018-02-20 14:27:08 -06:00
fireemblem8_ida.cfg correctly handle back-referencing jump table entries 2018-02-20 10:51:52 -06:00
gbadisasm.h add force func param 2022-07-06 01:51:20 -05:00
main.c support data_label 2022-07-06 16:51:56 -05:00
Makefile fix memory corruption and fix algorithm 2022-03-14 19:46:59 -05:00
pokeruby.cfg use user-supplied function labels when available 2018-02-19 20:14:00 -06:00
README.md update readme 2023-07-14 21:53:56 -05:00

GBADISASM

This is a simple disassembler for Game Boy Advance games.

Usage

gbadisasm rom_file -c config_file -l link_address -s

  • rom_file: the GBA rom to disassemble.
  • -c config_file (optional, but necessary for good output): a config file that gives hints to the disassembler.
  • -l link_address (optional): where the rom is linked to -- defaults to 0x8000000.
  • -s (optional): assume there's no rom header when present.

Config File

The config file consists of a list of statements, one per line. Lines beginning with # are treated as comments. An config file alttpafs.cfg for The Legend of Zelda: A Link to the Past and Four Swords (U) is provided as an example.

Config File Statement Format

Note: <> means optional. [] means you need to replace with your own address/name/number.

  • arm_func [function_address] <[function_name]> <f>: specify an ARM function. The letter f means you're sure this is a function (so it will never be changed to a normal label).
  • thumb_func [function_address] <[function_name]> <f>: specify a THUMB function. The letter f means you're sure this is a function (so it will never be changed to a normal label).
  • arm_label [label_address]: specify an ARM label. It may be changed to a function during analysis.
  • thumb_label [label_address]: specify a THUMB label. It may be changed to a function during analysis.
  • arm_far_jump [jump_target_address]: specify an ARM far jump target (i.e. a BL target but not a function).
  • thumb_far_jump [jump_target_address]: specify a THUMB far jump target (i.e. a BL target but not a function).
  • jump_table [jump_table_address] [count]: specify a jump table with count targets. This only works with jump tables generated by agbcc variants.
  • pool_label [pool_label_address] [count]: specify a pool label with count of 32-bit words.
  • data_label [data_label_address]: specify a data label. This results in .byte output.

Output Format

The program prints assembly code to stdout. The output should work with this header, with .syntax unified specifed.