#

# Netplay Documentation

Last updated January 14, 2022
Valid as of 1.29.0

Table of Contents:

- Introduction
- Setting up the Server
- Using Mednafen's netplay console

## Introduction

Mednafen's netplay is standalone-server based, with multiple clients(players) connecting to the same server. Save states are utilized upon connection, and whenever a player loads a save state on their end, so having decent bandwidth is critical, especially for newer systems with large save states like PS1 and Sega Saturn. Since nonvolatile memories(save RAM, floppy disks, etc.) are preserved in save states, you may want to backup any important save game files before netplaying with the corresponding game(s). Using a different Mednafen installation, or Mednafen base directory, solely for netplay, is an option as well. Be aware that the utilization of save states does bring about some potential security issues.

Players with lower ping times to the server will have a latency/lag advantage. To reduce latency, it's recommended to make the setting changes described here. If emulating SNES games, try the alternate snes_faust emulation module, with setting "snes_faust.spex" set to "1".

## Setting up the Server

Download the latest "Mednafen-Server" release. Untarballize it, and read the included "README" files for further instructions and caveats.

## Using Mednafen's netplay console

Pressing the 'T' key will bring up the network play console, or give it input focus if focus is lost. From this console, you may issue commands and chat. Input focus to the console will be lost whenever the Enter/Return key is pressed. The 'Escape' key(by default, shares assignment with the exit key) will exit the console entirely. Whenever text or important information is received, the console will appear, but without input focus.

Keys Relevant to the Text Box:
Key: | Action:
--- | ---
Up | Scroll up.
Down | Scroll down.
Page Up | Scroll up a page.
Page Down | Scroll down a page.
CTRL + Home | Scroll to the beginning.
CTRL + End | Scroll to the end.

Keys Relevant to the Prompt:
Key: | Action:
--- | ---
Left | Move cursor left.
Right | Move cursor right.
Home | Move cursor to the beginning.
End | Move cursor to the end.
Backspace | Remove character to the left of cursor position, and move cursor left.
CTRL + Backspace | Remove all characters to the left of the cursor position, and move cursor to the beginning.
Delete | Remove character at cursor position.
CTRL + Delete | Remove characters at and after cursor position.
CTRL + V (or) SHIFT + Insert | Paste text from the clipboard.
Enter | Process text entered into prompt.

Command: | Description: | Relevant Settings: | Examples:
--- | --- | --- | ---
/nick nickname | Sets nickname. | netplay.nick | /nick Deadly Pie /nick 運命子猫
/server [hostname] [port] | Connects to specified netplay server. | netplay.host netplay.port | /server /server netplay.fobby.net /server helheim.net 4046 /server ::1
/gamekey [gamekey] | Sets(or clears) game key. | netplay.gamekey | /gamekey pudding /gamekey
/ping | Pings the server. | - | /ping
/swap A B | Swap/Exchange all instances of controllers A and B(numbered from 1). | - | /swap 1 2
/dupe [A] [...] | Duplicate and take instances of specified controller(s)(numbered from 1). Note: Multiple clients controlling the same controller currently does not work correctly with emulated analog-type gamepads, emulated mice, emulated lightguns, and any other emulated controller type that contains "analog" axis or button data. | - | /dupe 1
/drop [A] [...] | Drop all instances of specified controller(s). | - | /drop 1 2
/take [A] [...] | Take all instances of specified controller(s). | - | /take 1
/list | List players in game. | - | /list
/quit | Disconnects from the netplay server. | - | /quit