CDROM: Improve simulation of seek timing

This commit is contained in:
Connor McLaughlin
2021-06-19 15:15:54 +10:00
parent 2c19c7ce57
commit 67344070ea
3 changed files with 63 additions and 29 deletions

View File

@ -83,10 +83,7 @@ private:
MOTOR_ON_RESPONSE_TICKS = 400000,
MAX_FAST_FORWARD_RATE = 12,
FAST_FORWARD_RATE_STEP = 4,
// Actually varies depending the distance into the disc.
BASE_SECTORS_PER_TRACK = 9,
FAST_FORWARD_RATE_STEP = 4
};
static constexpr u8 INTERRUPT_REGISTER_MASK = 0x1F;
@ -342,6 +339,7 @@ private:
CDImage::LBA m_seek_end_lba{};
CDImage::LBA m_physical_lba{}; // current position of the disc with respect to time
u32 m_physical_lba_update_tick = 0;
u32 m_physical_lba_update_carry = 0;
bool m_setloc_pending = false;
bool m_read_after_seek = false;
bool m_play_after_seek = false;