Groups | Search | Server Info | Login | Register


Groups > comp.sys.apple2.programmer > #52

Simultaneous Paddle Readings

From dog_cow@macgui.com (D Finnigan)
Newsgroups comp.sys.apple2.programmer
Subject Simultaneous Paddle Readings
Date 2011-07-27 00:56 +0000
Organization Mac GUI
Message-ID <dog_cow-1311728175@macgui.com> (permalink)

Show all headers | View raw


Earlier, a few months ago, there was a thread in csa2 on how to calibrate
the paddle or joystick. A BASIC program was given which showed the readings
of both paddles 0 and 1. I was reminded about what I had read in an
Applesoft Reference manual: Reading of paddle 0 will affect reading of
paddle 1 if they're done close together.

I wrote a BASIC program to demonstrate this. I then, with the help of the
Mini Assembler and the Apple II Reference Manual, wrote an assembly program
to also show paddle readings.

It is true. Set paddle 1 to 255 ($FF) and then move paddle 0. You will see
both values on screen change. Moving paddle 1 never seems to affect paddle
0. It is always 0 that affects 1. I have only tried these programs on an
Apple II Plus. I suspect that emulators do not emulate this behavior, and
that other Apples may behave slightly differently.

BASIC:

0 X = PDL(0) : Y = PDL(1) : PRINT X;" ";Y : GOTO 0

Assembly:

START LDX #$00 ; SWITCH TO PDL 0
JSR $FB1E ; READ PDL 0
STY $06 ; STORE PDL 0
INX ; SWITCH TO PDL 1
JSR $FB1E ; READ PDL 1
STY $07 ; STORE PDL 1
LDA $06 ; GET PDL 0
JSR $FDDA ; PRBYTE
LDA #$A0 ; SPACE
JSR $FDED ; COUT
LDA $07 ; GET PDL 1
JSR $FDDA ; PRBYTE
JSR $FD8E ; CROUT
JMP START ; COMPLETE LOOP

-- 
]DF$
Mac GUI Vault - A source for retro Apple II and
Macintosh computing.
http://macgui.com/vault/

Back to comp.sys.apple2.programmer | Previous | NextNext in thread | Find similar


Thread

Simultaneous Paddle Readings dog_cow@macgui.com (D Finnigan) - 2011-07-27 00:56 +0000
  Re: Simultaneous Paddle Readings Michael J. Mahon <mjmahon@aol.com> - 2011-07-27 02:27 -0500
  Re: Simultaneous Paddle Readings Patrick Schaefer <pa.schaefer@web.de> - 2011-07-27 15:05 +0200

csiph-web