/* motor on, active low */ void floppy_image_device::mon_w(int state) { if(mon == state) return; mon = state; /* off -> on */ if (!mon && image) { revolution_start_time = machine().time(); ready_counter = 2; index_resync(); } /* on -> off */ else { if(image_dirty) commit_image(); revolution_start_time = attotime::never; index_timer->adjust(attotime::zero); if(!ready) { ready = true; if(!cur_ready_cb.isnull()) cur_ready_cb(this, ready); } } }
void floppy_image_device::call_unload() { dskchg = 0; if (image) { if(image_dirty) commit_image(); global_free(image); image = 0; } wpt = 1; // disk sleeve is covering the sensor if (!cur_wpt_cb.isnull()) cur_wpt_cb(this, wpt); wpt = 0; // sensor is uncovered if (!cur_wpt_cb.isnull()) cur_wpt_cb(this, wpt); if (!cur_unload_cb.isnull()) cur_unload_cb(this); if(!ready) { ready = true; if(!cur_ready_cb.isnull()) cur_ready_cb(this, ready); } }
void floppy_image_device::call_unload() { dskchg = 0; if (image) { if(image_dirty) commit_image(); global_free(image); image = 0; } if (!cur_unload_cb.isnull()) cur_unload_cb(this); }
/* motor on, active low */ void floppy_image_device::mon_w(int state) { if(mon == state) return; mon = state; /* off -> on */ if (!mon && image) { revolution_start_time = machine().time(); index_resync(); } /* on -> off */ else { if(image_dirty) commit_image(); revolution_start_time = attotime::never; index_timer->adjust(attotime::zero); } }
void floppy_image_device::setup_write(floppy_image_format_t *_output_format) { output_format = _output_format; commit_image(); }