mirror of
https://github.com/holub/mame
synced 2025-06-25 22:04:15 +03:00
BACTA Datalogger: fixed regressions
This commit is contained in:
parent
055379b5bc
commit
0ca0f8e385
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#define LOG_DATA (1U << 1)
|
#define LOG_DATA (1U << 1)
|
||||||
|
|
||||||
#define VERBOSE (LOG_DATA)
|
//#define VERBOSE (LOG_DATA)
|
||||||
//#define LOG_OUTPUT_STREAM std::cout
|
//#define LOG_OUTPUT_STREAM std::cout
|
||||||
|
|
||||||
#include "logmacro.h"
|
#include "logmacro.h"
|
||||||
@ -38,7 +38,7 @@ bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig,
|
|||||||
: device_t(mconfig, BACTA_DATALOGGER, tag, owner, clock),
|
: device_t(mconfig, BACTA_DATALOGGER, tag, owner, clock),
|
||||||
device_serial_interface(mconfig, *this),
|
device_serial_interface(mconfig, *this),
|
||||||
m_rxd_handler(*this),
|
m_rxd_handler(*this),
|
||||||
m_last_input(0),
|
m_last_input(-1),
|
||||||
m_output_char(0)
|
m_output_char(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -68,10 +68,11 @@ void bacta_datalogger_device::tx_queue()
|
|||||||
{
|
{
|
||||||
if (is_transmit_register_empty())
|
if (is_transmit_register_empty())
|
||||||
{
|
{
|
||||||
if (m_output_char != 0)
|
if (m_output_char != -1)
|
||||||
{
|
{
|
||||||
|
set_tra_rate(1200);
|
||||||
transmit_register_setup(m_output_char);
|
transmit_register_setup(m_output_char);
|
||||||
m_output_char = 0;
|
m_output_char = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,6 +84,8 @@ void bacta_datalogger_device::tra_callback()
|
|||||||
|
|
||||||
void bacta_datalogger_device::tra_complete()
|
void bacta_datalogger_device::tra_complete()
|
||||||
{
|
{
|
||||||
|
// Shut down transmitter until there's a character
|
||||||
|
set_tra_rate(attotime::never);
|
||||||
tx_queue();
|
tx_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +96,9 @@ void bacta_datalogger_device::rcv_complete()
|
|||||||
receive_register_extract();
|
receive_register_extract();
|
||||||
|
|
||||||
data = get_received_char();
|
data = get_received_char();
|
||||||
if (data > 0x7f)
|
if (data != 0x00)
|
||||||
|
{
|
||||||
|
if (data > 0x80)
|
||||||
{
|
{
|
||||||
data &= ~0x80;
|
data &= ~0x80;
|
||||||
LOGDATA("Retransmission of %x\n",data);
|
LOGDATA("Retransmission of %x\n",data);
|
||||||
@ -102,9 +107,6 @@ void bacta_datalogger_device::rcv_complete()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data != 0x00)
|
|
||||||
{
|
|
||||||
m_last_input = data;
|
m_last_input = data;
|
||||||
switch (data)
|
switch (data)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user