From 224c8d3f97a124872fdf2c15630004a68d97c233 Mon Sep 17 00:00:00 2001 From: Jonathan Gevaryahu Date: Thu, 10 Sep 2009 06:13:26 +0000 Subject: [PATCH] 68681/2681 duart: When a channel is in loopback mode, do not actually transmit bytes sent to that duart channel over the TX pin --- src/emu/machine/68681.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index 8b7f6ab9d24..969c5e0a5c5 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -377,7 +377,9 @@ static TIMER_CALLBACK( tx_timer_callback ) duart68681_state *duart68681 = get_safe_token(device); int ch = param & 1; - if (duart68681->duart_config->tx_callback) + // send the byte unless we're in loopback mode; + // in loopback mode do NOT 'actually' send the byte: the TXn pin is held high when loopback mode is on. + if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80)) duart68681->duart_config->tx_callback(device, ch, duart68681->channel[ch].tx_data); duart68681->channel[ch].tx_ready = 1;