[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading Joystick Position



Many years ago, I wrote a program in Appesoft Basic, which performed that task.
If assembly language is alittle above you, try the following program:

10 PDL(X)
20 PRINT X
30 PDL(1): GOTO 10
] RUN
Press Control-C to quit.

By moving the joystick around, variant X ought to change.

The only peeks, I know of are for sensing if any joystick buttons have been
activated. Being:
49249 Button #0 (or Open-Apple on Apple IIe)
49350 Button #1 (or Closed-Apple on Apple IIe)
49251 Button #2

The machine language routine is less straightforward. You must be mindful that
by combining two paddle read routines together to control movement with a
joystick, will result in the paddle values not reading properly. This is known
as Paddle Crosstalk.