1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 23:44:53 +00:00

Add COMPARE and NON_MATCHING build options (#275)

* Add COMPARE and NON_MATCHING build options

* Add a -m/--make option to first_diff.py

* Minor comment update
This commit is contained in:
Roman971 2020-07-19 21:42:05 +02:00 committed by GitHub
parent 15038468ac
commit 3d36fe510f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View file

@ -24,10 +24,16 @@ parser.add_argument(
const="prompt",
help="run diff.py on the result with the provided arguments"
)
parser.add_argument(
"-m", "--make", help="run make before finding difference(s)", action="store_true"
)
args = parser.parse_args()
diff_count = args.count
if args.make:
check_call(["make", "-j4", "COMPARE=0"])
baseimg = f"baserom.z64"
basemap = f"expected/build/z64.map"
@ -228,6 +234,10 @@ if diffs > 100:
print(f"No ROM shift{' (!?)' if definite_shift else ''}")
if args.diff_args:
if len(found_instr_diff) < 1:
print(f"No instruction difference to run diff.py on")
exit()
diff_sym = search_rom_address(found_instr_diff[0]).split()[0]
if args.diff_args == "prompt":
diff_args = input("Call diff.py with which arguments? ") or "--"