From fbc648ce50860d91b486cf3771e1174ddeee5504 Mon Sep 17 00:00:00 2001 From: smf- Date: Fri, 11 Apr 2014 08:54:54 +0000 Subject: [PATCH] Stop the internal timer if DTR is high and there is no character being received as neither the transmit or receive will do anything anyway. The default is for the internal divider to be disabled so if the chip wasn't initialised then the timer would be running at the full rate of the xtal. (nw) --- src/emu/machine/mos6551.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c index 97d118b86ae..4aae612659e 100644 --- a/src/emu/machine/mos6551.c +++ b/src/emu/machine/mos6551.c @@ -240,7 +240,15 @@ void mos6551_device::update_divider() m_tx_internal_clock = true; m_divide = 16; - scale = (double) 1 / scale; + + if (!m_dtr || m_rx_state != STATE_START) + { + scale = (double) 1 / scale; + } + else + { + scale = 0; + } } else { @@ -355,6 +363,8 @@ void mos6551_device::write_command(UINT8 data) m_tx_output = OUTPUT_MARK; output_txd(1); } + + update_divider(); } READ8_MEMBER( mos6551_device::read ) @@ -629,6 +639,11 @@ WRITE_LINE_MEMBER(mos6551_device::receiver_clock) } m_rx_state = STATE_START; + + if (m_dtr) + { + update_divider(); + } } break; }