Esempio n. 1
0
        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;
                }
            }
        }
Esempio n. 2
0
 public override byte this[ushort addr]
 {
     get
     {
         var bankNo = addr >> 14;
         return(bankNo switch
         {
             1 => _pokeySound.Read(addr),
             _ => ROM[(_bank[bankNo] << 14) | (addr & 0x3fff)],
         });
Esempio n. 3
0
 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);
         }
     }
 }