Kodi Community Forum

Full Version: Native support for Bliss-Box 4-Play universal gamepad adapter?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Bliss-Box 4-Play is a a new universal gamepad adapter is now nativly supported by RetroArch, any chance for Kodi support too in a similar way in order to support four players on one of these converter boxes?
 
"RetroArch has support for many adapters and the ability to add countless more, however, it does so by mapping per adapter. Similarly, the 4-Play also supports a large number of controllers but outputs them as one device.  Previously, RetroArch could not map each game pad because of this. Fortunately, the 4-Play was designed with this in mind and has a built in API any project could take advantage of without the need of drivers. In this update of RetroArch each pad seen by the 4-Play is read in to RetroArch appending the pad type to the cfg file found during controller detection.

This is just the beginning and there is a road leading to amazing potential with the 4-Play adapter. Using the same API mechanism, we could expect to see but not limited to: native game pad communication with Gamecube and Dreamcast, direct memory card support and LCD screen writing, support for all 12 Playstation 2 pressure buttons, and more. The latest version of the 4-play firmware is required and you must configure your 4-play with the API tool available on the Bliss-Box page for download.

In addition the new firmware from Bliss-Box gives each player a unique USB ID. This allows players to be specific to the physical ports. Each USB name has a number indicating the player order."

 Image  Image


Bliss-Box 4-Play currently supports the following controller ports but more controller ports can be added with new cables and firmware updates:
 
  • Super Nintendo Entertainment System ( snes )
  • Nintendo Entertainment System ( nes )
  • Nintendo Virtual Boy
  • Nintendo 64 ( n64 )
  • Nintendo GameCube ( gc )
  • Nintendo Wii Remote Expansion Port
  • Sony PlayStation/PlayStation 2 ( psx ps2 )
  • DB9 (Sega SG-1000, Sega Master System, Sega Genesis, Atari 2600, Atari 7800, Commodore 64, Commodore Amiga CD32, ColecoVision, Mattel Intellivision, Amstrad GX-4000, Panasonic 3DO, Bally Astrocade, Sinclair ZX Spectrum)
  • Sega Saturn
  • Sega Dreamcast ( dc )
  • DH15 (Atari 5200, SNK Neo Geo AES)
  • Atari Jaguar
  • NEC PC Engine / TurboGrafx 16 (Full/Mini)
  • NEC PC-FX
  • GCE Vectrex
  • Apple Bandai Pippin ATMARK

I have one of these adapters, i would love to have it integrated with kodi and retroplayer.

You might contact ulao and ask for a sample, he wil prob give you one to incorporate in in to kodi and retroplayer. He gave one to retroarch. Heres his email. [email protected]
I tried to reach out to the team but it would seem there is no method for contact other then the forms.


  Hello Kodi team! My name is Sean I'm the owner and CEO of the Bliss-Box adapter (link intentionally left out as I'm not here to promote anything) . After working directly with the Retroarch team and learning about RetroPlayer it has only became obvious that this would be a great fit. I know that the Bliss-Box 4-play already works with Kodi 17 and only assume it does with 18. Though, there is a lot more to offer with the native HIDAPI functionality. In the case of Retroarch and the way it uses the mapping, it was imperative. Using simple USB control transfers Kodi can get all kinds of info and many amazing features. To mention a few; what controller is or has been plugged in, getting pressure data from the psx controller, sending data to memory units, auto mapping of all buttons,  and controlling rumble.

If the development team is interested contact me or Retroarchcdevs.
Also @garbear Happy to send you one fi you want one to work with.
Hi Sean,

I created an API for peripherals like the Bliss-Box. The API supports everything in that list except memory units, which I would be happy to add. If you create an add-on for the Bliss-Box 4-play, we can ship anything that's GPLv2 compatible.

If you say that a lot of stuff already works in Kodi, then it might be possible to extend our joystick support add-on instead of creating a new one. Do you have any more information on the protocols and APIs that the Bliss-Box uses?
Some of this is confusing to me, so I can not answer until I have a better understating.  First I call a peripherals a device that a controller uses. So like a memory card...
 
Quote:I created an API for peripherals like the Bliss-Box.
I'm not sure what that means but the Bliss-Box is a HID and needs no API, just normal USB communication.


 
Quote:The API supports everything in that list except memory units, which I would be happy to add.
What list are you referring to? I'm was talking about how to communicate to a memory unit like on a dream cast. You can use my adapter to do this via the HIDAPI with Libusb. My API is done via normal USB data transfers.


 
Quote:If you say that a lot of stuff already works in Kodi, then it might be possible to extend our joystick support add-on instead of creating a new one.
What I meant was that you can add normal HIDAPI calls with LibUSB (GPL) and I believe you are already using this. I really don't see how you can talk to a USB controller without it.


 
Quote:Do you have any more information on the protocols and APIs that the Bliss-Box uses?
api.Bliss-Box.net


Based on the questions above, I'm guessing you need the following information, I apologize if I'm wrong.
The Bliss-Box 4-Play is an adapter that allows you to play and use console controllers. All the signals are done in the box and aligned with a USB device that the Host see's. So to android it is just a USB controller and Kodi sees it as such. You can get the state of all the buttons and analogs like you would any controller. The API is a special layer on top of all this. With the API you can tell the Bliss-Box 4-play to get you info (like I mentioned in my OP) sent back to the USB control transfer. As for help coding this, you can see my example program here https://sourceforge.net/projects/bliss-box-api/  (windows only) or contact me. If you work directly with anyone from retro Arch, I'm sure they can also help. I work tightly with the Retro arch team, they are a great bunch or people. They are the first to take advantage of this API and has done a great job with it.
Kodi supports binary add-ons, which are small c++ wrappers around external libraries and APIs. The API for adding controllers and peripherals to Kodi is here: Peripheral.h. We have add-ons (in various working states) for the X-Arcade Tankstick and Steam Controller.
(2018-01-16, 21:21)ulao Wrote: [ -> ]You can use my adapter to do this via the HIDAPI with Libusb. My API is done via normal USB data transfers.

That's what I was looking for. We'll need an add-on similar to your C# example that translates the USB calls from api.bliss-box.net to the Peripheral API that I linked above.

The Tankstick add-on above is a perfect example, it packages libusb and contains the logic for communicating with the tankstick. Creating an add-on for the Bliss-Box should be a straightforward task. Do you have anyone to make this? I'm busy getting RetroPlayer ready for our release, but after it ships I can write a Bliss-Box add-on.
I do not but it would help if you had the device. I can get you a demo unit for testing. Just give me a PM.
FYI; I had actually already created a feature request thread for Bliss-Box 4-play here:

https://forum.kodi.tv/showthread.php?tid=326607
(2018-01-16, 17:27)ulao Wrote: [ -> ]there is a lot more to offer with the native HIDAPI functionality. In the case of Retroarch and the way it uses the mapping, it was imperative. Using simple USB control transfers Kodi can get all kinds of info and many amazing features. To mention a few; what controller is or has been plugged in, getting pressure data from the psx controller, sending data to memory units, auto mapping of all buttons,  and controlling rumble.
I copied the relative part from the summerized RetroArch/Libretro blog on why Kodi too needs to suppot its native HIDAPI functionality:

"RetroArch has support for many adapters and the ability to add countless more, however, it does so by mapping per adapter. Similarly, the 4-Play also supports a large number of controllers but outputs them as one device.  Previously, RetroArch could not map each game pad because of this. Fortunately, the 4-Play was designed with this in mind and has a built in API any project could take advantage of without the need of drivers. In this update of RetroArch each pad seen by the 4-Play is read in to RetroArch appending the pad type to the cfg file found during controller detection. This is just the beginning and there is a road leading to amazing potential with the 4-Play adapter. Using the same API mechanism, we could expect to see but not limited to: native game pad communication with Gamecube and Dreamcast, direct memory card support and LCD screen writing, support for all 12 Playstation 2 pressure buttons, and more. The latest version of the 4-play firmware is required and you must configure your 4-play with the API tool available on the Bliss-Box page for download.In addition the new firmware from Bliss-Box gives each player a unique USB ID. This allows players to be specific to the physical ports. Each USB name has a number indicating the player order."

My guess is that you will need to create a new binary addon, similar to the Tankstick add-on:

https://github.com/kodi-game/peripheral.xarcade
@ulao slightly off-topic but I think that you might find the discussion in gearbear's "Player Manager" thread very interested in regards to Bliss-box 4-play usage:

https://forum.kodi.tv/showthread.php?tid=295463

Among other thing it discuss handling different types of game-controllers via hubs, multi-tap adapters & port-expanders such as for example the Bliss-box 4-play.
threads merged
Wow, so confusing...  Spent a few trying to find where the post went... PM systems is completely busted too. Anyways...


@RockerC yeah I did already see that post, nihilisticEevee  seems to be on top of Bliss-Box's progress. He is right, it would help. I also noticed your thread but for some reason it looked old when I made mine. So I made a new one and later saw it was just below mine. Another thing is the Bliss-Box in atari mode works as a GPIO. Instead of sending to a V-pad or keyboard it goes to the Bliss-Box and Bliss-Box buttons are fully mappable. One more thing to add the  Bliss-Box now (2.0) uses port numbering. So VID 0d16 has a PID of 0d04, 0d05, 0d06, and 0d07 to signify player 1,2,3,4. The main reason is that USB will assign players to a random order. So it confused the heck out of the users when they need to figure out what physical port (1-4) matches what player Id. So in the API tool the user can set each physical port to a player via EEprom.  This way it remember it's Id. So if the Bliss-Box is added to a add-on it would key to remember to find the 0d04 and assign the next consecutive players  to 0d05 - 7.
(2018-01-17, 15:12)ulao Wrote: [ -> ]One more thing to add the  Bliss-Box now (2.0) uses port numbering. So VID 0d16 has a PID of 0d04, 0d05, 0d06, and 0d07 to signify player 1,2,3,4. The main reason is that USB will assign players to a random order. So it confused the heck out of the users when they need to figure out what physical port (1-4) matches what player Id. So in the API tool the user can set each physical port to a player via EEprom.  This way it remember it's Id. So if the Bliss-Box is added to a add-on it would key to remember to find the 0d04 and assign the next consecutive players  to 0d05 - 7.
I think this is why you might find the discussion in @garbear 's "Player Manager" thread very interested in regards to Bliss-box 4-play usage:

295463 (thread)

It also discuss handling different types of game-controllers via hubs, multi-tap adapters & port-expanders such as for ex. the Bliss-box 4-play.
(2018-01-17, 15:12)ulao Wrote: [ -> ]PM systems is completely busted too.
 Shortly after you reach 10 posts, you will be able to PM.
Thx, i was wondering that...
@ulao did you get the opertunity to ship one or more Bliss-Box 4-Play @garbear and/or other Team-Kodi members?

...see that you are close to 10 posts now so should be able to send PM to them soon if they have not sent PM to you.
Pages: 1 2