Mapper 52: Fixed work ram writes

This commit is contained in:
Sour 2020-05-08 00:36:43 -04:00
parent 3638474c99
commit 193235b11f

View File

@ -50,9 +50,13 @@ protected:
void WriteRegister(uint16_t addr, uint8_t value) override
{
if(addr < 0x8000) {
if(CanWriteToWorkRam() && (_extraReg & 0x80) == 0) {
_extraReg = value;
UpdateState();
if(CanWriteToWorkRam()) {
if((_extraReg & 0x80) == 0) {
_extraReg = value;
UpdateState();
} else {
BaseMapper::WritePrgRam(addr, value);
}
}
} else {
MMC3::WriteRegister(addr, value);