shithub: pokecrystal

Download patch

ref: 3a1f843e783a7a654ccd7e72f5e3fa4a40ea4009
parent: fe4b13e304decc48af0918fce281ed588f867a72
author: yenatch <[email protected]>
date: Thu Jun 27 20:10:38 EDT 2013

gbz80disasm: only track rom addresses for data

--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -603,7 +603,9 @@
     bank = address / 0x4000
     return (address & 0x3fff) + 0x4000 * bool(bank)
 def get_global_address(address, bank):
-    return (address & 0x3fff) + 0x4000 * bank
+    if address < 0x8000:
+        return (address & 0x3fff) + 0x4000 * bank
+    return None
 
 def output_bank_opcodes(original_offset, max_byte_count=0x4000, include_last_address=True, stop_at=[], debug = False):
     #fs = current_address