diff options
author | Sergey Svishchev <shattered@users.noreply.github.com> | 2016-11-25 23:28:47 +0300 |
---|---|---|
committer | Sergey Svishchev <shattered@users.noreply.github.com> | 2017-01-15 02:24:48 +0300 |
commit | 5fb832ed245de1d5739aea4b0d6ee40115cc8d5d (patch) | |
tree | 3c45cbc4af883a767caa52ca5c511a411f801294 /src/devices/imagedev | |
parent | ec2aa711ca539c147e9c9925476205def4b053ca (diff) |
imagedev/floppy: add 'dskchg_writable' property (for Sony Microfloppy drives)
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r-- | src/devices/imagedev/floppy.cpp | 12 | ||||
-rw-r--r-- | src/devices/imagedev/floppy.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 6ed29cda026..241483c7696 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -180,6 +180,7 @@ floppy_image_device::floppy_image_device(const machine_config &mconfig, device_t sides(0), form_factor(0), motor_always_on(false), + dskchg_writable(false), dir(0), stp(0), wtg(0), mon(0), ss(0), idx(0), wpt(0), rdy(0), dskchg(0), ready(false), rpm(0), @@ -314,6 +315,7 @@ void floppy_image_device::device_start() { rpm = 0; motor_always_on = false; + dskchg_writable = false; idx = 0; @@ -450,6 +452,9 @@ image_init_result floppy_image_device::call_load() } else if(!mon) ready_counter = 2; + if (dskchg_writable) + dskchg = 1; + return image_init_result::PASS; } @@ -651,7 +656,7 @@ void floppy_image_device::stp_w(int state) if (m_make_sound) m_sound_out->step(cyl*5/tracks); } /* Update disk detection if applicable */ - if (exists()) + if (exists() && !dskchg_writable) { if (dskchg==0) dskchg = 1; } @@ -696,7 +701,7 @@ void floppy_image_device::seek_phase_w(int phases) logerror("%s: track %d.%d\n", tag(), cyl, subcyl); /* Update disk detection if applicable */ - if (exists()) + if (exists() && !dskchg_writable) if (dskchg==0) dskchg = 1; } @@ -2040,6 +2045,7 @@ void sony_oa_d31v::setup_characteristics() form_factor = floppy_image::FF_35; tracks = 70; sides = 1; + dskchg_writable = true; set_rpm(600); } @@ -2075,6 +2081,7 @@ void sony_oa_d32w::setup_characteristics() form_factor = floppy_image::FF_35; tracks = 80; sides = 2; + dskchg_writable = true; set_rpm(600); } @@ -2111,6 +2118,7 @@ void sony_oa_d32v::setup_characteristics() form_factor = floppy_image::FF_35; tracks = 80; sides = 1; + dskchg_writable = true; set_rpm(600); } diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index b6e01fe5286..5e03708c409 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -124,6 +124,7 @@ public: void dir_w(int state) { dir = state; } void ss_w(int state) { ss = state; } void inuse_w(int state) { } + void dskchg_w(int state) { if (dskchg_writable) dskchg = state; } void index_resync(); attotime time_next_index(); @@ -162,6 +163,7 @@ protected: int sides; /* number of heads */ uint32_t form_factor; /* 3"5, 5"25, etc */ bool motor_always_on; + bool dskchg_writable; /* state of input lines */ int dir; /* direction */ |