mirror of
https://github.com/holub/mame
synced 2025-06-23 21:06:38 +03:00
microtouch: added output status command and fixed data transmission at 2400 baud.
This commit is contained in:
parent
d7ae91ffb2
commit
e3140d6e54
@ -120,10 +120,12 @@ void microtouch_device::device_timer(emu_timer &timer, device_timer_id id, int p
|
|||||||
|
|
||||||
if ( m_tx_buffer_ptr < m_tx_buffer_num )
|
if ( m_tx_buffer_ptr < m_tx_buffer_num )
|
||||||
{
|
{
|
||||||
m_output = m_tx_buffer[m_tx_buffer_ptr++];
|
|
||||||
m_output_valid = true;
|
|
||||||
if(is_transmit_register_empty())
|
if(is_transmit_register_empty())
|
||||||
|
{
|
||||||
|
m_output = m_tx_buffer[m_tx_buffer_ptr++];
|
||||||
|
m_output_valid = true;
|
||||||
tra_complete();
|
tra_complete();
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_tx_buffer_ptr == m_tx_buffer_num )
|
if ( m_tx_buffer_ptr == m_tx_buffer_num )
|
||||||
{
|
{
|
||||||
@ -263,6 +265,32 @@ void microtouch_device::rcv_complete()
|
|||||||
m_rx_buffer_ptr = 0;
|
m_rx_buffer_ptr = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if ( check_command("OS", m_rx_buffer_ptr, m_rx_buffer ) )
|
||||||
|
{
|
||||||
|
// output status
|
||||||
|
m_tx_buffer[m_tx_buffer_num++] = 0x01;
|
||||||
|
|
||||||
|
// ---- ---x RAM error
|
||||||
|
// ---- --x- ROM error
|
||||||
|
// ---- -x-- Analog-to-digital error
|
||||||
|
// ---- x--- NOVRAM error
|
||||||
|
// ---x ---- ASIC error
|
||||||
|
// --x- ---- Power on flag
|
||||||
|
// -x-- ---- Always 1
|
||||||
|
// x--- ---- Always 0
|
||||||
|
m_tx_buffer[m_tx_buffer_num++] = 0x40;
|
||||||
|
|
||||||
|
// ---- ---x Cable NOVRAM error
|
||||||
|
// ---- --x- Hard NOVRAM error
|
||||||
|
// ---x xx-- Reserved
|
||||||
|
// --x- ---- Software reset flag
|
||||||
|
// -x-- ---- Always 1
|
||||||
|
// x--- ---- Always 0
|
||||||
|
m_tx_buffer[m_tx_buffer_num++] = 0x40 | (m_reset_done << 5);
|
||||||
|
m_tx_buffer[m_tx_buffer_num++] = 0x0d;
|
||||||
|
m_rx_buffer_ptr = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
// send response
|
// send response
|
||||||
m_tx_buffer[m_tx_buffer_num++] = 0x01;
|
m_tx_buffer[m_tx_buffer_num++] = 0x01;
|
||||||
m_tx_buffer[m_tx_buffer_num++] = 0x30;
|
m_tx_buffer[m_tx_buffer_num++] = 0x30;
|
||||||
|
Loading…
Reference in New Issue
Block a user