mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-16 10:06:40 +13:00
skip some incbins from analyze_texts for 0-size intervals
hg-commit-id: a63d92b4534c
This commit is contained in:
parent
a6f495e25e
commit
ffdd92db77
|
|
@ -616,6 +616,7 @@ def scan_rom_for_tx_fars(printer=True):
|
||||||
incbin = analyze_incbins.processed_incbins[incbin_line_number]
|
incbin = analyze_incbins.processed_incbins[incbin_line_number]
|
||||||
start_address = incbin["start"]
|
start_address = incbin["start"]
|
||||||
end_address = incbin["end"]
|
end_address = incbin["end"]
|
||||||
|
if incbin["interval"] == 0: continue #skip this one
|
||||||
|
|
||||||
subrom = rom[start_address:end_address]
|
subrom = rom[start_address:end_address]
|
||||||
for address in range(start_address, end_address):
|
for address in range(start_address, end_address):
|
||||||
|
|
|
||||||
|
|
@ -418,6 +418,12 @@ def insert_text(address, label, apply=False, try_fixing=True):
|
||||||
print "skipping text at " + hex(start_address) + " with address " + label
|
print "skipping text at " + hex(start_address) + " with address " + label
|
||||||
return "skip"
|
return "skip"
|
||||||
|
|
||||||
|
#another reason to skip is if the interval is 0
|
||||||
|
processed_incbin = analyze_incbins.processed_incbins[line_number]
|
||||||
|
if processed_incbin["interval"] == 0:
|
||||||
|
print "skipping text at " + hex(start_address) + " with address " + label + " because the interval is 0"
|
||||||
|
return "skip"
|
||||||
|
|
||||||
text_asm, byte_count = text_pretty_printer_at(start_address, label)
|
text_asm, byte_count = text_pretty_printer_at(start_address, label)
|
||||||
end_address = start_address + byte_count
|
end_address = start_address + byte_count
|
||||||
newlines = split_incbin_line_into_three(line_number, start_address, byte_count)
|
newlines = split_incbin_line_into_three(line_number, start_address, byte_count)
|
||||||
|
|
@ -612,7 +618,7 @@ def scan_rom_for_tx_fars_and_insert():
|
||||||
for address_bundle in address_bundles:
|
for address_bundle in address_bundles:
|
||||||
tx_far_address = address_bundle[1]
|
tx_far_address = address_bundle[1]
|
||||||
tx_far_target_address = address_bundle[0]
|
tx_far_target_address = address_bundle[0]
|
||||||
if tx_far_address < 0x6150f: continue
|
#if tx_far_address < 0x7627b: continue #because it stopped a few times for errors
|
||||||
|
|
||||||
tx_far_label = "UnnamedText_%.2x" % (tx_far_address)
|
tx_far_label = "UnnamedText_%.2x" % (tx_far_address)
|
||||||
tx_far_target_label = "_" + tx_far_label
|
tx_far_target_label = "_" + tx_far_label
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue