Emulator Issues #12108
closedFeature request: Gamecube BBA integration with XLink Kai
0%
Description
Hi there!
I've been talking with JMC4789 about adding direct integration of Dolphin's Gamecube BBA with the XLink Kai PC client*
So far I've added a UDP socket to XLink with a simple protocol to exchange network data with emulators. I've got the following traffic patterns working:
- Emu socket -> Local LAN consoles (emulating a hub)
- Local LAN consoles -> Emu socket (emulating a hub)
- Emu socket -> Remote players
- Emu socket <-> Emu socket
- Remote players -> Emu socket and/or local LAN consoles
* I'm the lead developer, see https://www.teamxlink.co.uk/
TL;DR VPN tunnel for game console LAN play and the existing gamecube community is a bit frustrated with TAP adapters
Updated by CrunchBite almost 5 years ago
On dolphin's end a new BBA option needs to be added that has a UDP socket to connect to the XLink Kai client on port 34523 (Config for the BBA should have a box for the IP address of the device running the xlink client [default to localhost])
Simple protocol to communicate with XLink client:
- Dolphin sends 'c;uniquename;' to connect where uniquename is a....unique name to identify this dolphin process in case of multiple Dolphin instances connected to one XLink client (like at a LAN party/tournament night [This ability has been requested by the XLink gamecube community]) Name needs to be unique to the individual XLink client, not globally) (Could use the BBA's MAC address as the name!) Gets 'connectok;' in response
- Dolphin sends 'e;e;ethernetframebinary' where ethernetframebinary is literally an entire Ethernet frame that the BBA would normally be sending (MAC address of the BBA must be using Nintendo's OUI [the current BBA implementation does])
- Dolphin receives Ethernet frames back the same way; 'e;e;ethernetframebinary'
- Dolphin sends 'd;thesameuniquename;' to disconnect cleanly from the client (otherwise the XLink client will stop sending LAN traffic to that socket after 30 minutes of inactivity) Gets 'disconnectok;' in response
- If traffic is not expected to be sent for a while Dolphin can send 'k;' as a keepalive to reset the counter. Gets 'k;' in response.
Updated by CrunchBite almost 5 years ago
Connect/disconnect responses have been changed to "connected;" and disconnected;"
This new UDP socket is not in the current public release (7.4.36); you'll need a beta client to test with.
Updated by CrunchBite almost 5 years ago
This could be seen as a derivative of this PR by tommy1019 https://github.com/dolphin-emu/dolphin/pull/8754
Updated by CrunchBite almost 5 years ago
Dolphin can now communicate with XLink properly and multiple dolphin instances can do LAN play locally via XLink client and against remote players
Still need to get dolphin <-> local LAN cubes working via XLink, packet injection isn't working for some reason.
This has only been tested on Ubuntu so far; need to do macOS and Windows still.
Updated by CrunchBite almost 5 years ago
The following traffic patterns now work with Dolphin via XLink:
- Dolphin and remote gamecube
- Dolphin and remote dolphin
- Dolphin and local gamecube (XLink handling the Ethernet bridging!)
- Dolphin and another Dolphin
- Dolphin, another local dolphin, a local cube, and remote dolphin
Updated by JMC4789 almost 5 years ago
- Status changed from New to Work started
I guess this is Work Started if you're doing it yourself.
Updated by CrunchBite almost 5 years ago
Dolphin <-> XLink Kai comms protocol has changed since #1 was written. Do NOT use it as a protocol reference.
I'll provide proper docs when everything is done.
Updated by CrunchBite almost 5 years ago
Currently roadblocked by https://github.com/dolphin-emu/dolphin/pull/8841 and unknown QT errors on MacOS (Catalina)
Updated by CrunchBite almost 5 years ago
Can now compile on macOS, XLink Integration working perfectly :)
Now for windows!
Updated by CrunchBite almost 5 years ago
Now working on macOS/Windows/Linux with the same codebase!
Up next: Rewrites to conform to dolphin's coding style, performance tweaks, and fixing a couple crashes in XLink
Updated by CrunchBite almost 5 years ago
Everything now works on the dolphin end of things. I need to pull in some testers over the next couple days to make sure I haven't broken TAP adapters and that the drastic changes to XLink's frame handling code haven't broken other platforms.
Updated by CrunchBite almost 5 years ago
Added OSD messages for BBA connect/disconnect and added chat messages in OSD (can be turned off in the config file)
In testing we got 7 dolphins and one cube connected in MKDD!
Now adding the final polish before submitting the PR :D
Updated by CrunchBite almost 5 years ago
Updated by CrunchBite almost 5 years ago
Play testing is going very well. Testers are reporting improved FPS compared to TAP adapters and no stability problems.
Updated by CrunchBite almost 5 years ago
XLink Kai 7.4.37 (support for this addition) is now ready for release and will be out in a couple hours.
Updated by CrunchBite almost 5 years ago
XLink Kai 7.4.37 has now been released for:
- CentOS 7 x86
- CentOS 7 x86_64
- Debian 9 x86
- Debian 9 x86_64
- Ubuntu 16 x86
- Ubuntu 16 x86_64
- Raspbian/Raspberry Pi OS - Raspberry Pi (ARMHF)
- Windows
- macOS (including on brew!)
Updated by JosJuice almost 5 years ago
- Status changed from Work started to Fixed
- Fixed in set to 5.0-12233