CDROM: Add time to read sector to seek time

Fixes Yuukyuu Gensoukyoku Ensemble 1.
This commit is contained in:
Connor McLaughlin 2020-05-16 01:01:28 +10:00
parent 110aa8bd93
commit 214e852a54
1 changed files with 3 additions and 2 deletions

View File

@ -558,8 +558,6 @@ TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba)
ticks += static_cast<TickCount>(u64(MASTER_CLOCK) * 300 / 1000);
else if (m_drive_state == DriveState::Idle) // paused
ticks += 1237952 << (BoolToUInt8(!m_mode.double_speed));
else if (lba_diff >= 3 && lba_diff < 12)
ticks += MASTER_CLOCK / (75 << (BoolToUInt8(!m_mode.double_speed)) << 2);
if (m_mode.double_speed != m_current_double_speed)
{
@ -571,6 +569,9 @@ TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba)
ticks += static_cast<u32>(static_cast<double>(MASTER_CLOCK) * 0.1);
}
// time to read the sector
ticks += GetTicksForRead();
Log_DevPrintf("Seek time for %u LBAs: %d", lba_diff, ticks);
return ticks;
}