PCBUILD Archives

Personal Computer Hardware discussion List

PCBUILD@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Gillett <[log in to unmask]>
Reply To:
PCBUILD - PC Hardware discussion List <[log in to unmask]>
Date:
Fri, 6 Feb 1998 09:42:32 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
On  6 Feb 98 at 9:09, [log in to unmask] wrote:

>         Just for exactness: yes and no there is an A/D converter; there
> is no A/D converter in the sense of an electronic A/D converter. What is
> there is a trick: a potentiometer at the joy is part of a monostable
> (variable single pulse generator) at the game port hardware (done before
> with a 558 or a 556 chip). The timing is around 1 ms, so the timer
> interrupt of the PC (55 ms) is useless. The trick is read the state of
> one of the timers on the 8254 chip (now on chipset), when the pulse
> starts and when the pulse ends (btw, modern bios include a service
> for this on INT 15, AX=84 and DX=1, if I'm not wrong, although games
> and W95 may do it on their own). This is, btw, a processor intensive
> operation.

  In the Olde Days, we had a tightly-optimized assembly-language
routine that sat and polled the port, counting the number of poll
cycles that the X and Y bits stayed on for.  Newer code should use
INT 15, that function was added in the AT....

>         Interpolated: ???. Minimum and maximum timings are recorded,
> just so that the game knows extremes, but there are real readings
> each time. What can be done is an exponential, or a non linear,
> conversion from read values to position or whatever is translated.

  Well, supposed the calibration routine comes up with min = 50 and
max = 150.  Most code will then treat a reading of 75 as "half way
from neutral to minimum".  The conversion *can* be made non-linear,
but I've never seen any code that bothered to do that.  [The joystick
hardware and BIOS don't do it, the application *might*.

>         BTW: NTSC, the color television system in America and Japan is
> known in Europe as Never Transmit the Same Color. European PAL improved
> a weakness of the NTSC system at this respect.

  I've heard it, in North America, referred to as Never Twice the
Same Color, or Never The Same Color (Twice).

David G


          PCBUILD:  http://nospin.com  or  [log in to unmask]


ATOM RSS1 RSS2