Log In  

Hey guys and gals,

I bought Pico-8 today and have spent the past hour and a half trying to set up my USB SNES controller. I first downloaded the SDL2 tool, however it wasn't binding the D-Pad correctly. So I figured I could use a JoyToKey program, but the arrow keys weren't working. So I rebound the Pico-8 Bindings to use WASD instead of the arrow keys... Awesome! However, now I have an issue with the Left and Right D-Pad buttons which should represent A and D, which in PassMark Keyboard Test they do but in Pico-8 they they go diagonally. I've created a quick Gif to explain this a little better:

http://i.imgur.com/PdOoYyy.gif

Hoping I could get some advice or suggestion to fixing this? And here's the controller if it helps:
https://www.amazon.co.uk/gp/product/B00DG9KGHO/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1

Thanks!
James

P#26390 2016-08-03 14:58 ( Edited 2017-09-13 17:51)

the d-pad on your controller is in fact declared as two axises in hardware, you have to map it on the left stick in the sdl2 tool. for now pico8 doesn't use the d-pad in the tool anyway, it only reads the left stick.

concerning joy2key/passmark, no idea !

P#26391 2016-08-03 15:14 ( Edited 2016-08-03 19:14)

@ultrabrite I've just tried setting it up as the left thumb, this has resulted in nothing vertically and the same issues with left and right going diagonally :/

Here's my sdl_controllers file:

79001100000000000000504944564944,
USB Gamepad,
a:b2,
b:b1,
x:b3,
y:b0,
back:b8,
start:b9,
leftshoulder:b4,
rightshoulder:b5,
leftx:a0,
lefty:a1,
rightx:a2,
righty:a3,
platform:Windows,
P#26393 2016-08-03 15:46 ( Edited 2016-08-03 19:46)

those defines look fine...

what's that cart you're testing with ? is it your own making ? could it be bugged ? does the same thing happen with other carts ? maybe try this one : padtest.p8.png

could sdl2 & joy2key fight each other ? doubtful, but try disabling one or the other.

P#26394 2016-08-03 16:11 ( Edited 2016-08-03 20:11)

hum where do those come from: rightx:a2, righty:a3 ?
you're not supposed to have a second stick, try removing them ?

P#26395 2016-08-03 16:18 ( Edited 2016-08-03 20:18)

Ok removed the right ones. I now have the A B and Left Right buttons working! We're getting there, still no up or down :(

Here's my current controller file:

79001100000000000000504944564944,
USB Gamepad,
a:b2,
b:b1,
x:b3,
y:b0,
back:b8,
start:b9,
leftshoulder:b4,
rightshoulder:b5,
leftx:a0,
lefty:a1,
platform:Windows,

I've tried changing lefty to a2, a3, a4 and not had any luck. Oh and that pad test cartridge is fantastic, good call!

James

P#26438 2016-08-04 03:22 ( Edited 2016-08-04 07:22)

that's weird, did you try a5+ ?
alternatively try [windows]+[R], enter joy.cpl, properties to see what inputs windows gets. x-axis,y-axis,z-axis, x-rotation,y-rotation,z-rotation should be a0 to a5... good luck ;)

P#26446 2016-08-04 05:49 ( Edited 2016-08-04 10:15)

we really need gamepad config to be a builtin setup

P#26459 2016-08-04 09:18 ( Edited 2016-08-04 13:19)

Ok this is really odd, I can completely delete leftx:a0, lefty:a1 and the left and right buttons still work... Am i missing something here? Confused.com

P#26474 2016-08-04 13:03 ( Edited 2016-08-04 17:03)

What you should be doing:

  1. Connect controller
  2. Generate configuration string using suitable app
  3. Copy string into Pico 8 settings directory file sdl_controllers.txt
  4. Restart pico-8
  5. Test using padtest cart
P#26475 2016-08-04 13:07 ( Edited 2016-08-04 17:07)

That's exactly what i've been doing...

P#26476 2016-08-04 13:19 ( Edited 2016-08-04 17:19)

what do you see in joy.cpl ? is sdl_controllers.txt in the right directory ? what happens if you remove it ?

P#26484 2016-08-04 15:31 ( Edited 2016-08-04 19:31)

Kind of a necro, but I have the exact same issue. Left and right on my pad results in diagonal movement, up and down do not work at all.

Gamepad tool maps everything right sdl wise, but its like pico is ignoring it.
I tested the pad on some emulators and in the joystick configure tool and it works perfect, its definitely an issue Im having only with pico.

P#38706 2017-03-25 02:46 ( Edited 2017-03-25 06:46)

Sorry for another necrobump, but this seems to be quite common trouble. I tried to map my USB nes controller, and now my new SNES one with similar results. The SDL mapping tool isn't working as it should. It only asks for one direction of left stick and skips all the rest. Does anybody have a working sdl_controllers.txt for these type of controllers? Frustrating as hell.

EDIT: an afterthough, how exactly do you map two buttons to one axis of a stick? Wouldn't it be more logical for pico 8 to use d-pad mapping, given those direction buttons are digital?

P#44149 2017-09-13 13:08 ( Edited 2017-09-13 17:47)

This is the entry I use for my RetroLink NES USB controller:

79001100000000000000504944564944,NES Controller,a:b2,b:b1,back:b8,start:b9,leftx:a3,lefty:a4,platform:Windows,
P#44151 2017-09-13 13:51 ( Edited 2017-09-13 17:51)

Yes! Thank you MBoffin. It is the only thing working for me. I was on the same path as jam3sn trying to solve my problem with JoyToKey which never worked...

OS: Windows-10
Gamepad: Generic usb controller (nes style)

P#62410 2019-03-02 12:52

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 00:05:12 | 0.014s | Q:29