summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-10 12:06:32 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-10 12:06:32 -0600
commitb6d32d9022e43f56dc2797cac4879f61542f3b9e (patch)
treea0ec3f8eea78dc5a4b2d3e755f412f83e355ed4f
parent71a840c3c379dd597150e157b6e58715dcdefd97 (diff)
fix gbz80disasm pretty printer for non-08 scripts
hg-commit-id: 6f16741dc45f
-rw-r--r--extras/gbz80disasm.py5
-rw-r--r--extras/insert_texts.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py
index 95258bf8..d0093436 100644
--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -548,6 +548,7 @@ asm_commands = {
"3927": "AddPokemonToParty",
"3e48": "GivePokemon",
"3dd7": "Delay3",
+ "3e2e": "GiveItem",
}
def random_asm_label():
@@ -729,7 +730,9 @@ def text_asm_pretty_printer(label, address_of_08, include_08=True):
output = label + ": ; " + hex(address_of_08) + "\n"
if include_08:
output += spacing + "db $08 ; asm\n"
- results = output_bank_opcodes(address_of_08 + 1)
+ results = output_bank_opcodes(address_of_08 + 1)
+ else:
+ results = output_bank_opcodes(address_of_08)
output += results[0]
end_address = results[1]
diff --git a/extras/insert_texts.py b/extras/insert_texts.py
index 9c73dc7b..282f0bdc 100644
--- a/extras/insert_texts.py
+++ b/extras/insert_texts.py
@@ -424,7 +424,7 @@ if __name__ == "__main__":
#insert_08_asm(83, 1)
#insert_all_08s()
- insert_asm(0x3927, "AddPokemonToParty")
+ insert_asm(0x31cc, "LoadTrainerHeader")
print "-- FAILED ATTEMPTS --"
print str(failed_attempts)