summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/gbz80disasm.py6
-rw-r--r--extras/print_pc_items.py9
2 files changed, 4 insertions, 11 deletions
diff --git a/extras/gbz80disasm.py b/extras/gbz80disasm.py
index dbfb4e32..699d91aa 100644
--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -546,7 +546,7 @@ end_08_scripts_with = [
0xc9, #ret
###0xda, 0xe9, 0xd2, 0xc2, 0xca, 0xc3, 0x38, 0x30, 0x20, 0x28, 0x18, 0xd8, 0xd0, 0xc0, 0xc8, 0xc9
]
-relative_jumps = [0x38, 0x30, 0x20, 0x28, 0x18, 0xc3, 0xda]
+relative_jumps = [0x38, 0x30, 0x20, 0x28, 0x18, 0xc3, 0xda, 0xc2]
relative_unconditional_jumps = [0xc3, 0x18]
#TODO: replace call and a pointer with call and a label
@@ -566,6 +566,8 @@ asm_commands = {
"24d7": "TextScriptEnd",
"3e5c": "GenRandom", #bank 4
"6581": "ItemUseNotTime",
+ "3a87": "AddNTimes",
+ "3dab": "IsInArray", #bank 3
}
def random_asm_label():
@@ -722,7 +724,7 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000):
number += byte2 << 8;
insertion = "$%.4x" % (number)
- if maybe_byte in call_commands:
+ if maybe_byte in call_commands or current_byte in relative_unconditional_jumps or current_byte in relative_jumps:
if insertion[1:] in asm_commands:
insertion = asm_commands[insertion[1:]]
diff --git a/extras/print_pc_items.py b/extras/print_pc_items.py
deleted file mode 100644
index 7b9dc6c3..00000000
--- a/extras/print_pc_items.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-#author: Bryan Bishop <kanzure@gmail.com>
-#date: 2012-01-19
-#spit out some constants
-
-for x in range(1, 51):
- print "W_BOXITEM%.2d EQU $%s" % (x, ("%.2x" % (0xd539+(x*2))).upper())
- print "W_BOXITEM%.2dQTY EQU $%s" % (x, ("%.2x" % (0xd539+(x*2)+1)).upper())
-