示例#1
0
        /// <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);
        }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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));
 }
示例#4
0
 /// <summary>
 // Writes internal register state to the emulator, this is impossible on real device
 /// </summary>
 public void WriteState(byte[] registers)
 {
     Sidlib.WriteState(_Sid, registers);
 }
示例#5
0
 /// <summary>
 /// Reads current SID audio output value in N  bits
 /// </summary>
 public int Output(int bits)
 {
     return(Sidlib.Output(_Sid, bits));
 }
示例#6
0
 /// <summary>
 /// Reads current SID audio output value in 16 bits
 /// </summary>
 public int Output()
 {
     return(Sidlib.Output(_Sid));
 }
示例#7
0
 public void Input(byte sample)
 {
     Sidlib.Input(_Sid, sample);
 }
示例#8
0
 public void Reset()
 {
     Sidlib.Reset(_Sid);
 }
示例#9
0
 /// <summary>
 /// Simulates one cycle of SID
 /// </summary>
 public void Clock()
 {
     Sidlib.Clock(_Sid);
 }
示例#10
0
 /// <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);
 }
示例#11
0
 public void AdjustSamplingFrequency(bool enable)
 {
     Sidlib.AdjustSamplingFrequency(_Sid, enable);
 }
示例#12
0
 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));
 }
示例#13
0
 public void EnableExternalFilter(bool enable)
 {
     Sidlib.EnableExternalFilter(_Sid, enable);
 }
示例#14
0
 public void SetChipModel(Sidlib.ChipModel model)
 {
     Sidlib.SetChipModel(_Sid, model);
 }
示例#15
0
 public Sid()
 {
     _Sid = Sidlib.CreateSID();
 }