Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:07 12 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : XBox gamepad

Author Message
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 235
Posted: 12:37pm 26 Dec 2024
Copy link to clipboard 
Print this post

Hi Peter

First of all, the code on GitHub is now organized really well - I was able to compile MMBasic successfully out of the box! Thanks!!  


I was testing the XBox gamepad with PicoMite MMBasic USB RP2350A Edition V6.00.01RC10, with the following options:
PicoMite MMBasic USB RP2350A Edition V6.00.01RC10
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED  150000 'KHz
OPTION DISPLAY 64, 80

The gamepad (EasySMX Wireless) was not recognized any longer and therefore I looked into `USBKeyboard.c`. I don't think the issue is in the MMBasic code - therefore I did not trace back when it stopped working through the earlier versions. I think it may be related to a change in TinyUSB (?). In any case, my gamepad got "stuck" in PS3 mode without working correctly as a PS3 controller, and I could not change the mode on the controller.

I checked what is happening when I plug in my controller and it seems to cycle through different modes before "settling" into the correct mode:
> XBox Controller Connected on channel 3 (pid=&H2009, vid=&H57E)
> XBox Controller Disconnected
> XBox Controller Connected on channel 3 (pid=&H48, vid=&H2F24)
> XBox Controller Disconnected
> XBox Controller Connected on channel 3 (pid=&H5500, vid=&H11C0)

Then it works as before.

To make MMBasic deal with this mode change, two lines need to be added to "USBKeyboard.c". In case you consider this change; I made a pull request on GitHub.

Best
Thomas
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025