2018-01-02, 12:03
Can I suggest that the the Kodi Game project includes a "peripheral.GPIO-to-virtual-gamepad" add-on for for generic input support for direct-attached DIY arcade-controllers as virtual gamepads via GPIO-pins on a Raspberry Pi?
Having such an 'GPIO-to-virtual-gamepad' (in reality 'GPIO-to-virtual-keyboard') input-driver and a default mapping as an peripheral-addon in Kodi would enable any end-user to directly attach arcade-style 4-way or 8-way joysticks and buttons directly to the GPIO-pins (general-purpose input/output pins) on a Raspberry Pi without having to have programming-skills or having to add the cost and complexity of having to add a third-party GPIO HAT/Bonnet/Shield, custom controller-PCB, or USB-adapters.
This direct-attach wires (a.k.a. "wire harness") to GPIO-pins makes for a very clean design and a unified method to attach commonly available DIY arcade joysticks and buttons to all single-board computers that feature the same GPIO-header as the Raspberry Pi series. These pictures below are a couple Adafruit examples (originally published on 2013-06-03 so the details on recommended GPIO-pin layout might have changed since then):
That is, this would enable users to create a virtual-gamepad with the GPIO-pins (or even two virtual-gamepads with the GPIO-pins), as in reality you actually haved wired the micro switch (miniature snap-action switch) on the back of each DIY arcade-style joystick and button direct to an individual GPIO pin on your Raspberry Pi and the GPIO-to-virtual-keyboard peripheral addon for Kodi Game project would help you create the mappings that you need.
These classic arcade-style joysticks (a.k.a. "stick" or "rocker") and 30/24-mm buttons of SANWA/Seimitsu-type can also be bought really cheap in DIY-kits or as single arcade sticks and individual buttons from China (just do a search for "sanwa AND arcade" or "seimitsu AND arcade" on some Chinese shopping sites). But I would be willing to bet that Adafruit would sponsor any interested developers from Team-Kodi with thier matching kits of joysticks and buttons if they asked.
Anyway, for a basic addon could you maybe base it on Adafruit-Retrogame, GPIOnext, GPioneer, or similar simple Python-based GPIO-to-virtual-keyboard utility code designed for these types of arcade-style GPIO controllers?
However, I read though that for a little more serious installations many people instead recommend either the "mk_joystick_rpi" or "WiringPI" C/C++-based code from projects (which the Recalbox and RetroPie distros uses) because with those you can get you two (2) 8-way joysticks and up to eighteen (18) buttons only using GPIO pins on a single Raspberry Pi, (which allows for 2-players and is more than enough to have the equivalent of two SNES gamepads using arcade controls).
Having such an 'GPIO-to-virtual-gamepad' (in reality 'GPIO-to-virtual-keyboard') input-driver and a default mapping as an peripheral-addon in Kodi would enable any end-user to directly attach arcade-style 4-way or 8-way joysticks and buttons directly to the GPIO-pins (general-purpose input/output pins) on a Raspberry Pi without having to have programming-skills or having to add the cost and complexity of having to add a third-party GPIO HAT/Bonnet/Shield, custom controller-PCB, or USB-adapters.
This direct-attach wires (a.k.a. "wire harness") to GPIO-pins makes for a very clean design and a unified method to attach commonly available DIY arcade joysticks and buttons to all single-board computers that feature the same GPIO-header as the Raspberry Pi series. These pictures below are a couple Adafruit examples (originally published on 2013-06-03 so the details on recommended GPIO-pin layout might have changed since then):
- https://learn.adafruit.com/retro-gaming-...s-hardware
- https://learn.adafruit.com/retro-gaming-...k-assembly
That is, this would enable users to create a virtual-gamepad with the GPIO-pins (or even two virtual-gamepads with the GPIO-pins), as in reality you actually haved wired the micro switch (miniature snap-action switch) on the back of each DIY arcade-style joystick and button direct to an individual GPIO pin on your Raspberry Pi and the GPIO-to-virtual-keyboard peripheral addon for Kodi Game project would help you create the mappings that you need.
These classic arcade-style joysticks (a.k.a. "stick" or "rocker") and 30/24-mm buttons of SANWA/Seimitsu-type can also be bought really cheap in DIY-kits or as single arcade sticks and individual buttons from China (just do a search for "sanwa AND arcade" or "seimitsu AND arcade" on some Chinese shopping sites). But I would be willing to bet that Adafruit would sponsor any interested developers from Team-Kodi with thier matching kits of joysticks and buttons if they asked.
- https://www.adafruit.com/product/3272
- https://www.adafruit.com/product/480
- https://www.adafruit.com/product/471
Anyway, for a basic addon could you maybe base it on Adafruit-Retrogame, GPIOnext, GPioneer, or similar simple Python-based GPIO-to-virtual-keyboard utility code designed for these types of arcade-style GPIO controllers?
- https://github.com/adafruit/Adafruit-Retrogame
- https://github.com/mholgatem/GPIOnext
- https://github.com/mholgatem/gpioneer
However, I read though that for a little more serious installations many people instead recommend either the "mk_joystick_rpi" or "WiringPI" C/C++-based code from projects (which the Recalbox and RetroPie distros uses) because with those you can get you two (2) 8-way joysticks and up to eighteen (18) buttons only using GPIO pins on a single Raspberry Pi, (which allows for 2-players and is more than enough to have the equivalent of two SNES gamepads using arcade controls).