void SuperFX::mmio_write(unsigned addr, uint8 data) { cpu.synchronize_coprocessor(); if(addr >= 0x3100 && addr <= 0x32ff) { return cache_mmio_write(addr - 0x3100, data); } if(addr >= 0x3000 && addr <= 0x301f) { unsigned n = (addr >> 1) & 15; if((addr & 1) == 0) { regs.r[n] = (regs.r[n] & 0xff00) | data; } else { regs.r[n] = (data << 8) | (regs.r[n] & 0xff); } if(addr == 0x301f) regs.sfr.g = 1; return; }
void SuperFX::mmio_write(unsigned addr, uint8 data) { scheduler.sync_cpucop(); addr &= 0xffff; if(addr >= 0x3100 && addr <= 0x32ff) { return cache_mmio_write(addr - 0x3100, data); } if(addr >= 0x3000 && addr <= 0x301f) { unsigned n = (addr >> 1) & 15; if((addr & 1) == 0) { regs.r[n] = (regs.r[n] & 0xff00) | data; } else { regs.r[n] = (data << 8) | (regs.r[n] & 0xff); } if(addr == 0x301f) regs.sfr.g = 1; return; }