public override byte this[ushort addr] { get { var bankNo = addr >> 14; switch (bankNo) { case 1: return((_pokeySound != null) ? _pokeySound.Read(addr) : (byte)0); default: return(ROM[(_bank[bankNo] << 14) | (addr & 0x3fff)]); } } set { var bankNo = addr >> 14; switch (bankNo) { case 1: if (_pokeySound != null) { _pokeySound.Update(addr, value); } break; case 2: _bank[2] = value & 7; break; } } }
public override byte this[ushort addr] { get { return(((addr & 0xF000) == 0x4000 && _pokeySound != null) ? _pokeySound.Read(addr) : ROM[addr & 0x7fff]); } set { if ((addr & 0xF000) == 0x4000 && _pokeySound != null) { _pokeySound.Update(addr, value); } } }