summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mos6551.c
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2014-04-11 08:54:54 +0000
committer smf- <smf-@users.noreply.github.com>2014-04-11 08:54:54 +0000
commitfbc648ce50860d91b486cf3771e1174ddeee5504 (patch)
treee904ed56ef96a4f65a35fd76978dfb2aca5a839d /src/emu/machine/mos6551.c
parent82a53e97459e7ecb0c7bd01ce76909d071469845 (diff)
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)
Diffstat (limited to 'src/emu/machine/mos6551.c')
-rw-r--r--src/emu/machine/mos6551.c17
1 files changed, 16 insertions, 1 deletions
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;
}