Sorry not exactly a game but someone might be able to help.

I need to use the Game port interface to get some positional info for a program I'am working onto control some model trains. So far a written a VxD:grin: and a GUI but this means sitting at the computer to playtrains.

Now I have been able to use the windows API's to get info from the gameport but this seems to move around quite a bit. Does anyone have any code snippets or advice as to how to make the return values more stable. At the moment I have four 100k pots and four switches hanging off the gameport.

Btw the target machine\OS would probably be 486\lower pentium type machine running Win9x. Dont laugh I,ve got it to work on a 486 SX33 with 20 Meg RAM laptop servicing about 500 to 600 interrupts per second obvisiosly the gameport is not an option on the old laptop.
Posted on 2001-09-19 06:42:12 by edgarbrits
I dunno, but have you tried to see your results in a different operating system such as Linux or Menuet?

What I mean is it the OS, or is it the drivers or something inbetween?
Posted on 2001-09-19 13:09:52 by Kenny
Afternoon, edgarbrits.
... advice as to how to make the return values more stable.

Average the data over time.

i.e.: Divide every 10 inputs by 10, and use this number in your proggy. I use the same idea to stop having the framerate counter jump up and down. It doesn't allow *instantaneous* control, however it will make the input data *smoother*.

Cheers,
Scronty
Posted on 2001-09-19 17:26:08 by Scronty
Thanks.

I was thinking along those lines but thought there was some mystical way of doing it

cheers.
Posted on 2001-09-20 03:36:13 by edgarbrits