diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-12-23 02:56:46 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-12-23 02:57:21 -0600 |
commit | 3b20ea29160760a85db9d84f61a92a957d14efb3 (patch) | |
tree | 9009dd8d7c7610027b53cdf8a6f85e245904dd2e /extras/gbz80disasm.py | |
parent | 5e928616596b556194f3c2291ce0470ab0fb6ffd (diff) | |
parent | 8092f62cf42e20915ba608861e77588b38a36517 (diff) |
Merge remote branch 'remotes/yenatch/master'
fixes #49
Diffstat (limited to 'extras/gbz80disasm.py')
-rw-r--r-- | extras/gbz80disasm.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py index 385f89035..48739e03f 100644 --- a/extras/gbz80disasm.py +++ b/extras/gbz80disasm.py @@ -593,7 +593,7 @@ def asm_label(address): # why using a random value when you can use the address? return ".ASM_" + hex(address)[2:] -def output_bank_opcodes(original_offset, max_byte_count=0x4000): +def output_bank_opcodes(original_offset, max_byte_count=0x4000, debug = False): #fs = current_address #b = bank_byte #in = input_data -- rom @@ -601,11 +601,14 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000): #i = offset #ad = end_address #a, oa = current_byte_number - + + load_labels() + load_rom() + bank_id = 0 if original_offset > 0x8000: bank_id = original_offset / 0x4000 - print "bank id is: " + str(bank_id) + if debug: print "bank id is: " + str(bank_id) last_hl_address = None #for when we're scanning the main map script last_a_address = None @@ -843,7 +846,7 @@ def all_outstanding_labels_are_reverse(byte_labels, offset): if not label_id < offset: return False return True + + if __name__ == "__main__": - load_labels() - load_rom() print output_bank_opcodes(int(sys.argv[1], 16))[0] |