From 412e40698de037075842cb34bdaf09878e52c971 Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Mon, 19 Oct 2020 08:18:23 +0800 Subject: [PATCH] Fix overrides incorrectly setting flags --- src/ines.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ines.c b/src/ines.c index 8ca2d3e..8b8c621 100644 --- a/src/ines.c +++ b/src/ines.c @@ -328,13 +328,15 @@ static void CheckHInfo(void) { case 1: case 5: case 176: - tofix |= 32; - iNESCart.iNES2 = 1; if (moo[x].prgram >= 0) { + tofix |= 32; + iNESCart.iNES2 = 1; iNESCart.PRGRamSize = (moo[x].prgram & 0x0F) ? (64 << ((moo[x].prgram >> 0) & 0xF)) : 0; iNESCart.PRGRamSaveSize = (moo[x].prgram & 0xF0) ? (64 << ((moo[x].prgram >> 4) & 0xF)) : 0; } if (moo[x].chrram >= 0) { + tofix |= 32; + iNESCart.iNES2 = 1; iNESCart.CHRRamSize = (moo[x].chrram & 0x0F) ? (64 << ((moo[x].chrram >> 0) & 0xF)) : 0; iNESCart.CHRRamSaveSize = (moo[x].chrram & 0xF0) ? (64 << ((moo[x].chrram >> 4) & 0xF)) : 0; }