![]() |
Forum Index : Microcontroller and PC projects : USB Gamepads - please help
![]() ![]() |
|||||
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4200 |
PicoMiteVGAUSB RP2040. You might consider whether silent should actually be the default and have an extra argument to enable the console diagnostics. YMMV Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9800 |
Try this (untested) GAMEPAD MONITOR SILENT Don't want to change the default as this issue seems to be totally specific to the Bufallo PicoMite (2).zip Edited 2025-03-03 03:32 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4200 |
Hi Peter, Thanks, the change to GAMEPAD MONITOR worked. For my "The PiHut" branded gamepad ... though it looks like you already added it based on my earlier post: Gamepad Configure &h0079,&h0011,6,1,6,5,255,0,6,4,6,0,4,192,3,192,4,64,3,64,255,0,5,4,5,5,5,7,5,6,255,0,255,0 { .vid=0x0079, .pid=0x0011, .b_R={0x06,0x01}, .b_START={0x06,0x05}, .b_HOME={0xFF,0x00} .b_SELECT={0x06,0x04}, .b_L={0x06,0x00}, .b_DOWN={0x04,0xC0}, .b_RIGHT={0x03,0xC0} .b_UP={0x04,0x40}, .b_LEFT={0x03,0x40}, .b_R2={0xFF,0x00}, .b_X={0x05,0x04} .b_A={0x05,0x05}, .b_Y={0x05,0x07}, .b_B={0x05,0x06}, .b_L2={0xFF,0x00} .b_TOUCH={0xFF,0x00} } For my "Buffalo Classic USB Gamepad" - mapping Turbo & Clear to L2 & R2 respectively: Gamepad Configure &h0583,&h2060,2,5,2,7,255,0,2,6,2,4,1,192,0,192,1,64,0,64,3,5,2,2,2,0,2,3,2,1,3,4,255,0 { .vid=0x0583, .pid=0x2060, .b_R={0x02,0x05}, .b_START={0x02,0x07}, .b_HOME={0xFF,0x00} .b_SELECT={0x02,0x06}, .b_L={0x02,0x04}, .b_DOWN={0x01,0xC0}, .b_RIGHT={0x00,0xC0} .b_UP={0x01,0x40}, .b_LEFT={0x00,0x40}, .b_R2={0x03,0x05}, .b_X={0x02,0x02} .b_A={0x02,0x00}, .b_Y={0x02,0x03}, .b_B={0x02,0x01}, .b_L2={0x03,0x04} .b_TOUCH={0xFF,0x00} } Thank you for your patience, Tom Edited 2025-03-03 20:32 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4200 |
Hello Peter, I've tested b17 and can confirm that both these gamepads now work as expected, Thank You! However if I power-cycle the machine with both gamepads attached I get this (apparently harmless) error: ![]() Just to get them off my chest here are a couple of comments about gamepad support for you to take note of or not: Since the SDL team haven't succeeded it's unlikely you will even be able to support every possible gamepad (even excluding those that just don't work at all due to the limitation of Pico/USB) so is it possible to provide better support for users to add their own ? As I understand it the GAMEPAD CONFIGURE command has to be run before attaching a gamepad, is there no mechanism (configuration file, OPTIONs, doing a little dance) that would allow user configuration whilst the gamepad is attached ? At a simplest level I'm thinking that for their unsupported gamepads a user could keep their gamepads attached and have an "A:/config-gamepad.bas" that they manually after each boot if they want to use their gamepads. YMMV, Tom Edited 2025-03-10 23:00 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9800 |
That's probably because your keyboard has a spurious second connection. Many of then do but I know not what for. It would have to be done with an option which would mean adding an extra 256 byte page to the option area. Unless anyone reports anything that doesn't work (simple gamepads only) I wouldn't intend to pursue this further. It isn't really that hard to remember to plug in the gamepad after running the configure command. We do now have branded gamepads supported so the obvious advice is buy one of those and it will work. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4200 |
Right, it did report itself as such in earlier betas but it hasn't in recent ones so I thought it was something you'd "fixed", I guess instead it's just something where the behaviour has changed since you've added the enhanced gamepad support. ChatGPT suggests "Keyboards with dedicated media controls, customizable keys, or additional function keys might present themselves as a separate USB device. This is because these functions can require different protocols or drivers to operate independently of the standard keyboard input." And the keyboard in question whilst otherwise very low-rent does have multimedia icons printed on some of the keys. Perhaps it is that ? ACK. Can I ask if it is a technical reason or a philosophical reason that you won't read configuration from a fixed file on A:/ during boot ? ACK. I don't intend to pursue this further with you. Thanks again, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7339 |
One of the reasons for keyboards appearing as more than one USB device is to get n=key rollover at low latency rates. A single USB channel used to be too slow. That's why gamers kept hold of PS2 keyboards (and may still do so for all I know). It caused me a headache when a gaming keyboard wouldn't work on a linux box but would under Windows. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() |
![]() |