Skip to content

Commit

Permalink
use romstr.py as the new disassembler
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzure committed Jun 20, 2012
1 parent 96596c6 commit e2babd6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extras/romstr.py
@@ -1,3 +1,4 @@
import sys
from gbz80disasm import opt_table
from ctypes import c_int8
from copy import copy, deepcopy
Expand Down Expand Up @@ -73,7 +74,11 @@ def to_asm(self, address, end_address=None, size=None, max_size=0x4000, debug=No
that will be parsed, so that large patches of data aren't parsed as
code.
"""
if "0x" in address:
address = int(address, 16)

start_address = address

if start_address == None:
raise Exception, "address must be given"

Expand Down Expand Up @@ -421,3 +426,7 @@ def __repr__(self):
"""
return "AsmList(too long)"

if __name__ == "__main__":
cryrom = RomStr(open("../pokecrystal.gbc", "r").read());
asm = cryrom.to_asm(sys.argv[1])
print asm

0 comments on commit e2babd6

Please sign in to comment.