From bf20c717fbad7bdc0d623652c057e54eabfb5404 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 14 Sep 2017 22:32:13 -0400 Subject: [PATCH] =?UTF-8?q?The=20Drive=20now=20no=20longer=20produces=20in?= =?UTF-8?q?put=20when=20in=20writing=20mode=20=E2=80=94=20other=20than=20a?= =?UTF-8?q?nnouncing=20the=20index=20hole.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Storage/Disk/Drive.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Storage/Disk/Drive.cpp b/Storage/Disk/Drive.cpp index b019f5c4e..14f379c8d 100644 --- a/Storage/Disk/Drive.cpp +++ b/Storage/Disk/Drive.cpp @@ -98,9 +98,9 @@ void Drive::advance(const Cycles cycles) { } void Drive::run_for(const Cycles cycles) { - Time zero(0); - if(has_disk_ && motor_is_on_) { + Time zero(0); + int number_of_cycles = cycles.as_int(); while(number_of_cycles) { int cycles_until_next_event = (int)get_cycles_until_next_event(); @@ -163,7 +163,12 @@ void Drive::process_next_event() { if(ready_index_count_ < 2) ready_index_count_++; cycles_since_index_hole_ = 0; } - if(event_delegate_) event_delegate_->process_event(current_event_); + if( + event_delegate_ && + (current_event_.type == Track::Event::IndexHole || is_reading_) + ){ + event_delegate_->process_event(current_event_); + } get_next_event(Time(0)); }