diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index ce69f7b26..e7201c732 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -424,6 +424,12 @@ void CDROM::SetAsyncInterrupt(Interrupt interrupt) DeliverAsyncInterrupt(); } +void CDROM::CancelAsyncInterrupt() +{ + m_pending_async_interrupt = 0; + m_async_response_fifo.Clear(); +} + void CDROM::DeliverAsyncInterrupt() { Assert(m_pending_async_interrupt != 0 && !HasPendingInterrupt()); @@ -992,6 +998,7 @@ void CDROM::DoSectorRead() if (HasPendingAsyncInterrupt()) { Log_WarningPrintf("Data interrupt was not delivered"); + CancelAsyncInterrupt(); } if (!m_sector_buffer.empty()) { diff --git a/src/core/cdrom.h b/src/core/cdrom.h index 9e980e5c8..cb9dbae4f 100644 --- a/src/core/cdrom.h +++ b/src/core/cdrom.h @@ -171,6 +171,7 @@ private: bool HasPendingAsyncInterrupt() const { return m_pending_async_interrupt != 0; } void SetInterrupt(Interrupt interrupt); void SetAsyncInterrupt(Interrupt interrupt); + void CancelAsyncInterrupt(); void DeliverAsyncInterrupt(); void SendACKAndStat(); void SendErrorResponse(u8 reason = 0x80);