summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/upd765.cpp
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2022-12-05 21:22:49 -0600
committer cracyc <cracyc@users.noreply.github.com>2022-12-05 21:22:49 -0600
commit760e392bdd4bb0130fbac8ee8fbd3c04edbfcd84 (patch)
tree5f58d112227dfbd1ce7ace81f25581684eb87cb6 /src/devices/machine/upd765.cpp
parent69916dcec0458a0d7bcc3b94b0b784f31cb39f47 (diff)
upd765: revert data_completion change and clear data_irq in fifo_r/w. Also disable clearing data_irq in msr_r.
Diffstat (limited to 'src/devices/machine/upd765.cpp')
-rw-r--r--src/devices/machine/upd765.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index 8cb4e236a6b..b20000a82b5 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -521,11 +521,6 @@ uint8_t upd765_family_device::msr_r()
}
msr |= get_drive_busy();
- if(data_irq && !machine().side_effects_disabled()) {
- data_irq = false;
- check_irq();
- }
-
return msr;
}
@@ -546,6 +541,8 @@ void upd765_family_device::set_rate(int rate)
uint8_t upd765_family_device::fifo_r()
{
uint8_t r = 0xff;
+ if(!machine().side_effects_disabled())
+ data_irq = false;
switch(main_phase) {
case PHASE_CMD:
if(machine().side_effects_disabled())
@@ -591,6 +588,7 @@ void upd765_family_device::fifo_w(uint8_t data)
if(!BIT(dor, 2))
LOGWARN("%s: fifo_w(%02x) in reset\n", machine().describe_context(), data);
+ data_irq = false;
switch(main_phase) {
case PHASE_CMD: {
command[command_pos++] = data;
@@ -1982,10 +1980,7 @@ void upd765_family_device::read_data_continue(floppy_info &fi)
result[5] = command[4];
result[6] = command[5];
result_pos = 7;
- // 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);
+ command_end(fi, true);
return;
default:
@@ -2136,7 +2131,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, (fi.st0 & 0xc0) == 0x00);
+ command_end(fi, true);
return;
default:
@@ -2322,7 +2317,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, (fi.st0 & 0xc0) == 0x00);
+ command_end(fi, true);
return;
default:
@@ -2412,7 +2407,7 @@ void upd765_family_device::format_track_continue(floppy_info &fi)
result[5] = 0;
result[6] = command[2];
result_pos = 7;
- command_end(fi, (fi.st0 & 0xc0) == 0x00);
+ command_end(fi, true);
return;
default:
@@ -2504,7 +2499,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, (fi.st0 & 0xc0) == 0x00);
+ command_end(fi, true);
return;
default: