mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
Updated script to check for multiple ROM extensions.
This commit is contained in:
parent
d780e6b13e
commit
675215417f
1 changed files with 13 additions and 5 deletions
|
@ -4,10 +4,18 @@ import sys
|
|||
import struct
|
||||
import hashlib
|
||||
|
||||
# Read in the original ROM
|
||||
|
||||
# Determine if we have a ROM file
|
||||
romFileName = ""
|
||||
if (path.exists("baserom_original.z64")):
|
||||
print("File 'baserom_original.z64' found.")
|
||||
with open("baserom_original.z64", mode='rb') as file:
|
||||
romFileName = "baserom_original.z64"
|
||||
elif (path.exists("baserom_original.n64")):
|
||||
romFileName = "baserom_original.n64"
|
||||
|
||||
# Read in the original ROM
|
||||
if (romFileName != ""):
|
||||
print("File '" + romFileName + "' found.")
|
||||
with open(romFileName, mode='rb') as file:
|
||||
fileContent = bytearray(file.read())
|
||||
|
||||
# Check if ROM needs to be byte swapped
|
||||
|
@ -28,7 +36,7 @@ if (path.exists("baserom_original.z64")):
|
|||
|
||||
print("Byte swapping done.")
|
||||
else:
|
||||
print("Error: Could not find baserom_original.z64.")
|
||||
print("Error: Could not find baserom_original.z64/baserom_original.n64.")
|
||||
sys.exit(1)
|
||||
|
||||
# Strip the overdump
|
||||
|
|
Loading…
Reference in a new issue