summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev
diff options
context:
space:
mode:
author fulivi <fulivi@users.noreply.github.com>2015-10-21 15:11:21 +0200
committer fulivi <fulivi@users.noreply.github.com>2015-10-25 15:25:29 +0100
commit1af7785671b7c050bfbb307f1a3158111ca11635 (patch)
tree28983cec8c4a5f0f0509d631d6f2335270912b54 /src/devices/imagedev
parent2f30f65d9190a2c1e8587755a751b8b485216b8d (diff)
floppy: changed rules of "ready" signal on drives with motor that always spins
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r--src/devices/imagedev/floppy.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/devices/imagedev/floppy.c b/src/devices/imagedev/floppy.c
index 384f050e4f6..c248b10a1e7 100644
--- a/src/devices/imagedev/floppy.c
+++ b/src/devices/imagedev/floppy.c
@@ -415,7 +415,10 @@ bool floppy_image_device::call_load()
if (!cur_load_cb.isnull())
return cur_load_cb(this);
- if(!mon)
+ if (motor_always_on) {
+ // When disk is inserted, start motor
+ mon_w(0);
+ } else if(!mon)
ready_counter = 2;
return IMAGE_INIT_PASS;
@@ -442,7 +445,11 @@ void floppy_image_device::call_unload()
if (!cur_unload_cb.isnull())
cur_unload_cb(this);
- if(!ready) {
+
+ if (motor_always_on) {
+ // When disk is removed, stop motor
+ mon_w(1);
+ } else if(!ready) {
ready = true;
if(!cur_ready_cb.isnull())
cur_ready_cb(this, ready);
@@ -490,7 +497,15 @@ void floppy_image_device::mon_w(int state)
if (!mon && image)
{
revolution_start_time = machine().time();
- ready_counter = 2;
+ if (motor_always_on) {
+ // Drives with motor that is always spinning are immediately ready when a disk is loaded
+ // because there is no spin-up time
+ ready = false;
+ if(!cur_ready_cb.isnull())
+ cur_ready_cb(this, ready);
+ } else {
+ ready_counter = 2;
+ }
index_resync();
}