shithub: pokecrystal

Download patch

ref: e2babd69fb94781df54f2e4ded5efcc2aa7d0f8d
parent: 96596c6944562360c7cd16a2c4a9ea1948cb9870
author: Bryan Bishop <kanzure@gmail.com>
date: Tue Jun 19 19:59:49 EDT 2012

use romstr.py as the new disassembler

--- a/extras/romstr.py
+++ b/extras/romstr.py
@@ -1,3 +1,4 @@
+import sys
 from gbz80disasm import opt_table
 from ctypes import c_int8
 from copy import copy, deepcopy
@@ -73,7 +74,11 @@
             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"
 
@@ -421,3 +426,7 @@
         """
         return "AsmList(too long)"
 
+if __name__ == "__main__":
+    cryrom = RomStr(open("../pokecrystal.gbc", "r").read());
+    asm = cryrom.to_asm(sys.argv[1])
+    print asm
--