inline void c2040_device::micropolis_step_motor(int unit, int stp) { if (!m_unit[unit].m_mtr && (m_unit[unit].m_stp != stp)) { int tracks = 0; switch (m_unit[unit].m_stp) { case 0: if (stp == 1) tracks++; else if (stp == 3) tracks--; break; case 1: if (stp == 2) tracks++; else if (stp == 0) tracks--; break; case 2: if (stp == 3) tracks++; else if (stp == 1) tracks--; break; case 3: if (stp == 0) tracks++; else if (stp == 2) tracks--; break; } if (tracks != 0) { // step read/write head floppy_drive_seek(m_unit[unit].m_image, tracks); // read new track data read_current_track(unit); } m_unit[unit].m_stp = stp; } }
inline void c2040_device::spindle_motor(int unit, int mtr) { if (m_unit[unit].m_mtr != mtr) { if (!mtr) { // read track data read_current_track(unit); } floppy_mon_w(m_unit[unit].m_image, mtr); m_unit[unit].m_mtr = mtr; } }
static void spindle_motor(c1551_t *c1551, int mtr) { if (c1551->mtr != mtr) { if (mtr) { /* read track data */ read_current_track(c1551); } floppy_mon_w(c1551->image, !mtr); c1551->bit_timer->enable(mtr); c1551->mtr = mtr; } }
static void on_disk_change(device_image_interface &image) { c1551_t *c1551 = get_safe_token(image.device().owner()); read_current_track(c1551); }