mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00
Improve error checking in the context of issue #27
Link to kanzures' guidelines for that issue: https://bitbucket.org/iimarckus/pokered/issue/27/analyze_incbinsscan_for_predifined_labels#comment-2068911
This commit is contained in:
parent
db0c37557d
commit
19a859ca51
|
@ -409,6 +409,9 @@ def scan_for_predefined_labels():
|
|||
bank_intervals = {}
|
||||
all_labels = []
|
||||
|
||||
if asm is None:
|
||||
load_asm()
|
||||
|
||||
#figure out line numbers for each bank
|
||||
for bank_id in range(0x2d):
|
||||
abbreviation = ("%.x" % (bank_id)).upper()
|
||||
|
|
|
@ -561,7 +561,9 @@ def load_labels(filename="labels.json"):
|
|||
if os.path.exists(filename):
|
||||
all_labels = json.loads(open(filename, "r").read())
|
||||
else:
|
||||
print "You must run analyze_incbins.scan_for_predefined_labels() to create \"labels.json\"."
|
||||
print "You must run analyze_incbins.scan_for_predefined_labels() to create \"labels.json\". Trying..."
|
||||
import analyze_incbins
|
||||
analyze_incbins.scan_for_predefined_labels()
|
||||
load_labels()
|
||||
|
||||
def find_label(local_address, bank_id=0):
|
||||
|
|
Loading…
Reference in a new issue