shithub: pokered

Download patch

ref: ea4fce81fa6f34362a3e89631ecb9ef6a855f28d
parent: 6d6c18a301fec9463ef417200a1d6f5d0fcb90ce
author: Bryan Bishop <[email protected]>
date: Wed Jan 11 12:36:17 EST 2012

fix gbz80disasm to not treat $00 as the second byte of an opcode

hg-commit-id: 290296b59823


--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -608,7 +608,7 @@
         #find out if there's a two byte key like this
         temp_maybe = maybe_byte
         temp_maybe += ( ord(rom[offset+1]) << 8)
-        if temp_maybe in opt_table.keys():
+        if temp_maybe in opt_table.keys() and ord(rom[offset+1])!=0:
             opstr = opt_table[temp_maybe][0].lower()
             
             if "x" in opstr:
@@ -640,6 +640,7 @@
 
             current_byte_number += 2
             offset += 2
+            print "next byte is: " + hex(ord(extract_maps.rom[offset]))
         elif maybe_byte in opt_table.keys():
             op_code = opt_table[maybe_byte]
             op_code_type = op_code[1]