From 214e852a541e66c589a3e046380c74a78453d7cc Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 16 May 2020 01:01:28 +1000 Subject: [PATCH] CDROM: Add time to read sector to seek time Fixes Yuukyuu Gensoukyoku Ensemble 1. --- src/core/cdrom.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 2cd2cdc34..9048dc955 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -558,8 +558,6 @@ TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba) ticks += static_cast(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(static_cast(MASTER_CLOCK) * 0.1); } + // time to read the sector + ticks += GetTicksForRead(); + Log_DevPrintf("Seek time for %u LBAs: %d", lba_diff, ticks); return ticks; }