Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mymcplusplus/ps2mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from .save import ps2save

PS2MC_MAGIC = b"Sony PS2 Memory Card Format "
SC2MC_MAGIC = b"Memory Card for SoulCaliburII"
PS2MC_FAT_ALLOCATED_BIT = 0x80000000
PS2MC_FAT_CHAIN_END = 0xFFFFFFFF
PS2MC_FAT_CHAIN_END_UNALLOC = 0x7FFFFFFF
Expand Down Expand Up @@ -616,6 +617,8 @@ def __init__(self, f, ignore_ecc = False, params = None):

f.seek(0)
s = f.read(0x154)
if s.startswith(SC2MC_MAGIC):
raise error("SoulCalibur II Conquest Card for SYSTEM246 detected\nSkipping format to protect the file")
if len(s) != 0x154 or not s.startswith(PS2MC_MAGIC):
if (params == None):
raise corrupt("Not a PS2 memory card image",
Expand Down