Skip to content

About

Rewritten Netplay.pak to avoid drop-in patches, working with shims and stubs

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

Netplay for NextUI

Features

Shared-Screen Netplay (LAN)

Local network multiplayer with shared screen and synchronized inputs. Both devices display the same game state—-think of it as playing on the same console, but over WiFi. Works similarly to RetroArch Netplay, but with frame delay.

  • Supports 2 players (host + client)
  • Connect via WiFi (same network) or ad hoc (auto-generated by host)
  • Supports limited sync recovery
  • Not internet-based multiplayer—LAN only
  • Ad hoc/hotspot is the best for performance

GBA/GBC/GB Link

True multiplayer for GameBoy Advance/Game Boy Color/Game Boy. Each player has their own independent screen and game state.

  • Supports 2 players (host + client)
  • Connect via WiFi (same network) or ad hoc (auto-generated by host)
  • Works with GBA games that support the GBA Wireless Adapter, Pokemon Gen III or Advance Wars 1/2
  • Works for GB/GBC games that support Game Link.
  • Linked games do not have to be the same — Pokemon Red & Pokemon Blue, Oracle of Seasons/Oracle of Ages all work

Instanced Cores (experimental) for Game Boy/Game Boy Color/Game Boy Advance

In Configuration > Cores > Base, open GB/GBC (Gambatte) and turn on Dual instance; each device then emulates both Game Boys, keeping the link cable inside the device and sending only controller inputs over WiFi. It removes a WiFi round trip from every cable exchange, which is what makes trading and battling feel sluggish.

mGBA's is in Configuration > Cores > Extras > MGBA (mGBA): turning on Instanced link installs Netplay's bundled MGBA.pak on each supported platform on the card while keeping the paired core inside Netplay.pak. Existing paks, saves and states are backed up first, and Remove MGBA.pak on the same screen offers an independent restore for each category.

Because of how NextUI handles mGBA, if you're installing it for the first time, you will need to copy the games you want to play over to Roms/Game Boy Advance (MGBA) and saves to Saves/MGBA.

Both devices have to have the instanced mode switched on, and both have to have both games available — no game files are sent between devices. So if you want to trade between Pokemon Ruby and Emerald, both devices will need both ROMs. If either condition isn't met, the game restarts automatically on the normal link-cable path and plays as it always did.

Nintendo DS Local Wireless (experimental)

DS games that play over local wireless (Mario Kart DS, for one) can play between two devices. Each device runs its own DS with its own screens and save; the DS radio is carried over the Netplay session's network.

Select DSP (DSperate) in Configuration > Cores > Extras. That installs Netplay's bundled DSP.pak (minui-nintendo-dsperate-pak 0.2.0, with its pause menu and shaders, on DSperate v3.0.5), backing up any DSP.pak, saves and states that were already there. Selecting it again offers to remove it from Netplay (the pak stays and plays offline), remove it from the device, or restore the backup. Put your games in Roms/Nintendo DS (DSP). No BIOS is needed.

With a session armed, launch the same game on both devices (in either order) and use the game's own wireless menu: one player creates a group, the other joins it. Use the ad hoc network: through a router the games run at about a third of full speed. On a Trimui Brick and an RG35XX H, Mario Kart DS races run at about 50 fps (menus at full speed) and Asphalt: Urban GT 2 at about 57. DSP.pak is built for tg5040, tg5050 and h700.

DraStic works too: select NDS (DraStic) in the same list. If NDS.pak is already on your card (the DraStic 2.5.2.0 build that minui-nintendo-ds-pak ships), Netplay adds local wireless to it and leaves your DraStic settings alone; if it isn't, Netplay installs minui-nintendo-ds-pak 0.14.1 first. Selecting it again offers to remove it from Netplay (NDS.pak gets its own launcher back) or remove NDS.pak from the device. Games stay in Roms/Nintendo DS (NDS). On a Trimui Brick and an RG35XX H, both on DraStic, Mario Kart DS races run at 55-58 fps over ad hoc. DraStic and DSperate speak the same protocol, so each device can use either; a mixed pair runs at DSperate's pace. The DraStic overlay is built for tg5040, tg5050 and h700.

Save states are off while the two consoles are talking. Details and measurements: docs/dsperate.md and docs/drastic.md.

Compatibility

The .pak will check each installed core's build for shared-screen netplay. Matching builds = maximum compatibility. If the builds don't match, it can attempt to fall back on specially compiled "compatibility cores" that should work regardless.

Currently builds for:

  • tg5040 (Trimui Brick, Trimui Brick Hammer, Trimui Smart Pro)
  • tg5050 (Trimui Smart Pro S)
  • my282 (Miyoo A30)
  • my355 (Miyoo Flip)
  • H700 (Anbernic XX devices)

I'm trying to make everything compatible, but I only have a Trimui Brick and Miyoo A30 so I cannot promise everything will work properly on other devices.

Supported Systems

Core Platform Mode
FCEUmm NES / Famicom (Famicom Disk System untested) Shared screen
Snes9x SNES / Super Famicom Shared screen
Snes9x 2005 SNES / Super Famicom (Miyoo A30) Shared screen; pairs with other devices through Supafaust
Supafaust SNES / Super Famicom Shared screen; also the SNES compatibility core
PicoDrive Sega Genesis / Mega Drive (Master System, Game Gear, SG-1000, Sega CD and 32X untested) Shared screen
PCSX ReARMed PlayStation Shared screen, experimental: the A30 cannot stay in sync with the other devices
gpSP Game Boy Advance Link (Wireless Adapter)
mGBA Game Boy Advance Instanced link (experimental)
Gambatte Game Boy / Game Boy Color Link cable, or instanced link (experimental)
DSperate (DSP.pak) Nintendo DS Local wireless (experimental)
DraStic (NDS.pak) Nintendo DS Local wireless (experimental)
FBNeo Arcade Shared screen, untested

Installation

⚠️ Backup your SD card before proceeding.

This is beta software, and despite testing, I cannot promise that no bugs exist.

Manual Installation

  1. Mount your NextUI SD card to a computer.
  2. Download the latest release file named Netplay-Full.pak.zip from Github.
  3. Copy the zip file to /Tools/<PLATFORM>/ (replace <PLATFORM> with your device: tg5040/tg5050/my282/my355/h700).
  4. Extract the zip, then delete the zip file. (the .zip contains a Netplay.pak folder, so extract to the <platform> folder)
  5. Confirm that there is a /Tools/<PLATFORM>/Netplay.pak folder on your SD card.
  6. Unmount your SD Card and insert it into your device.

Pak Store Installation

Might come soon?

Updating from a previous installation

Delete previous Netplay.pak folder. Extract new one.

Usage

The app's top level is Host, Join and Configuration. Configuration holds:

  • Cores: Base (NextUI's base install) and Extras list each system with a check when it plays over Netplay on this device, two checks in instanced or dual mode, a hollow circle when its pak is here but not set up, and a dash when it is not installed. The hint under the selection says how it plays.
  • Settings: Quick Menu, Netplay Icon in NextUI (Always, Active Session, Disabled), Use compatibility cores, Add Netplay to GameSwitcher and Disable Wi-Fi Power Saving. LEFT and RIGHT change a setting.
  • Debug: Force compatibility cores, Verbose debugging logs, Run checks and Restore Wi-Fi.
  • Turn Off Netplay.

The hint text lives in Netplay.pak/pak_hints.json and can be edited on the card; a key ending in .<platform> (ready.my282) replaces the plain one on that platform.

Quick menu (experimental)

Configuration > Settings > Quick Menu draws a small Netplay menu over NextUI's own menus (it needs Varnish.pak, which Netplay offers to install). Turning it on makes START open it; select the row again to choose your own buttons: hold them, let go, and save. Up to three buttons; MENU, power and volume cannot be used, and buttons NextUI also uses will do both things.

Netplay (LAN)

  1. From one device, open the .pak and select 'Host.' If ad hoc is recognized as being available for your device, the option will be available.
    • For ad hoc, the device will scan the local wifi channels for one with the least noise
    • It will create a nextui-XXXX network while still staying connected to the original host network
  2. From the other device, open the .pak and select 'Join.'
  3. Select the wifi network of the Host device. If none appear, press 'rescan'
  4. After both devices are connected, exit the .pak and navigate to the game you want to play together
  5. When you are done playing, go back to the .pak and press X to end the session. Previous wifi networks should be re-established.

Hosting continues in a detached session broker after the setup app closes. If you reopen Netplay.pak, the main screen shows Hosting: nextui-XXXX and its connected guests on the host, or Joined: nextui-XXXX and the host address on the guest. Host and Join stay hidden until the session ends.

An empty host remains available for guests to leave and rejoin. If the device reboots without ending the session, Netplay discards that previous-boot session on the next boot, game launch, or opening of the setup app; installed launcher bindings remain as inactive passthroughs.

Disable Wi-Fi Power Saving (experimental)

Configuration > Settings > Disable Wi-Fi Power Saving is off by default. When it is on, the radio's power saving is turned off while a session is armed and put back when the session ends. Power saving makes the radio sleep between beacons, which adds latency to the small per-frame packets netplay sends.

On H700 devices the driver has to be reloaded to change it, which drops WiFi for several seconds, so the setting asks before applying. The change lasts until the next reboot; after one, Netplay shows the setting as off again.

Game Switcher shortcut (experimental)

Configuration > Settings > Add Netplay to GameSwitcher is off by default. When it is enabled, Netplay appears at the top of NextUI's Game Switcher. Opening it shows the quick menu over NextUI when that is on (below), and otherwise starts the Netplay app, where you can host, join, or press X to end an armed session.

While a session is armed, the Game Switcher intentionally contains only the Netplay shortcut. Your normal history is backed up and restored, with Netplay kept at the top, when the session ends. NextUI uses the same recent.txt data for both the Game Switcher and its in-menu Recents folder, so those two views cannot have different contents while the session is armed without modifying NextUI itself.

From a running netplay game, use NextUI's configured Game Switcher shortcut (MENU+SELECT on the stock mapping). Netplay's MinArch shell wrapper removes the false slot marker/preview produced by MinArch's rejected quicksave and restores any metadata that existed before the session. The shipped MinArch binary is not modified or replaced.

Controller ports remain fixed at host/player 1 and guest/player 2. Swapping ports requires synchronized transport support and is not exposed as a setting yet.

Saving and save states:

Save states are disabled while in netplay.

For shared-screen netplay, the host's save file will be used, and will not be saved to the guest's SD card.

For game linking, each device will use its own save file.

Disclaimer

This is an unofficial modification. Use at your own risk. Always backup your SD card before installing.

Credits

About

Rewritten Netplay.pak to avoid drop-in patches, working with shims and stubs

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages