2012-12-05 21:07:51 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Computers.Commodore64.MOS
|
|
|
|
|
{
|
2012-12-06 04:29:08 +00:00
|
|
|
|
// the functions on this port are at the point of
|
|
|
|
|
// view of an external device.
|
|
|
|
|
|
2012-12-05 21:07:51 +00:00
|
|
|
|
public class SerialPort
|
|
|
|
|
{
|
2012-12-06 04:29:08 +00:00
|
|
|
|
public Func<bool> DeviceReadAtn;
|
|
|
|
|
public Func<bool> DeviceReadClock;
|
|
|
|
|
public Func<bool> DeviceReadData;
|
|
|
|
|
public Func<bool> DeviceReadReset;
|
|
|
|
|
public Action<bool> DeviceWriteAtn;
|
|
|
|
|
public Action<bool> DeviceWriteClock;
|
|
|
|
|
public Action<bool> DeviceWriteData;
|
|
|
|
|
public Action<bool> DeviceWriteSrq;
|
|
|
|
|
|
|
|
|
|
public Func<bool> SystemReadAtn;
|
|
|
|
|
public Func<bool> SystemReadClock;
|
|
|
|
|
public Func<bool> SystemReadData;
|
|
|
|
|
public Func<bool> SystemReadSrq;
|
|
|
|
|
public Action<bool> SystemWriteAtn;
|
|
|
|
|
public Action<bool> SystemWriteClock;
|
|
|
|
|
public Action<bool> SystemWriteData;
|
|
|
|
|
public Action<bool> SystemWriteReset;
|
|
|
|
|
|
|
|
|
|
// Connect() needs to set System functions above
|
|
|
|
|
|
2012-12-06 06:53:55 +00:00
|
|
|
|
public SerialPort()
|
|
|
|
|
{
|
|
|
|
|
DeviceReadAtn = (() => { return true; });
|
|
|
|
|
DeviceReadClock = (() => { return true; });
|
|
|
|
|
DeviceReadData = (() => { return true; });
|
|
|
|
|
DeviceReadReset = (() => { return true; });
|
|
|
|
|
DeviceWriteAtn = ((bool val) => { });
|
|
|
|
|
DeviceWriteClock = ((bool val) => { });
|
|
|
|
|
DeviceWriteData = ((bool val) => { });
|
|
|
|
|
DeviceWriteSrq = ((bool val) => { });
|
|
|
|
|
SystemReadAtn = (() => { return true; });
|
|
|
|
|
SystemReadClock = (() => { return true; });
|
|
|
|
|
SystemReadData = (() => { return true; });
|
|
|
|
|
SystemReadSrq = (() => { return true; });
|
|
|
|
|
SystemWriteAtn = ((bool val) => { });
|
|
|
|
|
SystemWriteClock = ((bool val) => { });
|
|
|
|
|
SystemWriteData = ((bool val) => { });
|
|
|
|
|
SystemWriteReset = ((bool val) => { });
|
|
|
|
|
}
|
|
|
|
|
|
2012-12-05 21:07:51 +00:00
|
|
|
|
public void HardReset()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|