mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
CDROM: Reset read sector buffer on INT1
Fixes GetlocL -> DMA out returning incorrect data. Fixes FoxKids.com - Micro Maniacs Racing.
This commit is contained in:
parent
e1157bff65
commit
110aa8bd93
|
@ -473,6 +473,9 @@ void CDROM::DeliverAsyncInterrupt()
|
||||||
Assert(m_pending_async_interrupt != 0 && !HasPendingInterrupt());
|
Assert(m_pending_async_interrupt != 0 && !HasPendingInterrupt());
|
||||||
Log_DebugPrintf("Delivering async interrupt %u", m_pending_async_interrupt);
|
Log_DebugPrintf("Delivering async interrupt %u", m_pending_async_interrupt);
|
||||||
|
|
||||||
|
if (m_pending_async_interrupt == static_cast<u8>(Interrupt::DataReady))
|
||||||
|
m_current_read_sector_buffer = m_current_write_sector_buffer;
|
||||||
|
|
||||||
m_response_fifo.Clear();
|
m_response_fifo.Clear();
|
||||||
m_response_fifo.PushFromQueue(&m_async_response_fifo);
|
m_response_fifo.PushFromQueue(&m_async_response_fifo);
|
||||||
m_interrupt_flag_register = m_pending_async_interrupt;
|
m_interrupt_flag_register = m_pending_async_interrupt;
|
||||||
|
@ -1582,8 +1585,8 @@ void CDROM::ProcessDataSector(const u8* raw_sector, const CDImage::SubChannelQ&
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: How does XA relate to this buffering?
|
// TODO: How does XA relate to this buffering?
|
||||||
SectorBuffer* sb = &m_sector_buffers[m_current_write_sector_buffer];
|
|
||||||
m_current_write_sector_buffer = (m_current_write_sector_buffer + 1) % NUM_SECTOR_BUFFERS;
|
m_current_write_sector_buffer = (m_current_write_sector_buffer + 1) % NUM_SECTOR_BUFFERS;
|
||||||
|
SectorBuffer* sb = &m_sector_buffers[m_current_write_sector_buffer];
|
||||||
if (sb->size > 0)
|
if (sb->size > 0)
|
||||||
{
|
{
|
||||||
Log_DevPrintf("Sector buffer %u was not read, previous sector dropped",
|
Log_DevPrintf("Sector buffer %u was not read, previous sector dropped",
|
||||||
|
|
Loading…
Reference in a new issue