Here is my go at understanding the hardwareside of reading the Creativision keyboard and joysticks...
In the CV the 6821 PIA reads the keyboard and joystick inputs. (it also feeds the soundchip with data and does the tape I/O)
During reading:
Port B (PB0 - PB7) are put into Input mode (they are three-state-high-impedance)
PB0 - PB7 are pulled "high" with the 8 x 3.3K resistors (so if no key is pressed or joystick moved all Port B bits are "1")
4 Pins of Port A (PA0 - PA3) are put to output mode and set to "high"
Every 20ms, PA0 - PA3 are set to "low" for a short impuls (strobe) at first PA 0,1 (the right controller) then PA 2,3 (the left controller) (as the 20ms equal 50Hz, i guess this happens during an interrupt?)
If a key is pressed or a joystick moved 1,2 or 3 Port B lines are connected to a corresponding Port A line => and the short "low" strobe pulls the Port B lines "low", so pressed keys are read as "0"s
The 16 diodes (D0 - D15) provided that only during the "low" strobe on the PA lines the state of the PB lines is influenced by keypresses/joymoves (as no connection to a "high" PA line ie. a +5V signal can get thru the diodes, only a connection to "low" can pull the PB lines "low")
I hope i got this right :0) any comments from the experts?
Cheers, TOM:0)
This is the fitting part of the Creativision schematic...
6821_controller_interface.jpg
You do not have the required permissions to view the files attached to this post.