From 99b3304c5ba49471065e4bc4b9ea23669c2f3021 Mon Sep 17 00:00:00 2001 From: pnp2084 Date: Sun, 23 Oct 2022 21:10:29 -0700 Subject: Fix FDC Busy bit for overlapped commands (#10464) Fixes MT8464 The problem here is that the end of the previous command clears the BSY status bit which makes it appear to system code that the second command has completed (when it has not). The bug report has files to demonstrate the problem on a TRS-80 Model I emulation. --- src/devices/machine/wd_fdc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index bb2d798e554..027d7c81ba8 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -355,7 +355,9 @@ void wd_fdc_device_base::command_end() motor_timeout = 0; if(!drq && (status & S_BUSY)) { - status &= ~S_BUSY; + if (!t_cmd->enabled()) { + status &= ~S_BUSY; + } intrq = true; if(!intrq_cb.isnull()) intrq_cb(intrq); -- cgit v1.2.3