Sort X76F041 dumps by cart type, update cartdb

This commit is contained in:
spicyjpeg 2023-09-22 16:38:02 +02:00
parent 2876823f0c
commit 5bce5a4d41
No known key found for this signature in database
GPG Key ID: 5CC87404C01DF393
2 changed files with 11 additions and 1 deletions

Binary file not shown.

View File

@ -37,6 +37,9 @@ class GameEntry:
def getFullName(self) -> str:
return f"{self.name} [{self.code} {self.region}]"
def hasCartID(self) -> bool:
return self.gameCart.endswith("DS2401")
def hasSystemID(self) -> bool:
return (self.ioBoard in SYSTEM_ID_IO_BOARDS)
@ -242,6 +245,13 @@ def processDump(
continue
# TODO: handle separate installation/game carts
if game.hasCartID():
#parser.flags |= DataFlag.DATA_HAS_CART_ID
assert parser.flags & DataFlag.DATA_HAS_CART_ID
else:
#parser.flags &= ~DataFlag.DATA_HAS_CART_ID
assert not (parser.flags & DataFlag.DATA_HAS_CART_ID)
if game.hasSystemID():
parser.flags |= DataFlag.DATA_HAS_SYSTEM_ID
else:
@ -250,7 +260,7 @@ def processDump(
games[game.name] = \
DBEntry(parser.code, parser.region, game.name, dump, parser)
logging.info(f"imported {dump.chipType.name}: {game.name}")
logging.info(f"imported {dump.chipType.name}: {game.getFullName()}")
yield from games.values()