From 60ced2cb0c9c4ae9a2f6a65ff50b07fecee78f4c Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 16 Apr 2023 13:14:59 -0400 Subject: wd_fdc: Drop DRQ when ending a normal command or starting a "Force Interrupt" command --- src/devices/machine/wd_fdc.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 1ee3815c17e..f8ccbfb3f9f 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -366,7 +366,9 @@ void wd_fdc_device_base::command_end() main_state = sub_state = IDLE; motor_timeout = 0; - if(!drq && (status & S_BUSY)) { + if(drq) + drop_drq(); + else if (status & S_BUSY) { if (!t_cmd->enabled()) { status &= ~S_BUSY; } @@ -1096,6 +1098,12 @@ void wd_fdc_device_base::interrupt_start() status_type_1 = true; } + if(drq) { + drq = false; + if(!drq_cb.isnull()) + drq_cb(false); + } + intrq_cond = command & 0x0f; if(!intrq && (command & I_IMM)) { -- cgit v1.2.3