From cbcdd9cdbc9770f2aa43d829d2c798011d35b022 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Fri, 17 May 2013 20:22:32 +0000 Subject: [PATCH] (MESS) softbox: Fixed terminal. (nw) --- src/emu/machine/i8251.c | 25 +++++++++++++++---------- src/mess/drivers/softbox.c | 11 +++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/emu/machine/i8251.c b/src/emu/machine/i8251.c index c10d0d1ae97..14d359e8bac 100644 --- a/src/emu/machine/i8251.c +++ b/src/emu/machine/i8251.c @@ -390,24 +390,28 @@ WRITE8_MEMBER(i8251_device::control_w) LOG(("Character length: %d\n", (((data>>2) & 0x03)+5))); + int parity = SERIAL_PARITY_NONE; + if (data & (1<<4)) { LOG(("enable parity checking\n")); + + if (data & (1<<5)) + { + LOG(("even parity\n")); + parity = SERIAL_PARITY_EVEN; + } + else + { + LOG(("odd parity\n")); + parity = SERIAL_PARITY_ODD; + } } else { LOG(("parity check disabled\n")); } - if (data & (1<<5)) - { - LOG(("even parity\n")); - } - else - { - LOG(("odd parity\n")); - } - { UINT8 stop_bit_length; @@ -446,7 +450,6 @@ WRITE8_MEMBER(i8251_device::control_w) } int word_length = ((data>>2) & 0x03)+5; - int parity = SERIAL_PARITY_NONE; int stop_bit_count = 1; switch ((data>>6) & 0x03) { @@ -667,10 +670,12 @@ WRITE8_MEMBER(i8251_device::data_w) /* writing clears */ m_status &=~I8251_STATUS_TX_READY; + m_status &=~I8251_STATUS_TX_EMPTY; /* if transmitter is active, then tx empty will be signalled */ update_tx_ready(); + update_tx_empty(); } diff --git a/src/mess/drivers/softbox.c b/src/mess/drivers/softbox.c index d94d9a3db18..8d4be1aea32 100644 --- a/src/mess/drivers/softbox.c +++ b/src/mess/drivers/softbox.c @@ -247,7 +247,7 @@ static I8255A_INTERFACE( ppi1_intf ) WRITE_LINE_MEMBER( softbox_state::fr_w ) { m_rx_clock++; - logerror("rx %u\n", m_rx_clock); + if (m_rx_clock & 0x10) { m_rx_clock = 0; @@ -258,7 +258,7 @@ WRITE_LINE_MEMBER( softbox_state::fr_w ) WRITE_LINE_MEMBER( softbox_state::ft_w ) { m_tx_clock++; - logerror("tx %u\n", m_tx_clock); + if (m_tx_clock & 0x10) { m_tx_clock = 0; @@ -285,14 +285,9 @@ static DEVICE_INPUT_DEFAULTS_START( terminal ) DEVICE_INPUT_DEFAULTS( "TERM_FRAME", 0x30, 0x10 ) // 7E1 DEVICE_INPUT_DEFAULTS_END -WRITE8_MEMBER( softbox_state::dummy_w ) -{ - // handled in usart_intf -} - static const serial_terminal_interface terminal_intf = { - DEVCB_DRIVER_MEMBER(softbox_state, dummy_w) + DEVCB_NULL };