mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
use romstr.py as the new disassembler
This commit is contained in:
parent
96596c6944
commit
e2babd69fb
@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
from gbz80disasm import opt_table
|
from gbz80disasm import opt_table
|
||||||
from ctypes import c_int8
|
from ctypes import c_int8
|
||||||
from copy import copy, deepcopy
|
from copy import copy, deepcopy
|
||||||
@ -73,7 +74,11 @@ class RomStr(str):
|
|||||||
that will be parsed, so that large patches of data aren't parsed as
|
that will be parsed, so that large patches of data aren't parsed as
|
||||||
code.
|
code.
|
||||||
"""
|
"""
|
||||||
|
if "0x" in address:
|
||||||
|
address = int(address, 16)
|
||||||
|
|
||||||
start_address = address
|
start_address = address
|
||||||
|
|
||||||
if start_address == None:
|
if start_address == None:
|
||||||
raise Exception, "address must be given"
|
raise Exception, "address must be given"
|
||||||
|
|
||||||
@ -421,3 +426,7 @@ class AsmList(list):
|
|||||||
"""
|
"""
|
||||||
return "AsmList(too long)"
|
return "AsmList(too long)"
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
cryrom = RomStr(open("../pokecrystal.gbc", "r").read());
|
||||||
|
asm = cryrom.to_asm(sys.argv[1])
|
||||||
|
print asm
|
||||||
|
Loading…
Reference in New Issue
Block a user