Add a virtual controller to merge Joy-Cons. #434
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "madwind/master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Download the artifacts for this pull request:
Only for Developers
Done testing on MK8, PKM Letsgo, Super Mario Oddeysey, all works like a charm with orientation, Motion, Dual mode and single mode.
I tested it under botw and it works fine.
I'm sakuba
It works fine when I used single JC on SMP
It works fine when I used single JC on SMP
Very basic testing on Fitness Boxing: Fist of the North Star (using the compiled release from the Github-actions bot listed above, so it may not be the latest version. ) and Fitness Boxing 3 shows promise - it does seem that Dual Joycon w/motion on both sides is registering! I'll need to do more comprehensive testing on Ring Fit Adventure and the titles above. I've run into a couple of questions or potential issues
Issue/bug w/ Controller Applet pop up - While playing at varying irregular intervals, the controls applet (will have to check the name again) pops up suggesting that the current gamepad configuration is invalid for the type of game (it does properly show the dual joycon graphics) and to reconfigure. It may be this happens during periods of inactivity or if the gamepad goes into standby, but I've also gotten it during active play (which thankfully usually pauses the game). Simply exiting the pop-up and resuming play seems to maintain Dual Joycon w/ dual motion usage so its not like you actually need to reconfigure anything, but I gather it still should not be happening. Maybe one of the updates since the compiled build from the bot solves this already, but if not I wanted to make sure to document.
Rumble - What are the suggested Rumble settings to replicate Switch default "HD rumble"? Some of the games listed also include the rumble component along with the motion in different ways, and using the Ryujinx control options simply to enable Rumble with its defaults seemed functional, but I wanted to make sure I was using the proper setup. When I test Ring Fit I'll be able to see if it "feels" right as Ring Fit Adventure makes pretty significant usage of rumble.
Accuracy of gyro/motion registering - I had some issues with accurate and timely detection of motion/gyro related inputs in Fitness Boxing FotNS, especially when there were lots of concurrent, incidental inputs. That is to say, When playing a Fitness Boxing title, you typically grip the Dual Joycons by making a fist around them, sideways - so that you could easily slide your thumb up and press L or R with your thumb, for instance, and once you slid on the side connector with the wrist strap your fingers would curl around the unused SL/SR buttons, as well as be likely touch face buttons or sticks during gameplay. I mention this as I said above, it seemed that perhaps both incidental button press inputs and more importantly frequent motion input strings (ie a series of 6 - 8 punches in different styles,/direction of motion, using both joycons in an alternating fashion during the series - left jab, right straight, left uppercut, left body uppercut, right body hook etc) seemed to be likely to result in it not registering and missing, especially after the first one or two events . PLEASE NOTE: I need to conduct more tests to rule out any hardware or input issues on my side, but I thought it worth mentioning.
Suggestion, Ryujin Input config - Its great that the new drop-downs for selecting the Dual Joycon layout and applying to to Dual Joycon hardware are functional. Likewise, the default keybindings are pre-assigned and accurate. Clicking on one of them to rebind-as-means-of-testing-connection , like the Dpad Up button on Joycon L and then A Button on Joycon R, confirms both halves of the Dual Joycon layout are functional. Would it be possible however to show a visual representation without the need to rebind and most importantly, add one for both gyros? That is to say, on the little 3D model Dual Joycons, have whatever button you press or thumbstick you use light up momentarily to show it is registering and the proper command (ie pressing A has the A button on the model glow ) ? For motion/gyro, perhaps a small X, Y, Z wireframe in the shape of a joycon on each sided that could move in response to the user tilting or shifting the joycon? Seems like it may be a nice QoL update related to this new functionality; not sure if it was worth its own suggestion but given that the function would be most comprehensive when using Dual Joycon, it should also apply to Pro Controller, solo Joycon etc... just using their models instead to light up the buttons and with only a single motion demonstration wireframe instead of the both of them.
Thank you to Greem, Madwind and others who have brought this comprehensive, important feature into Ryujinx!
Thanks!
I’ve experienced point 1 on stable Ryujinx a couple of times, so I think it’s unlikely that it’s related to this commit.
I've been continuing to test the PR (still using the compiled version produced by the github-actions bot ) and the vast majority of time it works without issue! My primary focus has been on the new Fitness Boxing 3 so far, but I've also confirmed Fit Boxing Fist of the North Star and Fitness Circuit; waiting to test Ring Fit Adventure until I can get the latest update + my saves dumped properly.
Most play testing has gone smoothly. The issues of frequent faux(?) disconnects still necessitates turning the Ignore Applet setting on. There are infrequent (usually once per 30+ minute 'workout' session with one of the aforementioned games that make use of Dual Joycon w/ motion ) issues of controls not registering (both button press and motion at times, require going back to keyboard to pause emulation to check if there has been a disconnect visible at the OS level or if not present, then Ryujinx Input settings etc.. ..and then take steps to remedy the potential issue) or perhaps connection, but there are enough differences that I'm trying to pin down commonalities so I can identify what is specific to this PR and/or new functionality vs a prexisting Ryujinx issue that is simply exacerbated, or something unrelated all together. Overall though, most of the time it seems things are working as intended.
I'm still waiting on another set of JoyCons to arrive for comparison/to eliminate local hardware variables, will update later. Also if there are any specific usage/feature requests primary developers/contributors wish to have tested, please let me know. Great work so far!
"When I tested using one pair of controllers, Fitness Boxing worked fine. However, when using two pairs of controllers, this version of the emulator couldn't simulate two pairs—only one pair of controllers could be used normally. I wanted to play Fitness Boxing with two players."
I only have one pair of Joy-Cons, so I can't determine how automatic pairing should work when there are two pairs of Joy-Cons.
If intentionally implementing this for one pair only: I think it would make sense to signify in the UI that this type only works for one pair (e.g. disable the option if already in use + show a tooltip explanation), otherwise most users would probably consider it a bug.
Otherwise, without some setup screen similar what the switch does for paired joycon selection, it seems the only option would be to determine the pairs arbitrarily. A very rough idea could be:
This would enable initial multiple pairings, while leaving room for some kind of joycon pair selection UI to be implemented in the future.
Continuing along testing (still using the same compiled version above - ryujinx-Release-1.2.0+d264c27 ) and overall things are going smoothly with the primary issue being the disconnects and controller applet messages (if enabled). Disconnects (or notification thereof) happens several times per play session on Fitness Boxing 3. These can fall into several parameters and I'll try and break them down as to illustrate different things that may be going on
A) Ignore Applet option turned OFF (default)
When Ignore Applet pop-ups are turned off, there will be frequent pop-ups suggesting that the JoyCons are not connected / are not a correct configuration for this game (ie it properly shows the game, in the case of Fitness Boxing 3, expects the Dual Joycon pair ). This seems to happen in several circumstances. No matter what, I will need to use my PC's keyboard to click on the "OK" button on the pop up to resume playing.
B) Ignore Applet option turned ON
This is a trade-off in that in the case of variant 1 and 2 above, gameplay is not interrupted for the most part. Now, there MAY be some occasional missed inputs but its hard to discern during those variants right themselves very quickly. The bigger issue is with Variant 3, especially if the LED indicators on the JoyCons have not shown any change. In this case, while playing suddenly inputs drop entirely leaving me to race for the keyboard so I can pause emulation and then attempt to fix the JoyCon connectivity, as described previously. While overall turning the Ignore Applet option on does mean less "needless" interruptions to gameplay, it does make the situation more hectic in the case of a an actual significant disconnection.
As of late I've returned to playing with the Ignore Applet option turned OFF again to see how often I'm interrupted and the different parameters linked above. I'm attaching a most recent log - a play session that had Type 1 and 2 events, but had no Type 3. When connected it seems to be working flawlessly for a Dual Joycon layout including dual gyro/motion, so perhaps if there can be an improvement to connectivity / reporting within the driver/Ryujinx, the functionality (at least for a single player - I've not attempted to look into multiple Dual Joycon pairs, but it seems mcost45 has identified an issue and potential solution there), is overall ready to go! Thanks and hope this helps !
Ryujinx_1.2.0+cf7e7b5_2025-02-13_19-49-21.log
@RanceJustice Maybe you can try changing the Bluetooth adapter for testing, such as using a 4.0 adapter or one with an antenna, or modifying the Bluetooth name.
@madwind If you think its worth it, I'll grab a latest BT 5.x USB adapter stand alone. If there's a major difference I'd be surprised given that with the exception of the Type3 description above I'm not sure there's anything noticed as a disconnection, but to be comprehensive its a good idea and the adapters are not usually very expensive.
@madwind : the joycon only has full compability with BT 4.0
i have one here and when i use a differente BT adaptar i get severous delay and keep disconnect
sorry for my bad english
tested a few games
house of dead, arms, donkey kong
everything works fine, no disconnection issues or delay iput.
Huh, when you use a different one less than 4.0 or one greater than 4.0? In theory, anything above 4.0 should easily support it as its all backwards compatible according to BT standards. Still, stranger things have happened.
Are any of these using both inputs individually, especially via gyro/motion? Though it is a good idea, I should test a game that is using a Dual Joycon layout that plays as a "standard gamepad" (ie the game could be played just the same by the Pro Controller, perhaps with a single point of gyro usage) such as Splatoon 3, BOTW, or those you mentioned vs one that is specific like the exercise titles that need both to register individual inputs and both gyro sides simultaneously.
@RanceJustice
the game ARMS use both input individually! and works perfects here!
you have to make move with your right and left hand to play the game.
@RanceJustice about the BT adapter.
its a joycon issue
whenever i use a version above >4.0 i get delay input and disconecting issues.
on youtube and reddit there's a few reports about this!
i have in my house
BT adapter 4.0 , 5.0 , 5,3 and only 4.0 works with joycon
When those issues happen (ie the disconnects) are they the sort that have a visible change at the OS level such as the status changing in your Devices list from "connected" to falling back to "paired" ? Also, do these problems you describe happen with any application using JoyCons (ie another Switch emulator, emulators for other platforms, Steam Input using JoyCons for PC titles, any 3rd party driver package like DS4Windows/DualSenseX/BetterJoy etc) if you're not using a BT 4.0 adapter? Or is it only an issue with Ryujinx?
In any event I'll be sure to pick up both a 4.0 adapter specifically and a 5.x to compare, in addition to motherboard's built in BT that I've been using thus far(which claims to be 4.0). Thanks!
@RanceJustice
when the issues happen its a OS level issues!
for your first question:
You can see in the Bluetooth adapter settings that the Joycons are no longer connected.
for your second question:
sometimes you cant paired the 2 joy-con at the same time, sometime when you connect those they disconnect immediately
these problems happen regardless the program was on top on windows.
you cant even enter on emulator without the disconect issues.
BUT with you change to BT 4.0 those problem suddenly dissapearIt
could be a problem with my joycons since they are over 2 years old and it could have been a manufacturing defect or something like that, but if you search on Google for "joycons bluetooth 5.0" you get all kinds of trouble due to bluetooth
One more thing!
pokemon lets go, (eever or pikachu), doesnt recongnize MOTION SENSIOR,
single joy-con or portable mode with dual joycon.
maybe something to fix using this PR?
@bozis92
Thanks for that description. I have a couple new USB BT adapters on the way to check things out. From what you describe, I think my issues may be different or at least partially so. Given that both my PC's included BT happens to be 4.0, and that I don't have any difficulty pairing both JoyCons in Windows (or Linux, but I've been sticking to Windows for the testing given its most likely other users will make use of Windows) and I only rarely see a disconnect that is visible at the PC OS level, I'm wondering if something else is going on here.
In my more detailed report above, only the "type 3" error causes any sort of occasional disconnection (this may not happen at every 30-min+ playtest) - the ones type 1 and 2 are not visible at the OS level at all, but simply within Ryujinx (ie such as the controller applet pop up). Aside from that, none of the other issues you mention like only being able to connect one JoyCon to the OS at a time, or issues entering the emulator with JoyCons connected etc...are not what I've experienced anyway. Not to mention that, at least last I checked, I didn't get the kinds of disconnects (or notification thereof at the emulator level) using other emulators that allowed Dual Joycon w/ motion. So I think there could be more than one thing going on here.
It may very well need to come down to yet another set of JoyCons to test but it seems like we're having different experiences given what you've mentioned. The BT I've been using for testing thus far has been 4.0 (and integrated to my X99 platform's WiFi chip I've used thus far), but I'm picking up stand alone 4.0 and 5.x USB adapters (as soon as I can find those that are equally supported on Windows and Linux) and test with those. Alternately, it may come down to using another set of JoyCons entirely - the ones I've used for consistency's sake have been dependable yet old from a release-era Switch but its not out of the question that could be a part of the issue. However, I'd think if it was a hardware issue exclusively on the JoyCon side then it would be happening no matter the emulator or use case. Still, good information..
Oh, regarding the Pokemon Lets Go issue you cite, you mention portable mode? Perhaps that is an issue? My understanding is portable mode is with both joycons expected to be fixed to the Switch, as opposed to Docked mode with the JoyCons or other controllers, in hand? Though if it seems to not register at all, even a single motion sensor for a single JoyCon or ProController, in Docked mode - then that may be something outside of both this PR (which has to do with the driver combining Dual JoyCons into a single input but allowing both motion sensors to work together) and the 'standard' Ryujinx functionality which should be able to handle a single ProController input with a single gyro point? Thus, maybe its an issue with the game itself or its particular implementation/controls?
can we make a build with this PR with the last improvemetns?
@RanceJustice about pokemon lets go


even on portable mode the gyro is need to catch pokemon.
like this!
my configs:
and the game wont recongnize any gyro or motion.
@GabCoolDude i think has failed compile this PR with the recents improvments
That's because @madwind needs to fix the errors in their code.
@bozis92
Ah yes I understand about Pokemon Lets Go in Portable mode still using the gyro, but if I am correct its using a single gyro sensor instead of requiring them both. Does it only not recognize gyro when using the Dual Joycon layout, docked or portable? Using the same testing PR version of Ryujinx that supports Dual Joycon we've been discussing, did you try having it report itself as a Pro Controller? How about using a physical Pro Controller and/or a DualSense/DualShock that is using the layout of one? How about trying the mainline latest Ryujinx latest version with a Pro Controller?
I'm trying to figure out if the problem is specific to this PR and its driver to use Dual Joycons, or Pokemon Lets Go has problems with gyro on other branches and/or using other hardware that have a single gyro point (ie a Pro Controller)?
In any case I'm interested that if Madwind can fixes any errors that are preventing compilation, to see the feature merged into an official build (or for that matter, another unofficial build - I'm still using the one at the top of this PR's discussions - to see the updates. If there's anything we can do to help or test to resolve errors, just let us know.
The links to this build seems to be dead - any chance of getting it back up? I'd love to test this with my cheap o 3rd party joy cons.
@zhoumann https://github.com/Ryubing/Ryujinx/actions/runs/13694949690
Scroll to the bottom of this page.
Make sure you download "Release" version and not "Debug"
The
nightly.link
URLs are not working for some reason.Thanks GreemDev - I did about 30 minutes of testing with Fitness Boxing 2, and it works great! No disconnects during the entire play session, on Windows 11 with the laptop's native Bluetooth 5.3. Can't wait until this PR is merged into the main release!
@zhoumann you using a third party joycon? did you mind to share with us what joycon is? because im using a oficial joycon and this only works with BT 4.0
and did you have pokemon lets go? you cant test for us using this joycon the gyro?
@bozis92 The joycons I bought were from Aliexpress: https://www.aliexpress.us/item/3256807078539263.html (it has gone up in price considerably since I bought it; inflation is crazy!)
Unfortunately I don't have Pokemon Go, but I did test these joycons on MK8 Deluxe, and the gyro works perfectly in paired mode. The way it worked is that BOTH joycons' gyro can activate steering. This means that as long as I tilt ONE of the joycons, it will steer. When I tilt both joycons in opposite directions, they cancel each other out and the kart goes straight, as expected.
Checkout
From your project repository, check out a new branch and test the changes.