9 pin D-SUB FEMALE connector at the joystick
The most common joystick type in home computers have been Atari-style digital joysticks. Those joysticks are calle after Atari, because this joystick type was first introduced in Atari 2600 videogame and then adopted to the home computers introduced on ever since (VIC 20, Commodore 64, Amiga, MSX-computers and even Sinclair Spectrum joystick adapters used this joystick type).
The joystick itself consisted of five whiched which are arranged to that four of them told about the joystick direction (UP, DOWN, LEFT, RIGHT) and one was for fire button. The joystick connector was 9 pin D-shell connector. Normally all of those whiches are open, but when joystick is turned from the center position, one or two position whiched are closed (according to what direction the stick is turned). The fire button worked so that it closes when button is pressed. All of the swiches are connected between ground and corresponding signal pin of the joystick connector.
Note: Connect Direction/Button to Ground for action.