How does the system detect an old-style game controller

I need to build an adapter between a push button and the “fire” button input
for an old-style (non-usb) game controller input. This should be as simple
as hooking the button between pins 2 and 4 on the connector.

But it isn’t, because Windows is convinced that I don’t have a game
controller plugged in.

What is it checking for? The traditional old joystick had one or two
switches and a couple of pots. Do I need to tie some resistors into the
connector to pretend to be pots?

Thanks!

Loren

You mean an old 0x201 assigned gameport? The OS doesn’t support them
anymore. If you can find the XP DDK, there is support in there,
gameenum.sys. gameenum does no detection, just like busenum it is told
what to enumerate. A HID miniport is usually loaded (hidgame.sys) and
that HID miniport uses the parent assigned resources to retrieve any
data and the turn it into HID data. If you want to change the data, you
need your own hid miniport.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Loren Wilton
Sent: Sunday, September 02, 2007 5:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How does the system detect an old-style game controller

I need to build an adapter between a push button and the “fire” button
input
for an old-style (non-usb) game controller input. This should be as
simple
as hooking the button between pins 2 and 4 on the connector.

But it isn’t, because Windows is convinced that I don’t have a game
controller plugged in.

What is it checking for? The traditional old joystick had one or two
switches and a couple of pots. Do I need to tie some resistors into the

connector to pretend to be pots?

Thanks!

Loren


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi Loren,

You need to have an X and Y axis, otherwise Windows won’t see it. If you don’t need real axes, put a couple fo 47k resistors in the circuit, one from Pin 1 to Pin 3 and the second from Pin 1 to Pin 6. That will make Windows happy and you’ll be able to add it as a 2-Axis/4-Button in the Game Controllers applet. You can lie about the buttons, Windows just thinks they never closed.

You will need GameEnum installed along with the HID joystick driver (HidMini, I think). Someone out in the gaming community has apparently set up an installer for it, look on the newsgroup:

alt.games.microsoft.flight-sim

I saw a message there about it a few days ago as I recall. I haven’t looked at it yet but it does reportedly work in Vista. XP32 support is already there of course.

There is no 64-bit GameEnum available as far as I know. XP64 did not support it and neither version of Vista does. If you’ve got an older DDK, the source was there and you could probably compile it in a 64-bit build environment along with the standard HID mini, but whether or not it would work I do not know.

Hope this helps!

Best regards,

  • Bob

The StickWorks
http://www.stickworks.com

Gameenum should compile just fine for x64 if you can find a 64 bit
machine with a game controller in it ;). The HID miniport is hidgame,
not hidmini. You can find hidgame in the server 2001 SP1 DDK,
3790.1830\src\wdm\hid\hidgame. I don’t see gameenum in that version of
the DDK, so I think the last version which shipped it was the XP DDK

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@compuserve.com
Sent: Tuesday, September 04, 2007 7:13 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How does the system detect an old-style game
controller

Hi Loren,

You need to have an X and Y axis, otherwise Windows won’t see it. If you
don’t need real axes, put a couple fo 47k resistors in the circuit, one
from Pin 1 to Pin 3 and the second from Pin 1 to Pin 6. That will make
Windows happy and you’ll be able to add it as a 2-Axis/4-Button in the
Game Controllers applet. You can lie about the buttons, Windows just
thinks they never closed.

You will need GameEnum installed along with the HID joystick driver
(HidMini, I think). Someone out in the gaming community has apparently
set up an installer for it, look on the newsgroup:

alt.games.microsoft.flight-sim

I saw a message there about it a few days ago as I recall. I haven’t
looked at it yet but it does reportedly work in Vista. XP32 support is
already there of course.

There is no 64-bit GameEnum available as far as I know. XP64 did not
support it and neither version of Vista does. If you’ve got an older
DDK, the source was there and you could probably compile it in a 64-bit
build environment along with the standard HID mini, but whether or not
it would work I do not know.

Hope this helps!

Best regards,

  • Bob

The StickWorks
http://www.stickworks.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer