summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2022-05-01 20:45:47 +0200
committer GitHub <noreply@github.com>2022-05-02 04:45:47 +1000
commit394107b576959f48311e07e73e92cb3e0f5cbe1b (patch)
tree89023921c1c761945ad3afdd85c99808fc8916a9 /src/devices/machine
parent9d77923b93885c49fa83fa361e9d9972eeec5d5a (diff)
-tim011.cpp: Hooked up floppy drives properly. (#9649)
* Hooked up floppy drives and controller properly, and implemented video display. * formats/tim011_dsk.cpp: Added TIM 011 floppy image format. -machine/upd765.cpp: If waiting for additional command bytes, treat a data register read as an open bus write (tested on real hardware) and always trigger the DRQ line even if in nodma mode. [Carl -cpu/z180: Added callbacks for tend; decrement bcr1 when DMA channel 1 is active. [Carl]
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/upd765.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index 3c8f3add09e..0db88c35c6e 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -533,12 +533,17 @@ uint8_t upd765_family_device::fifo_r()
{
uint8_t r = 0xff;
switch(main_phase) {
+ case PHASE_CMD:
+ if(command_pos)
+ fifo_w(0xff);
+ LOGFIFO("fifo_r in command phase\n");
+ break;
case PHASE_EXEC:
if(machine().side_effects_disabled())
return fifo[0];
if(internal_drq)
return fifo_pop(false);
- LOGFIFO("fifo_r in phase %d\n", main_phase);
+ LOGFIFO("fifo_r in execution phase\n");
break;
case PHASE_RESULT:
@@ -594,7 +599,7 @@ void upd765_family_device::fifo_w(uint8_t data)
fifo_push(data, false);
return;
}
- LOGFIFO("fifo_w in phase %d\n", main_phase);
+ LOGFIFO("fifo_w in execution phase\n");
break;
default:
@@ -639,11 +644,10 @@ void upd765_family_device::enable_transfer()
check_irq();
}
- } else {
- // DMA
- if(!drq)
- set_drq(true);
}
+ // DMA
+ if(!drq)
+ set_drq(true);
}
void upd765_family_device::disable_transfer()
@@ -651,8 +655,8 @@ void upd765_family_device::disable_transfer()
if(spec & SPEC_ND) {
internal_drq = false;
check_irq();
- } else
- set_drq(false);
+ }
+ set_drq(false);
}
void upd765_family_device::fifo_push(uint8_t data, bool internal)