USB2LLAPI

The USB2LLAPI allows usb controllers to work anywhere. This adapter is designed to only work with Gamepad or Joystick USB devices. IT attempts to take in the inputs and packs them in to our LLAPI signal making it universal amongst other devices. 

USB: A standard most everyone is familiar with by now, supports many human interface devices. This allowed OS's to use a common device that didn't require installing a driver. This adapter will read that device and attempt to use it. 

LLAPI: This is an internal single used to communicate amongst device in the Bliss-Box ECO system. This signal is open, free to use, so you can read the output and integrate it in to your own device. More info here: https://bliss-box.com/pages/integration

How US2LLAPI works:

Startup

 

  • The first step is to init the SDcard and read in flags and data. Mainly used for custom config and options the user may want.
  • Then the device will make an attempt to read the device. This involves installing a HID driver and sending control transfers to establish the type of device it connected to. If the device enumerates, it moves on.
  • Next the device will set up in and out pipes that are used for communication. If not pipes are available the default pipe will be used. These pipes are commonly used for buttons and rumble but can offer other features. 
  • Next the device reads and attempts to parse the Descriptor Table. This essentially tells the device what to expect and how to read the bytes and bits of the pipe. 
  • Lastly the device will start polling reading and sending LLAPI data out.

Processing

When the device is running it will run two cores. ! core is dedicated to USB and updates the payload of buttons, or sends our requests. The second cores will handle the environment, logging, and mapping. You can configure the SD card to log to a file. This is off by default but handy if things do not work.  As well as logging the SD card has a mapper file. These files provide a system, to remap the outputs in way you prefer. the SD card does not need to be large or fast. Logging may interfere with performance. It is not suggested to log at the Error level constantly. This should be used when you are looking for reasons for a failure. 

Use

This device is a plug and play, meaning you can plug in the USB device and remove it at anytime. It is not wise to remove the SD card during use. You also must plug the output in to something to get power. A USB Uart bridge driver can be used if you wish not to couple with a Bridge. But to get the full use out of this device, consider connecting it to a Bliss-Box Bridge. Plugging in a USB controller at anytime is supported. You may also remove the device from the output source at any time. 

 

Mapping/Config

Do to the nature of USB, there is no way possible for this device to act like a real HID host. If you plan to use this device with a USB controller not yet configured it will assume its a default HID. 

Here are two configs. 

Version: 

There maybe more mapping versions, like a raw mapper that read from the out pipe. V1.1 is the default mapper.  There are codes in the mapper.ini file for how this work. It is best to visualize the game pad screen.


So for example, under buttons you see 1:0. Meaning the first button will go to row1,0. We use 0 as the first in this case as it applies to how the system works. If you wanted the first button to go to the next over it would be 1:1.  There are other codes to do more advanced mappings. Analogs are similar and the POVs have many special options. 

You can map this anyway you like but remember, if you map it the way it was intended then things will match up. the Bliss-Box adapters will know what each number and analog is for. Its best to leave that how it is. This is a visual to help with new mappings. 

If you choose not to follow this parading, you will end up frustrated in the end. For example the Bridge will look at the select and start buttons when connected to a NES, f you do not map that up right, it will be confusing. The Bridge will look at Slider and dial to know if you connected an Atari paddle, if you map something else to that, it will not work at all. Also remember there are other ways to map buttons. 

 

USB D

The mapper.ini file will be full of ID's. If your ID is in there nothing should be needed unless you want to customize it.  If its not, a default mapping will be created. 




Output modes.

There are 3 output modes, LLAPI, UartUSB-Bridge, and Bootloader. 

LLAPI: This mode is designed to be connected to a LLAPI capable device likes the MiSTer or the Bridge. The polrate is selected by the host ( device you plug it in to) and will handle up to 1000 Hz. Note that this will be bottle-necked by your inputs device. This mode is auto detected and will send immediately on insert. 

UartUSB-Bridge: This device does not have a USB out, but it does have a USB Bridge. That means you will see a common port on your PC, The protocol sent is IBus. You may use your own application and read this signal A USB Bridge does not use a com baud or bits, just a port. Find the port your  PC assign and read from it. 

You may use vJoy and vJoySerialFeeder. They should have both linux and PC versions. The user profile  for vJoySerialFeeder 1.7.1 can be found here. The location may change but it was under

C:\Users\ --your  user name --\AppData\Local\vJoySerialFeeder\vJoySerialFeeder.exe--some code--\1.7.1.0

This should be dropped in here and then you can load the usb2llapi profile.  IT will look similar to:

 

Once you hit connect it will feed vjoy. Remember, windows may need zadig for the bridge, windows likes to force its own drivers. Here is the setup used 


 

SD card files

 

Mapper.ini:

This file will be versions in GIT, If you wish to use a blank file use this one. The official GIT file will be the only one supported. I plan to make a proper submitting for commits. TBD as submission needs to work and follow the Bliss-Box paradigm.  Most all controller will have a mapping you can use. The ini is based on USBID. If the controller you are using, is spoofing an ID your forced to use that layout unless you change it. Chances are there is an ID in the file already matching what you are looking for. 

Logfile:

There are 4 levels of logging. 

3 Errors Warns Info

2 Errors and Warns

1 Errors

0 No logging ( default )

 

 

 

FAQ

Our customer support is available Monday to Friday: 8am-8:30pm.Average answer time: 24h