summaryrefslogtreecommitdiff
path: root/extras/sym.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-06-17 16:56:00 -0700
committerBryan Bishop <kanzure@gmail.com>2013-06-17 16:56:00 -0700
commitac773a9dc1499f7070dc98236c66de6309885210 (patch)
tree9bbb797102d061a4f6d7ac930a3a76bd7029eedf /extras/sym.py
parentfe01fb510ff87310de1ecbce73f74d1a390d557c (diff)
parent20c0c0e233a7599b1f21e05ddefbd67d0d17504c (diff)
Merge pull request #147 from yenatch/master
gbz80disasm/sym fixes + odds and ends
Diffstat (limited to 'extras/sym.py')
-rw-r--r--extras/sym.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/sym.py b/extras/sym.py
index 445abb155..cc580fa67 100644
--- a/extras/sym.py
+++ b/extras/sym.py
@@ -10,7 +10,7 @@ def make_sym_from_json(filename = '../pokecrystal.sym', j = 'labels.json'):
# todo: delete and remake labels.json at runtime
with open(filename, 'w') as sym:
for label in json.load(open(j)):
- sym.write('{0:x}:{1:x} {2}\n'.format(label['bank'], label['address']&0x3fff, label['label']))
+ sym.write('{0:x}:{1:x} {2}\n'.format(label['bank'], label['address']%0x4000 + (0x4000 if label['bank'] else 0), label['label']))
def make_sym_from_mapfile(filename = '../pokecrystal.sym', mapfile = '../mapfile.txt'):