BizHawk/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Machine/SpectrumBase.Port.cs

57 lines
1.7 KiB
C#
Raw Normal View History

2017-11-23 17:26:15 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
/// <summary>
/// The abstract class that all emulated models will inherit from
/// * Port Access *
/// </summary>
public abstract partial class SpectrumBase
{
/// <summary>
/// The last OUT data that was sent to the ULA
/// </summary>
protected byte LastULAOutByte;
2018-03-12 12:00:17 +00:00
public byte LASTULAOutByte
{
get { return LastULAOutByte; }
set { LastULAOutByte = value; }
}
2017-11-23 17:26:15 +00:00
/// <summary>
/// Reads a byte of data from a specified port address
/// </summary>
/// <param name="port"></param>
/// <returns></returns>
2017-12-05 10:02:57 +00:00
public abstract byte ReadPort(ushort port);
2017-11-23 17:26:15 +00:00
/// <summary>
/// Writes a byte of data to a specified port address
/// </summary>
/// <param name="port"></param>
/// <param name="value"></param>
2017-12-05 10:02:57 +00:00
public abstract void WritePort(ushort port, byte value);
2018-03-07 17:40:15 +00:00
/// <summary>
/// Increments the CPU totalCycles counter by the tStates value specified
/// </summary>
/// <param name="tStates"></param>
2018-05-31 16:54:57 +00:00
//public virtual void PortContention(int tStates)
//{
// CPU.TotalExecutedCycles += tStates;
//}
/// <summary>
/// Simulates IO port contention based on the supplied address
2018-03-12 12:00:17 +00:00
/// This method is for 48k and 128k/+2 machines only and should be overridden for other models
/// </summary>
/// <param name="addr"></param>
//public abstract void ContendPort(ushort addr);
2017-11-23 17:26:15 +00:00
}
}