Skip to content

Commit

Permalink
Fix FDC Busy bit for overlapped commands (#10464)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pnp2084 committed Oct 24, 2022
1 parent 347e053 commit 99b3304
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/devices/machine/wd_fdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 99b3304

Please sign in to comment.