mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-25 04:29:09 +00:00
Quickie: head unload is scheduled only if the head is presently loaded.
This commit is contained in:
parent
0f15a2f97f
commit
a4ee697ed1
@ -174,10 +174,12 @@ void i8272::set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define SCHEDULE_HEAD_UNLOAD() \
|
#define SCHEDULE_HEAD_UNLOAD() \
|
||||||
if(drives_[active_drive_].head_unload_delay[active_head_] == 0) { \
|
if(drives_[active_drive_].head_is_loaded[active_head_]) {\
|
||||||
head_timers_running_++; \
|
if(drives_[active_drive_].head_unload_delay[active_head_] == 0) { \
|
||||||
} \
|
head_timers_running_++; \
|
||||||
drives_[active_drive_].head_unload_delay[active_head_] = MS_TO_CYCLES(head_unload_time_);
|
} \
|
||||||
|
drives_[active_drive_].head_unload_delay[active_head_] = MS_TO_CYCLES(head_unload_time_);\
|
||||||
|
}
|
||||||
|
|
||||||
void i8272::posit_event(int event_type) {
|
void i8272::posit_event(int event_type) {
|
||||||
if(!(interesting_event_mask_ & event_type)) return;
|
if(!(interesting_event_mask_ & event_type)) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user