USB Joystick

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

USB Joystick

Postby maxtherabbit » Wed Jan 09, 2019 1:19 pm

This appears to be a similar problem as my USB mouse - error stage 214 again

/B Output:
Code: Select all
BAD (INCOMPATIBLE) JOYSTICKS
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

HOST  DVC   INTF  STAGE  ERROR
INDX  ADDR  NUM    NUM   CODE
ÄÄÄÄ  ÄÄÄÄ  ÄÄÄÄ  ÄÄÄÄÄ  ÄÄÄÄÄ
   0     3     0    214  0040h


USBUHCIL R Output:
Code: Select all
USB HID (HUMAN INTERFACE DEVICE) REPORT DESCRIPTOR               
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
05 01          Usage Page:       Generic Desktop
09 05          Usage:            GamePad
A1 01          Collection:       Application

15 00            Logical Min:      00h  0  0
25 01            Logical Max:      01h  1  +1
35 00            Physical Min:     00h  0  0
45 01            Physical Max:     01h  1  +1
75 01            Report Size:      1
95 0E            Report Count:     14
05 09            Usage Page:       Buttons
19 01            Usage Min:        Button #1 (Primary)
29 0E            Usage Max:        Button #14
81 02            INPUT:            Data  Variable  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   No_Null_State  Non_Volatile  Bit_Field

95 02            Report Count:     2
81 01            INPUT:            Constant  Array  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   No_Null_State  Non_Volatile  Bit_Field

05 01            Usage Page:       Generic Desktop
25 07            Logical Max:      07h  7  +7
46 3B 01         Physical Max:     013Bh  315  +315
75 04            Report Size:      4
95 01            Report Count:     1
65 14            Units:            degrees
09 39            Usage:            Hat-Switch
81 42            INPUT:            Data  Variable  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   Null_State  Non_Volatile  Bit_Field

65 00            Units:            00h
95 01            Report Count:     1
81 01            INPUT:            Constant  Array  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   No_Null_State  Non_Volatile  Bit_Field

26 FF 00         Logical Max:      FFh  255  -1
46 FF 00         Physical Max:     FFh  255  -1
09 30            Usage:            X-axis
09 31            Usage:            Y-axis
09 32            Usage:            Z-axis
09 35            Usage:            Rotation around Z-axis
75 08            Report Size:      8
95 04            Report Count:     4
81 02            INPUT:            Data  Variable  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   No_Null_State  Non_Volatile  Bit_Field

75 08            Report Size:      8
95 01            Report Count:     1
81 01            INPUT:            Constant  Array  Absolute
                                   No_Wrap  Linear  Preferred_State
                                   No_Null_State  Non_Volatile  Bit_Field

C0               End Collection


USBUHCIL Descr Output:
Code: Select all
DEVICE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 12h  18
Descr Type:                   01h  Device
USB Release:                0200h  2.00
Device Class:                 00h  Look at Interface
Device SubClass:              00h  None
Device Protocol:              00h  None
Max Packet Size EP0:          40h  64
Vendor ID:                  20D6h  No Matching Record Found               
Product ID:                 A712h  42,770
Device Release:             0103h  1.03
Manufacturer String:          00h  None
Product String:               02h  "MAYFLASH Arcade Fightstick F300"
Serial # String:              00h  None
# of Configs:                 01h  1

    CONFIGURATION DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 09h  9
Descr Type:                   02h  Configuration
Descr Total Length:         0029h  41
# of Interfaces:              01h  1
Configuration Value:          01h  1
Configuration String:         00h  None
Attributes:                   80h  Valid Historical Attribute 80h
                                   Bus Powered
                                   No Remote Wakeup
                                   Not Battery Powered
Current Draw / 2:             FAh  250 (500 mA)

      INTERFACE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 09h  9
Descr Type:                   04h  Interface
Interface Number:             00h  0
Alternate Setting:            00h  0
# of End Points:              02h  2
Interface Class:              03h  HID (Human Interface Device)
Interface SubClass:           00h  None
Interface Protocol:           00h  None
Interface String:             00h  None

  HUMAN INTERFACE DEVICE DESCR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 09h  9
Descr Type:                   21h  HID (Human Interface Device)
HID Class Release:          0111h  1.11
Country Code:                 00h  None/Not Applicable
# of Classes:                 01h  1
Class Descr Type 1:           22h  Report
Class Descr Size 1:         0050h  80

      END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 07h  7
Descr Type:                   05h  EndPoint
End Point Number:             02h  EndPoint = 2  Direction = Out
Attributes:                   03h  Interrupt NonSynchronous Data
Max Packet Size:            0040h  64
Max Poll Interval:            05h  5

      END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length:                 07h  7
Descr Type:                   05h  EndPoint
End Point Number:             81h  EndPoint = 1  Direction = In
Attributes:                   03h  Interrupt NonSynchronous Data
Max Packet Size:            0040h  64
Max Poll Interval:            05h  5
maxtherabbit
 
Posts: 16
Joined: Thu Dec 27, 2018 4:00 pm

Re: USB Joystick

Postby Bret » Wed Jan 09, 2019 5:26 pm

The problem is indeed the same as the mouse -- the Max Packet Size for the End Point is 64 bytes and USBJSTIK only allows 32 bytes (32 bytes of data is more than enough for a joystick). This is actually a really screwed-up design by the manufacturer. Even though the End Point says the joystick may send up to 64 bytes, according to the HID Report Descriptor it will never send more than 8 bytes. There is also an OUT End Point, which means that the computer can send data to the joystick (for example, if the joystick supported force feedback). But, the HID Report Descriptor doesn't say anything about the output data. Basically, it's a really screwed up joystick where the different descriptors don't correspond to each other or to reality. But I should be able to fix USBJSTIK so it works.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: USB Joystick

Postby maxtherabbit » Thu Jan 10, 2019 3:17 am

Can't say I'm surprised. It's a cheap Chinese fight stick. It dose not have force feedback or any other feature that would necessitate host->device writes
maxtherabbit
 
Posts: 16
Joined: Thu Dec 27, 2018 4:00 pm

Re: USB Joystick

Postby Bret » Fri Jan 11, 2019 6:49 am

Here's a new version of USBJSTIK to try. It will hopefully work with your joystick now. USBJSTIK was already setup in a flexible enough fashion that it was a pretty easy change to make, even though it wouldn't have been needed if the joystick manufacturer knew what they were doing. Anyway, give it a try and let me know.
Attachments
USBJS012.ZIP
(62.49 KiB) Downloaded 981 times
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: USB Joystick

Postby maxtherabbit » Fri Jan 11, 2019 3:24 pm

No joy. When booting without EMM386 it just still beeps and gives the exact same error. (214 / 0040h)

When booting with EMM386, after loading the driver, the system crashes when the joystick is connected.
maxtherabbit
 
Posts: 16
Joined: Thu Dec 27, 2018 4:00 pm

Re: USB Joystick

Postby Bret » Sat Jan 12, 2019 1:31 pm

I'll do some more testing and see if I can figure anything out. Glad the mouse is working, though.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: USB Joystick

Postby Bret » Thu Jan 31, 2019 6:18 am

Just letting you know that I haven't had a chance to look at this yet, and not sure when I will get time in the near future. Too much "real life" going on.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: USB Joystick

Postby maxtherabbit » Thu Jan 31, 2019 6:31 am

that's ok, thanks again for your help with the mouse
maxtherabbit
 
Posts: 16
Joined: Thu Dec 27, 2018 4:00 pm


Return to Programs

Who is online

Users browsing this forum: No registered users and 3 guests

cron