Exemple #1
0
 public override void Run()
 {
     keyShiftPending = false;
     TrimBuffer();
     if (keyBuf.Length > 0 && irq != null)
     {
         irq.Raise(true);
     }
 }
 // Resets the controller
 public void Reset()
 {
     driveSeeking       = (byte)0;
     pendingReadyChange = (byte)0;
     regSt0             = (byte)0;
     commandbuf         = new byte[9];
     commandptr         = 0;
     resultbuf          = null;
     databuf            = null;
     if (irq != null)
     {
         irq.Raise(false);
     }
     if (dma != null)
     {
         dma.DMARequest(false);
     }
     state = States.IDLE;
     task?.Cancel();
 }
Exemple #3
0
        // Scheduled task to drive IRQ 0 based on counter 0 output signal
        public override void Run()
        {
            currentTime = cpu.Sched.CurrentTime;
            // Set IRQ 0 signal equal to counter 0 output
            bool s = System.Convert.ToBoolean(mChannels[0].GetOutput());

            if (s != lastChan0)
            {
                irq.Raise(s);
                lastChan0 = s;
            }

            // reschedule task for next output change
            long t = (long)(mChannels[0].NextOutputChangeTime());

            if (t > 0)
            {
                cpu.Sched.RunTaskAt(task, t);
            }

            //cpu.RTC?.Run()
        }