diff options
author | 2015-10-21 15:11:21 +0200 | |
---|---|---|
committer | 2015-10-25 15:25:29 +0100 | |
commit | 1af7785671b7c050bfbb307f1a3158111ca11635 (patch) | |
tree | 28983cec8c4a5f0f0509d631d6f2335270912b54 | |
parent | 2f30f65d9190a2c1e8587755a751b8b485216b8d (diff) |
floppy: changed rules of "ready" signal on drives with motor that always spins
-rw-r--r-- | src/devices/imagedev/floppy.c | 21 |
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(); } |