You are not logged in.
Pages: 1
Hello,
I'd like to know what disassembler have you used to disassemble pokered and pokecrystall.
Thank you!
Last edited by Luca91 (2016-04-22 11:25:21)
Offline
In the pokemon-reverse-engineering-tools project (the 'extras' submodule in pokered and pokecrystal), there is a script called:
https://github.com/pret/pokemon-reverse … 0disasm.py
This script is a generic disassembler, so you can use it to dump code from any GameBoy ROM.
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
How do you use this script?
Offline
How do you use this script?
python gbz80disasm.py <ROM address>
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
And you type it in Cygwin, right? Or is there a different program you gotta use to load the script?
Also, what does <ROM address> stand for, for example?
Offline
And you type it in Cygwin, right? Or is there a different program you gotta use to load the script?
Also, what does <ROM address> stand for, for example?
You type that in command line. It needs to know command 'python' for running python code though.
if __name__ == "__main__":
conf = configuration.Config()
disasm = Disassembler(conf)
disasm.initialize()
addr = sys.argv[1]
if ":" in addr:
addr = addr.split(":")
addr = int(addr[0], 16)*0x4000+(int(addr[1], 16)%0x4000)
else:
label_addr = disasm.find_address_from_label(addr)
if label_addr:
addr = label_addr
else:
addr = int(addr, 16)
For example these three lines
if ":" in addr:
addr = addr.split(":")
addr = int(addr[0], 16)*0x4000+(int(addr[1], 16)%0x4000)
here stand for the fact that if <ROM address> is form "bank":"pointer", it produces address "bank * 0x4000 + pointer % 0x4000" based on that. So you can for example give the address in that (big indian) format. Also, I'd assume you can also give a label from disassembly as the address based on the "else" branch.
Last edited by Miksy91 (2016-04-24 10:39:08)
Offline
I still think there's stuff I need to learn before even attempting to disassemble the Japanese versions of the games. Is there anything else I need to know?
Offline
Is there anything else I need to know?
GameBoy CPU Manual: http://marc.rawer.de/Gameboy/Docs/GBCPUman.pdf
GameBoy Pan Docs: http://bgb.bircd.org/pandocs.htm
These are the 2 main resources I used to get a good understanding of the GameBoy.
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
Pages: 1