/// <summary> /// Installs HBF card to the system /// </summary> /// <param name="in_tvcomputer"></param> public void Install(ITVComputer in_tvcomputer) { m_tvcomputer = in_tvcomputer; // set timing m_index_pulse_period = in_tvcomputer.MicrosecToCPUTicks(IndexPulsePeriod); m_index_pulse_width = in_tvcomputer.MicrosecToCPUTicks(IndexPulseWidth); }
/// <summary> /// Starts head moving operaton in emulated speed (lengthty) or fast mode (immediate). /// </summary> /// <param name="in_delay_us">Operation length in us</param> /// <param name="in_new_status_flags">New status flag after the operation is complete</param> /// <param name="in_new_hardware_flags">New hardware status flag after the operation is complete</param> /// <param name="in_new_track">Track register value after the operation is complete</param> private void StartOperation(int in_delay_us, StatusFlags in_new_status_flags, HardwareFlags in_new_hardware_flags, byte in_new_track) { if (m_fast_operation) { // no delay -> immediately execute the operation m_fdc_status = in_new_status_flags; m_reg_hw_status = in_new_hardware_flags; m_fdc_track = in_new_track; m_operation_state = OperationState.None; } else { // start delaying operation m_fdc_status |= StatusFlags.BUSY; m_pending_status = in_new_status_flags; m_pending_hw_status = in_new_hardware_flags; m_pending_track = in_new_track; m_pending_delay = m_tvcomputer.MicrosecToCPUTicks(in_delay_us); m_operation_state = OperationState.Seek; } }