void via6522_device::shift() { if (SO_O2_CONTROL(m_acr) || SO_T2_CONTROL(m_acr)) { m_out_cb2 = (m_sr >> 7) & 1; m_sr = (m_sr << 1) | m_out_cb2; m_out_cb2_func(m_out_cb2); m_in_cb1=1; /* this should be one cycle wide */ m_out_cb1_func(0); m_out_cb1_func(1); m_shift_counter = (m_shift_counter + 1) % 8; if (m_shift_counter) { if (SO_O2_CONTROL(m_acr)) { m_shift_timer->adjust(clocks_to_attotime(2)); } else { m_shift_timer->adjust(clocks_to_attotime((m_t2ll + 2)*2)); } } else { if (!(m_ifr & INT_SR)) { set_int(INT_SR); } } }
void via6522_device::shift() { if (SO_O2_CONTROL(m_acr) || SO_T2_CONTROL(m_acr)) { m_out_cb2 = (m_sr >> 7) & 1; m_sr = (m_sr << 1) | m_out_cb2; devcb_call_write_line(&m_out_cb2_func, m_out_cb2); m_in_cb1=1; /* this should be one cycle wide */ devcb_call_write_line(&m_out_cb1_func, 0); devcb_call_write_line(&m_out_cb1_func, 1); m_shift_counter = (m_shift_counter + 1) % 8; if (m_shift_counter) { if (SO_O2_CONTROL(m_acr)) { timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0); } else { timer_adjust_oneshot(m_shift_timer, cycles_to_time((m_t2ll + 2)*2), 0); } } else { if (!(m_ifr & INT_SR)) { set_int(INT_SR); } } }