diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-06-14 21:54:25 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-06-14 21:54:25 -0500 |
commit | 4b7ca6934420fcac3c493cc82eddfe1b29b67a38 (patch) | |
tree | 93f9e4fc38f6281a04b05770498adee80f00eed1 | |
parent | b19db1e6041d593f88a9fb935ca4cf152b39e34c (diff) |
advance forward when disassembling the rom
-rw-r--r-- | extras/romstr.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extras/romstr.py b/extras/romstr.py index edcc3fa9b..d7d03ea7c 100644 --- a/extras/romstr.py +++ b/extras/romstr.py @@ -1,4 +1,6 @@ from gbz80disasm import opt_table, end_08_scripts_with, relative_jumps, relative_unconditional_jumps, call_commands +from ctypes import c_int8 +from copy import copy, deepcopy class RomStr(str): """ Simple wrapper to prevent a giant rom from being shown on screen. @@ -245,7 +247,7 @@ class Asm: # Check for relative jumps, construct the formatted asm line. # Also set the usage of labels. - if current_byte in [0x18, 0x20] or current_byte in relative_jumps: # jr or jr nz + if current_byte in [0x18, 0x20] + relative_jumps: # jr or jr nz print "debug5" # generate a label for the byte we're jumping to @@ -326,6 +328,9 @@ class Asm: asm_command["value"] = current_byte keep_reading = False + # jump forward by a byte + offset += 1 + # save this new command in the list asm_commands[asm_command["address"]] = asm_command self.asm_commands = asm_commands |