SNES games: use JPN as abbreviation for Japan/Japanese

This commit is contained in:
strotlog
2022-06-28 00:43:05 +00:00
committed by Fabian Dill
parent 8a8bc6aa34
commit b206f2846a
5 changed files with 20 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import Utils
from Patch import read_rom
JAP10HASH = '03a63945398191337e896e5771f77173'
LTTPJPN10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '9952c2a3ec1b421e408df0d20c8f0c7f'
ROM_PLAYER_LIMIT = 255
@@ -2890,7 +2890,7 @@ hash_alphabet = [
class LttPDeltaPatch(Patch.APDeltaPatch):
hash = JAP10HASH
hash = LTTPJPN10HASH
game = "A Link to the Past"
patch_file_ending = ".aplttp"
@@ -2907,8 +2907,8 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
basemd5 = hashlib.md5()
basemd5.update(base_rom_bytes)
if JAP10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for JAP(1.0) release. '
if LTTPJPN10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for Japan(1.0) release. '
'Get the correct game and version, then dump it')
get_base_rom_bytes.base_rom_bytes = base_rom_bytes
return base_rom_bytes

View File

@@ -4,12 +4,12 @@ import os
import Utils
from Patch import read_rom, APDeltaPatch
JAP10HASH = '21f3e98df4780ee1c667b84e57d88675'
SMJUHASH = '21f3e98df4780ee1c667b84e57d88675'
ROM_PLAYER_LIMIT = 65535
class SMDeltaPatch(APDeltaPatch):
hash = JAP10HASH
hash = SMJUHASH
game = "Super Metroid"
patch_file_ending = ".apsm"
@@ -26,8 +26,8 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
basemd5 = hashlib.md5()
basemd5.update(base_rom_bytes)
if JAP10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for JAP(1.0) release. '
if SMJUHASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for Japan+US release. '
'Get the correct game and version, then dump it')
get_base_rom_bytes.base_rom_bytes = base_rom_bytes
return base_rom_bytes

View File

@@ -4,8 +4,8 @@ import os
import Utils
from Patch import read_rom, APDeltaPatch
SMJAP10HASH = '21f3e98df4780ee1c667b84e57d88675'
LTTPJAP10HASH = '03a63945398191337e896e5771f77173'
SMJUHASH = '21f3e98df4780ee1c667b84e57d88675'
LTTPJPN10HASH = '03a63945398191337e896e5771f77173'
ROM_PLAYER_LIMIT = 256
@@ -27,16 +27,16 @@ def get_base_rom_bytes() -> bytes:
basemd5 = hashlib.md5()
basemd5.update(sm_base_rom_bytes)
if SMJAP10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for SM JAP(1.0) release. '
if SMJUHASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for SM Japan+US release. '
'Get the correct game and version, then dump it')
lttp_file_name = get_lttp_base_rom_path()
lttp_base_rom_bytes = bytes(read_rom(open(lttp_file_name, "rb")))
basemd5 = hashlib.md5()
basemd5.update(lttp_base_rom_bytes)
if LTTPJAP10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for LttP JAP(1.0) release. '
if LTTPJPN10HASH != basemd5.hexdigest():
raise Exception('Supplied Base Rom does not match known MD5 for LttP Japan(1.0) release. '
'Get the correct game and version, then dump it')
get_base_rom_bytes.base_rom_bytes = bytes(combine_smz3_rom(sm_base_rom_bytes, lttp_base_rom_bytes))