From 14df08d804a574bed792983c6f6d0ef74f3c54ed Mon Sep 17 00:00:00 2001 From: Alexey Cluster Date: Tue, 28 May 2024 14:03:27 +0400 Subject: [PATCH] Take NES 2.0 header WRAM size into account for MMC3 --- src/boards/mmc3.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/boards/mmc3.cpp b/src/boards/mmc3.cpp index d0f4d20e..f0eb52d2 100644 --- a/src/boards/mmc3.cpp +++ b/src/boards/mmc3.cpp @@ -363,8 +363,10 @@ static void M4Power(void) { void Mapper4_Init(CartInfo *info) { int ws = 8; - if ((info->CRC32 == 0x93991433 || info->CRC32 == 0xaf65aa84)) { - FCEU_printf("Low-G-Man can not work normally in the iNES format.\nThis game has been recognized by its CRC32 value, and the appropriate changes will be made so it will run.\nIf you wish to hack this game, you should use the UNIF format for your hack.\n\n"); + if (info->ines2) { + ws = (info->wram_size + info->battery_wram_size) / 1024; + } else if ((info->CRC32 == 0x93991433 || info->CRC32 == 0xaf65aa84)) { + FCEU_printf("Low-G-Man can not work normally in the iNES format.\nThis game has been recognized by its CRC32 value, and the appropriate changes will be made so it will run.\nIf you wish to hack this game, you should use the NES 2.0 format for your hack.\n\n"); ws = 0; } GenMMC3_Init(info, 512, 256, ws, info->battery);