CDROM: More conservative handling of INT1-while-pending-INT3 case

This commit is contained in:
Connor McLaughlin 2021-04-19 15:34:36 +10:00
parent 3106c797d9
commit 5af6424324

View file

@ -577,7 +577,7 @@ void CDROM::SetAsyncInterrupt(Interrupt interrupt)
{ {
if (m_interrupt_flag_register == static_cast<u8>(interrupt)) if (m_interrupt_flag_register == static_cast<u8>(interrupt))
{ {
Log_WarningPrintf("Not setting async interrupt %u because there is already one unacknowledged", Log_DevPrintf("Not setting async interrupt %u because there is already one unacknowledged",
static_cast<u8>(interrupt)); static_cast<u8>(interrupt));
m_async_response_fifo.Clear(); m_async_response_fifo.Clear();
return; return;
@ -2070,12 +2070,10 @@ void CDROM::ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ&
if (sectors_missed > 1) if (sectors_missed > 1)
Log_WarningPrintf("Interrupt not processed in time, missed %u sectors", sectors_missed - 1); Log_WarningPrintf("Interrupt not processed in time, missed %u sectors", sectors_missed - 1);
} }
else
{
m_async_response_fifo.Push(m_secondary_status.bits); m_async_response_fifo.Push(m_secondary_status.bits);
SetAsyncInterrupt(Interrupt::DataReady); SetAsyncInterrupt(Interrupt::DataReady);
} }
}
static std::array<std::array<s16, 29>, 7> s_zigzag_table = { static std::array<std::array<s16, 29>, 7> s_zigzag_table = {
{{0, 0x0, 0x0, 0x0, 0x0, -0x0002, 0x000A, -0x0022, 0x0041, -0x0054, {{0, 0x0, 0x0, 0x0, 0x0, -0x0002, 0x000A, -0x0022, 0x0041, -0x0054,