54016$D300PORTA STICK0 STICK1 all

Read or write data from the control ports (joystick ports), depending on how the data direction is set (default: 0 "read/input"). To set the direction, set Bit 2 of PACTL to "0" and define the direction by setting the bits of PORTA (0=read, 1=write) for each input/output line. Then set Bit 2 of PACTL to "1" again.


PACTL=PACTL && %11111011 ;set Bit 2 to 0
PORTA=%11110000          ;set Port 2 to output/write, Port 1 is input/read
PACTL=PACTL %% %00000100 ;set Bit 2 to 1

BitFunctionDescriptionJoystick directionPaddletrigger
7PA7Joystick Port 2 Pin 4RightPaddle 4 PTRIG3
6PA6Joystick Port 2 Pin 3LeftPaddle 3 PTRIG2
5PA5Joystick Port 2 Pin 2Downnot used
4PA4Joystick Port 2 Pin 1Up not used
3PA3Joystick Port 1 Pin 4RightPaddle 2 PTRIG1
2PA2Joystick Port 1 Pin 3LeftPaddle 1 PTRIG0
1PA1Joystick Port 1 Pin 2Downnot used
0PA0Joystick Port 1 Pin 1Upnot used

Joystick direction Bit=0 when pushed in that direction

Paddletrigger Bit=0 when pressed

see also: Controller topics


next: PORTB

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 03-Feb-2023 16:21 by Florian Dingler  
G’day (anonymous guest) My Prefs
© 2010-2021 AtariWiki
All content in the Wiki is licensed under Creative Commons Share Alike License, unless otherwise noted.
JSPWiki v2.8.3