54016-54271 (R) Serial data input frame error caused by missing or extra bits. Beset latches as above. BIT 2 is first set to zero to reset POT registers to zero (dumping the capacitors used to change the POT registers). Then BIT 2 is set to one to enable the fast scan. Fast scan is not as accurate as the normal scan routine. BIT 2 must be reset to zero to enable the normal scan mode; otherwise, the capacitors will never dump. --------------------------------------------------------------------------- Locations 53776 to 54015 ($D210 to $D2FF) are duplications of locations 53760 to 53775 and have no particular use at present. --------------------------------------------------------------------------- PIA: 6520 CHIP 54016-54271 D300-D3FF The Peripheral Interface Adapter (PIA) integrated circuit is a special microprocessor used to control the Atari ports, controller jacks one to four. Ports can be used for both input and output simultaneously or alternately. Barely tapped at the time of this writing, the ports represent a major resource for external (and internal) control and expansion. PIA also processes two of the IRQ interrupts: VINTER and VPRCED, vectored at locations 514 to 517 ($202 to $205). These interrupts are unused by the OS, but also may be used to provide greater control over external devices. 54016 D300 PORTA (W/R) Reads or writes data from controller jacks one and two if BIT 2 of PACTL (location 54018) is one. Writes to direction control if BIT 2 of PACTL is zero. These two port registers also control the direction of data flow to the port, if the controller register (54018, below) is POKEd with 48 ($30). Then, if the bits in the register read zero, it is in input (R) mode; if they read one, it is in output (W) mode. A zero POKEd here makes all bits input, a 255 ($FF) makes all bits output. BITs 0 to 3 address pins one to four on jack one, BITs 4 to 7 address pins one to four on jack two. POKE 54018 with 52 to make this location into a data register again. Shadow registers are: STICK0 (632; $278, jack one), STICK1 (633; $279, jack two) and PTRIG0-3 (636-639; $27C-$27F). Bits used as data register 7 6 5 4 3 2 1 0 --Jack 0-- --Jack 1-- --Stick 1-- --Stick 0-- Forward = BIT 0, 4 = 1 Backward = BIT 1, 5 = 1