summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/wd_fdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/wd_fdc.cpp')
-rw-r--r--src/devices/machine/wd_fdc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp
index 09553d7c13f..516bd47f2e2 100644
--- a/src/devices/machine/wd_fdc.cpp
+++ b/src/devices/machine/wd_fdc.cpp
@@ -87,7 +87,8 @@ wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_typ
enp_cb(*this),
sso_cb(*this),
ready_cb(*this), // actually output by the drive, not by the FDC
- enmf_cb(*this)
+ enmf_cb(*this),
+ mon_cb(*this)
{
force_ready = false;
disable_motor_control = false;
@@ -113,6 +114,7 @@ void wd_fdc_device_base::device_start()
sso_cb.resolve();
ready_cb.resolve();
enmf_cb.resolve();
+ mon_cb.resolve_safe();
if (!has_enmf && !enmf_cb.isnull())
logerror("Warning, this chip doesn't have an ENMF line.\n");
@@ -217,6 +219,9 @@ void wd_fdc_device_base::set_floppy(floppy_image_device *_floppy)
int next_ready = floppy ? floppy->ready_r() : 1;
+ if (motor_control)
+ mon_cb(status & S_MON ? 0 : 1);
+
if(floppy) {
if(motor_control && !disable_motor_control)
floppy->mon_w(status & S_MON ? 0 : 1);
@@ -1296,6 +1301,8 @@ void wd_fdc_device_base::spinup()
}
status |= S_MON|S_SPIN;
+
+ mon_cb(0);
if(floppy && !disable_motor_control)
floppy->mon_w(0);
}
@@ -1335,6 +1342,7 @@ void wd_fdc_device_base::index_callback(floppy_image_device *floppy, int state)
motor_timeout ++;
if(motor_control && motor_timeout >= 5) {
status &= ~S_MON;
+ mon_cb(1);
if(floppy && !disable_motor_control)
floppy->mon_w(1);
}