bsnes-plus/bsnes/snes/smp/mmio/mmio.cpp
devinacker d308c1be15 allow debugger to read MMIO without side effects
(closes #46 assuming I didn't screw anything up)
2016-05-06 20:37:37 -04:00

14 lines
274 B
C++

#ifdef SMP_CPP
uint8 SMP::mmio_read(unsigned addr) {
if(!Memory::debugger_access())
cpu.synchronize_smp();
return port.smp_to_cpu[addr & 3];
}
void SMP::mmio_write(unsigned addr, uint8 data) {
cpu.synchronize_smp();
port.cpu_to_smp[addr & 3] = data;
}
#endif