private void UpdateCh0() { // State of channel 0 may have changed // Run the IRQ task immediately to take this into account task.Cancel(); task.Start(); }
// 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(); }