mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
symfile: fix address handling
This commit is contained in:
parent
dfb2416192
commit
a4235e11bf
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user