Fixed find_similar_areas
Hard-coded total bytes for non-us since those aren't mapped out and the current % is misleading
This commit is contained in:
Ethan Roseman 2023-02-18 18:03:57 +09:00
parent e55556ddcb
commit 2ce88d2869
No known key found for this signature in database
GPG Key ID: 27F9FCEB8E4969BD
2 changed files with 5 additions and 2 deletions

View File

@ -106,6 +106,9 @@ def main(args):
sizes, vrams = get_func_info() sizes, vrams = get_func_info()
total_size = sum(sizes.values()) total_size = sum(sizes.values())
# TODO hack for now since non-jp roms aren't mapped out
if args.version != "us":
total_size = 3718668
all_funcs = set(sizes.keys()) all_funcs = set(sizes.keys())
nonmatching_funcs = get_nonmatching_funcs() nonmatching_funcs = get_nonmatching_funcs()

View File

@ -108,7 +108,7 @@ def parse_map() -> OrderedDict[str, Symbol]:
sect = sect_re.search(line) sect = sect_re.search(line)
if sect: if sect:
sect_str = sect.group(0) sect_str = sect.group(0)
if sect_str in ["(.text)", "(.data)", "(.rodata)", "(.bss)"]: if sect_str in ["(.text*)", "(.data*)", "(.rodata*)", "(.bss*)"]:
cur_sect = sect_str cur_sect = sect_str
if "load address" in line: if "load address" in line:
@ -136,7 +136,7 @@ def parse_map() -> OrderedDict[str, Symbol]:
elif "/" in fn: elif "/" in fn:
cur_file = fn cur_file = fn
else: else:
if cur_sect != "(.text)": if cur_sect != "(.text*)":
continue continue
new_sym = Symbol( new_sym = Symbol(
name=fn, name=fn,