From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Subject: Re: int15h for joysticks is slow....
Organization: University of Illinois at Urbana
Lines: 25

lioness@oak.circa.ufl.edu writes:


>I'm using int15h to read my joystick, and it is hideously slow.  Something
>like 90% of my CPU time is being spent reading the joystick, and this
>is in a program that does nothing but printf() and JoyRead().

>The problem is that a lot of programs trap int15h ( like SMARTDRV ) and
>so it is a slow as hell interface.  Can I read the joystick port in
>a reasonably safe fashion via polling?  And that isn't platform or
>clockspeed specific?

    The joystick reads in anolog values through a digital port. How?
    You send a command to the port to read it, then you time how long
    it takes for the joystick port to set a certain bit.  This time
    is proportional to the joystick position.  Obviously, since time
    is used as a position, you cannot get rid of this ridiculus waste 
    of time.  If you wrote your own routine instead of the BIOS, it
    would speed it up some, but the time would still be there.

-- 
-----------------------------------------------------------------------------
 John A. Slagel              "My old man used to tell me, before he left this
 j-slagel1@uiuc.edu           shitty world, never chase buses or women- you
 (217) 337-7930               always get left behind." -The Marlboro Man
