This is a simple disassembler for Game Boy Advance games.
Modified by Icedude_907. Forked from jiangzhengwenjz's project.
You need to fetch a copy of capstone disassembler and include it in the source folder. Then configure CMakeLists.txt to point to the folder name (e.g.: capstone-5.0.3).
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.
The config file consists of a list of statements, one per line. Lines beginning with # are treated as comments. Some config files, including alttpafs.cfg for The Legend of Zelda: A Link to the Past and Four Swords (U) are provided as an example.
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 letterfmeans 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 letterfmeans 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. aBLtarget but not a function).thumb_far_jump [jump_target_address]: specify a THUMB far jump target (i.e. aBLtarget but not a function).jump_table [jump_table_address] [count]: specify a jump table withcounttargets. This only works with jump tables generated by agbcc variants.pool_label [pool_label_address] [count]: specify a pool label withcountof 32-bit words.data_label [data_label_address] <[label_name]>: specify a data label. This results in.byteoutput.
The program prints assembly code to stdout. The output should work with this header, with .syntax unified specifed.