using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum { /// /// The abstract class that all emulated models will inherit from /// * Port Access * /// public abstract partial class SpectrumBase { /// /// The last OUT data that was sent to the ULA /// protected byte LastULAOutByte; public byte LASTULAOutByte { get { return LastULAOutByte; } set { LastULAOutByte = value; } } /// /// Reads a byte of data from a specified port address /// /// /// public abstract byte ReadPort(ushort port); /// /// Writes a byte of data to a specified port address /// /// /// public abstract void WritePort(ushort port, byte value); /// /// Increments the CPU totalCycles counter by the tStates value specified /// /// //public virtual void PortContention(int tStates) //{ // CPU.TotalExecutedCycles += tStates; //} /// /// Simulates IO port contention based on the supplied address /// This method is for 48k and 128k/+2 machines only and should be overridden for other models /// /// public abstract void ContendPort(ushort addr); } }