New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature XLink Kai BBA #8853
Feature XLink Kai BBA #8853
Conversation
Based on work by tommy1019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I just left some other review comments about some things I missed in the previous review (sorry, made the initial review at 1AM)
|
Before this goes any further I'm going to see if I can change the Ethernet link state on the fly so the link status in game is accurate |
|
I've added a check for if the BBA actually connected to XLink. This will notify the user if they try to use LAN mode and the connection wasn't successful, or if the connection was dropped. This is the last change I'll make. |
|
So now that the actual code comments have slowed down, I guess I'll comment on my experience diving into, installing, and using Xlink-Kai. It's pretty funny, I remember hearing about things like Warppipe on TechTV back when I was a kid, never imagining that someday I'd be using something like that... to test an emulator no less. Unlike with BBA-TAP and Netplay, XLink-Kai has a lot more infrastructure. Not only can you use it locally with multiple Dolphin instances/GameCubes on a network, but you can also play online through their sort of IRC-like chat service. I didn't test it personally, but from what I saw people with ~30 - 40ms of latency were able to play without incident. I'm not a technical wizard, so I don't exactly know how different XLink-Kai is versus BBA Tap. Instead of talking about the different ways they work, I'll stick mostly to the actual user experience. The installation process of XLink-Kai is very different than trying to setup TAP devices. One of the first potential issues is that Windows is very adamant about not letting you run XLink-Kai. It warns me about them with smartscreen, refuses to install it, then I tell it I want to install it, it says are you sure, then I finally can install it. This might spook some users from using it. I don't know if there's a way this could be fixed, but it would be appreciated for our less tech enthusiastic users. Unlike TAP, you have to register to XLink-Kai's service. It's not a very invasive process, mostly requiring an email (and I haven't gotten any spam. Just the initial confirmations.), username and password. When you start XLink-Kai it connects your default web browser to a sort of web-irc interface. This was all initially very overwhelming for just trying to use BBA. After all, I was just trying to set it up locally... However, once I figured out how everything worked it got simpler. Basically, none of that was necessary for me if I'm just playing locally. If I did want to play with friends, I can add them as contacts and then if I search for a console in Dolphin at the same time as them while using XLink-Kai, it'll automatically work. You can also join rooms for playing with non-friends. Unlike netplay, these games are very sensitive to ping so I don't know how feasible this is, but if you have friends around you it'll probably work okay. As a bonus to Dolphin users, the chat interface for the room will get communicated over imgui, though you can't respond through Dolphin at this time like in Netplay's chat GUI. A few comments on the overall interface. I just kind of wish there was a "local" mode that didn't have all the registration requirements. For long term preservation, I always worry about services disappearing and for all the flaws of BBA Tap, at least it'll always function. I also worry about the lengthy process keeping away more casual users, but I don't know how much of that is even avoidable considering how BBA or XLink-Kai works. However, as an enthusiast feature to use BBA, once you're past the initial setup everything worked very well. Setting up rooms and such isn't hard and it's very "hands off." You can get a BBA match going in less than a few minutes. Testing Results I tested 3 out of the 4 BBA titles. I was too lazy to setup the Japanese exclusive Homeworld. Mario Kart: Double Dash performed perfectly in a few short races. I didn't get any desyncs once I got connected, however I did get one connection error. All I had to do was retry and they connected next try so honestly that's probably something that can happen on console. Kirby Air Ride: This one is a bit more complicated but in the end I got it to work smoothly. Kirby Air Ride is a lot more sensitive to latency... or so I thought. I actually got it to work over Wi-Fi latency at least by upping Dolphin's Emulated CPU clock. I don't know why this smoothed out the frame-rate but it did. I need to try connecting this to a real console and seeing what's up sometime but that's for another day. 1080 Snowboarding: I didn't do that much testing on this one, but it worked and had no desyncs over 10 minutes of testing. Instantly connected too. Not much else to say. |
|
Heya, I'll address things one at a time. Full disclosure I'm the current head of Team XLink and the primary developer of the client and server architecture.
These are the traffic patterns that work with XLink and this BBA PR:
As you mentioned most gamecube games are extremely sensitive to latency so avoiding WiFi and being geographically close to other players is important.
From MS's point of view XLink checks most of the 'sketchiness' boxes despite being harmless; Unsigned exe, requires admin rights, has its own internal http client and httpd, self contained crypto functions, processes and injects raw ethernet frames etc etc... Windows 10 is especially picky about all this.
For local only use I agree its overkill but the main focus of the service is online play :)
"these games" specifically being GameCube LAN games
When XLink eventually shuts down (wont be for years yet) we'll likely open-source everything. With that said; now that this PR exists it is fairly obvious how to add additional BBA types to Dolphin so I expect there will be alternatives in the future.
XLink itself is going through a bit of a revamp lately. A new website is on the way as well as a set of new setup guides. I've written a simple guide to using this BBA geared towards users who are already somewhat familiar with the service: https://www.teamxlink.co.uk/wiki/Dolphin_Gamecube_XLink_BBA_Tutorial |
|
Any other thoughts on this PR? I'm fine with the Dolphin side of it usage wise. I'd like to know if I should prep a Progress Report entry for this. |
|
Is there anyone else who wants to review this? I obviously can't review the code, but most of it appears to be localized into the BBA/EXI sections and it doesn't seem to impact anything in emulation it shouldn't. If anyone else doesn't have any qualms with this, then it's been sitting long enough and I'll merge it when the feature goes live into XLink. |
| // i18n: TAP is a type of virtual network interface, MAC stands for Media Access Control | ||
| // A MAC address uniquely identifies a network interface (physical) like a serial | ||
| // number. "TAP" and "MAC" should be kept in translations. | ||
| this, tr("Broadband Adapter (TAP) MAC address"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MAC is still used in both cases (TAP and XLink Kai), should this translation string really be updated to include the word "TAP"?
Also, since XLink Kai also requires a MAC (not to mention from a specific vendor; as validated by the CEXIETHERNET ctor), it appears that currently you have to select TAP to generate (or update) the MAC and then switch to XLink Kai to update the Destination Address.
Is this something we want to address here (assuming I'm not mistaken by just reading the code; I didn't run or test anything)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the wording used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good for the most part, untested though.
There is still a few things to address, but they can likely wait for a follow-up PR (and shouldn't block merging if you ask me):
- The link state should start as down and "connect" once XLink is ready (which has a source TODO)
- Changing the MAC to a custom one requires the BBA to be selected (but is still used with XLink). Ideas include moving it to either the GameCube settings or the Advanced settings tab; it is fairly advanced tho and can be another PR
- The "show chat on OSD" setting is not exposed anywhere, and needs to be changed using the INI if someone wants it off
|
I think this will be a helpful change for the BBA communities. I hope we can continue to improve things but the change seems fairly isolated and shouldn't be too hard to maintain. It's seen multiple reviews and I've seen the X-Link Kai community do many tests and I've verified it worked as well. I'm essentially good with the user side of things as is and Bhaal approved the code. I do think some of the GUI things can be made clearer in the future, but that can be handled in followups. |
|
Did some quick and dirty performance testing with BBA Expansions turned off to make sure this doesn't impact performance otherwise, and it seems fine. This is ready as far as I'm concerned. |
This PR adds support for GameCube LAN play via XLink Kai using a new BBA which communicates directly with the XLink client via UDP socket.
This relies on unreleased additions to the XLink Kai client but is functioning correctly on Windows, macOS, and Linux.
For more information see: https://bugs.dolphin-emu.org/issues/12108