Esempio n. 1
0
        protected override void Poke(RomCartMemoryBank bank, byte value)
        {
            base.Poke(bank, value);

            ulong address = bank.GetAddress(this.shiftRegister, this.counter);
            bool  a1      = (address & A1Mask) == A1Mask;
            bool  a7      = (address & A7Mask) == A7Mask;

            Eeprom.Update(a7, a1);
        }
Esempio n. 2
0
        protected virtual byte Peek(RomCartMemoryBank bank)
        {
            byte data = bank.Peek(shiftRegister, counter);

            if (!currentStrobe)
            {
                counter++;
                // "... a 11 bit counter"
                counter &= 0x07ff;
            }
            return(data);
        }
Esempio n. 3
0
        // "The length of the strobe is 562.5 ns, the data is stable for 125 ns prior to the strobe and
        // for 62.5 ns after the strobe. This is a 'blind' write from the CPU and must not be interrupted
        // by another access to Suzy until it is finished.
        // The CPU must not access Suzy for 12 ticks after the completion of the 'blind' write cycle."
        protected virtual void Poke(RomCartMemoryBank bank, byte value)
        {
            // "The ROM Cart can also be written to. The addressing scheme is the same as for reads."
            if (bank.WriteEnabled)
            {
                bank.Poke(shiftRegister, counter, value);
            }

            // "The strobe is also self timed."
            if (!currentStrobe)
            {
                counter++;
                // "... a 11 bit counter"
                counter &= 0x07ff;
            }
        }
Esempio n. 4
0
 public RomCart(int bank0Size, int bank1Size)
 {
     Bank0 = new RomCartMemoryBank(bank0Size);
     Bank1 = new RomCartMemoryBank(bank1Size);
 }
 protected override byte Peek(RomCartMemoryBank bank)
 {
     return(base.Peek(bank));
 }