From 5da7919cde55e1c69edbb9862cf2a6428ab771c5 Mon Sep 17 00:00:00 2001 From: Ariane Fugmann Date: Sun, 28 Jun 2015 03:36:06 +0200 Subject: [PATCH] S32COMM: fix stadium cross link (nw) --- src/mame/machine/m1comm.c | 22 ++++++++++------------ src/mame/machine/s32comm.c | 24 +++++++++++------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/mame/machine/m1comm.c b/src/mame/machine/m1comm.c index e88095af307..03177efcaef 100644 --- a/src/mame/machine/m1comm.c +++ b/src/mame/machine/m1comm.c @@ -129,20 +129,18 @@ 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()); - } + m_localhost[0] = 0; + 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()); - } + m_remotehost[0] = 0; + strcat(m_remotehost, "socket."); + strcat(m_remotehost, mconfig.options().comm_remotehost()); + strcat(m_remotehost, ":"); + strcat(m_remotehost, mconfig.options().comm_remoteport()); } //------------------------------------------------- diff --git a/src/mame/machine/s32comm.c b/src/mame/machine/s32comm.c index 4c8968873c9..abacdd7a75c 100644 --- a/src/mame/machine/s32comm.c +++ b/src/mame/machine/s32comm.c @@ -103,20 +103,18 @@ s32comm_device::s32comm_device(const machine_config &mconfig, const char *tag, d 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()); - } + m_localhost[0] = 0; + 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()); - } + m_remotehost[0] = 0; + strcat(m_remotehost, "socket."); + strcat(m_remotehost, mconfig.options().comm_remotehost()); + strcat(m_remotehost, ":"); + strcat(m_remotehost, mconfig.options().comm_remoteport()); } //------------------------------------------------- @@ -528,7 +526,7 @@ void s32comm_device::comm_tick_15033() bool isRelay = (m_shared[2] == 0x02); // if link not yet established - Z80 reply check? - if (m_linkalive == 0x00 && m_shared[0] == 0x56 && m_shared[1] == 0x37 && m_shared[2] == 0x30 && m_shared[0x0A] == 0x00) + if (m_linkalive == 0x00 && m_shared[0] == 0x56 && m_shared[1] == 0x37 && m_shared[2] == 0x30) { for (int j = 0x003 ; j < 0x0800 ; j++) {