using System; namespace BizHawk.Emulation.Cores.Intellivision { public sealed class PSG { private ushort[] Register = new ushort[16]; public int TotalExecutedCycles; public int PendingCycles; public Func ReadMemory; public Func WriteMemory; public ushort? ReadPSG(ushort addr) { if (addr >= 0x01F0 && addr <= 0x01FF) { return Register[addr - 0x01F0]; } return null; } public bool WritePSG(ushort addr, ushort value) { if (addr >= 0x01F0 && addr <= 0x01FF) { Register[addr - 0x01F0] = value; return true; } return false; } } }