diff --git a/src/coprocessor/sa1.cpp b/src/coprocessor/sa1.cpp index 22be0a2..d3104f2 100644 --- a/src/coprocessor/sa1.cpp +++ b/src/coprocessor/sa1.cpp @@ -265,6 +265,7 @@ uint8_t SA1::IRAM::readCPU(unsigned address, uint8_t data) { void SA1::IRAM::writeCPU(unsigned address, uint8_t data) { cpu.synchronizeCoprocessors(); + if(!(sa1.mmio.siwp & 1 << (address >> 8 & 7))) return; return write(address, data); } @@ -273,6 +274,7 @@ uint8_t SA1::IRAM::readSA1(unsigned address, uint8_t data) { } void SA1::IRAM::writeSA1(unsigned address, uint8_t data) { + if(!(sa1.mmio.ciwp & 1 << (address >> 8 & 7))) return; return write(address, data); }