diff options
Diffstat (limited to 'src/devices/machine/6522via.cpp')
| -rw-r--r-- | src/devices/machine/6522via.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index e58f1d03ace..87fb65f2579 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -527,10 +527,17 @@ TIMER_CALLBACK_MEMBER(via6522_device::shift_tick) TIMER_CALLBACK_MEMBER(via6522_device::t1_tick) { - if (T1_CONTINUOUS (m_acr)) + if (T1_CONTINUOUS(m_acr)) { - m_t1_pb7 = !m_t1_pb7; - m_t1->adjust(clocks_to_attotime(TIMER1_VALUE + IFR_DELAY)); + if (TIMER1_VALUE > 0) + { + m_t1_pb7 = !m_t1_pb7; + m_t1->adjust(clocks_to_attotime(TIMER1_VALUE + IFR_DELAY)); + } + else + { + m_t1_active = 0; + } } else { @@ -824,7 +831,7 @@ u8 via6522_device::read(offs_t offset) void via6522_device::write(offs_t offset, u8 data) { - offset &=0x0f; + offset &= 0x0f; LOGSETUP(" * %s Reg %02x <- %02x - %s\n", tag(), offset, data, std::array<char const *, 16> {{"ORB", "ORA", "DDRB", "DDRA", "T1CL","T1CH","T1LL","T1LH","T2CL","T2CH","SR","ACR","PCR","IFR","IER","ORA (nh)"}}[offset]); |
