ref: 0d1f2d6710a8a22d76b4c645f40a6d8e6411571d
parent: c07ffc7633fca8ccdb55856d67f5265638dcbe9a
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Wed Jan 3 09:57:10 EST 2018
Add example .map lines
--- a/tools/sort_map.py
+++ b/tools/sort_map.py
@@ -23,10 +23,15 @@
return sizes[type]
def sorted_mapfile(input):
+ # ex: OAM:
unused_rx = re.compile(r'^([A-Z]+):$')
+ # ex: ROM Bank #1:
bank_rx = re.compile(r'^([A-Z]+) Bank #([0-9]+)')
+ # ex: SECTION: $4000-$747A ($347B bytes) ["bank1"]
section_rx = re.compile(r' +SECTION: \$([0-9A-F]+)(?:-\$([0-9A-F]+))? \(\$([0-9A-F]+) bytes\) \["(.+)"\]')
+ # ex: $4025 = PlaceWaitingText.Waiting
label_rx = re.compile(r' +\$([0-9A-F]+) = (.+)')
+ # ex: SLACK: $0B85 bytes
slack_rx = re.compile(r' +SLACK: \$([0-9A-F]+) bytes')
bank_type = None