Joystick/Keyboard matrix decoding
Posted: Wed Mar 16, 2022 11:15 am
Is there a schematic diagram for the joystick/keyboard matrix? By looking at the datasheet (circuit 3.pdf) I see the PIA data ports are connected to J1 and J2, which I think are the joysticks connectors, but I have no clue how they are actually wired.
My actual understanding of the decoding is (please correct me if I am wrong):
- PA3, PA2, PA1, PA0 work as "select" lines (negated logic, activated when "0")
- the user queries the matrix in 4 steps, one for each select line
- at each step, the port B of the PIA is read and parsed into joystick directions or keystrokes (negated logic here as well, "0" means key pressed)
The Salora/2001 seems to have totally a different matrix, with PA2,3,4,5,6,7 as select lines for keyboard and second joystick, and PA0,1 for first joystick.
Is the above correct?
My actual understanding of the decoding is (please correct me if I am wrong):
- PA3, PA2, PA1, PA0 work as "select" lines (negated logic, activated when "0")
- the user queries the matrix in 4 steps, one for each select line
- at each step, the port B of the PIA is read and parsed into joystick directions or keystrokes (negated logic here as well, "0" means key pressed)
The Salora/2001 seems to have totally a different matrix, with PA2,3,4,5,6,7 as select lines for keyboard and second joystick, and PA0,1 for first joystick.
Is the above correct?