The Atari 7800 joystick has the only difference from its predecessor, the 2600ish joystick, that it has 2 buttons instead of one. The Atari 7800 engineers wanted to have a retro compatibility with one button joysticks on 7800 and 2600 machines and vice-versa. This was done by using the two remaining pins of the 2600 standard as button one and button two in positive logic. These pins (9 and 5) are normally use for the pot end of the paddle controllers. Since they are TTL inputs, they can be used as button inputs. Pin 6 (normal one button pin), can be put in 5 volts pull-up mode to enable the two buttons mode in a 7800 console. Thus, this will push a 5 volts on either pin 9 or 5 if button one or two are pressed.
This joystick in a 2600 machine will act as a one button device, having both buttons grounding pin 6. Yup, it’s that easy.
This schematic might help to understand how a 7800 machine can read this two buttons joystick;
With a 2600 joystick, only what in the dashed box exists. Pin 9 and 5 are thus ignored.