Revert "M1COMM: small fixes"

This reverts commit be79fd7774.
This commit is contained in:
Ariane Fugmann 2015-06-24 23:32:03 +02:00
parent 94c9fc1f9d
commit 3035213d04

View File

@ -129,20 +129,16 @@ m1comm_device::m1comm_device(const machine_config &mconfig, const char *tag, dev
m_line_tx(OPEN_FLAG_READ) m_line_tx(OPEN_FLAG_READ)
{ {
// prepare localhost "filename" // prepare localhost "filename"
if (strlen(m_localhost) == 0){
strcat(m_localhost, "socket."); strcat(m_localhost, "socket.");
strcat(m_localhost, mconfig.options().comm_localhost()); strcat(m_localhost, mconfig.options().comm_localhost());
strcat(m_localhost, ":"); strcat(m_localhost, ":");
strcat(m_localhost, mconfig.options().comm_localport()); strcat(m_localhost, mconfig.options().comm_localport());
}
// prepare remotehost "filename" // prepare remotehost "filename"
if (strlen(m_remotehost) == 0){
strcat(m_remotehost, "socket."); strcat(m_remotehost, "socket.");
strcat(m_remotehost, mconfig.options().comm_remotehost()); strcat(m_remotehost, mconfig.options().comm_remotehost());
strcat(m_remotehost, ":"); strcat(m_remotehost, ":");
strcat(m_remotehost, mconfig.options().comm_remoteport()); strcat(m_remotehost, mconfig.options().comm_remoteport());
}
} }
//------------------------------------------------- //-------------------------------------------------
@ -278,13 +274,9 @@ WRITE8_MEMBER(m1comm_device::cn_w)
#ifndef __M1COMM_SIMULATION__ #ifndef __M1COMM_SIMULATION__
if (!m_cn) if (!m_cn)
{
device_reset(); device_reset();
}
else else
{
m_commcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); m_commcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
#else #else
if (!m_cn) if (!m_cn)
{ {
@ -334,8 +326,7 @@ void m1comm_device::check_vint_irq()
} }
#ifdef __M1COMM_SIMULATION__ #ifdef __M1COMM_SIMULATION__
void m1comm_device::comm_tick() void m1comm_device::comm_tick(){
{
if (m_linkenable == 0x01) if (m_linkenable == 0x01)
{ {
int frameStart = 0x0010; int frameStart = 0x0010;
@ -353,9 +344,6 @@ void m1comm_device::comm_tick()
// if link not yet established... // if link not yet established...
if (m_linkalive == 0x00) if (m_linkalive == 0x00)
{ {
// waiting...
m_shared[0] = 0x05;
// check rx socket // check rx socket
if (!m_line_rx.is_open()) if (!m_line_rx.is_open())
{ {
@ -541,7 +529,7 @@ void m1comm_device::comm_tick()
// update "ring buffer" if link established // update "ring buffer" if link established
// live relay does not send data // live relay does not send data
if (m_linkid != 0x00 && m_shared[5] != 0x00) if (m_linkid != 0x00 && m_shared[5] == 0x01)
{ {
m_buffer[0] = m_linkid; m_buffer[0] = m_linkid;
frameOffset = frameStart + (m_linkid * frameSize); frameOffset = frameStart + (m_linkid * frameSize);
@ -573,5 +561,5 @@ void m1comm_device::comm_tick()
m_shared[5] = 0x00; m_shared[5] = 0x00;
} }
} }
}
#endif #endif
}