[BS-X] Flash Support for BS Compatible Games

- Removed write MMC check from S9xSetBSX() [redundant with BSX_Map_FlashIO()]
This commit is contained in:
LuigiBlood 2017-12-17 00:34:53 +01:00
parent d89d7681ad
commit 660b087378

13
bsx.cpp
View File

@ -704,18 +704,20 @@ static void BSX_Map (void)
static uint8 BSX_Get_Bypass_FlashIO (uint32 offset)
{
//For games other than BS-X
FlashROM = Memory.ROM + Multi.cartOffsetB;
if (BSX.prevMMC[0x02])
{
return (FlashROM[offset & 0x0FFFFF]);
}
else
{
return (FlashROM[(offset & 0x1F0000) >> 1 | (offset & 0x7FFF)]);
}
}
static void BSX_Set_Bypass_FlashIO (uint32 offset, uint8 byte)
{
//For games other than BS-X
FlashROM = Memory.ROM + Multi.cartOffsetB;
if (BSX.prevMMC[0x02])
FlashROM[offset & 0x0FFFFF] = FlashROM[offset & 0x0FFFFF] & byte;
else
@ -814,7 +816,7 @@ void S9xSetBSX (uint8 byte, uint32 address)
}
// Flash Command Handling
if (BSX.MMC[0xC]) {
//Memory Pack Type 1 & 3 & 4
BSX.flash_command <<= 8;
BSX.flash_command |= byte;
@ -915,7 +917,6 @@ void S9xSetBSX (uint8 byte, uint32 address)
break;
}
}
}
void S9xBSXSetStream1 (uint8 count)
{