CDROM: Seek to LBA 0 when resetting

Fixes Love & Destroy.
This commit is contained in:
Connor McLaughlin 2020-07-10 20:55:14 +10:00
parent 71157b171e
commit c5e8327e7a

View file

@ -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);