GB MBC: Fix MMM01 detection heuristic

This commit is contained in:
Vicki Pfau 2018-08-03 18:39:26 -07:00
parent 825c70bbf7
commit 35a56e9507
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ void GBMBCInit(struct GB* gb) {
if (gb->memory.rom) {
if (gb->memory.romSize >= 0x8000) {
const struct GBCartridge* cartFooter = (const struct GBCartridge*) &gb->memory.rom[gb->memory.romSize - 0x7F00];
if (doCrc32(cartFooter->logo, sizeof(cartFooter->logo)) == GB_LOGO_HASH) {
if (doCrc32(cartFooter->logo, sizeof(cartFooter->logo)) == GB_LOGO_HASH && cartFooter->type >= 0x0B && cartFooter->type <= 0x0D) {
cart = cartFooter;
}
}