SoE: include base_checksum in apbp

This commit is contained in:
black-sliver 2021-11-10 09:17:27 +01:00
parent c32f3d6e96
commit 9ada4df151
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,10 @@ from typing import Optional
import Utils import Utils
USHASH = '6e9c94511d04fac6e0a1e582c170be3a'
current_patch_version = 2
def read_rom(stream, strip_header=True) -> bytes: def read_rom(stream, strip_header=True) -> bytes:
"""Reads rom into bytearray and optionally strips off any smc header""" """Reads rom into bytearray and optionally strips off any smc header"""
data = stream.read() data = stream.read()
@ -18,7 +22,8 @@ def generate_yaml(patch: bytes, metadata: Optional[dict] = None) -> bytes:
"game": "Secret of Evermore", "game": "Secret of Evermore",
# minimum version of patch system expected for patching to be successful # minimum version of patch system expected for patching to be successful
"compatible_version": 1, "compatible_version": 1,
"version": 1}) "version": current_patch_version,
"base_checksum": USHASH})
return patch.encode(encoding="utf-8-sig") return patch.encode(encoding="utf-8-sig")