m176: Fix battery save size, silence parenthesis warning

This commit is contained in:
negativeExponent
2020-10-21 21:03:36 +08:00
parent e0cb4d2814
commit c2594418a9
2 changed files with 5 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ static SFORMAT StateRegs[] =
static void Sync(void) {
if (type && unrom) {
setprg16(0x8000, 0x80 | reg & 7);
setprg16(0x8000, 0x80 | (reg & 7));
setprg16(0xC000, 0x80 | 7);
setchr8(0);
setmirror(MI_V);

View File

@@ -531,7 +531,10 @@ void GenBMCFK23C_Init(CartInfo *info)
if (info->battery)
{
info->SaveGame[0] = WRAM;
info->SaveGameLen[0] = info->PRGRamSaveSize ? info->PRGRamSaveSize : WRAMSIZE;
if (info->iNES2 && info->PRGRamSaveSize)
info->SaveGameLen[0] = info->PRGRamSaveSize
else
info->SaveGameLen[0] = WRAMSIZE;
}
}