PIA Documentation

by Fox/Taquart


Registers

 Address  Read/Write register 
^30PORTA
^31PORTB
^32PACTL
^33PBCTL


Description

PORTA - Port A
A bit is RESET on an event
bit 0 - joystick 0 up
bit 1 - joystick 0 down
bit 2 - joystick 0 left / paddle 0 button
bit 3 - joystick 0 right / paddle 1 button
bit 4 - joystick 1 up
bit 5 - joystick 1 down
bit 6 - joystick 1 left / paddle 0 button
bit 7 - joystick 1 right / paddle 1 button

PORTA - Port B
Controls memory.
bit 0 - $c000-$cfff and $d800-$ffff:
0 - RAM
1 - OS ROM
bit 1 - $a000-$bfff:
0 - BASIC ROM
1 - RAM
bits 6-2 - extended memory control
bit 7 - $5800-$5fff:
0 - SELF TEST ROM
1 - RAM

PACTL - Port A Control
bits 1-0 - interrupts control (?) = 00
bit 2 - PORTA control
0 - input/output configuration
1 - data register
bit 3 - cassette motor
0 - on
1 - off
bits 7-4 - interrupts status (?) = 0011

PBCTL - Port B Control
bits 1-0 - interrupts control (?) = 00
bit 2 - PORTB control
0 - input/output configuration
1 - data register
bit 3 - serial devices command line
0 - on
1 - off
bits 7-4 - interrupts status (?) = 0011