[BS-X] Avoid updating the memory map when it is not needed

This commit is contained in:
LuigiBlood 2017-12-16 17:21:00 +01:00
parent f17e66fc62
commit 54d7fe404d
1 changed files with 11 additions and 2 deletions

13
bsx.cpp
View File

@ -741,9 +741,18 @@ void S9xSetBSX (uint8 byte, uint32 address)
// MMC // MMC
if ((bank >= 0x01 && bank <= 0x0E)) if ((bank >= 0x01 && bank <= 0x0E))
{ {
BSX.MMC[bank] = byte; //Avoid updating the memory map when it is not needed
if (bank == 0x0E) if (bank == 0x0E && BSX.dirty)
{
BSX_Map(); BSX_Map();
BSX.dirty = FALSE;
}
else if (bank != 0x0E && BSX.MMC[bank] != byte)
{
BSX.dirty = TRUE;
}
BSX.MMC[bank] = byte;
} }
// Flash IO // Flash IO