summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/wd_fdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/wd_fdc.c')
-rw-r--r--src/emu/machine/wd_fdc.c54
1 files changed, 49 insertions, 5 deletions
diff --git a/src/emu/machine/wd_fdc.c b/src/emu/machine/wd_fdc.c
index 4e922aab398..82dd3d0d0dc 100644
--- a/src/emu/machine/wd_fdc.c
+++ b/src/emu/machine/wd_fdc.c
@@ -9,6 +9,7 @@ const device_type FD1781x = &device_creator<fd1781_t>;
const device_type FD1791x = &device_creator<fd1791_t>;
const device_type FD1792x = &device_creator<fd1792_t>;
const device_type FD1793x = &device_creator<fd1793_t>;
+const device_type KR1818VG93x = &device_creator<kr1818vg93_t>;
const device_type FD1794x = &device_creator<fd1794_t>;
const device_type FD1795x = &device_creator<fd1795_t>;
const device_type FD1797x = &device_creator<fd1797_t>;
@@ -903,12 +904,17 @@ void wd_fdc_t::interrupt_start()
status_type_1 = true;
}
- if(!(command & 0x0f)) {
- intrq_cond = 0;
- } else if ((command & 0x0f) > 8) { // assume I_IMM is set only if condition equal to 8 but not more than, Spectrum's BetaDisk require this
- intrq_cond = 0;
+ int intcond = command & 0x0f;
+ if (!nonsticky_immint) {
+ if(intcond == 0)
+ intrq_cond = 0;
+ else
+ intrq_cond = (intrq_cond & I_IMM) | intcond;
} else {
- intrq_cond = (intrq_cond & I_IMM) | (command & 0x0f);
+ if (intcond < 8)
+ intrq_cond = intcond;
+ else
+ intrq_cond = 0;
}
if(command & I_IMM) {
@@ -2394,6 +2400,7 @@ fd1771_t::fd1771_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1771_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2418,6 +2425,7 @@ fd1781_t::fd1781_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1781_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2444,6 +2452,7 @@ fd1791_t::fd1791_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1792_t::fd1792_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1792x, "FD1792", tag, owner, clock, "fd1792", __FILE__)
@@ -2459,6 +2468,7 @@ fd1792_t::fd1792_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1793_t::fd1793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1793x, "FD1793", tag, owner, clock, "fd1793", __FILE__)
@@ -2474,6 +2484,23 @@ fd1793_t::fd1793_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
+}
+
+kr1818vg93_t::kr1818vg93_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1793x, "FD1793", tag, owner, clock, "fd1793", __FILE__)
+{
+ step_times = fd179x_step_times;
+ delay_register_commit = 4;
+ delay_command_commit = 12;
+ disable_mfm = false;
+ has_enmf = false;
+ inverted_bus = false;
+ side_control = false;
+ side_compare = true;
+ head_control = true;
+ motor_control = false;
+ ready_hooked = true;
+ nonsticky_immint = true;
}
fd1794_t::fd1794_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1794x, "FD1794", tag, owner, clock, "fd1794", __FILE__)
@@ -2489,6 +2516,7 @@ fd1794_t::fd1794_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1795_t::fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1795x, "FD1795", tag, owner, clock, "fd1795", __FILE__)
@@ -2504,6 +2532,7 @@ fd1795_t::fd1795_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1795_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2527,6 +2556,7 @@ fd1797_t::fd1797_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1797_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2550,6 +2580,7 @@ mb8866_t::mb8866_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
mb8876_t::mb8876_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, MB8876x, "MB8876", tag, owner, clock, "mb8876", __FILE__)
@@ -2565,6 +2596,7 @@ mb8876_t::mb8876_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
mb8877_t::mb8877_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, MB8877x, "MB8877", tag, owner, clock, "mb8877", __FILE__)
@@ -2580,6 +2612,7 @@ mb8877_t::mb8877_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1761_t::fd1761_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1761x, "FD1761", tag, owner, clock, "fd1761", __FILE__)
@@ -2595,6 +2628,7 @@ fd1761_t::fd1761_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1763_t::fd1763_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1763x, "FD1763", tag, owner, clock, "fd1763", __FILE__)
@@ -2610,6 +2644,7 @@ fd1763_t::fd1763_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
fd1765_t::fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, FD1765x, "FD1765", tag, owner, clock, "fd1765", __FILE__)
@@ -2625,6 +2660,7 @@ fd1765_t::fd1765_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1765_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2648,6 +2684,7 @@ fd1767_t::fd1767_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int fd1767_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2671,6 +2708,7 @@ wd2791_t::wd2791_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2793x, "WD2793", tag, owner, clock, "wd2793", __FILE__)
@@ -2686,6 +2724,7 @@ wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
wd2795_t::wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_analog_t(mconfig, WD2795x, "WD2795", tag, owner, clock, "wd2795", __FILE__)
@@ -2701,6 +2740,7 @@ wd2795_t::wd2795_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int wd2795_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2724,6 +2764,7 @@ wd2797_t::wd2797_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = true;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}
int wd2797_t::calc_sector_size(UINT8 size, UINT8 command) const
@@ -2747,6 +2788,7 @@ wd1770_t::wd1770_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = false;
motor_control = true;
ready_hooked = false;
+ nonsticky_immint = false;
}
wd1772_t::wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd_fdc_digital_t(mconfig, WD1772x, "WD1772", tag, owner, clock, "wd1772", __FILE__)
@@ -2764,6 +2806,7 @@ wd1772_t::wd1772_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = false;
motor_control = true;
ready_hooked = false;
+ nonsticky_immint = false;
}
int wd1772_t::settle_time() const
@@ -2784,4 +2827,5 @@ wd1773_t::wd1773_t(const machine_config &mconfig, const char *tag, device_t *own
head_control = false;
motor_control = false;
ready_hooked = true;
+ nonsticky_immint = false;
}