Guides:MAME - Linked Mode

From Wah!ki
Jump to navigation Jump to search

Linked Mode Arcade Machine

Linking Virtua Racing, this machine uses serial based comms

MAME supports the following cli options for serial based comms


To successfully link two+ Virtua Racing instances you will need two separate nvmram directories because you will need to set the machines as master/slave devices as applicable

  • The first machine (Car 1) will be the Master in all cases
  • Each additional machine (Car) will
* be in slave mode
* need a port open to listen on
* be on the same network with an ip address

Setup (2 machines)

  • Create two nvram directories to store the machine configs
  • Get the IP address of the each machine
  • Assign each machine a port with their IP address, just do this on piece of paper for now

One the first machine (car 1 / master) start mame

mame vr -nvram_directory <path to nvram> -localhost <machine1 ip> -comm_localport <machine1 port> -remotehost <machine2 ip> -remoteport <machine2 port>

On the second machine (car 2 / slave) start mame

mame vr -nvram_directory <path to nvram> -localhost <machine2 ip> -comm_localport <machine2 port> -remotehost <machine1 ip> -remoteport <machine1 port>

When the games start for the first time set their mode

  • Press F2 to enter test mode, navigate
  • Navigate to GAME SYSTEM
  • LINK ID -> Master (machine 1) or Slave (machine 2+)
  • Back out of the menu and when prompted save your settings
  • Exit test mode

The two machines should find each other and the game will start


Some basic troubleshooting techniques when trying to setup linked mode

In all cases below the mame command line from machine1 looked like this, and all traffic (to date) has been TCP

mame vr -localhost -comm_localport 15111 -remotehost -remoteport 15112

Is MAME listening?

Check to see if MAME is actually listening locally on the ip/port you supplied to localhost and localport, do this on all machines

# ss -lnp | grep mame
tcp    LISTEN  0       1                                                                        *    

Is the MAME port open

Use telnet to try and connect to the port from the remote host

$ telnet 15112
Connected to
Escape character is '^]'.

This shows the connection was successful ruling out firewall issues on the remote end

Is there traffic flow out of MAME

Run tcpdump to monitor the TCP traffic from one machine to the other, this is useful to see if there is _any_ flow out of the machine, some machines may not yet have active functionality for linking regardless of if the machine runs or not.

# tcpdump -n host and port 15112