Freeplaytech Forum

Full Version: Buttons not working on pico-8 v0.1.12c
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I run pico-8 v0.1.12c on my Freeplay CM3, the buttons and dpad are not working. I got this error message : 

the path /dev/dri cannot be opened or is not available

Maybe someone could help?
I haven't tried it myself, but others have asked about it. If you do figure it out, please post here and let others know how to set it up on the Freeplay CM3.

I don't know where that error code comes from. It "seems" like it is looking for the joystick device, but that "/dev/dri" is incomplete. I guess that some config file for Pico-8 has /dev/dri listed in it.

On the Freeplay CM3, if the joystick is working in the main Emulationstation menu, that means it's set up as /dev/input/js0 and that's what other programs should read as the default first joystick. I don't know enough about what Pico-8 does, but I would assume that it would read this joystick.

Here are some links that may prove helpful (for anyone that shows up here):
Can it be possible that video output driver (renderer) is not set right, when googling "/dev/dri", most of the first result are related to video card.
So, /dev/dri is a video related error and (as far as I can gather) is related to video cards and performance. The binary runs fine so there's no reason to fret about that error message.

Unfortunately, I can't download an older copy of Pico8 to test with, but the most recent version I got from my Humble Bundle page (where I purchased it long ago) has no way for us to get working with our units.

The software only reads input from the keyboard or from an SDL enabled controller, while our GPIO controller is neither. I tried using Joy2Key (both the python version bundled with RetroPie and the binary version in the repos), but neither will work with Pico8 due to the fact that Pico8 doesn't read the keyboard input from the terminal it is started from, and we can't target an X server window since we aren't even running an X server in the first place.

Until lexaloffle supports keyboard-terminal input or integrates the Linux /dev/input/js* joystick method, Pico8 is not able to be used with Freeplay units, unless you can feasibly just downgrade to an older version that worked fine.
I heard that Mootikins may have found a solution. Stay tuned!
As Flav said, we got controls working by using the controllermap utility included with SDL2. HERE is a good guide on getting an initial version of the controllermap working, but you will need to plug in an external keyboard so you can skip the buttons you don't want to bind. Bind all the keys, and put the output config line into the controller file at ~/.lexaloffle/pico-8/sdl_controllers.txt. If you already have the system in emulationstation then you should only need to open Pico8 and rebind the keys as you want!

Our config looks like:

15000000010000000400000000010000,GPIO Controller 1,platform:Linux,a:b3,b:b0,x:b1,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,

Yours may vary if you are using an older version of the joystick driver or the old tact switch button layout.
Some more tinkering and I also fixed the /dev/dri issue; use the pico8_dyn binary instead of the standard one, you will see no error and some games that would not run correctly with the normal binary will now run flawlessly.