summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2022-12-01 20:49:44 +0100
committer GitHub <noreply@github.com>2022-12-01 20:49:44 +0100
commit38c9748a2e0b77b7f88a23e2c7686d56de512bf4 (patch)
treee4ac33b2a700c6d3a4f694f6242a1921bb4dcfd4
parent71034406b13a71339aba6e0b4e50564f360a82e6 (diff)
upd765.cpp: return a command_end with data_completion = false for failed commands (#10615)
* upd765.cpp: return a command_end with data_completion = false for failed commands * upd765.cpp: add for format_track_continue too
-rw-r--r--src/devices/machine/upd765.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index acf4182fecc..8cb4e236a6b 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -1982,7 +1982,10 @@ void upd765_family_device::read_data_continue(floppy_info &fi)
result[5] = command[4];
result[6] = command[5];
result_pos = 7;
- command_end(fi, true);
+ // PC80S31K i/f is fussy on this:
+ // wants data_completion = false for anything that throws a scan_id failed,
+ // otherwise it will try to terminal count something that doesn't have data in the first place.
+ command_end(fi, (fi.st0 & 0xc0) == 0x00);
return;
default:
@@ -2133,7 +2136,7 @@ void upd765_family_device::write_data_continue(floppy_info &fi)
result[5] = command[4];
result[6] = command[5];
result_pos = 7;
- command_end(fi, true);
+ command_end(fi, (fi.st0 & 0xc0) == 0x00);
return;
default:
@@ -2319,7 +2322,7 @@ void upd765_family_device::read_track_continue(floppy_info &fi)
result[5] = command[4];
result[6] = command[5];
result_pos = 7;
- command_end(fi, true);
+ command_end(fi, (fi.st0 & 0xc0) == 0x00);
return;
default:
@@ -2409,7 +2412,7 @@ void upd765_family_device::format_track_continue(floppy_info &fi)
result[5] = 0;
result[6] = command[2];
result_pos = 7;
- command_end(fi, true);
+ command_end(fi, (fi.st0 & 0xc0) == 0x00);
return;
default:
@@ -2501,7 +2504,7 @@ void upd765_family_device::read_id_continue(floppy_info &fi)
result[5] = cur_live.idbuf[2];
result[6] = cur_live.idbuf[3];
result_pos = 7;
- command_end(fi, true);
+ command_end(fi, (fi.st0 & 0xc0) == 0x00);
return;
default: