shithub: pokecrystal

Download patch

ref: d01369178b0ced3b299903b1cdf0084bdf067c43
parent: acdb00c5dc7aa96aeb36a3166702c0f910a2c9aa
author: Sanky <[email protected]>
date: Tue May 7 21:21:55 EDT 2013

make gbz80disasm understand bank:offset syntax

--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -861,4 +861,10 @@
 
 
 if __name__ == "__main__":
-    print output_bank_opcodes(int(sys.argv[1], 16))[0]
+    addr = sys.argv[1]
+    if ":" in addr:
+        addr = addr.split(":")
+        addr = int(addr[0], 16)*0x4000+(int(addr[1], 16)%0x4000)
+    else:
+        addr = int(addr, 16)
+    print output_bank_opcodes(addr)[0]