Patch: update to version 4 (#312)

This commit is contained in:
Fabian Dill
2022-03-18 04:53:09 +01:00
committed by GitHub
parent b02a710bc5
commit 7394598aff
14 changed files with 334 additions and 118 deletions

View File

@@ -1,11 +1,21 @@
import hashlib
import os
import Utils
from Patch import read_rom
from Patch import read_rom, APDeltaPatch
JAP10HASH = '21f3e98df4780ee1c667b84e57d88675'
ROM_PLAYER_LIMIT = 65535
import hashlib
import os
class SMDeltaPatch(APDeltaPatch):
hash = JAP10HASH
game = "Super Metroid"
patch_file_ending = ".apsm"
@classmethod
def get_source_data(cls) -> bytes:
return get_base_rom_bytes()
def get_base_rom_bytes(file_name: str = "") -> bytes:
@@ -22,6 +32,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
get_base_rom_bytes.base_rom_bytes = base_rom_bytes
return base_rom_bytes
def get_base_rom_path(file_name: str = "") -> str:
options = Utils.get_options()
if not file_name: