CDROM: Tweak timings / add missing status update

This commit is contained in:
Connor McLaughlin 2019-10-27 01:45:26 +10:00
parent f22de715c7
commit 4283fa7f74

View file

@ -476,7 +476,7 @@ void CDROM::UpdateStatusRegister()
TickCount CDROM::GetAckDelayForCommand() const
{
const u32 default_ack_delay = 2000;
const u32 default_ack_delay = 4000;
if (m_command == Command::Init)
return 60000;
else
@ -933,6 +933,8 @@ void CDROM::BeginReading(bool cdda)
Log_DebugPrintf("Starting %s", cdda ? "playing CDDA" : "reading");
if (m_setloc_pending)
{
if (m_media->GetMSFPositionOnDisc() != m_setloc_position)
{
BeginSeeking();
m_read_after_seek = !cdda;
@ -940,6 +942,10 @@ void CDROM::BeginReading(bool cdda)
return;
}
// already in position
m_setloc_pending = false;
}
m_secondary_status.motor_on = true;
m_secondary_status.seeking = false;
m_secondary_status.reading = !cdda;
@ -980,6 +986,7 @@ void CDROM::DoSeekComplete()
m_async_response_fifo.Push(m_secondary_status.bits);
SetAsyncInterrupt(Interrupt::INT2);
UpdateStatusRegister();
}
else
{