public override void InitializeMemoryMap(PPU ppu) { ppu.MapReadHandler(0x0000, 0x1FFF, address => { var bank = address / 0x1000; var ret = _chrROM[_chrBankOffsets[bank, _latches[bank].AsByte()] + address % 0x1000]; if ((address & 0x08) > 0) { GetLatch(address, out uint latch, out bool?on); if (on != null) { _latches[latch] = (bool)on; } }
public override void InitializeMemoryMap(PPU ppu) { ppu.MapReadHandler(0x0000, 0x1FFF, addr => _chrROM[_chrBankOffset + addr]); }
public override void InitializeMemoryMap(PPU ppu) { ppu.MapReadHandler(0x0000, 0x1FFF, addr => _chrROM[_chrBankOffsets[addr / 0x1000] + addr % 0x1000]); ppu.MapWriteHandler(0x0000, 0x1FFF, (addr, val) => _chrROM[_chrBankOffsets[addr / 0x1000] + addr % 0x1000] = val); }
public virtual void InitializeMemoryMap(PPU ppu) { ppu.MapReadHandler(0x0000, 0x1FFF, addr => _chrROM[addr]); ppu.MapWriteHandler(0x0000, 0x1FFF, (addr, val) => _chrROM[addr] = val); }
public override void InitializeMemoryMap(PPU ppu) { ppu.MapReadHandler(0x0000, 0x1FFF, address => _chrROM[_chrBankOffsets[address / 0x400] + address % 0x400]); }