I bought a couple of bluetooth gamepads off Amazon:
KIWITATA 2.4G Wireless NES USB Controller
Which are imitation NES classic, 2-button, D-pad, select start controllers.
It gets recognized right away by my latest Linux Mint OS and works in Pico-8
EXCEPT that both buttons do the same thing (I think they are both X).
I ran this code:
function _draw() cls() ?btn() end --both B and A output 32 |
and sure enough I get different values for all the buttons except both B1 and B2 print 32.
I've found this thread https://www.lexaloffle.com/bbs/?tid=3623 where one poster talks about the same problem. But its from 2016 and was for pocketCHIP and they solved it by getting a different controller.
I've also installed the SDL2 gamepad-tool for Linux but had issues. It sort of works EXCEPT that it wont recognize left/right on the dpad. I tried a million times and also tried skipping and mapping it to the little joysticks instead but it didn't work.
my understanding is that I am to copy/paste the resulting mapping line into
.lexaloffle/pico-8/sdl_controllers.txt
but haven't yet because it doesn't do me any good without right and left on the dpad.
I've got to think this is a pretty easy fix in 2024. Any suggestions?
Or at least, which NES classic style wireless controllers DO work?
Not NES classic style (way more buttons), but I have an 8BitDo Lite which does work correctly with PICO-8 on my Manjaro Linux laptop. The A button is X and the B button is circle, and I didn't do anything to map the buttons, that's the out of the box experience.
Thanks for the info. If I have to at least I know what will work. But it seems crazy to me if I cant have a NES classic controller. The platform is based on that setup and I don't play any others. Doesn't anyone here use classic NES pads for Pico-8? Is there something wrong with the ones I bought since they're outputting the same value?
update:
without mapping, everything works except B1 and B2 do the same thing.
with mapping B1 and B2 work but dpad left/right wont register. I cant only map
specific buttons. I have to map them all or none. what to do....
So, if the mapping is giving the wrong values for B1 and B2, my suggestion would be to try adjusting the button values for the mapping. Try changing the x, y, a, and b values. The correct values should have a "b" followed by a number (unless your controller is treating them as axes or hats). They also are allowed to be anywhere from 0 through 31.
thanks @kimiyoribaka, but look at the update from my last comment. Without the mapping tool, the A and B values are both 32 and everything else works fine. With the mapping tool the A and B are mapped correctly but the tool will not recognize my left or right directions. I tried manually putting in left and right values but no dice.
Oh, whoops. Well, in that case, the entries that are wrong are either "leftx" or "dpleft" and "dpright". For the dp ones, if the driver is assuming they should be buttons, then "b" followed by number should work for some number. If the driver is assuming they should be "pov hats", then the value would be "h0." or "h1." followed by a number from 0 through 9. If "leftx" is the thing that's wrong, then it's "a" followed by a number (for axis). If your mapping contains "dpleft" and "dpright", then "dpup" and "dpdown" should have some clue as to how they're being perceived.
Given the information you've provided, my guess is that the SDL2 gamepad-tool is making assumptions about what the driver's way of looking at each input will be that turn out to be incorrect.
Regardless, problems like what you're facing are an unfortunate result of the lack of standardization in the programming community. Basically, until someone with your specific brand of gamepad adds it to one of the online databases for gamepad mappings, out of the box support simply won't be possible.
@kimiyoribaka,
thank you for sharing your knowledge... looks like I'm stuck until I figure out how to add the gamepad to the database...
or...
There must be a NES classic style bluetooth controller that Pico-8ers use already for Linux right? I can't believe I'm the first one to want this. The entire platform is based on that style of gamepad. I'm hoping that someone can just tell me which one to buy. They aren't that expensive and the nostalgia is cool. Else I'll have to settle for the one that @2bitchuck recommended above.
[Please log in to post a comment]