summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Tom <37988779+TwistedTom@users.noreply.github.com>2019-11-21 15:52:10 +0000
committer Vas Crabb <cuavas@users.noreply.github.com>2019-11-22 02:52:10 +1100
commitb4003648241f11e79808dba23e9c2db2c782d3f7 (patch)
tree4aa4b956be3bc7785ab43e703bee7afd0f71a793 /src/devices/machine
parentc38f63c10afec9cd90ba48514a180344cb005762 (diff)
new working ZX Spectrum slot devices: DISCiPLE and +D disk interfaces (#5931)
* plusd working (rom patch) * plusd done * added disciple, not working * disciple working * wd_fdc fix * final tidy-up * ready for pr * Pernod70 changes * cuavas changes #1 * combine devices + files * sort out side_effects
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/wd_fdc.cpp8
-rw-r--r--src/devices/machine/wd_fdc.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp
index 691a7914b10..d2353fd26a5 100644
--- a/src/devices/machine/wd_fdc.cpp
+++ b/src/devices/machine/wd_fdc.cpp
@@ -91,6 +91,7 @@ wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_typ
{
force_ready = false;
disable_motor_control = false;
+ spinup_on_interrupt = false;
}
void wd_fdc_device_base::set_force_ready(bool _force_ready)
@@ -1122,6 +1123,8 @@ void wd_fdc_device_base::cmd_w(uint8_t val)
{
// checkme
delay_cycles(t_cmd, dden ? delay_register_commit * 2 : delay_register_commit);
+ if (spinup_on_interrupt) // see note in WD1772 constructor
+ spinup();
}
else
{
@@ -2895,6 +2898,11 @@ wd1772_device::wd1772_device(const machine_config &mconfig, const char *tag, dev
head_control = false;
motor_control = true;
ready_hooked = false;
+
+ /* Sam Coupe/+D/Disciple expect a 0xd0 force interrupt command to cause a spin-up.
+ eg. +D issues 2x 0xd0, then waits for index pulses to start, bails out with no disk error if that doesn't happen.
+ Not sure if other chips should do this too? */
+ spinup_on_interrupt = true;
}
int wd1772_device::settle_time() const
diff --git a/src/devices/machine/wd_fdc.h b/src/devices/machine/wd_fdc.h
index 038fee362f6..d6b07260078 100644
--- a/src/devices/machine/wd_fdc.h
+++ b/src/devices/machine/wd_fdc.h
@@ -108,6 +108,7 @@ protected:
const int *step_times;
int delay_register_commit;
int delay_command_commit;
+ bool spinup_on_interrupt;
static constexpr int fd179x_step_times[4] = { 6000, 12000, 20000, 30000 };
static constexpr int fd176x_step_times[4] = { 12000, 24000, 40000, 60000 };