Skip to content

Link Play

Link Play is RePlay's name for multiplayer provided through the libretro Netpacket Interface, also known as the Core Packet Interface. It is different from traditional synchronized netplay: instead of synchronizing controller inputs and frames, RePlay transports network packets generated by the core to emulate hardware such as link cables, wireless adapters, serial links, and local-network adapters.

How It Works

One RePlay system acts as the host. Each joining system receives a client ID, and the host delivers directed packets to the requested client or relays broadcast packets to all connected clients. The emulation core remains responsible for the multiplayer protocol and decides how many players it supports.

All systems must use a compatible core and core network protocol. RePlay checks the core name and the protocol version supplied by the core before accepting a client.

Link Play is intended for a trusted local network. Its transport does not provide encryption, authentication, matchmaking, NAT traversal, or an Internet relay service. The TCP port would have to be forwarded for direct Internet use, so a private VPN is recommended if systems are not on the same LAN.

As of the current v2 build, the Atari Jaguar and Nintendo DS cores support the Link Play protocol. Other cores remain unavailable until they register a compatible libretro Netpacket Interface.

Open REPLAY OPTIONS > LINK PLAY to see the current state and configuration.

Entry Description
STATUS Live state: disabled, waiting for a compatible game, hosting, connecting, connected, or invalid configuration.
MODE Disabled, Host session, or Join session.
HOST ADDRESS Host name or IP address used in client mode. It is filled automatically when a discovered session is selected.
TCP PORT Link Play transport port. The default is 55435.
LAN DISCOVERY Advertises hosted sessions and searches for hosts on the local IPv4 network. It is on by default.
LAN SESSIONS Live list of hosts discovered while in Join session mode. Select a host to fill the address and port automatically.

MODE and LAN DISCOVERY can be changed directly in the RePlay menu. HOST ADDRESS and TCP PORT remain read-only; change them in replay.cfg, through the authenticated REST API, or by selecting a host from LAN SESSIONS. Core-specific network hardware settings, when required, remain in the running core's own options.

Configuration File

The default configuration is:

link_play_mode          = "disabled"
link_play_address       = ""
link_play_port          = "55435"
link_play_lan_discovery = "true"

To host and advertise a session:

link_play_mode          = "host"
link_play_port          = "55435"
link_play_lan_discovery = "true"

To join a host manually:

link_play_mode          = "client"
link_play_address       = "192.168.1.42"
link_play_port          = "55435"
link_play_lan_discovery = "true"

Changes made directly in replay.cfg are applied when RePlay starts. REST changes, LAN discovery UI changes, and discovered-host selections are applied immediately.

REST API

The standard authenticated get_config and set_config endpoints support all four Link Play settings. See the Link Play REST API reference for accepted values, runtime effects, responses, and additional examples. For example, configure a host with one atomic request:

curl -H 'X-RePlay-Token: 123456' \
  'http://<replay-ip>:55356/api/v1/set_config?type=replay&option=link_play_mode&value=host&option=link_play_port&value=55435&option=link_play_lan_discovery&value=true'

Configure a client:

curl -H 'X-RePlay-Token: 123456' \
  'http://<replay-ip>:55356/api/v1/set_config?type=replay&option=link_play_mode&value=client&option=link_play_address&value=192.168.1.42&option=link_play_port&value=55435'

LAN Discovery

LAN discovery is enabled by default. When enabled, a system in Host session mode advertises its system name, active core protocol, and TCP port once per second while a compatible game is running. A system searches only in Join session mode while REPLAY OPTIONS > LINK PLAY is open, checking UDP port 55436 once per second. Disabled systems and hosts never search. Discovered entries expire automatically when their advertisements stop.

Discovery normally stays within the same LAN or VLAN because routers do not forward broadcast packets. It uses the source address of the received advertisement rather than trusting an address supplied inside the packet. If discovery is unavailable or blocked by a firewall, configure the host address manually.

Starting A Session

  1. Configure one system as host, enable LAN discovery if desired, and start the game.
  2. Use the same compatible core and network-related core options on each system.
  3. On each client, open REPLAY OPTIONS > LINK PLAY, set MODE to Join session, and select the host under LAN SESSIONS; alternatively, configure client mode and the host address manually.
  4. Start the compatible game on each client. RePlay connects automatically when the core registers the Netpacket Interface.

The host must remain running because it assigns client IDs and relays packets between clients.

Connected-Play Restrictions

Operations that alter emulated time or state can disrupt a core-managed network session. While at least one peer is connected, RePlay prevents pausing, halting, fast-forwarding, save-state loading or saving, game reset or restart, and input-movie recording or playback. Normal behavior returns after all peers disconnect.

Link Play is available only in cores that register the libretro Netpacket Interface. If the active core does not support it, the status remains Waiting for compatible game and no transport session starts.