• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 26
Input
#1
Hey guys,

I'm working on the new input API. I want this API to be robust to all of retroplayer's needs. I'm gonna brainstorm here, chime in if you have any input.
Reply
#2
Standardizing buttons

The first task is to standardize the buttons. Different systems expect different buttons ("A", "Start", "C-up", "Circle", etc). Here's the non-trivial consoles I'm familiar with, mapped to standardized IDs:

Image

(source can be edited here)

That gives us 21 standardized buttons. The most-buttoned controllers are the PS2 (are the triggers digital?) and Wii U Pro, with 17 buttons, so maybe this can be improved. Let me know if you can add another non-trivial console (or any corrections) to this list, so that I can get the best idea of what standardized buttons we need. (This list isn't part of the API, it's just to give me an idea of which buttons need to be standardized.)

Graphical configuration has been proposed here: http://forum.kodi.tv/showthread.php?tid=164566 . Adding graphical configuration to the input API will be really tricky, but is perhaps possible. Any ideas?
Reply
#3
Other info provided by the input api
  • Joystick names
  • Joystick icons?
  • Requested player number (e.g. Xbox 360 controller connecting as player 3)
  • Presents two rumblers, weak and strong, that can have a strength from 0.0 to 1.0
  • Ability to set controller LEDs
Reply
#4
Hi garbear,

thanks for your efforts!!!! I'm really looking forward to see retroplayer in the mainline!
I think you missed the left and right button of the n64 controller. Also the Z button is not a trigger it is a pure digital button on the n64

Cheers!
Reply
#5
updated. thanks

EDIT: crap. triggers can be digital buttons. this will need some thought
Reply
#6
Joystick icons always seemed like a good idea to me.

I'd suggest a 512x512 transparent png like clearart.

Example:

Image

We could start a thread on fanart.tv for them to start making some if you want. There are some very talented graphic artists on there.
Reply
#7
That would be awesome. It could make configuring unknown joysticks a breeze as well: "Select the joystick that looks like yours"
Reply
#8
We could also add a device general selection in the keymaps were we keep metadata like this. So url to image etc. Could almost even have links to icons for each button (so we could show (x) on PS3 but the equivalent for another)

This metadata stuff could obviously be outsourced to a site later but IMO keep it simple first, just add the data needed in a place which is available. New gamepads doesn't pop up every day anyways Smile
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#9
Exactly - a finite number of gamepads turn this into a data gathering problem, really. And we know who excels at gathering data Wink

My goal is to strip all the joystick alias stuff from xbmc and place it in an add-on. Either in the binary add-on where I'm moving the platform-specific joystick code, or possibly a resource add-on like montellese's PR:5561.

The joystick keymap then becomes like remote.xml, where tags are simply standard button IDs like <a>Select</a> and <start>ActivateWindow(Home)</start>. A half-assed example is here
Reply
#10
Hi garbear again Smile

I just had a second thought about the buttons you want to standardize, what about d-pads with eight directions. I dont know if they have an own signal for the directions inbetween or if they just send the standard direction signals subsequent.
Maybe you should add the sega saturn and dreamcast controller, but that could be done later as you have written.

Cheers!

- edit: ATM your standard has 6 standard buttons as this is the highest number of buttons on any controller I know. Maybe it would be a good idea to standardize for instance 10 buttons although that their is no such controller but you never know Wink http://i.imgur.com/LVlBgTA.jpg

- edit: For the PS2: all buttons except start/select R3/L3 were preassure sensitive see Dual Shock 2: http://en.wikipedia.org/wiki/DualShock

- edit: For the PS3: same as PS2
Reply
#11
(2014-12-12, 13:55)garbear Wrote: My goal is to strip all the joystick alias stuff from xbmc and place it in an add-on. Either in the binary add-on where I'm moving the platform-specific joystick code, or possibly a resource add-on like montellese's PR:5561.
Keymaps and keyboard layouts are on my list for things that could be "easily" provided as resource addons.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
It looks to me like we need to support a second D-Pad. The N64 controller C keys act as a 2nd D-Pad. Imaging playing Golden Eye with the current mappings using an Xbox 360 controller. I think this means that we need a way to map analog to digital buttons. If you could map the Xbox 360 right analog stick to the second D-Pad then playing Golden Eye would feel natural. The Dreamcast Maple Bus protocol also supports a 2nd D-Pad, though I don't know of any controllers that actually have a second D-Pads.

I would map the Xbox black and white buttons to L and R. Then are analogous to the LB/RB from the 360 controller.

The Xboxdrv project has a bunch of button configuration options Maybe you can use some of it for inspiration. Or even use some of the code Smile http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html.

Where can I read about the new Input API? I was wondering if it supports dynamically adding and removing inputs? Will it support force feedback? Will it be possible to remap key combinations? i.e LT+RT+Start+Back => Guide button (old school xbox reset trick) ?

Glad to see all this work is going on. So excited! Keep up the good work!

If you can check out some remapping examples here: https://github.com/OpenELEC/OpenELEC.tv/...8db48008R4
Reply
#13
Some controllers have rumble/force feedback and a LED features.
I don't know if the libretro cores support this, but maybe this should also be a part of the input API?
Reply
#14
The Xbox 360 controller has two additional buttons/triggers on the top side called LB and RB.

The Google Nexus Player controller is pretty similar to the Xbox 360 controller i.e. two analogue sticks, one D-Pad, A, B, X and Y, two big and two small triggers on the top side (same as LT, RT, LB and RB), a back button, a home button and a big power button.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#15
Don't know enough to know how to ask this, but what are the buttons from OEM controllers "sent as" when using USB adapters? Do you already know if a specific adapter brand is "suggested"? Some time back you mentioned having the USB adapters for OEM controllers, hope that's still the case
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 26

Logout Mark Read Team Forum Stats Members Help
Input3