From c5e8327e7a383921b5be496e958ff92304b2afa3 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 10 Jul 2020 20:55:14 +1000 Subject: [PATCH] CDROM: Seek to LBA 0 when resetting Fixes Love & Destroy. --- src/core/cdrom.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index de06fd29b..753977894 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -1180,8 +1180,11 @@ void CDROM::ExecuteCommand() Log_DebugPrintf("CDROM reset command"); SendACKAndStat(); + if (IsSeeking()) + UpdatePositionWhileSeeking(); + m_drive_state = DriveState::Resetting; - m_drive_event->Schedule(400000); + m_drive_event->Schedule(400000 + GetTicksForSeek(0)); EndCommand(); return; @@ -1675,6 +1678,9 @@ void CDROM::DoResetComplete(TickCount ticks_late) return; } + m_current_lba = 0; + m_reader.QueueReadSector(0); + m_async_response_fifo.Clear(); m_async_response_fifo.Push(m_secondary_status.bits); SetAsyncInterrupt(Interrupt::Complete);