home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!noose.ecn.purdue.edu!gn.ecn.purdue.edu!seifert
- From: seifert@gn.ecn.purdue.edu (Michael S. Seifert)
- Subject: OS joystick routines
- Message-ID: <1993Jan12.173159.28081@gn.ecn.purdue.edu>
- Organization: Purdue University Engineering Computer Network
- Date: Tue, 12 Jan 93 17:31:59 GMT
- Lines: 34
-
-
- Ive been having some minor problems using the gameport.device to
- read an absolute joystick... Although my code works, once in a
- while it misses a joystick input...
-
- There are a lot of calculations being done between READEVENTs, but
- I figured the device's buffer would just queue up the inputs. The
- code looks a little like this...
-
- for(;;)
- {
- calculations();
- readjoystick();
- timerdevicedelay();
- }
-
- timerdevicedelay()
- {
- while (GetMsg != NULL) READEVENT();
- }
-
- Ive tried putting more calls to the routine readjoystick() in the
- middle of the calculations, but this doesnt seem to help...
- SO...
-
- What would be a good solution?
-
- 1) Give up the gameport.device and use hardware bashing...
- 2) Fix something in this routine (give solution, please)
- 3) or could I use an Interrupt to automatically read the joystick
-
- thanks in advance,
- mike
-
-