static WRITE8_HANDLER( svi318_fdc_density_side_w ) { device_t *fdc = space->machine().device("wd179x"); wd17xx_dden_w(fdc, BIT(data, 0)); wd17xx_set_side(fdc, BIT(data, 1)); }
void coco_fdc_device::dskreg_w(UINT8 data) { UINT8 drive = 0; UINT8 head = 0; if (LOG_FDC) { logerror("fdc_coco_dskreg_w(): %c%c%c%c%c%c%c%c ($%02x)\n", data & 0x80 ? 'H' : 'h', data & 0x40 ? '3' : '.', data & 0x20 ? 'D' : 'S', data & 0x10 ? 'P' : 'p', data & 0x08 ? 'M' : 'm', data & 0x04 ? '2' : '.', data & 0x02 ? '1' : '.', data & 0x01 ? '0' : '.', data); } /* An email from John Kowalski informed me that if the DS3 is * high, and one of the other drive bits is selected (DS0-DS2), then the * second side of DS0, DS1, or DS2 is selected. If multiple bits are * selected in other situations, then both drives are selected, and any * read signals get yucky. */ if (data & 0x04) drive = 2; else if (data & 0x02) drive = 1; else if (data & 0x01) drive = 0; else if (data & 0x40) drive = 3; device_t *floppy[4]; floppy[0] = subdevice(FLOPPY_0); floppy[1] = subdevice(FLOPPY_1); floppy[2] = subdevice(FLOPPY_2); floppy[3] = subdevice(FLOPPY_3); for (int i = 0; i < 4; i++) { floppy_mon_w(floppy[i], i == drive ? CLEAR_LINE : ASSERT_LINE); } head = ((data & 0x40) && (drive != 3)) ? 1 : 0; m_dskreg = data; update_lines(); wd17xx_set_drive(m_wd17xx, drive); wd17xx_set_side(m_wd17xx, head); wd17xx_dden_w(m_wd17xx, !BIT(m_dskreg, 5)); }
static void osborne1_load_proc(device_image_interface &image) { int size = image.length(); osborne1_state *state = image.device().machine().driver_data<osborne1_state>(); switch( size ) { case 40 * 10 * 256: wd17xx_dden_w(state->m_fdc, ASSERT_LINE); break; case 40 * 5 * 1024: wd17xx_dden_w(state->m_fdc, CLEAR_LINE); break; case 40 * 8 * 512: wd17xx_dden_w(state->m_fdc, ASSERT_LINE); break; case 40 * 18 * 128: wd17xx_dden_w(state->m_fdc, ASSERT_LINE); break; case 40 * 9 * 512: wd17xx_dden_w(state->m_fdc, CLEAR_LINE); break; } }
void dragon_fdc_device::dskreg_w(UINT8 data) { if (LOG_FDC) { logerror("fdc_dragon_dskreg_w(): %c%c%c%c%c%c%c%c ($%02x)\n", data & 0x80 ? 'X' : 'x', data & 0x40 ? 'X' : 'x', data & 0x20 ? 'N' : 'n', data & 0x10 ? 'P' : 'p', data & 0x08 ? 'S' : 'D', data & 0x04 ? 'M' : 'm', data & 0x02 ? '1' : '0', data & 0x01 ? '1' : '0', data); } if (data & 0x04) wd17xx_set_drive(m_wd17xx, data & 0x03); wd17xx_dden_w(m_wd17xx, BIT(data, 3)); m_dskreg = data; }