Joystick Question

G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

This will seem like a strange question, but here it is:

Andreas and me are discussing joysticks, and the way I remember it is
that most joysticks give a simple direction readout and that some game
(minority) have analog joysticks that give readout of _how far_ in a
direction you're going.

For instance, I believe that most games will go as fast right whether you
press right a tiny bit of all the way, and that games like Road Runner
are the exception where how far you push the joystick determines how fast
you go in that direction.

So, who's right here? Me (most joysticks aren't analog), Andreas (Most
joysticks are) or something else entirely (there are no joysticks! :p) ?

*-) K.os
--
"He imagined for a moment his itinerary connecting up all the dots in the
sky like a child's numbered dots puzzle. He hoped that from some vantage
point in the Universe it might be seen to spell a very, very rude word" -
D. N. Adams
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:

>So, who's right here? Me (most joysticks aren't analog), Andreas (Most
>joysticks are)

You! It is much more difficult hardware-wise to read an analogue input
rather than a digital input.


cu, Martin
--
Ubi bene ibi Colonia!
ROT13 for email: znegva.trexra@jro.qr
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

In a parallel universe, Anti-Sune Salminen said exactly the opposite of:

> Martin Gerken wrote:
>> On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>>
>>> So, who's right here? Me (most joysticks aren't analog), Andreas
>>> (Most joysticks are)
>>
>> You! It is much more difficult hardware-wise to read an analogue input
>> rather than a digital input.
>
> But most PC joysticks are analog.

So that could explain the confusion.

If we're talking about 'golden years' arcade games, I'm certain it's a
correct statement to say that most of them didn't use analog joysticks.

*-) K.os
--
"He imagined for a moment his itinerary connecting up all the dots in the
sky like a child's numbered dots puzzle. He hoped that from some vantage
point in the Universe it might be seen to spell a very, very rude word" -
D. N. Adams
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Martin Gerken wrote on 15. May 2005:
>
> On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>
>>So, who's right here? Me (most joysticks aren't analog), Andreas (Most
>>joysticks are)
>
> You!

Don't say that. We bet who pays the next beer... :)

> It is much more difficult hardware-wise to read an analogue input
> rather than a digital input.

At least I assumed that most PC joysticks are "analog" (digital of
course, but with 16 signed bit resolution (-32768 to 32767 or
something)). I have a joystick calibrator, as probably all Linux users,
called joycal or something. And most joysticks I saw nowadays for the
where "analog". So with a kind of potentiometer, and even calibration
wheels.
--
By(e) Andreas
U w4nt r0meZ? <http://www.lazarus.org.uk/>
Old school arcade classics at http://www.tombstones.org.uk/~ankman/
Linux without installation? http://www.knopper.net/knoppix/index-en.html
OE user? Ease the pain and try the better newsreader http://xnews.newsguy.com/
Registered as user #289125 with the Linux Counter http://counter.li.org/
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

K.os wrote on 15. May 2005:
>
> In a parallel universe, Anti-Sune Salminen said exactly the opposite of:
>
>> Martin Gerken wrote:
>>> On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>>>
>>>> So, who's right here? Me (most joysticks aren't analog), Andreas
>>>> (Most joysticks are)
>>>
>>> You! It is much more difficult hardware-wise to read an analogue input
>>> rather than a digital input.
>>
>> But most PC joysticks are analog.
>
> So that could explain the confusion.
>
> If we're talking about 'golden years' arcade games, I'm certain it's a
> correct statement to say that most of them didn't use analog joysticks.

Yup, it seems that we misunderstood each others. I meant PC joysticks
while you thought I talk about Arcade games. So we both were right, and
no one is getting a beer. *g*
--
By(e) Andreas
U w4nt r0meZ? <http://www.lazarus.org.uk/>
Old school arcade classics at http://www.tombstones.org.uk/~ankman/
Linux without installation? http://www.knopper.net/knoppix/index-en.html
OE user? Ease the pain and try the better newsreader http://xnews.newsguy.com/
Registered as user #289125 with the Linux Counter http://counter.li.org/
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Dead_Dad wrote on 15. May 2005:
>
> Andreas Kohlbach wrote:
>> Martin Gerken wrote on 15. May 2005:
>>
>>>On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>>>
>>>
>>>> So, who's right here? Me (most joysticks aren't analog), Andreas
>>>> (Most joysticks are)
>>>
>>>You!
>> Don't say that. We bet who pays the next beer... :)
>>
>>>It is much more difficult hardware-wise to read an analogue input
>>>rather than a digital input.
>> At least I assumed that most PC joysticks are "analog" (digital of
>> course, but with 16 signed bit resolution (-32768 to 32767 or
>> something)). I have a joystick calibrator, as probably all Linux users,
>> called joycal or something. And most joysticks I saw nowadays for the
>> where "analog". So with a kind of potentiometer, and even calibration
>> wheels.
>
> The 'classic' analogue PC joystick uses a rather bizarre, if thrifty
> method (See also 'Apple ][ Graphics' <G>) for determining the joystick
> axis values. A voltage is fed through a pot connected to each axis of
> the stick. The resulting voltage is then directed to a capacitor,
> which 'fills up', then 'dumps'. The higher the resistance, the less
> voltage gets to the cap, the longer it take to 'fill it up', the
> longer it takes to 'dump'. The number you see is /not/ the value of
> the pot, but simply how many times the cap has 'dumped' per second
> (Thus explaining why the values 'wiggle' a bit). This has /always/
> been a headache for programmers, because they /have/ to have
> calibration routines in their programs as /every single computer/ will
> have different ranges. When I started programming (on the venerable
> XT), the values ranged from 3-10 to 80-110 (AIR). A /lot/ of joystick
> games were broken when computers got fast enough, simply because the
> returned values would no longer fit into a single byte, and the two
> bytes that were returned could crash a program that wasn't built to
> deal with them. (See, Windoze /wasn't/ the originator of the 'buffer
> overflow' problem.<G>)

That really sounds like a PITA. Thanks for the explanation. :)
--
By(e) Andreas
U w4nt r0meZ? <http://www.lazarus.org.uk/>
Old school arcade classics at http://www.tombstones.org.uk/~ankman/
Linux without installation? http://www.knopper.net/knoppix/index-en.html
OE user? Ease the pain and try the better newsreader http://xnews.newsguy.com/
Registered as user #289125 with the Linux Counter http://counter.li.org/
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Andreas Kohlbach wrote:
> Martin Gerken wrote on 15. May 2005:
>
>>On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>>
>>
>>>So, who's right here? Me (most joysticks aren't analog), Andreas (Most
>>>joysticks are)
>>
>>You!
>
>
> Don't say that. We bet who pays the next beer... :)
>
>
>>It is much more difficult hardware-wise to read an analogue input
>>rather than a digital input.
>
>
> At least I assumed that most PC joysticks are "analog" (digital of
> course, but with 16 signed bit resolution (-32768 to 32767 or
> something)). I have a joystick calibrator, as probably all Linux users,
> called joycal or something. And most joysticks I saw nowadays for the
> where "analog". So with a kind of potentiometer, and even calibration
> wheels.

The 'classic' analogue PC joystick uses a rather bizarre, if thrifty
method (See also 'Apple ][ Graphics' <G>) for determining the joystick
axis values. A voltage is fed through a pot connected to each axis of
the stick. The resulting voltage is then directed to a capacitor, which
'fills up', then 'dumps'. The higher the resistance, the less voltage
gets to the cap, the longer it take to 'fill it up', the longer it takes
to 'dump'. The number you see is /not/ the value of the pot, but simply
how many times the cap has 'dumped' per second (Thus explaining why the
values 'wiggle' a bit). This has /always/ been a headache for
programmers, because they /have/ to have calibration routines in their
programs as /every single computer/ will have different ranges. When I
started programming (on the venerable XT), the values ranged from 3-10
to 80-110 (AIR). A /lot/ of joystick games were broken when computers
got fast enough, simply because the returned values would no longer fit
into a single byte, and the two bytes that were returned could crash a
program that wasn't built to deal with them. (See, Windoze /wasn't/ the
originator of the 'buffer overflow' problem.<G>)

--
Thnik about it!
Dead_Dad
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Andreas Kohlbach wrote:
> Dead_Dad wrote on 15. May 2005:
>
>>Andreas Kohlbach wrote:
>>
>>>Martin Gerken wrote on 15. May 2005:
>>>
>>>
>>>>On Sun, 15 May 2005 13:56:54 -0400, "K.os" <K.os023@gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>>So, who's right here? Me (most joysticks aren't analog), Andreas
>>>>>(Most joysticks are)
>>>>
>>>>You!
>>>
>>>Don't say that. We bet who pays the next beer... :)
>>>
>>>
>>>>It is much more difficult hardware-wise to read an analogue input
>>>>rather than a digital input.
>>>
>>>At least I assumed that most PC joysticks are "analog" (digital of
>>>course, but with 16 signed bit resolution (-32768 to 32767 or
>>>something)). I have a joystick calibrator, as probably all Linux users,
>>>called joycal or something. And most joysticks I saw nowadays for the
>>>where "analog". So with a kind of potentiometer, and even calibration
>>>wheels.
>>
>>The 'classic' analogue PC joystick uses a rather bizarre, if thrifty
>>method (See also 'Apple ][ Graphics' <G>) for determining the joystick
>>axis values. A voltage is fed through a pot connected to each axis of
>>the stick. The resulting voltage is then directed to a capacitor,
>>which 'fills up', then 'dumps'. The higher the resistance, the less
>>voltage gets to the cap, the longer it take to 'fill it up', the
>>longer it takes to 'dump'. The number you see is /not/ the value of
>>the pot, but simply how many times the cap has 'dumped' per second
>>(Thus explaining why the values 'wiggle' a bit). This has /always/
>>been a headache for programmers, because they /have/ to have
>>calibration routines in their programs as /every single computer/ will
>>have different ranges. When I started programming (on the venerable
>>XT), the values ranged from 3-10 to 80-110 (AIR). A /lot/ of joystick
>>games were broken when computers got fast enough, simply because the
>>returned values would no longer fit into a single byte, and the two
>>bytes that were returned could crash a program that wasn't built to
>>deal with them. (See, Windoze /wasn't/ the originator of the 'buffer
>>overflow' problem.<G>)
>
>
> That really sounds like a PITA. Thanks for the explanation. :)

You're welcome & quite right. That's why I made a small library of
joystick routines that used 'zones' for the axes; simple, digital-style
movement only required three equal zones (left, deadzone, right), while
steering-style movement (in one example) used 17 non-linear zones. It
still required calibration, but allowed you to avoid using the regular
joystick reading routine, which only returned the raw data (that you
would need to manipulate anyway). You could instead use the
'JOYSTICKZONE(<STICKNUM>,{XZONE},{YZONE})' routine, which returned the
Zones the X & Y values were contained in. Anyone who has tried to do
anything with the raw data beyond 'ShipX = Joystick1X' knows how much
easier my routines made my life.

--
Thnik about it!
Dead_Dad
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Dead_Dad wrote on 16. May 2005:
>
> Andreas Kohlbach wrote:
>>
>> That really sounds like a PITA. Thanks for the explanation. :)
>
> You're welcome & quite right. That's why I made a small library of
> joystick routines that used 'zones' for the axes; simple,
> digital-style movement only required three equal zones (left,
> deadzone, right), while steering-style movement (in one example) used
> 17 non-linear zones. It still required calibration, but allowed you
> to avoid using the regular joystick reading routine, which only
> returned the raw data (that you would need to manipulate anyway). You
> could instead use the 'JOYSTICKZONE(<STICKNUM>,{XZONE},{YZONE})'
> routine, which returned the Zones the X & Y values were contained in.
> Anyone who has tried to do anything with the raw data beyond 'ShipX =
> Joystick1X' knows how much easier my routines made my life.

Is this really necessary for new operating systems? Those (very cheap)
joysticks for the PC I had worked without a problem in DOS, Windows 98 and
Linux. So drivers exist and work.
--
By(e) Andreas
U w4nt r0meZ? <http://www.lazarus.org.uk/>
Old school arcade classics at http://www.tombstones.org.uk/~ankman/
Linux without installation? http://www.knopper.net/knoppix/index-en.html
OE user? Ease the pain and try the better newsreader http://xnews.newsguy.com/
Registered as user #289125 with the Linux Counter http://counter.li.org/
 
G

Guest

Guest
Archived from groups: alt.games.mame (More info?)

Andreas Kohlbach wrote:
> Dead_Dad wrote on 16. May 2005:
>
>>Andreas Kohlbach wrote:
>>
>>>That really sounds like a PITA. Thanks for the explanation. :)
>>
>>You're welcome & quite right. That's why I made a small library of
>>joystick routines that used 'zones' for the axes; simple,
>>digital-style movement only required three equal zones (left,
>>deadzone, right), while steering-style movement (in one example) used
>>17 non-linear zones. It still required calibration, but allowed you
>>to avoid using the regular joystick reading routine, which only
>>returned the raw data (that you would need to manipulate anyway). You
>>could instead use the 'JOYSTICKZONE(<STICKNUM>,{XZONE},{YZONE})'
>>routine, which returned the Zones the X & Y values were contained in.
>>Anyone who has tried to do anything with the raw data beyond 'ShipX =
>>Joystick1X' knows how much easier my routines made my life.
>
>
> Is this really necessary for new operating systems? Those (very cheap)
> joysticks for the PC I had worked without a problem in DOS, Windows 98 and
> Linux. So drivers exist and work.

While I wrote my /routines/ (not /drivers/ - they can be considered
'driver data interpretors') in assembly, with stubs for QuickBASIC, the
/concept/ works with /any/ language. While it isn't /necessary/, it
did, and still can, make programmers lives easier.

--
Thnik about it!
Dead_Dad