diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index 240de545092..ddbd4ecf965 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -776,13 +776,19 @@ u8 via6522_device::read(offs_t offset) LOGSHIFT(" - ACR: %02x ", m_acr); if (SI_O2_CONTROL(m_acr) || SO_O2_CONTROL(m_acr)) { - m_shift_timer->adjust(clocks_to_attotime(8) / 2); // 8 edges to start shifter from a read - LOGSHIFT(" - read SR starts O2 timer "); + if (m_shift_timer->expire().is_never()) + { + m_shift_timer->adjust(clocks_to_attotime(7) / 2); // 8 edges to start shifter from a read -- use 7 for a mac128 issue to be fixed later + LOGSHIFT(" - read SR starts O2 timer "); + } } else if (SI_T2_CONTROL(m_acr) || SO_T2_CONTROL(m_acr)) { - m_shift_timer->adjust(clocks_to_attotime(m_t2ll + 2) / 2); - LOGSHIFT(" - read SR starts T2 timer "); + if (m_shift_timer->expire().is_never()) + { + m_shift_timer->adjust(clocks_to_attotime(m_t2ll + 2) / 2); + LOGSHIFT(" - read SR starts T2 timer "); + } } else if (!SO_T2_RATE(m_acr)) { @@ -972,13 +978,19 @@ void via6522_device::write(offs_t offset, u8 data) LOGSHIFT(" - ACR is: %02x ", m_acr); if (SO_O2_CONTROL(m_acr) || SI_O2_CONTROL(m_acr)) { - m_shift_timer->adjust(clocks_to_attotime(8) / 2); // 8 edges to start shifter from a write - LOGSHIFT(" - write SR starts O2 timer"); + if (m_shift_timer->expire().is_never()) + { + m_shift_timer->adjust(clocks_to_attotime(8) / 2); // 8 edges to start shifter from a write + LOGSHIFT(" - write SR starts O2 timer"); + } } else if (SO_T2_RATE(m_acr) || SO_T2_CONTROL(m_acr) || SI_T2_CONTROL(m_acr)) { - m_shift_timer->adjust(clocks_to_attotime(m_t2ll + 2) / 2); - LOGSHIFT(" - write starts T2 timer"); + if (m_shift_timer->expire().is_never()) + { + m_shift_timer->adjust(clocks_to_attotime(m_t2ll + 2) / 2); + LOGSHIFT(" - write starts T2 timer"); + } } else { diff --git a/src/mame/drivers/mac128.cpp b/src/mame/drivers/mac128.cpp index 884f29500bb..43b184c2c81 100644 --- a/src/mame/drivers/mac128.cpp +++ b/src/mame/drivers/mac128.cpp @@ -698,7 +698,7 @@ void mac128_state::via_sync() uint64_t vpa_cycle = cur_cycle+2; uint64_t via_start_cycle = (vpa_cycle + 9) / 10; uint64_t end_cycle = via_start_cycle * 10 + 4; - m_maincpu->adjust_icount(cur_cycle - end_cycle); + m_maincpu->adjust_icount(cur_cycle - end_cycle - 4); // 4 cycles already counted by the core } uint16_t mac128_state::mac_via_r(offs_t offset)