-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Request for gamestick and ouya controller #42
Comments
Ouya controller support has already been requested here #17. I've mostly implemented it and it will be included in the next release. If you want to try it out now there's a build posted in that thread. Can you provide me more information about the gamestick? I'm not familiar with this controller. Yes, button combos could be used in place of missing buttons, but it's much harder to come up with defaults that everyone is going to agree with, necessitating the need for user configurable layouts. I'm not quite ready to start adding those features yet. If there are some obvious combos to use for certain buttons I'll consider setting them as defaults in the short term. |
Interesting. Never seen this before. Thanks for the pics. From the name I thought it was going to have far fewer buttons. Looks like it wouldn't be such a big deal to add a few combos to handle the missing buttons. Is that a battery indicator in the last picture? I'll need some more info about it in order to make it work. Have you tried pairing it with the console? It won't show up as connected yet, but if it's not doing anything weird it should show up in the pairing database. You can dump that with my |
The gamestick came out couple of months after the ouya and yes it is a battery indicator in the last picture I have just tried to pair up and nothing happens and there's nothing new posted in btdb.nro |
Oh nice. I'm not sure why the Ouya build would have made a difference though. Are those your two controllers in the pics you posted? Could you try and pair the other one too so I can see if that device ID is consistent vs random garbage? |
Cool, sounds like that's probably a real hardware ID then. Give me a bit and I'll knock up a skeleton handler for it and we can work through figuring out the button layout. I couldn't really find any existing code for it online. |
Good find. There's a section on button mappings that we might be able to reference. It's not entirely clear on the reporting format though so I think we're going to have to inspect the incoming packets visually, to get our bearings at least. Here's an initial build with the skeleton handler in place. This should make the controller show up as connected, but you won't get any button presses or anything just yet. Here's a tool I've used to figure out button layouts in the past. It's kinda crappy and lags about 1sec behind but it gets the job done. It steals the controller events from the system so you need to use the home button on the joycon (attached to the switch) to exit. This tool should print a raw hex dump of the incoming packets. Make sure you only have one controller connected or it will mess up the output. Send me a capture of the screen so I can get an idea of the packet size and ID. Then the idea is to press each of the buttons one at a time and see if you can spot which value it changes. Likewise, push the sticks to their extremes in X and Y and see if you can see which values are maxing out. |
@oxley192 can you get a better picture? Can't really read that (you know you can use the consoles capture button right?) . What's that first digit? |
03 0f 80 80 80 80 00 00 00 00 |
Ok, so it's sending report 0x03. Do those values change when you press the buttons or move the analog sticks? |
Yes they do I'll do take a capture for every button and say which button it is |
Ha, if that's how you want to do it that would be great. Otherwise you could just tell me a few and I'll see if I can line it up with what that SDK document you found says |
Home button big button with the arrow on = 01 00 10 00 00 00 00 00 00 Back button = 01 00 20 00 00 00 00 00 00 |
Perfect. Could you do the same with the sticks too? It should be enough to just record them in 100% up and 100% right position |
left analogstick Right analogstick D pad |
Could you check that |
Start button 03 0f 80 80 80 80 00 00 00 08 is wot it comes up with and the x button 03 0f 80 80 80 80 00 00 08 00 |
All good, looks like you missed a 0x00 above. |
Yep I did |
Made this build that maps the controls according to my interpretation of the info you gave me. Let me know what works and what doesn't. Do you have some idea of which button combo would be good to simulate the ZL/ZR buttons? |
The home button , back and start don't seem to work not sure about x and y haven't tried them on a game yet lol but everything things else seem to be working good and I was thinking like the start button and the back buttons for a combo |
X and y both work it's just home start and back that don't seem to work |
I might have got the bit ordering of home and back reversed. Try this build. Not sure why start doesn't work though. I mapped it as the Here's a visual controller test app I made that might help you to check everything better. |
Start button still isn't working but home and bk button now work |
Ah yeah whoops I read 0x08 as 0x80 for the start button. This build should fix it. I've also added the start button as a modifier for L and R so you should hopefully be able to press ZL and ZR now. Was easier than using the back button because it gets sent in the same report as the rest of the controls |
Just trying out lz and rz in some games to see if I like the combination but verything else works goods |
Don't like it cause it doesn't fully work I think it might be better using down on the dpad and the back buttons cos the combination doesn't always work with start |
The combination not working might be due to a logic error in my handling code though, so if that's your only complaint it still might be the better choice since those center buttons don't get used so much. Did you notice any pattern to it failing to trigger? I would imagine the case where you might legitimately hit a dpad button with a shoulder button and not want the combo might pop up more frequently |
It's cos the games I was using it on used + for like maps and setting up options so it wasn't working with some shooting games |
Ah right, so it was otherwise working as expected? This is where we get into the territory of needing to be user-configurable as everyone is going to have a different idea of what makes sense depending on which games they're playing. Since you're the only one who has requested this controller so far I can make dpad down be the default modifier for the time being if you want. |
I made this special build of hid_report_tool that filters out the normal button data. Could you run it and tell me if the controller sends any other data when it connects, or if you plug/unplug a charging cable? I want to see if it reports battery level information so I can add that. |
It just a blank screen unless I press the home button then it says 01 00 10 00 00 00 00 00 00 or back says 01 00 20 |
Yeah, that's to be expected. Sounds like it doesn't send any additional reports then. I wonder where the battery info is... Anyway, here's a build with the dpad down combo. See what you think. |
That works better thank u |
Sure, but please create a new issue for this one |
I have got a gamestick and a ouya it would be nice to use these controller on the switch I now the gamestick controller is lacking some buttons but couldn't u use a combination of buttons to emulate missing buttons
The text was updated successfully, but these errors were encountered: