Log In  


The process to add even a USB controller in pico-8 on linux has already been fleshed out as a difficult and painful process. I have found that it can be moreso painful to try to add bluetooth controllers given that one must manually pair and connect the device before it's able to be used (this is still something I'm working on given my controller, a Wii U Pro Controller, requires extra packages for it to be used).

So far, the process as far as I have been able to figure out is this:

1. Download any required packages for your device

For me, this meant downloading the xwiimote and xserver-xorg-input-xwiimote packages. (There may be more, but so far those are the ones I believe are needed).

2. Pair and connect the bluetooth device

Within the terminal still, type "bluetoothctl" to get to the terminal-based bluetooth controller. You can type "help" to get a list of bluetooth-specific commands, but the ones you're going to need are "pair" and "connect". First, ensure that your pocketchip's bluetooth is scanning by typing "scan on". Once that is done, if you place your device in pairing mode, it should show up in your terminal as a pairable device with a serial number like "40:8B:2A:3D:1F". Unfortunately, you cannot use the Pocketchip's keyboard to type colons in the terminal for some odd reason, so instead type "pair 40" and then press TAB. That should complete the rest of the serial number for you and allow you to pair it. Once that is done, you may have to put your controller back into pairing mode and then use the same method for pairing but instead use "connect 40<TAB>" to then actually connect the pocketchip to the device.

Once that is done, the device could potentially be ready to use depending on what you have and what program you're planning to use it with (Unfortunately, not the case with Pico-8). If the device's buttons correlate to keyboard key-presses, then you may be able to skip steps 3 and 4.

More information on bluetoothctl can be found here!

3. Check to see whether your device is in this list of SDL devices

If it is not, then you will have to use [an SDL mapping tool like this one (but not this one)](http://www.generalarcade.com/gamepadtool/ ) in order to make one. That's the one that Zep has suggested earlier, but it appears to not work for Linux and the button mappings and serial number associated with the controllers do not correlate with mappings for other operating systems. It has been suggested that the serial numbers can be deduced using the SDL controllers list like a list of examples, but it is still far too much guesswork considering there is no way that I have been able to find to figure out whether Pico-8 accepts your SDL configuration string later on.

4. Add the SDL string to your sdl_controllers.txt file

As per this post, one just take the SDL controller string from step two and place it into a file so that Pico-8 knows how to map the controller's buttons. The controller check happens during startup, so you must completely restart Pico-8 for any changes to take affect.

5. Use keyconfig to map Pico-8 buttons to the controller's buttons

In pico-8, use the command "keyconfig" in console to get a graphical interface to change the pre-set buttons however you like. Once this is done, one should be able to use the controller how they wish.

If you find that when you press buttons using your paired controller and it doesn't do anything, then you're not alone. I have not been able to get keyconfig to register my button presses on my wii controller yet. (If you figure it out, please, for the love of God and all that is holy, let me know).

Like I have said earlier, I have still not been able to use a Wii U Pro controller other than to move the mouse with my left analog stick (even then, no other button correlates to right or left mouse click so I can't even use it as a mouse).

3



[Please log in to post a comment]