Repository navigation
Releases
v0.6: Neo Geo netplay
Release notes
v0.6: Neo Geo
New: Neo Geo netplay
NeoGeo_netplay.rbf: the MiSTer Neo Geo core with lockstep netplay, for
cartridge games in Console (AES) mode, two players. Both MiSTers run the
same frames, and only the controllers cross the network. It goes in
_Consolenext to the normal NeoGeo core, which is not changed.- In the OSD: Netplay → Host on one MiSTer and Join on the other, then
both load the same game. With a server, Join takes the open room with that
game; without one,peer=innetplay.inias on the other cores. - Both need the same BIOS files in
games/NeoGeo(uni-bios.rom, or
neo-epo.sp1with BIOS Original;sfix.sfix,000-lo.lo) and the same
System Type, BIOS and Video Mode settings. All of this is checked. - A game matches by its program, its sound CPU ROM and its cartridge
configuration, not by its files: the same game from a Darksoft folder, a
MAME zip or a.neofile finds the other player's room. The server never
hands out Neo Geo games. - A session needs a freshly started machine. If a game was played in the core
before, the core loads itself again first, and the game follows by itself. - With Netplay on, the core starts only once a game is loaded: there is no
BIOS screen before that, even when the SD card hasbootrom/neogeo.rom. - The memory card, multitap, spinner and mouse are off during a session; the
OSD's Reset and the user button do nothing.
What was changed in the core so that two MiSTers run it exactly alike (details
in SPEC.md section 14):
- The sound CPU's ROM (M1) is read from the SDRAM instead of DDR3. DDR3 is
shared with the ARM and the scaler, and the Z80 waited a different time for
it on every MiSTer. - The YM2610 no longer stops when a sample byte from DDR3 is late (sound
only: the late byte is the one before it). - The machine leaves reset at a fixed point of the picture, after the game's
save file has been read. The sound chip's and the video chip's counters and
the Z80's clock start with the reset instead of running free. - Timing constraints that hold on the hardware for the paths the Z80's bus
feeds on every clock.
Built on the MiSTer-devel Neo Geo core (github.com/MiSTer-devel/NeoGeo_MiSTer),
the work of its contributors credited in its README.
Tested on hardware: two MiSTers over the internet through the lobby server,
nine sessions with different games and no desync, among them Over Top, Double
Dragon, Pulstar, Art of Fighting, Shock Troopers 2nd Squad and Aero Fighters 3.
A recorded Neo Turf Masters session replayed with identical results over 9,000
frames. In simulation (Verilator): the whole core makes the same writes with
both CPUs, at the same clocks, in every frame, with the DDR3's timing, the clock
phase, the session's start, the save file's read and the input's arrival all
varied, and with a boot ROM at the core's start.
Known limits
- Neo Geo CD is not supported, and nor are the memory card, multitap, spinner
and mouse during a session. Arcade (MVS) mode has not been tested. - Neo Geo has no room folder: with a server, Join takes the oldest open room
with the game you load. - Update both MiSTers: the core and
MiSTer_onlinemust come from this
release on both.
v0.5: GBA Wireless Adapter
New: GBA wireless games
GBA_netplay.rbf: the MiSTer GBA core with an emulated GBA Wireless
Adapter on the link port. Games that use Nintendo's adapter play over the
internet: Apotris, Pokémon FireRed, LeafGreen and Emerald (the Union Room:
battles and trades), and homebrew built on gba-link-connection.- This is not lockstep: each MiSTer runs its own game, and the two adapters
talk to each other over the network. The players may run different games
that talk to each other (FireRed and LeafGreen). - In the OSD: Hardware → Link Port → Wireless Adapter, then Netplay →
Host on one MiSTer and Join on the other, and load the game. Then use
the game's own wireless menu, as on real GBAs. - The core handles the adapter's handshake and words; the Main binary answers
each command (ported from gpSP's adapter emulation, GPL-2.0-or-later) and
carries the adapter's packets over a reliable, ordered link between the two
MiSTers, directly or through the lobby server. - Loading the game again keeps the room: the other player's MiSTer follows
without loading its own game again. - A lost packet is sent again after about 1.5 round trips, so the game's data
is held up for tens of milliseconds, not 100. netplay.logshows the link's round trip, resends, and how fast the
adapter's commands are answered, every 10 seconds.- To try it: Apotris, a free game by akouzoukos with 2-player battles over
the adapter, from https://akouzoukos.com/apotris/downloads (put
Apotris.gbaingames/GBA).
Built on the work of others: the adapter emulation is ported from gpSP by
David Guillen Fandos (github.com/libretro/gpsp), the protocol is as documented
by afska and davidgfnet in gba-link-connection
(github.com/afska/gba-link-connection), and Pokémon's link handling was read in
pret/pokefirered. Details in the README, "Where the GBA Wireless Adapter
comes from".
Tested on hardware: two MiSTers over the internet through the lobby server on a
Raspberry Pi: Pokémon FireRed/LeafGreen battles and a trade in the Union Room, and
gba-link-connection's LinkUniversal_stress ROM (packet loss and packet sync,
65,534 packets each without a loss; ping 26 to 47 ms with a 20 ms network round
trip). In simulation: the core's serial port and adapter against Pokémon's own
wireless library, with the Main binary's answers late and out of order.
Scripts
netplay_onno longer saves an older netplay binary asMiSTer_offline
when you update: your normal binary stays there.netplay_offsays so when
MiSTer_offlineis a netplay binary (from an oldernetplay_on); then
update_allordownloaderbrings the normal binary back.
Server
- GBA rooms accept any GBA game, so FireRed and LeafGreen find each other.
Update the server too.
Known limits
- Two players (the adapter allows five). No wireless multiboot (one cartridge
for both). Savestates and rewind are off while the adapter is on. - Each command the game sends to the adapter is answered by the Main binary,
usually in 0.2 to 0.5 ms; about 1 in 100 takes 1 to 3 ms. The games tested
handle this. Moving the answers for the data commands into the core is
planned. - When the host loads the core again (not just the game), the other player
loads their game again too. - Through a server on the same network as one of the players, the link goes
through the server; the extra step is about a millisecond.
v0.4: Arcade netplay (Bubble Bobble)
New: arcade netplay
jtbubl-netplay.rbf: Jotego's Bubble Bobble core (jtbubl) with lockstep
netplay. The netplay module is in his framework, jtframe, so other jtframe
arcade cores can get it the same way later. The core goes in
_Arcade/coresnext to the normaljtbubl.rbf, which is not changed, and is
started from its own MRA, Bubble Bobble (US, Ver 5.1) [netplay]. It uses
the ROM set the MiSTer updater installs for Jotego's core.- Host: OSD Netplay → Host. Join: in the game's OSD, Join room
lists the open rooms; picking one joins it without reloading the game. The
same rooms are in the Arcade list, folder _Netplay, also from the main
menu. Without a server:peer=and Netplay → Join. - Both players need the same ROM set (checked) and the same core version. The
host's DIP switches are used during a session, and each player's own come
back afterwards. The game's RAM is cleared at the start of a session. - The checksum covers the game state (every CPU write), so a desync is caught
in the frame it happens. - The CPUs read their ROMs from block RAM in the netplay core: SDRAM timing
differs between two MiSTers and must not decide the game's timing. - When an input is late, HDMI repeats the last picture without a glitch.
Tested on hardware: two MiSTers over the internet through the lobby server on a
Raspberry Pi, 33 levels in 20 minutes without a desync. In simulation: the whole
core on two simulated MiSTers in sync, with the same order of every clock
enable.
Server
- A join without a picked room (Netplay → Join and load the game) only goes
into a room when exactly one room with that game is open. With several, the
OSD says<n> rooms with this game: pick one, so nobody ends up with a
stranger by chance. This applies to NES, SNES and Game Boy 2P too. - The status page has an Arcade tab with the open arcade rooms. It is
public by default (no key in the address);public_page=noasks for the key. - Lighter page (no endless animations).
- Raspberry Pi:
sudo sh install-linux.shin the release'sServerfolder
installs or updates the server as a service; settings, key and games stay.
Known limits
- With
mode=joininnetplay.ini, or the OSD on Join, a game load joins
by itself when exactly one room with the game is open. Keepmode=off(the
OSD onnetplay.ini) to pick rooms yourself. - Only Bubble Bobble so far. During netplay the pause, test and service
switches are off. Analog video may flicker for a moment when an input is late.
v0.3: Game Boy link-cable netplay
New: Game Boy 2P
GAMEBOY2P_netplay.rbf: pomstazlesa's Game Boy 2P core (two Game Boys
joined by a link cable inside the FPGA) with lockstep netplay. Each MiSTer
runs both Game Boys; the host plays Game Boy 1, the other player Game Boy 2.
Only the controller input goes over the network, so the link cable's timing
is the same as on one MiSTer.- Lin...
- v0.5 – Wireless GBA netplay: trade and battle in Pokémon FireRed/LeafGreen
New: GBA wireless games
GBA_netplay.rbf: the MiSTer GBA core with an emulated GBA Wireless
Adapter on the link port. Games that use Nintendo's adapter play over the
internet: Apotris, Pokémon FireRed, LeafGreen and Emerald (the Union Room:
battles and trades), and homebrew built on gba-link-connection.- This is not lockstep: each MiSTer runs its own game, and the two adapters
talk to each other over the network. The players may run different games
that talk to each other (FireRed and LeafGreen). - In the OSD: Hardware → Link Port → Wireless Adapter, then Netplay →
Host on one MiSTer and Join on the other, and load the game. Then use
the game's own wireless menu, as on real GBAs. - The core handles the adapter's handshake and words; the Main binary answers
each command (ported from gpSP's adapter emulation, GPL-2.0-or-later) and
carries the adapter's packets over a reliable, ordered link between the two
MiSTers, directly or through the lobby server. - Loading the game again keeps the room: the other player's MiSTer follows
without loading its own game again. - A lost packet is sent again after about 1.5 round trips, so the game's data
is held up for tens of milliseconds, not 100. netplay.logshows the link's round trip, resends, and how fast the
adapter's commands are answered, every 10 seconds.- To try it: Apotris, a free game by akouzoukos with 2-player battles over
the adapter, from https://akouzoukos.com/apotris/downloads (put
Apotris.gbaingames/GBA).
Tested on hardware: two MiSTers over the internet through the lobby server on a
Raspberry Pi: Pokémon FireRed/LeafGreen battles and a trade in the Union Room, and
gba-link-connection's LinkUniversal_stress ROM (packet loss and packet sync,
65,534 packets each without a loss; ping 26 to 47 ms with a 20 ms network round
trip). In simulation: the core's serial port and adapter against Pokémon's own
wireless library, with the Main binary's answers late and out of order.
Scripts
netplay_onno longer saves an older netplay binary asMiSTer_offline
when you update: your normal binary stays there.netplay_offsays so when
MiSTer_offlineis a netplay binary (from an oldernetplay_on); then
update_allordownloaderbrings the normal binary back.
Server
- GBA rooms accept any GBA game, so FireRed and LeafGreen find each other.
Update the server too.
Known limits
- Two players (the adapter allows five). No wireless multiboot (one cartridge
for both). Savestates and rewind are off while the adapter is on. - Each command the game sends to the adapter is answered by the Main binary,
usually in 0.2 to 0.5 ms; about 1 in 100 takes 1 to 3 ms. The games tested
handle this. Moving the answers for the data commands into the core is
planned. - When the host loads the core again (not just the game), the other player
loads their game again too. - Through a server on the same network as one of the players, the link goes
through the server; the extra step is about a millisecond.
Download: mister-netplay-v0.5.zip below has everything (SD card files, server, quick start). Check it with md5sums.txt.
NES, SNES, Game Boy and arcade v0.4
Jotego's Bubble Bobble core (jtbubl) now has lockstep netplay. The netplay module lives in his framework, jtframe, so other jtframe arcade cores can get it the same way later.
Download mister-netplay-v0.4.zip: copy the folder SD card to the root of the MiSTer's SD card on both MiSTers, then run Scripts → netplay_on. Server/ has netplay-server for Windows, Linux and Raspberry Pi.
New: arcade netplay (Bubble Bobble)
- Start Bubble Bobble (US, Ver 5.1) [netplay] in the Arcade list. The core is
_Arcade/cores/jtbubl-netplay.rbf, next to Jotego'sjtbubl.rbf, which is not changed. It uses the ROM set the MiSTer updater installs (games/mame/bublbobl.zip), and both players need the same one. - Host: OSD Netplay → Host. Join: pick the room in the game's OSD (Join room). The game is not reloaded. The same rooms are in the Arcade list, folder _Netplay, also from the main menu. Without a server, set
peer=and pick Netplay → Join. - The ROM set and the core version are checked. The host's DIP switches are used during a session, and your own come back afterwards. The RAM is cleared when a session starts.
- The checksum covers the game state, so a desync is caught in the frame it happens. When an input is late, HDMI repeats the last picture without a glitch.
Tested on hardware: two MiSTers over the internet through the lobby server on a Raspberry Pi, 33 levels in 20 minutes with no desync and no picture glitches.
Server
- A join without a picked room (Netplay → Join and load the game) only goes into a room when exactly one room with that game is open. With several, the OSD says
<n> rooms with this game: pick one. This applies to NES, SNES and Game Boy 2P too. - The status page has an Arcade tab and needs no key by default (
public_page=noasks for the key). The page is lighter. - Raspberry Pi:
sudo sh install-linux.shinstalls or updates the server as a service.
Known limits
- With
mode=joininnetplay.ini, or the OSD on Join, loading a game joins by itself when exactly one room with the game is open. Keepmode=offto pick rooms yourself. - Bubble Bobble is the only arcade game so far. Pause, test and service are off during netplay. Analog video may flicker for a moment when an input is late.
Everything from v0.3 (NES, SNES, Game Boy 2P) is included. Details: RELEASE_NOTES.md. Source: tag v0.4, ./setup.sh recreates the source trees from the upstream repositories and the patches.
NES, SNES and Game Boy v0.3
NES, SNES and Game Boy netplay for MiSTer v0.3
This release adds Game Boy link-cable netplay. Two MiSTers play Game Boy link-cable games together over the internet or a LAN, with the same lockstep as NES and SNES. NES and SNES netplay work as before.
Download: mister-netplay-v0.3.zip (check it against md5sums.txt). It contains:
SD card/: the NES, SNES and Game Boy 2P cores, the netplay Main binary, scripts and NetPongServer/: the lobby server for Windows, Linux and Raspberry Pi
New: Game Boy 2P
GAMEBOY2P_netplay.rbf: pomstazlesa's Game Boy 2P core (two Game Boys joined by a link cable inside the FPGA) with lockstep netplay. Each MiSTer runs both Game Boys. The host plays Game Boy 1, the other player Game Boy 2. Only the controller input goes over the network, so the link cable's timing is the same as on one MiSTer.- Link-cable games such as Tetris, Tennis and Dr. Mario.
- One game for both: both players load the same file (same extension too:
.gband.gbcstart the Game Boy in different modes). - Two different games (for example two Pokémon versions): load game 1 with Rom for second GB Off, then switch it On and load game 2.
- One game for both: both players load the same file (same extension too:
- Show → My screen shows only your own Game Boy, centred at the right aspect ratio. Audio select → Own GB (the default) plays your own Game Boy's sound.
- Both Game Boys run on one shared clock, and the SDRAM serves both from one read when they read the same word, so the core runs at full speed with clean sound.
- The Game Boys' RAM and the cartridge clock (MBC3, HuC3, TAMA) are cleared at the start of a session, so a MiSTer that ran other games before starts like a freshly loaded one.
- Same lobby as NES and SNES: OSD → Netplay → Host in GAMEBOY2P_netplay. The other player joins from _Netplay/Rooms; a room with two games holds both files. The server's Game Boy games go in
roms/GB. - Battery saves work as on NES: both players need the same
.savfile, or none. - Not supported: MegaDuck games (
.bin). During netplay, OSD reset, Reload Backup RAM and Sync Video are off. Needs the SDRAM board, as the original core.
Tested:
- On hardware: a Tetris link match between two MiSTers through the lobby server; Tennis with clean sound at full speed.
- In simulation: two MiSTers stay in sync over 1,800 frames of a Tetris link match, and also when one of them ran another game first.
Other changes
- The lobby folder is now created on a MiSTer that has no games folder for the core yet.
Good to know
- Put your Game Boy games in
games/GAMEBOY2P(.gb,.gbc). - To switch between the netplay cores (NES, SNES, Game Boy 2P), reboot from the MiSTer's menu first.
- Both players need the same release. Otherwise netplay shows
Different core build. - If the players are in different netplay cores, netplay shows
The other player runs another console.
Upgrading from v0.2
- Copy the new
SD cardfolder onto both MiSTers. - Run Scripts → netplay_on again.
- Replace the server's binary.
netplay.ini and netplay-server.ini stay as they are.
Source: this repository at tag v0.3. ./setup.sh applies the patches to the upstream NES_MiSTer, SNES_MiSTer, Gameboy2PUW_MiSTer and Main_MiSTer.
NES and SNES v0.2
NES and SNES netplay for MiSTer v0.2
This release adds Super NES netplay. Two MiSTers run the real SNES core in lockstep over the internet or a LAN. NES netplay works as before.
Download: mister-netplay-v0.2.zip. It contains:
SD card/: the NES and SNES cores, the netplay Main binary, scripts and NetPongServer/: the lobby server for Windows, Linux and Raspberry Pi
New: Super NES
SNES_netplay.rbf: the MiSTer SNES core with lockstep netplay. A checksum of every frame is compared, so a desync stops the session instead of going on silently.- All 12 buttons on both controllers.
- The core's coprocessors stay on: SA-1, Super FX, the DSP chips, Cx4, S-DD1, SPC7110 (without its clock) and Sufami Turbo.
- The SNES core has no pause, so netplay stops the emulated machine's clock while the other player's input is late. HDMI holds the picture; analog video goes black for that moment.
- Same lobby as NES: OSD → Netplay → Host in SNES_netplay. The other player joins from _Netplay/Rooms. Rooms and server games are per core.
- There are no settings to change, but both players need the same OSD settings. The session tells you when one differs.
- Not supported: MSU-1, BS-X/Satellaview, S-RTC, SPC7110 with its clock, the competition carts and SPC files. During netplay, cheats, savestates, multitap, mouse, light guns, turbo and SNAC are off.
Tested on hardware:
- Replays of 37,000+ frames came out identical on Super Mario World, Donkey Kong Country, Kirby Super Star (SA-1), Yoshi's Island (Super FX 2) and Pilotwings (DSP-1).
- Two MiSTers (a DE10-Nano and a MiSTer Pi) played over the internet through the lobby server.
Fixed before release
- Desync after playing other games. A ROM load kept the sound chip's registers from the previous game. The core now clears them on every load.
- SDRAM timing. The path for DMA from ROM to WRAM now meets real one-clock timing. Before, it could fail on some boards and not on others.
Main binary and server
- One
MiSTer_onlineworks with both cores. NES keeps protocol version 1, so NES play with Mesen still works. - New messages:
The other player runs another consoleGame chip not supported in netplayDifferent core build(now shown for both cores)
- Server:
- Games go in
roms/NES(orromsitself) and inroms/SNES. SNES games can be up to 8 MB. - A new status page shows a library per core, room cards and live updates.
- Games go in
Good to know
- To switch between NES_netplay and SNES_netplay, reboot from the MiSTer's menu first. Jumping straight from one core to the other can leave netplay without the ROM reload at the start of a session.
- Both players need the same release. Otherwise netplay shows
Different core build. - The host may wait at
waiting for player 2while the server already shows the other player as joined. If so, the joining MiSTer stopped on an error of its own (on NES, often RAM Clear). Read the message on that MiSTer. - The easiest way to get the same game file on both sides: the host loads it from
_Netplay/Server gamesand the other player joins from_Netplay/Rooms.
Upgrading from v0.1.x
- Copy the new
SD cardfolder onto both MiSTers. - Run Scripts → netplay_on again.
- Replace the server's binary.
netplay.ini and netplay-server.ini stay as they are.
Source: this repository at tag v0.2. ./setup.sh applies the patches to the upstream NES_MiSTer, SNES_MiSTer and Main_MiSTer.
NES netplay v0.1.1
First test release of NES netplay for MiSTer.
Download nes-netplay-v0.1.1.zip — everything in one file:
SD card/— copy to the root of each MiSTer's SD card (the NES_netplay core,MiSTer_online, the Scriptsnetplay_on/netplay_off,netplay.ini, the NetPong test game)Server/— the optional lobby/relay server for Windows, Linux x86-64, Raspberry Pi (arm64 and armv7), withinstall-linux.shREADME.txt— quick start
See the repository's README for requirements, installation and troubleshooting (for example a black screen after netplay_on).
Status
- Lockstep netplay over the internet between two MiSTers: tested on hardware.
- Replay determinism on NROM, MMC1, MMC3, MMC5 and UNROM games: tested on hardware.
- Lobby with rooms and player names: tested between two MiSTers, with the server on Windows 10. Direct connection with relay fallback is also covered by the automated tests.
Built from MiSTer-devel/NES_MiSTer 49a0a66 and MiSTer-devel/Main_MiSTer 0827165 with the patches in this repository (tag v0.1.1). GPL-3.0.
md5 of nes-netplay-v0.1.1.zip: 8c4f11efee34e0651ece91432d303ac9 (all files: md5sums.txt)