03-18-2017, 09:33 AM
This is the fruit of an IDA pro auto-analysis and an hour of formatting and sorting with notepad++:
https://www.ff6hacking.com/misc/FF6A_Disassembly.zip
There were 1638 functions disassembled in the (E) version and 1631 in the (U) version (with automatic ARM / Thumb switching). I can't tell if it's 100% of the code but IDA is supposed to take every code path possible in the ROM. The map file is a listing of the functions and ROM offsets used in the code to pull data, GFX, etc. If you find a function listed in the map that is not in the disassembly, it mean I deleted it by mistake with my line deleting / sorting process in notepad++ but I don't think there are any case of this, except ROM second half obvious garbage code. The disassembly probably still contain garbage, especially toward the end. There would probably be a better way to format all this in IDA Pro and I'll look into it. I'm not sure if I can display the instructions hex in the disassembly the same way does some disassemblers. I left the GBA I/O map at beginning for reference. If a I/O register is used in code, it should be labeled correctly.
I hope this will somewhat help GBA hacking and help sharing information among hackers (unless my disassembies are total garbage). If you ever figure out a piece of code, function, please report it, I could label it in IDA PRO, add comments, etc. Same with RAM, if you know RAM values, I could import a RAM map similar to the I/O map, making the code a lot more readable. I'll try to import a ROM map file in IDA to label the known offsets. If you're a good GBA coder and you see the disassembled code doesn't make any sense, please report it too. I know little ARM / Thumb but I'm projecting to use this document and IDA Pro to improve.
Edit: Added (U) disassembly and map.
https://www.ff6hacking.com/misc/FF6A_Disassembly.zip
There were 1638 functions disassembled in the (E) version and 1631 in the (U) version (with automatic ARM / Thumb switching). I can't tell if it's 100% of the code but IDA is supposed to take every code path possible in the ROM. The map file is a listing of the functions and ROM offsets used in the code to pull data, GFX, etc. If you find a function listed in the map that is not in the disassembly, it mean I deleted it by mistake with my line deleting / sorting process in notepad++ but I don't think there are any case of this, except ROM second half obvious garbage code. The disassembly probably still contain garbage, especially toward the end. There would probably be a better way to format all this in IDA Pro and I'll look into it. I'm not sure if I can display the instructions hex in the disassembly the same way does some disassemblers. I left the GBA I/O map at beginning for reference. If a I/O register is used in code, it should be labeled correctly.
I hope this will somewhat help GBA hacking and help sharing information among hackers (unless my disassembies are total garbage). If you ever figure out a piece of code, function, please report it, I could label it in IDA PRO, add comments, etc. Same with RAM, if you know RAM values, I could import a RAM map similar to the I/O map, making the code a lot more readable. I'll try to import a ROM map file in IDA to label the known offsets. If you're a good GBA coder and you see the disassembled code doesn't make any sense, please report it too. I know little ARM / Thumb but I'm projecting to use this document and IDA Pro to improve.
Edit: Added (U) disassembly and map.