NES joystick controller pinout
o 4 1 o o 5 2 o o 6 3 o o 7
- +5VDC Supply
- Data out
The NES starts the show by sending a high pulse down the Latch line, which makes the 4021 (8-bit shift register) inside the controller grab and store the state of all buttons.
Then the NES sends a series of eight low pulses down the CLK line, which makes the controller shuffle bits (one for each CLK pulse) down the Data Out line according to which buttons were pressed when latched. A low bit on the Data Out line means the button is pressed.
Clock pulse and corresponding button
- Pins 2 and 3 aren”t used on the standard pad. I believe they may be used with alternative controllers like the light gun or Arkanoid paddle.