Arcade Cabinet Linking

From San Francisco Rush Wiki

This article goes over all the aspects you need to know when it comes to linking either real physical cabinets, PCs running MAME, or a combination of the two. Please note these tutorials are written with the expectation you have basic computer knowledge like how to use a command line interface as well as fundamental networking concepts.

Disclaimer: MAME networking support is still very much in an alpha state. The emulator has a tendency to crash at random and wireless interfaces are NOT SUPPORTED. You must use a wired network interface. Additionally this likely only works on Windows and Linux (unverified) - MacOS is not supported.

First, determine which scenario applies to your setup the best by looking at the table of contents:

Real cabinets at one physical location

This is the easiest scenario - All you simply have to do is connect one or more (maximum of 8) cabs to the same unmanaged network switch. Afterwords, adjust each cabinet's setting so that the car color (for San Francisco Rush/Rush The Rock) or cabinet number (for Rush 2049) is different for each cab. You can then enter the network test on every cab through the test menu - Each cab should show up on each other cab. From there reboot back into the game and start a game and select a course on one cab. All other cabs should get an invitation to join the game that is about to start.

Real cabinet(s) and MAME PC(s) at one physical location

First, connect one or more (maximum of 8) cabs and/or PCs to the same unmanaged network switch.

TODO: Detailed steps

  • Test if game can run at full speed on PC (critical for reliable linked play)
  • Install TAP adapter
  • Create bridge between NIC and TAP adapter
  • Configure MAME to use TAP adapter
  • Set up game (change car color/cab number, network test)

Afterwords, adjust each cabinet's setting so that the car color (for San Francisco Rush/Rush The Rock) or cabinet number (for Rush 2049) is different for each cab. You can then enter the network test on every cab through the test menu - Each cab should show up on each other cab.

Real cabinet(s) at multiple physical locations

In order to link one or more cabinets at multiple locations you will need some sort of network device that can bridge Layer 2 network traffic over a VPN connection where each cabinet or cabinets are located. The simplest to set up is ZeroTier.

This device could be something like a Linux PC or a router with OpenWRT with at least two network interfaces.

Create ZeroTier network

  1. Navigate to My ZeroTier and create an account, then log in and create a network.
  2. Note the join code - It will look like this:

123abc456def789g

  1. Keep this open as we will need to access it later to approve our devices.
  2. Optionally, give this network a name as well.

Preparing the bridge device

Generic Linux device running Debian-based distribution

Automated install script

This is a work in progress - The script will be linked here once it is ready.

Manual setup

1. Install packages via package manager:

apt update && apt install curl bridge-utils gpg

2. Add the ZeroTier GPG Key, download and install ZeroTier:

curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi

3. Join your ZeroTier network you created earlier:

zerotier-cli join 123abc456def789g

4. Wait for about 5-10 seconds and check if your device appears in your My ZeroTier account, then check the "Auth?" checkbox and optionally give it a name.

5. Click the wrench icon and check the following boxes: Allow Ethernet Bridging, Do Not Auto-Assign IP.

6. Check that your device has connected to your ZeroTier network: zerotier-cli info

7. Identify your network interfaces and note the name of the wired network interface that will connect to the switch that your cabs will be plugged into, as well as the name of your ZeroTier interface (starts with zt):

ip a

8. Create a bridge and add the interfaces to the bridge:

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 ztppabc123

9. Restart your networking stack to apply the changes:

systemctl restart networking

From there, repeat these steps for the device at the other end that will perform the network bridging.

Note: With this, your bridge will be deleted upon reboot - Now is a good time to test and if it doesn't work, you can simply reboot to undo the changes. If everything works as expected, you can write these lines to /etc/network/interfaces.d/br0:

auto br0
iface br0 inet dhcp
bridge_ports eth0 ztppabc123

This will make the bridge stay even after reboots.

OpenWRT Device

1. By default, OpenWRT uses a 192.168.1.0/24 subnet, which may overlap with your current network at home - You will want to change this to prevent overlapping IP addresses to prevent packet routing issues. A good option would be to use 192.168.209.1 for the OpenWRT device. Change this on your br-lan interface and then reconnect to your router's new IP address.

2. Connect your existing network into the WAN/Internet port on your OpenWRT device so has internet connectivity.

3. Navigate to System > Software and click "Refresh Lists".

4. In the package list, filter for "zerotier" and install the "zerotier" package.

5. SSH into your router and execute the following commands as root:

uci set zerotier.openwrt_network=zerotier
uci add_list zerotier.openwrt_network.join='123abc456def789g'
uci set zerotier.openwrt_network.enabled='1'
uci commit zerotier

6. Reboot your router.

7. Navigate to Network > Interfaces and click on the Devices tab.

8. Edit the br-lan device. In the dropdown, select the ZeroTier virtual interface (Interface name will start with ztpp).

9. Save and apply the changes.

10. Repeat these steps for any additional OpenWRT devices at other locations.

11. Wait for about 5-10 seconds and check if your devices appear in your My ZeroTier account, then check the "Auth?" checkbox and optionally give each one a name.

12. Click the wrench icon for each device and check the following boxes: Allow Ethernet Bridging, Do Not Auto-Assign IP.

Real cabinet(s) and MAME PC(s) at multiple physical locations

TODO - Mix of the steps from above

Techincal Information

The games uses Ethernet II broadcast frames and do not have any concept of TCP/IP networking - Hence you must use unmanaged switches or hubs, and layer 2 tunneling VPN solutions. Each packet is broadcast so there is a high amount of PPS (packets per second). RTT latency and packet loss are major factors with regards to your experience in quality linked games, so avoiding using wireless (either WiFi or cellular internet providers) where possible is ideal. From limited testing we find that a RTT latency of 100ms or less and less than 1% packet loss is the most ideal.