Atari 2600 Input
The 2600 came with two different controllers. The paddle was for the pong game that was included in the system and the joystick was used for the included combat game. Very few additional games made use of the paddle controller with the joystick becoming the primary input device for the 2600.
The paddle controllers are what are known as capacitive controllers. The idea here is that the time it takes to charge the capacitor determines how far the player has twisted the controller. These are read using what is known as dumped input ports which are INPT0, INPT1, INPT2, and INPT3.
Joysticks are much simpler to program for as they use latched inputs. The concept here is fairly simple. A 2600 joystick has five buttons, four for the directions and one for the action button. These buttons are tied to bits on the INPT4 and INPT5 latched ports. The latches are enabled which makes them all positive (1 bits). The joystick will clear the latches when a button is pressed. The latch remains cleared until the port is enabled again even if the button is returned to the up state.
The idea here is that at the start of the frame you enable the latched ports which resets the button states. At the end of the frame you read the value of this port which tells you which buttons were down during the frame.
Other controllers were also released for the 2600, with the star raiders controller probably being the best known. As with modern day consoles, non-included controllers tend to not become widely adapted as only people who have the controller are going to buy games that require that controller. These controllers use the provided input ports but use the bits differently.
Finally, the console buttons are also under control of the software. This may seem weird to programmers who are use to the operating system managing things for you, but remember that the 2600 does not have an operating system. These buttons are read only and are read from SWCHB. The buttons on the console are P0 difficulty, P1 difficulty, Color/BW, game select, and reset. The power switch is obviously not under software control.