Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:14 09 May 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 : USB Gamepads - please help

     Page 2 of 3    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 02:37pm 28 Feb 2025
Copy link to clipboard 
Print this post

Saitek P220
The throttle buttons are not used.
button 5 = Select
button 6 = Start


{
    .vid=0x6A3,.pid=0x107,
   .b_R1={3,7},
   .b_START={3,5},
   .b_HOME={255,0},
   .b_SELECT={3,4},
   .b_L1={3,6},
   .b_DOWN={1,192},
   .b_RIGHT={0,192},
   .b_UP={1,64},
   .b_LEFT={0,64},
   .b_R2={3,7},
   .b_X={3,1},
   .b_A={3,3},
   .b_Y={3,0},
   .b_B={3,2},
   .b_L2={255,0},
   .b_TOUCH={255,0}
},

Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 02:47pm 28 Feb 2025
Copy link to clipboard 
Print this post

What version do you want to test with?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 02:48pm 28 Feb 2025
Copy link to clipboard 
Print this post

It doesn't look to me as if this one works.

gioteck VX-2  Model VX2PS3-12

{
    .vid=0x25F0,.pid=0x83C3,
   .b_R1={255,0},
   .b_START={255,0},
   .b_HOME={255,0},
   .b_SELECT={255,0},
   .b_L1={255,0},
   .b_DOWN={255,0},
   .b_RIGHT={255,0},
   .b_UP={255,0},
   .b_LEFT={255,0},
   .b_R2={255,0},
   .b_X={255,0},
   .b_A={255,0},
   .b_Y={255,0},
   .b_B={255,0},
   .b_L2={255,0},
   .b_TOUCH={255,0}
},

Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 02:51pm 28 Feb 2025
Copy link to clipboard 
Print this post

I don't even know if that VX-2 is a working unit. I don't think we have a PS3 to test it on now.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 03:02pm 28 Feb 2025
Copy link to clipboard 
Print this post

Some of the controllers need a command from the host to turn them on after they request connection. The Pico doesn't support that.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 03:25pm 28 Feb 2025
Copy link to clipboard 
Print this post

Thanks anyway. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 08:05am 01 Mar 2025
Copy link to clipboard 
Print this post



{
   .vid=0x11FF,.pid=0x3331,
   .b_R1={6,3},
   .b_START={6,1},
   .b_HOME={6,6},
   .b_SELECT={6,0},
   .b_L1={6,2},
   .b_DOWN={1,192},
   .b_RIGHT={0,192},
   .b_UP={1,64},
   .b_LEFT={0,64},
   .b_R2={6,5},
   .b_X={5,4},
   .b_A={5,6},
   .b_Y={5,5},
   .b_B={5,7},
   .b_L2={6,4},
   .b_TOUCH={6,7}
},



gamepad configure &H11FF,&H3331,6,3,6,1,6,6,6,0,6,2,1,192,0,192,1,64,0,64,6,5,5,4,5,6,5,5,5,7,6,4,6,7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 08:36am 01 Mar 2025
Copy link to clipboard 
Print this post

javavi

If you post the diagnostics when also moving the analogue sticks we can probably get those working as well
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 10:42am 01 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  If you post the diagnostics when also moving the analogue sticks we can probably get those working as well

This gamepad is essentially an analog PC joystick. It has two modes: analog and discrete (in which only extreme values ​​for the directions of the analog sticks are set)
The D-Pad processes the extreme positions of the left analog stick.

+----+----+----+----+----+----+----+----+
| 7F | 7F | 7F | 7F | 7F | 0F | 00 | A0 |
+----+----+----+----+----+----+----+----+
 X1   Y1   Z1   X2   Y2  But1 But2 Stat

X1,Y1 - Left Analog Stick
X2,Y2 - Right Analog Stick

Left - X1=00
Rigt - X1=FF
Up   - Y1=00
Dn   - Y1=FF

But1 - B   A   Y   X . 1   1   1   1  (bits)

But2 - Rt  Lt  R2  L2  R1  L1  6   5  (bits)

Stat - A0 - Discret
      20 - Analog

Edited 2025-03-01 20:50 by javavi
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 11:10am 01 Mar 2025
Copy link to clipboard 
Print this post

I also have two joysticks for the XBox 360 system.

They are not recognized by the test program at all.
I wish they were also supported by the PicoMite system.
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 11:48am 01 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  If you post the diagnostics when also moving the analogue sticks we can probably get those working as well


In terms of the report form, this SVEN X-Pad is similar to the top USB SNES gamepad that the PicoMite system currently accepts. They differ only in the VID/PID code.
I think that there are a great many such gamepads, similar in report only from different manufacturers!
They can also contain a different amount of information in the report from the number of axes and buttons.
And it would be better to recognize them by the USB HID device descriptor.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 11:50am 01 Mar 2025
Copy link to clipboard 
Print this post

  Quote  And it would be better to recognize them by the USB HID device descriptor.


I agree but tell me how
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 436
Posted: 11:57am 01 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  And it would be better to recognize them by the USB HID device descriptor.

I agree but tell me how

I know a project on Pico, where the author worked on this issue both to support various USB gamepads and several types of USB mice and created a library that contains a parser for the USB HID device descriptor.
https://github.com/fruit-bat/pico-hid-host

BTW:
His ZX-Spectrum emulator works great on PicoMiteHDMIUSB hardware with various USB joysticks, mice and keyboards connected to the Hub at the same time.
Edited 2025-03-01 22:11 by javavi
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4249
Posted: 07:52pm 01 Mar 2025
Copy link to clipboard 
Print this post

Hi Peter,

For my "The PiHut" branded gamepad:
{
    .vid=0x79,.pid=0x11,
   .b_R1={6,1},
   .b_START={6,5},
   .b_HOME={255,0},
   .b_SELECT={6,4},
   .b_L1={6,0},
   .b_DOWN={4,192},
   .b_RIGHT={3,192},
   .b_UP={3,192},
   .b_UP={4,64},
   .b_LEFT={3,64},
   .b_R2={255,0},
   .b_X={5,4},
   .b_A={5,5},
   .b_Y={5,7},
   .b_B={5,6},
   .b_L2={255,0},
   .b_TOUCH={255,0}
},

gamepad configure &H79,&H11,6,1,6,5,255,0,6,4,6,0,4,192,3,192,3,192,4,64,3,64,255,0,5,4,5,5,5,7,5,6,255,0,255,0


Unfortunately your basic utility just goes "crazy" with my Buffalo Classic USB Gamepad, I think this is because its idle state is not 100% stable; its D-Pad X and Y-axis "randomly" return 0x7F, 0x80 or 0x81 as it sees fit. I'll finish writing my own utility if I can find the strength.

Best wishes,

Tom
Edited 2025-03-02 05:54 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 08:01pm 01 Mar 2025
Copy link to clipboard 
Print this post

Change

      If bits(inp%,outp%) Then
        Print #1,Str$(i%-1)+","+Str$(Choice(outp%>inp%,192,64));
        Print #2,Str$(i%-1)+","+Str$(Choice(outp%>inp%,192,64));
      EndIf


to
      If bits(inp%,outp%) Then
        Print #1,Str$(i%-1)+","+Str$(Choice(outp%>baseline%,192,64));
        Print #2,Str$(i%-1)+","+Str$(Choice(outp%>baseline%,192,64));
      EndIf

in function changed - might work
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 09:00am 02 Mar 2025
Copy link to clipboard 
Print this post

"THEGAMEPAD" seems to be as common as unicorn poo here, and the indicated price (almost £30) is remarkably expensive for such a basic controller. :(  The price is irrelevant when it's out of stock everywhere though.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4249
Posted: 04:59pm 02 Mar 2025
Copy link to clipboard 
Print this post

Peter,

Do you have to call GAMEPAD MONITOR in order for DEVICE(GAMEPAD channel, RAW) to work ? - I don't think you had to in the first beta that supported the RAW output.

At the moment I can't read the Buffalo controller because as soon as I use GAMEPAD MONITOR the PicoMiteVGAUSB console output is overwhelmed by the gamepad diagnostics caused by the "unstable" (0x7F, 0x80, 0x81) output from the D-pad.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 05:03pm 02 Mar 2025
Copy link to clipboard 
Print this post

You have to call gamepad monitor to get data from a non-supported device. Otherwise we get these spurious gamepads off some keyboards. You probably have enough data from the Buffalo in your original post to do it by hand. From what I remember you just need the codes from select and start
Edited 2025-03-03 03:05 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4249
Posted: 05:12pm 02 Mar 2025
Copy link to clipboard 
Print this post

Probably, but now I've invested significantly in my own tool I'd like to finish the job. Is there any chance of GAMEPAD MONITOR SILENT (or ... NOCONSOLE) which does the monitoring without the console output?

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10062
Posted: 05:19pm 02 Mar 2025
Copy link to clipboard 
Print this post

What version?
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025