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

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #150 on: March 20, 2022, 02:00:28 pm »
Hi Wim

The joystick is not longer working for me on Makman and DOS GAMES. (Using gamepad-20220317.zip)
I'm using the Huskee adapter with the PS2 gamepad. oinput.cmd and xevent.cmd are working fine, they show me the button strokes, so I guess "gamepad.sys" is working fine too.

I seems to have some problem with teh GAMEDD.SYS and GAMEVDD.SYS talking to the "gamepad.sys", I guess.
Is there something else I can try to find out where my issue can be?

My config.sys:
Quote
DEVICE=X:\OS2\BOOT\USBECD.SYS /D:0C12:0005:0001 /N:$HUSKEE$ /V
Quote
DEVICE=X:\OS2\MDOS\GAMEDD.SYS
DEVICE=X:\OS2\MDOS\GAMEPAD.SYS
DEVICE=X:\OS2\MDOS\GAMEVDD.SYS

Regards

Note: Should we open a new forum thread for USB gamepad testing?
« Last Edit: March 20, 2022, 02:11:57 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

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 #151 on: March 20, 2022, 03:40:47 pm »
Hi Wim

The joystick is not longer working for me on Makman and DOS GAMES. (Using gamepad-20220317.zip)
I'm using the Huskee adapter with the PS2 gamepad. oinput.cmd and xevent.cmd are working fine, they show me the button strokes, so I guess "gamepad.sys" is working fine too.

I seems to have some problem with teh GAMEDD.SYS and GAMEVDD.SYS talking to the "gamepad.sys", I guess.
Is there something else I can try to find out where my issue can be?

Hi Martin,

What did you try? You could try and use the drivers contained in huskee-20211226.zip  which worked on your system before.
Perhaps you need to press the select button? Perhaps you changed something else on your test system?
For dos games setting GAME_DIRECT_ACCESS must be OFF.

Wim

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #152 on: March 20, 2022, 04:22:35 pm »
Hi Wim

I reverted to "huskee-20211226.zip".
- oinput.cmd and xevent.cmd are still working fine. I also noticed that on xevents, the "triangle" button is not providing any action, while on oinput it is working. (EC500000810308008080FFFF10000000)
- It is not working on MakMan and it is not working on DOS Worlfstein (I got to the "Calibrate Joystick" screen and it does not detect any action).
- For DOS Wolfstein, GAME_DIRECT_ACCESS is OFF

I just noticed that Makman used to work with my other gamepad (the one that looks like a NES controller) and I never tested the Huskee on Makman or DOS, because oinput.cmd and xevent.cmd  where working.

Regards
« Last Edit: March 20, 2022, 04:24:27 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #153 on: March 20, 2022, 07:14:29 pm »
Hi Wim!

Hi Mark,

I played tennis yesterday for one hour. Good for my health and fun to do.
Quote
Oinput.cmd worked perfectly. However adding command oinput.cmd > Button.log hung the process until control-c was pressed, so could not generate log. Tried syntax oinput.cmd >button.log. Same result.
.
As mentioned the LOG instructions are not working - do you have any idea why?
It seems to me that oinput.cmd > button.log is not working up to your expectation. What you do with the controls is not shown but written to the log instead.

I have no idea what the Thrustmaster Pro Joystick looks like i.e. how many buttons it has and where these are located.
Do you have a picture and description of what controls it has  and how you would use those controls?

Thanks for your efforts sofar!

Wim

A Happy Vernal Equinox to you - unfortunately after four days of +10 C temps, we are in the teeth of a winter storm on what is supposed to be the first day of Spring - 10 to 20 cm expected here so no tennis today - then should be up to 15 C by Wednesday - just yet another day is this Year of Strange.

Perhaps I misunderstood your instructions, as when I added the syntax > button.log to oinput .cmd it looked like the command line output hung and no output was being generated. Will try again this afternoon when I'm tired watching yet more blowing snow <sic>.

I have attached an annotated photo of the Thrustmaster Joystick below as reference if you are interested (for others looking for the hex output I posted and am referencing below, refer to attachments in my previous post).

Screen shot Button Test 1 - 4 Buttons (attached)

First Hex set    - Thrustmaster at rest (no buttons pressed)
Second set   - Trigger pressed (#1 on the photo)
Third set   - Trigger released
Fourth Set   - Red button beside Hat pressed (#2 on the photo)
Fifth Set            - Red button beside Hat released
Sixth set            - Red button left side pressed (#3 on the photo)
Seventh set   - Red button left side released
Eighth set   - Red button bottom front pressed (#4 on the Phot0)
Ninth set   - Red button bottom front released

The second set of date was generated by the moveable hat at the top of the joystick which in most flight games is used to view various directions in flight.

The joystick is all metal and very durable - it is based on an actual joystick of the HOTAS type (Hands on Throttle and Stick) and actually was the configuration used first on the US F-4 Phantom fighter. It is one of the joysticks which should be recognized immediately by many of the DOS based flight games, so we will see.

Best to you Sir as always!

M

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #154 on: March 20, 2022, 09:19:31 pm »
Hi Mark, at least no snow here.
Try piping through tee, something like,
Code: [Select]
oinput.cmd 2>&1 | tee oinput.log
This will capture both stdout and stderr and split the output so it displays and goes into the log.

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #155 on: March 20, 2022, 09:38:02 pm »
Hi Wim!


It seems to me that oinput.cmd > button.log is not working up to your expectation. What you do with the controls is not shown but written to the log instead.


Okay, I understand whats happening now after your explanation and rereading your testing.txt.

I generated three files, Wim, which I found in the root directory for the operating system partition after completing the tests. They are attached as:

buttonred.log
hat.log
stick.log

The first two essentially are the same as the JPG screenshots I took previously. The third log has the stick data as follows: (I will describe position by standard compass direction - north being forward)

Initial Hex row - stick is centered at rest
First position - stick in north position then centered
Second position - stick pulled south then centered
Third position - stick positioned to the west then centered
Fourth position - stick positioned to the east then centered
Fifth position - stick positioned to the northwest then centered
Sixth position - stick positioned to the northeast then centered
Seventh position - stick positioned to the southeast then centered
Eighth position - stick positioned to the southwest then centered

Let me know if you wanted any further tests related to Part A.

I will proceed to Part B shortly, after I install your drivers and reboot.

Best!

Mark


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 #156 on: March 20, 2022, 09:47:23 pm »
Heh Dave!

Hi Mark, at least no snow here.
Try piping through tee, something like,
Code: [Select]
oinput.cmd 2>&1 | tee oinput.log
This will capture both stdout and stderr and split the output so it displays and goes into the log.

We just got rid of all the snow on the roads porches and pads and all the ice I chopped, and suddenly we're having a stormy temper tantrum on the first day of Spring - blowing like hell, visibility zero and covering up all my efforts with 10-20 cm of snow, at least for today.

I had enough of that up in Norman Wells last week - can't seem to get rid of it (Grrrrr.....)

Finally got what Wim was saying and posted the logs he requested (didn't realize it was a redirect as no info was seen on the command line - get it now after finding the logs in my root directory) - will install the DD's next and see what happens ....... !

M
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 #157 on: March 20, 2022, 10:50:50 pm »
Hi Wim!


It seems to me that oinput.cmd > button.log is not working up to your expectation. What you do with the controls is not shown but written to the log instead.

I have no idea what the Thrustmaster Pro Joystick looks like i.e. how many buttons it has and where these are located.
Do you have a picture and description of what controls it has  and how you would use those controls?

Thanks for your efforts so far!

Wim

Moved on to Part B of the testing you requested.

Installed the three drivers you provided in D:\OS2\MDOS\ which is one of my operating system partitions. In the CONFIG.SYS I placed the drivers below the statement for your USBECD.SYS which I assumed was a necessary perquisite to using the drivers.

Running xevents.cmd the following happened:

1) pressing each of the 4 red buttons in turn generated no return hex data (ie. it seems none of them were recognized).

2) pressing the HAT controller in each of the 4 directions I indicated previously generated a return hex line in the command window, both when pressed and when released.

3) pushing and pulling the stick in each of the directions indicated previously generated a return hex line in the command window.

I undertook each of steps 1) to 3) above five times to verify the results. At one point I thought I may have received feedback from one of the red buttons, but I put it down to jiggling the stick slightly while pressing the button, as I could not reproduce the one result noted.

I realize now I did not explain the use of all the buttons - the hat as mentioned is usually used to view in various directions. The trigger is self explanatory. Usually the button beside the hat is used for weapons selection, and the two other buttons can perform a variety of programmable functions, based on the game being played. If it is a game not to do with a warplane, the various buttons may have other functions - as the Thrustmaster was very prevalent as a joystick in the DOS era, most DOS menus requiring a joystick had menu choices which coded to use the 4 buttons and hat in various creative ways).

Hope that helps out for the moment, Wim - as always don't hesitate to let me know if I can provide anything further and Best!

Mark
« Last Edit: March 21, 2022, 01:23:27 am by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

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 #158 on: March 21, 2022, 12:41:27 pm »
Hi Mark,

Quote
Running xevents.cmd the following happened:

1) pressing each of the 4 red buttons in turn generated no return hex data (ie. it seems none of them were recognized).

Oops, my mistake. You will have to modify xevents.cmd line 98 as follows:

From: "button = c2d(substr(oiBuffer,8+0,1))" into "button = c2d(substr(oiBuffer,8+1,1))"

Good luck!

Wim

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #159 on: March 21, 2022, 03:23:33 pm »
Hi Wim!

Starting the day here - snow storm over and expecting first 7 C today then 10 C and a high of 15 C on Wednesday, so on Spring plus 1 we're getting back on course.


Oops, my mistake. You will have to modify xevents.cmd line 98 as follows:

From: "button = c2d(substr(oiBuffer,8+0,1))" into "button = c2d(substr(oiBuffer,8+1,1))"

Good luck!

Wim

Yup as you mentioned one slight change to line 98 fixed the problem - Philosophically, its amazing to think that 1"s and 0"s run our world, and having "one" instead of the other could result in a disaster <sic>.

Have to shovel yet again as probably 10 cm of heavy wet snow on the ground at the moment - will try to continue part B of the testing later today.

Best of the start of the week to you!

M
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 #160 on: March 22, 2022, 01:35:05 am »
Hi All!

Haven't had time today to do much testing, as I had to deal with our weather related issues after the snow storm here (where it is a balmy 10 C at the moment - CRAZY).

However I was thinking about the testing of the drivers Wim supplied and thought of a number of questions related to same:
(addressed these to a number of likely people with answers but others can jump in)

2Wim - Wim, will your current drivers work natively under ArcaOS as well? (ie. if there is a native ArcaOS game that uses a joystick, could the joystick be used with the drivers, as you've programmed them currently?)

2Martin - Martin - Do you know of a native ArcaOS game that would use a game controller (Have Galactic Civilizations, but not installed at the moment - can't recall if that had a controller option - or possibly Trials of Battle?)

2Jochen - Is there anything that is needed to do specifically under the current version of DOSBOX, other than modifying DOSBOX.conf to recognize the Joystick? Or is that currently possible under your latest version? Any additional specific library dependencies? I have both SDL 1.2.15-5 and SDL2 2.0.18-1 installed as well as the experimental release of HIDAPI and USB1 packages, if needed.

I'm currently relearning how to use a program template to play DOS based games after modifying the DOS settings - been a while as I pretty well use DOSBOX exclusively. If someone can suggest a DOS game that has worked (eg. Wolfenstein, which I think Wim mentioned) along with the DOS settings used. If so I will try to duplicate that result as a first step.

Thought I might as well hit all the bases in the testing process before I take a stab at this. Success or failure could be because I either have not set things up correctly, or there are issues with the drivers in beta, so I want to ensure iI eliminate the tester as a factor before I report back.

Best to all!

M

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

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +27/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #161 on: March 22, 2022, 11:22:28 am »
2Jochen - Is there anything that is needed to do specifically under the current version of DOSBOX, other than modifying DOSBOX.conf to recognize the Joystick? Or is that currently possible under your latest version? Any additional specific library dependencies? I have both SDL 1.2.15-5 and SDL2 2.0.18-1 installed as well as the experimental release of HIDAPI and USB1 packages, if needed.
If you download the WPI, then you get notified of missing dependencies.
If Wim's driver shows up as native OS/2 joystick, it should work with Dosbox, because the native OS/2 api for joysticks is supported.

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 #162 on: March 22, 2022, 05:37:26 pm »
Quote
2Wim - Wim, will your current drivers work natively under ArcaOS as well? (ie. if there is a native ArcaOS game that uses a joystick, could the joystick be used with the drivers, as you've programmed them currently?)
Yes Mark, in an ideal world, it will work as long as the native ArcaOS game uses the GAME$ device for its joystick access. Right now it is still very experimental.

Mark Szkolnicki

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

Quote
2Wim - Wim, will your current drivers work natively under ArcaOS as well? (ie. if there is a native ArcaOS game that uses a joystick, could the joystick be used with the drivers, as you've programmed them currently?)
Yes Mark, in an ideal world, it will work as long as the native ArcaOS game uses the GAME$ device for its joystick access. Right now it is still very experimental.

Busy day today.

Just one follow-up question - was the GAME$ device what was used previously in the original incarnation of GAMEDD.SYS? I ask because obviously if I can find a native OS/2 program that used the original GAMEDD.SYS to access a Joystick, I assume it should conform to your native driver as well.

M
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 #164 on: March 22, 2022, 11:41:53 pm »
Hi Jochen!

If you download the WPI, then you get notified of missing dependencies.
If Wim's driver shows up as native OS/2 joystick, it should work with Dosbox, because the native OS/2 api for joysticks is supported.

I believe that I installed DOSBOX 0.72 the last time in late 2020.

Has there been any changes that would affect this testing since then?

Obviously, if another WPI install has not occurred since then I would not be aware of any changes in dependencies (BTW that's indeed a nice touch, Jochen, and very conscientious - I wish all packages I've installed in the past would have those same dependencies defined up front).

Best!

M

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