summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author pnp2084 <pnp2084@gmail.com>2022-10-23 21:10:29 -0700
committer GitHub <noreply@github.com>2022-10-24 06:10:29 +0200
commit99b3304c5ba49471065e4bc4b9ea23669c2f3021 (patch)
tree50ede040118dd8a8896c01e26884011b7749cfee
parent347e0531b1df9418a134fb4e621b512223c066ff (diff)
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.
-rw-r--r--src/devices/machine/wd_fdc.cpp4
1 files changed, 3 insertions, 1 deletions
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);