From e992c500ccf306f7245158d6d5ee97661211dccf Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 16 Apr 2023 14:07:19 -0400 Subject: wd_fdc: IRQ/DRQ corrections - Always interrupt upon command completion and clear busy flag if the latter was set (even if DRQ was not serviced) - Drop DRQ when "Force Interrupt" command is issued in idle state This partially reverts the changes of 60ced2cb0c9c4ae9a2f6a65ff50b07fecee78f4c. --- src/devices/machine/wd_fdc.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index f8ccbfb3f9f..f53c88e2934 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -366,9 +366,7 @@ void wd_fdc_device_base::command_end() main_state = sub_state = IDLE; motor_timeout = 0; - if(drq) - drop_drq(); - else if (status & S_BUSY) { + if(status & S_BUSY) { if (!t_cmd->enabled()) { status &= ~S_BUSY; } @@ -1096,12 +1094,7 @@ void wd_fdc_device_base::interrupt_start() // when a force interrupt command is issued and there is no // currently running command, return the status type 1 bits status_type_1 = true; - } - - if(drq) { - drq = false; - if(!drq_cb.isnull()) - drq_cb(false); + drop_drq(); } intrq_cond = command & 0x0f; -- cgit v1.2.3