shithub: pokecrystal

Download patch

ref: dfb241619203a2b1b9eb389055cbe0ff31baa7a0
parent: ef6767f1a9bf1f29c009103c355b7c91cd33297a
author: yenatch <[email protected]>
date: Sat Jun 15 10:11:50 EDT 2013

gbz80disasm: fix labels outside of banks 0 and 1

--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -577,7 +577,7 @@
 
     if local_address < 0x8000:
         for label_entry in all_labels:
-            if label_entry["address"] == local_address:
+            if label_entry["address"] & 0x7fff == local_address:
                 if label_entry["bank"] == bank_id or label_entry["bank"] == 0:
                     return label_entry["label"]
     if local_address in wram_labels.keys():