1
0
mirror of https://github.com/blawar/ooot.git synced 2024-06-30 16:29:55 +00:00

added support for multiple rom hashes

This commit is contained in:
Blake Warner 2022-03-01 17:10:23 -05:00
parent b449223992
commit 461206d6ea
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"rom": {
"UNCOMPRESSED_SIZE": null,
"hash_md5": "f0b7f35375f9cc8ca1b2d59d78e35405",
"hash_md5": ["f0b7f35375f9cc8ca1b2d59d78e35405", "8ca71e87de4ce5e9f6ec916202a623e9", "f751d1a097764e2337b1ac9ba1e27699"],
"FILE_TABLE_OFFSET": "12F70",
"FILE_NAMES": [
"makerom",

View File

@ -1,7 +1,7 @@
{
"rom": {
"UNCOMPRESSED_SIZE": "34D3040",
"hash_md5": "c02c1d79679f7ceb9a3bde55fff8aa13",
"hash_md5": ["c02c1d79679f7ceb9a3bde55fff8aa13"],
"FILE_TABLE_OFFSET": "7950",
"FILE_NAMES": [
"makerom",

View File

@ -197,8 +197,8 @@ if conf.rom.FILE_TABLE_OFFSET:
# Check to see if the ROM is a "vanilla" Debug ROM
str_hash = get_str_hash(bytearray(fileContent))
if str_hash != conf.rom.hash_md5:
print("Error: Expected a hash of %s but got %s. The baserom has probably been tampered, find a new one" % (conf.rom.hash_md5, str_hash))
if str_hash.lower() not in conf.rom.hash_md5:
print("Error: Expected a hash of %s but got %s. The baserom has probably been tampered, find a new one" % (', '.join(conf.rom.hash_md5), str_hash))
cancel()