mirror of https://github.com/pret/pokecrystal.git
advance forward when disassembling the rom
This commit is contained in:
parent
b19db1e604
commit
4b7ca69344
|
@ -1,4 +1,6 @@
|
||||||
from gbz80disasm import opt_table, end_08_scripts_with, relative_jumps, relative_unconditional_jumps, call_commands
|
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):
|
class RomStr(str):
|
||||||
""" Simple wrapper to prevent a giant rom from being shown on screen.
|
""" 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.
|
# Check for relative jumps, construct the formatted asm line.
|
||||||
# Also set the usage of labels.
|
# 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"
|
print "debug5"
|
||||||
|
|
||||||
# generate a label for the byte we're jumping to
|
# generate a label for the byte we're jumping to
|
||||||
|
@ -326,6 +328,9 @@ class Asm:
|
||||||
asm_command["value"] = current_byte
|
asm_command["value"] = current_byte
|
||||||
keep_reading = False
|
keep_reading = False
|
||||||
|
|
||||||
|
# jump forward by a byte
|
||||||
|
offset += 1
|
||||||
|
|
||||||
# save this new command in the list
|
# save this new command in the list
|
||||||
asm_commands[asm_command["address"]] = asm_command
|
asm_commands[asm_command["address"]] = asm_command
|
||||||
self.asm_commands = asm_commands
|
self.asm_commands = asm_commands
|
||||||
|
|
Loading…
Reference in New Issue