From 3035213d045bc0edc31194fa5309c60ade5919ff Mon Sep 17 00:00:00 2001 From: Ariane Fugmann Date: Wed, 24 Jun 2015 23:32:03 +0200 Subject: [PATCH] Revert "M1COMM: small fixes" This reverts commit be79fd777487afc4d68a25a9e857c6522fc450df. --- src/mame/machine/m1comm.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/mame/machine/m1comm.c b/src/mame/machine/m1comm.c index 2686e14604a..9b3c0758c6a 100644 --- a/src/mame/machine/m1comm.c +++ b/src/mame/machine/m1comm.c @@ -129,20 +129,16 @@ m1comm_device::m1comm_device(const machine_config &mconfig, const char *tag, dev m_line_tx(OPEN_FLAG_READ) { // prepare localhost "filename" - if (strlen(m_localhost) == 0){ - strcat(m_localhost, "socket."); - strcat(m_localhost, mconfig.options().comm_localhost()); - strcat(m_localhost, ":"); - strcat(m_localhost, mconfig.options().comm_localport()); - } + strcat(m_localhost, "socket."); + strcat(m_localhost, mconfig.options().comm_localhost()); + strcat(m_localhost, ":"); + strcat(m_localhost, mconfig.options().comm_localport()); // prepare remotehost "filename" - if (strlen(m_remotehost) == 0){ - strcat(m_remotehost, "socket."); - strcat(m_remotehost, mconfig.options().comm_remotehost()); - strcat(m_remotehost, ":"); - strcat(m_remotehost, mconfig.options().comm_remoteport()); - } + strcat(m_remotehost, "socket."); + strcat(m_remotehost, mconfig.options().comm_remotehost()); + strcat(m_remotehost, ":"); + strcat(m_remotehost, mconfig.options().comm_remoteport()); } //------------------------------------------------- @@ -176,7 +172,7 @@ READ8_MEMBER(m1comm_device::dlc_reg_r) return 0xFF; } // dirty hack to keep Z80 in RESET state - + UINT8 result = m_dlc_reg[offset]; #ifdef __M1COMM_VERBOSE__ printf("m1comm-dlc_reg_r: read register %02x for value %02x\n", offset, result); @@ -278,13 +274,9 @@ WRITE8_MEMBER(m1comm_device::cn_w) #ifndef __M1COMM_SIMULATION__ if (!m_cn) - { device_reset(); - } else - { m_commcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); - } #else if (!m_cn) { @@ -334,8 +326,7 @@ void m1comm_device::check_vint_irq() } #ifdef __M1COMM_SIMULATION__ -void m1comm_device::comm_tick() -{ +void m1comm_device::comm_tick(){ if (m_linkenable == 0x01) { int frameStart = 0x0010; @@ -353,9 +344,6 @@ void m1comm_device::comm_tick() // if link not yet established... if (m_linkalive == 0x00) { - // waiting... - m_shared[0] = 0x05; - // check rx socket if (!m_line_rx.is_open()) { @@ -541,7 +529,7 @@ void m1comm_device::comm_tick() // update "ring buffer" if link established // 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; frameOffset = frameStart + (m_linkid * frameSize); @@ -573,5 +561,5 @@ void m1comm_device::comm_tick() m_shared[5] = 0x00; } } -} #endif +} \ No newline at end of file