/// <summary> /// Reads internal emulator register state, that is inaccessible in real device /// </summary> public byte[] ReadState() { var result = new byte[32]; Sidlib.ReadState(_Sid, result); return(result); }
/// <summary> /// Writes SID register /// </summary> public void Write(byte address, byte value) { if (address >= 25) { throw new InvalidOperationException("Sid.Write(...) : operation is only available for addresses under 25"); } Sidlib.Write(_Sid, address, value); }
/// <summary> /// Reads SID register /// </summary> /// <returns>Value of the register</returns> public byte Read(byte address) { if (address < 25) { throw new InvalidOperationException("Sid.Read(...) : operation is only available for addresses above 24"); } return((byte)Sidlib.Read(_Sid, address)); }
/// <summary> // Writes internal register state to the emulator, this is impossible on real device /// </summary> public void WriteState(byte[] registers) { Sidlib.WriteState(_Sid, registers); }
/// <summary> /// Reads current SID audio output value in N bits /// </summary> public int Output(int bits) { return(Sidlib.Output(_Sid, bits)); }
/// <summary> /// Reads current SID audio output value in 16 bits /// </summary> public int Output() { return(Sidlib.Output(_Sid)); }
public void Input(byte sample) { Sidlib.Input(_Sid, sample); }
public void Reset() { Sidlib.Reset(_Sid); }
/// <summary> /// Simulates one cycle of SID /// </summary> public void Clock() { Sidlib.Clock(_Sid); }
/// <summary> /// Simulates deltaT cycles of SID /// </summary> /// <param name="deltaT">Number of cycles to simulate</param> public void Clock(int deltaT) { Sidlib.Clock(_Sid, deltaT); }
public void AdjustSamplingFrequency(bool enable) { Sidlib.AdjustSamplingFrequency(_Sid, enable); }
public bool SetSamplingParameters(double clockFreq, Sidlib.SamplingMethod method, double sampleFreq, double passFreq = -1, double filterScale = 0.97) { return(Sidlib.SetSamplingParameters(_Sid, clockFreq, method, sampleFreq, passFreq, filterScale)); }
public void EnableExternalFilter(bool enable) { Sidlib.EnableExternalFilter(_Sid, enable); }
public void SetChipModel(Sidlib.ChipModel model) { Sidlib.SetChipModel(_Sid, model); }
public Sid() { _Sid = Sidlib.CreateSID(); }