From 0f771aaf7a3eba09822429c53a813bcfe5533e35 Mon Sep 17 00:00:00 2001 From: bladeoner Date: Wed, 17 Apr 2019 02:03:46 +0200 Subject: [PATCH] Snes9x - Round up calculated size to next 8k for bad hacks. (#842) --- source/snes9x/memmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/snes9x/memmap.cpp b/source/snes9x/memmap.cpp index 5452f0e..a98e722 100644 --- a/source/snes9x/memmap.cpp +++ b/source/snes9x/memmap.cpp @@ -1468,7 +1468,7 @@ bool8 CMemory::LoadROMInt (int32 ROMfillSize) lo_score = ScoreLoROM(FALSE); } - CalculatedSize = (ROMfillSize / 0x2000) * 0x2000; + CalculatedSize = ((ROMfillSize + 0x1fff) / 0x2000) * 0x2000; if (CalculatedSize > 0x400000 && (ROM[0x7fd5] + (ROM[0x7fd6] << 8)) != 0x3423 && // exclude SA-1