UINT16 via6522_device::get_counter1_value() { UINT16 val; if(m_t1_active) { val = time_to_cycles(m_t1->remaining()) - IFR_DELAY; } else { val = 0xffff - time_to_cycles(machine().time() - m_time1); } return val; }
UINT16 via6522_device::get_counter1_value() { UINT16 val; if(m_t1_active) { val = time_to_cycles(timer_timeleft(m_t1)) - IFR_DELAY; } else { val = 0xffff - time_to_cycles(attotime_sub(timer_get_time(&m_machine), m_time1)); } return val; }
void wozfdc_device::device_reset() { floppy = NULL; active = MODE_IDLE; phases = 0x00; mode_write = false; mode_load = false; last_6502_write = 0x00; cur_lss.tm = machine().time(); cur_lss.cycles = time_to_cycles(cur_lss.tm); cur_lss.data_reg = 0x00; cur_lss.address = 0x00; cur_lss.write_start_time = attotime::never; cur_lss.write_position = 0; cur_lss.write_line_active = false; predicted_lss.tm = attotime::never; }
void wozfdc_device::device_reset() { floppy = nullptr; active = MODE_IDLE; phases = 0x00; mode_write = false; mode_load = false; last_6502_write = 0x00; cycles = time_to_cycles(machine().time()); data_reg = 0x00; address = 0x00; write_start_time = attotime::never; write_position = 0; write_line_active = false; external_io_select = false; // Just a timer to be sure that the lss is updated from time to // time, so that there's no hiccup when it's talked to again. timer->adjust(attotime::from_msec(10), 0, attotime::from_msec(10)); }