datalatch mapper-fix bug where wramless games would be able to do something mysterious to unmapped host emulator memory or something creepy like that (fix battletoads sync regression)

This commit is contained in:
zeromus 2011-09-17 20:08:37 +00:00
parent fd82c1ee2d
commit feae56ad1d
1 changed files with 9 additions and 2 deletions

View File

@ -40,8 +40,15 @@ static void LatchPower(void)
{
latche=latcheinit;
WSync();
SetReadHandler(0x6000,0xFFFF,CartBR);
SetWriteHandler(0x6000,0x7FFF,CartBW);
if(WRAM)
{
SetReadHandler(0x6000,0xFFFF,CartBR);
SetWriteHandler(0x6000,0x7FFF,CartBW);
}
else
{
SetReadHandler(0x8000,0xFFFF,CartBR);
}
SetWriteHandler(addrreg0,addrreg1,LatchWrite);
}