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:
Reply To:
PCBUILD - PC Hardware discussion List <[log in to unmask]>
Date:
Fri, 6 Feb 1998 09:09:32 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (70 lines)
        Hi.

> On  5 Feb 98 at 15:28, Jim Meagher wrote:
>
> > Michael Webb wrote:
> > >
> > > A buddy uses his joystick for flying Flight Simulator and then has to
> > > unplug it and plug in his steering wheel for a Nascar driving
> > > simulator.  Anyone know how to set up to leave them plugged in and then
> > > work an easy software switch to change to the new configuration.  He has
> > > to reboot each time he want to change games.  The alternative would be
> > > some kind of T or a-b switch and then some software switching.  Any help
> > > would be appreciated.
> >
> > The simplest solution might be to just add another serial port.
>
>   Joystick ports are not comm ports.
>
>   There is a single standard 8-bit I/O address for a joystick port,
> if present.  Each attached joystick (Y cable if two) uses 4 bits of
> the port.  Two of those bits reflect two buttons on the stick -- note
> that on many sticks, one or both of these may include multiple
> physical buttons.  The other two reflect X and Y values through A/D
> converters -- the *duration* of this signal depends on the resistance
> along that dimension.  (Calibration involves determining the minimum
> and maximum durations for the current configuration; other values are
> interpolated.)

        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.
        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.

>
>   Adding a second joystick port isn't a workable option, because both
> ports will try to be at the same address.

        I've posted a workaround; see elsewhere. As always a trick: have
two 201 ports, with only one enabled at the time; can't be done quickly
with PnP (what a good description is Plug and Pray; I would amplify
it to PnPntSC (Plug and Pray and then Simply Cry).
        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.

>
> David G
************************************
Javier Vizcaino. Ability Electronics. [log in to unmask]

Starting point:        (-1)^(-1) = -1
Applying logarithms: (-1)*ln(-1) = ln(-1)
Since ln(-1) <> 0, dividing:  -1 = 1
     (ln(-1) is complex, but exists)


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


ATOM RSS1 RSS2