From 90cf6b8b41384c063f4e0da34894afbb7b3c4a18 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 12 Nov 2019 18:02:36 +1000 Subject: [PATCH] CDROM: Don't lose INT1 interrupts from command execution --- src/core/cdrom.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index b836a1667..73a503bb3 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -367,6 +367,8 @@ void CDROM::WriteRegister(u32 offset, u8 value) { if (HasPendingAsyncInterrupt()) DeliverAsyncInterrupt(); + else if (HasPendingCommand()) + m_system->SetDowncount(m_command_remaining_ticks); } // Bit 6 clears the parameter FIFO. @@ -525,7 +527,7 @@ TickCount CDROM::GetTicksForSeek() const void CDROM::Execute(TickCount ticks) { - if (HasPendingCommand()) + if (HasPendingCommand() && !HasPendingInterrupt()) { m_command_remaining_ticks -= ticks; if (m_command_remaining_ticks <= 0)