[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: joystick test application
- Subject: Re: joystick test application
- From: nathan@visi.com (Nathan Mates)
- Date: 1996/08/18
- Newsgroups: comp.sys.apple2
- Organization: Vector Internet Services, Inc.
- References: <4v62se$q0d@cello.gina.calstate.edu>
In article <4v62se$q0d@cello.gina.calstate.edu>,
Steve Jensen <sjensen@cello.gina.calstate.edu> wrote:
>I just got 6 Apple IIe/IIc joysticks that I need to test and
>adjust. What tester should I use?
Well, here's a quick program in Basic to do that:
10 X=PDL(0): FOR I=1 TO 10: NEXT: Y=PDL(1)
20 PRINT X " " Y " " PEEK(49249) , PEEK (49250)
30 GOTO 10
That checks the X/Y positioning of them, as well as the buttons.
The first number per line is the horizontal position, th second the
vertical. 0,0 should be top-left, and 255,255 the bottom
right. Properly centered joysticks should be about 127 (+/- 5 is fine
for almost all programs) The third and fourth numbers are the two
buttons (also your open-apple and option/closed apple keys). The
button values will be <128 if not pressed, and >=128 if pressed.
The little loop with I in line 10 should be left in-- you should
have a small pause before reading each axis of the joystick. (The
print takes long enough that it's the pause)
Nathan Mates
--
<*> Nathan Mates http://www.visi.com/~nathan/ <*>
# What are the facts? Again and again and again-- what are the _facts_?
# Shun wishful thinking, avoid opinion, care not what the neighbors
# think-- what are the facts, and to how many decimal places? -R.A. Heinlein