Author Topic: DOS VDM - USB and Game port Gamepad support  (Read 158781 times)

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #360 on: November 07, 2022, 03:01:41 pm »
Hi Mark,

thank you very much for your kind words and deep explanations!  I really do appreciate the work you and your fellows are doing in this thread, great!

I made a presantation at our (sadly) Last User Meeting in Cologne yesterday with Dosbox and ScummVm as topics. I remember the painfull memory management and config.sys trials and errors to get in 1995 enough free memory on MS DOS 6.22 (needed almost 580/590k of free memory if i remember correctly), for my first (and still for me one of alltime best) DOS Game named BIOFORGE from Origin. So my 486 PC at that time had Dualboot with OS/2 Warp 3 and MS DOS 6.22.

After several Years Paul Smedley thankfully ported ScummVM to OS/2, wich makes - with a lot of other DOS Games and even Hopkins FBI, - Broken Sword 1+2 playable on OS/2, without any restrictions!

All the best and good luck!!

Sigurd

Yes I heard about Cologne closing up on the Java Applications thread about a week ago.

I was particularly interested in that, as I followed Joops efforts for a number of years - I run about 20 Java applications including games, and that was all due to his efforts - from his work I learned how to run Java apps through CMD files, and still have those templates.

I'm sorry to see that he shutdown the website, as I don't think he ever received the recognition he deserves for his work there - for many years I have been more a lurker than a contributor and tester, out of necessity, running my own consulting firm and doing emergency planning and training and response around the world.

Now in semi-retirement I've been spending a lot of time testing both this project, as well as Paul's UniAud32 efforts, and going down my "To Do" list of things I wanted to get working in the past, being a hardware geek and building my own towers.

I go back to having the third IBM PC in Winnipeg, Manitoba Canada in the early 80's - the machine had NO hard drives, an 8086 processor (no 8087 co-processor) and if I recall right 16 M of memory, had an advanced video card (Hercules monochrome), and no sound card (got a Soundblaster original when I could afford it) - it ran DOS 5.0 off a floppy, and had two full height 360 K 6 inch floppy drives. But I could still run my first Word Processor (Volkswriter) on that configuration.

Started with OS/2 2.0 on a 386 box over 30 years ago, and have run my business on the various OS incarnations since, using Virtual PC and VirtualBox mostly, to run Windows as needed.

I hang around here mostly because I admire the work done by some very dedicated and talented people - and because I've made a lot of friends here  8)

Despite Cologne, hope I still see you hanging around here Sigurd - and I'm always interested in what people have to say, if you want to contribute to any conversation.

Best of the week to you Sir!

M

« Last Edit: November 08, 2022, 04:19:40 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #361 on: November 07, 2022, 04:46:36 pm »
Heh David!


 Hope this is useful. What would be the next step?

Regards,

Could you also post your Equipment ID for the gamepad (the one generated and which you added to Wims USBECD,SYS /D: and /N: statements.

Also that seems to be a lot of buttons - do any of the buttons overlap in function?

M
« Last Edit: November 07, 2022, 05:56:38 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #362 on: November 07, 2022, 06:50:00 pm »
Heh Dave!

Manual says for modern games, to use XInput mode with DirectInput being an older input standard and better for older games.

Ran across this in my research today:

https://learn.microsoft.com/en-us/windows/win32/xinput/xinput-game-controller-apis-portal

and of course that stellar answerer of questions, Wikipedia:

https://en.wikipedia.org/wiki/DirectInput

XInput is a Windows API for "next generation" controllers, and was introduced in December 2005 alongside the launch of the Xbox 360. This specification provided support for Xbox 360 controllers in Windows XP SP1 and subsequent operating systems, and is described by Microsoft as being easier to program for and requiring less setup than DirectInput. XInput is compatible with DirectX version 9 and later.

DirectInput is a legacy Microsoft API for collecting input from a computer user, via input devices such as the mouse, keyboard, or a gamepad. It also provides a system for action mapping, which allows the user to assign specific actions within a game to the buttons and axes of the input devices.

Advantages of DirectInput over XInput:

- XInput supports only controllers that work with the Microsoft Xbox console
- XInput supports a maximum of four controllers at a time. DirectInput has no such limit
- XInput does not support keyboards, mice, or mouse-type devices. While this mirrors Microsoft's recommendation not to use DirectInput with these devices, programmers can use DirectInput with these devices.
- XInput supports maximum of 4 axes, 10 buttons, 2 triggers and 8-direction digital pad per controller, compared to DirectInput's support for 8 axes, 128 buttons, and full-range POV. (The number of axes, buttons and triggers XInput supports corresponds directly to the Xbox 360 controller.)

Advantages of XInput over DirectInput:

- Currently supported by Microsoft

Sounded like the Wikipedia article writer was just a little biased towards DirectInput (sic)  ;D

If your gamepad is stuck in DirectInput mode, obviously some kid loved his legacy games, Windows or otherwise, or gave up that controller long ago - however as that's what we're trying to address here, its probably the mode you and David would like to test in if we can ever get this going and Best!

M

Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #363 on: November 07, 2022, 10:55:27 pm »
Hi Mark,

  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

 seems to work fine in XInput mode, not so in DirectInput mode. As far as overlapping functions, I really don't know since I've only had this thing for a month or 2 and got it just for this purpose. Haven't tried it yet on Windows even. Got any advice on what I could test on Windows to determine overlapping functions?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4807
  • Karma: +100/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #364 on: November 08, 2022, 02:07:56 am »
Hi Mark,

  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

Is that # a typo for 6?

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #365 on: November 08, 2022, 04:09:53 am »
Heh Dave!

Hi Mark,

  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

Is that # a typo for 6?

Wim's USBECD.SYS does allow global characters to be used in the descriptors - I suspect that if C21# was changed to C216, like your F310, it would make no difference.

With the Logilink connection on my older Thrustmaster Flight Pro, the second grouping for me is actually 203#, as switching between modes 1-4 could be ID's 2030 2031 2032 or 2033.

I was interested, knowing your equipment ID, as to whether Davids was the same - and its not.

Your Device Release Code is 0300 his is 4014 - I suspect a much newer version.

I ran into this when I was having a discussion with Ivan related to the Corsair K95 keyboard - mine had 6 customizable keys to the left and was bought new 2 years ago - his has 18 and is a legacy board - but the model number is the same.

Looking at the oinput data, I suspect signals may be totally different between the two JoyPads - but that is something for another day.

M

Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #366 on: November 09, 2022, 11:57:07 am »

Is that # a typo for 6?
Dave,

  No, it is a place holder. In XInput mode it is a 'd' and in DirectInput mode it is a '6'. The place holder allows for me to switch modes without changing the line in CONFIG.SYS.

Regards,

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: DOS VDM - USB and Game port Gamepad support
« Reply #367 on: November 09, 2022, 05:18:45 pm »
Hi David,

..
  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

 seems to work fine in XInput mode, not so in DirectInput mode.
..

I think that is because bcdDevice 4014 applies to XInput mode whereas bcdDevice 0414 applies to DirectInput mode.

Regards,
Wim

P.S. I am already lurking for quite a while now and gradually beginning to like to react again.

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #368 on: November 09, 2022, 07:07:22 pm »
Heh Wim!

Hi David,

..
  Here is the line I use in CONFIG.SYS:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:4014 /N:$GAMEPD$ /S

 seems to work fine in XInput mode, not so in DirectInput mode.
..

I think that is because bcdDevice 4014 applies to XInput mode whereas bcdDevice 0414 applies to DirectInput mode.

Regards,
Wim

P.S. I am already lurking for quite a while now and gradually beginning to like to react again.

I was curious as to what you thought about XInput mode vs DirectInput mode for these GamePads - should both work with your drivers?

M

Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #369 on: November 09, 2022, 10:06:57 pm »
Hi Wim,

  Great to see you posting here again! - hope you got thru your health issue alright.

 Of course you are correct - it was the bcdDevice value that prevented DirectInput mode from working. Now my CONFIG.SYS has this:

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:046D:C21#:##14 /N:$GAMEPD$ /S

 and I can use both XInput and DirectInput mode with OInput.cmd. I'll get a new set of test files for this mode and post (probably not until tomorrow evening though... busy with other stuff tonight).

Regards,

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4751
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #370 on: November 10, 2022, 02:46:56 am »
Hi

It was time to also give a test drive to the "Genius MaxFighter F-31U Vibration" with ArcaOS.

I took the "RM203" files and copy it as "MAXFIG".
Added:
 
Quote
DEVICE=X:\OS2\BOOT\USBECD.SYS /D:0458:3019:0100 /N:$MAXFIG$ /V
Changed the oinput and xevents and I got some output there.

But I overestimated the difference between a joystick and gamepad. It seems that the joystick has something different that is always "pressing". Even that I got different visual feedback when I press the buttons, I was not able to make Makman and Wolfstein 3D to work with the RM203 scripts, also the DOS game joytest utilities does not provide any movement.

I'm attaching the scripts and log just in case.

Regards

Funny Note: I had to check the online dictionary to know what is a "Rudder" and I still does not know what does it do on a Joystick  ;D
Hi

I want to give it a try again to this joystick, "Genius MaxFighter F-31U Vibration", but this time following back Wim's testing documentation.

Keystrocks are recognized by OINPUT from "MaxFig", but there is like a permanent noise of something moving.

- BUTTON.LOG was generated by pressing from 1 to 10 according the image.
- STICK.LOG was Up, Down, Left, Right with the joystick
- HAT.LOG was Up, Down, Left, Right with the "hat"
- SPEED.LOG was Increase (up) and Decrese (down)
- RUDDE.LOG was with RUDDER on top left, move it to top right.

Wim, I don't know if you can get the keystrocks with all the noise that made the joystick.

Regards




« Last Edit: November 12, 2022, 08:38:38 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #371 on: November 10, 2022, 11:12:39 pm »
OK, got some test logs in DirectInput mode with my Logitech F310 gamepad. Each control string is still the same: 144 digit hexadecimal. But they are different values from XInput mode. Also, the 'Logitech' button has no output, but the 'Mode' button does in DirectInput mode. Finally, the triggers on the front at the bottom are simple on-off buttons in DirectInput mode (not continuous).

 I used the same format as before, like this:

  Started with buttons in this order: LB, RB, Back, Mode, Start, A, B, X, Y: 'DIbuttons.txt'. These are all on-off. The 'Logitech' button does not produce any output so not included.

 Then the 2 front triggers in this order: LT, RT - pulled them all the way on, then all the way off one at a time: 'DItriggers.txt'. These are on-off buttons in DI mode..

 Next the thumbpad at top left in this manner: forward, 45deg clockwise, 90 deg clockwise etc.: 'DIleftpad2.txt'. This is a 8-way on-off button.

 Now each joystick separately this way: press all the way forward - let go, then all the way backward-let go, then all the way left-let go, then all the way right- let go: 'DIrightstick.txt' and 'DIleftstick.txt'. These are continuous.

 Finally, the joysticks are also on-off buttons when pressed down - did the left then right stick button: 'DIjoybutton.txt'.

 HTH- would be good if Dave Yeo could confirm his works with similar settings...

Regards,
« Last Edit: November 10, 2022, 11:15:30 pm by David McKenna »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4751
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #372 on: November 12, 2022, 08:44:42 pm »
Hi David.

Can you also post the USB hardware report of the Logitech F310 Gamepad? You can use lsusb.

I want to add the info on a wiki page.

Regards
« Last Edit: November 12, 2022, 08:58:44 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #373 on: November 13, 2022, 01:46:48 pm »
Hi Martin,

  Here it is attached...

Regards,

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4751
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #374 on: November 17, 2022, 03:53:15 pm »
Hi Mark

Just for my records and wiki pages, can you please let me know the list of the joystick devices that you have that you consider that are working fine?

On my side I have:
- Huskee PSX Adapter - 0c12:0005
- PCS SNES Gamepad - 0810:e501

According to you guide you have:
- Logilink Gameport to USB converter
- Thrustmaster T. Flight Stick X

And I guess that Wim Brul tested the:
- Manta MM812

Mark, can you help me with the HardwareIDs for your two devices?

By the way, I think I will have some time this Saturday and I will go and check all the OS/2 Native games from my OHFOWG project to look for more games with joystick support.

Regards
« Last Edit: November 17, 2022, 06:53:44 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.