Controller connector: Difference between revisions

From SNESdev Wiki
Jump to navigationJump to search
m (should be WRIO not RDIO)
(Reformats the pinout to match our typical layout (names and directions in the diagram). De-densifies the information. Adds more detailed signal descriptions.)
Line 1: Line 1:
[[Category:Pinouts]]
== Pinout ==
Port 1
  _
  / \
| 7 | -- GND
| 6 | <> joypad IO D6
| 5 | <- joypad 1 D1
|---|
| 4 | <- joypad 1 D0
| 3 | -> OUT0
| 2 | -> joypad 1 /OE
| 1 | -- +5V
|___|
Port 2
  ___
|  |
| 1 | -- +5V
| 2 | -> joypad 2 /OE
| 3 | -> OUT0
| 4 | <- joypad 2 D0
|---|
| 5 | <- joypad 2 D1
| 6 | <> joypad IO D7
| 7 | -- GND
  \_/


  --------------------------    --------------------------
=== Signal descriptions ===
( 7  6  5  | 4  3  2 1 |   | 2 3  4  | 5  6  7  )
* '''OUT0''': Output to the controller, used on standard controllers to latch the current button state. Written manually via [[MMIO_registers#JOYOUT|JOYOUT]] D0 or automatically during autoread.
  --------------------------    --------------------------
* '''joypad 1 /OE''', '''joypad 2 /OE''': Clocks the joypad. Asserted when reading [[MMIO_registers#JOYSER0|JOYSER0]] (joypad 1) or [[MMIO_registers#JOYSER1|JOYSER1]] (joypad 2) and during autoread.
    Port 1                                        Port 2
* '''joypad 1 D1..0''': Controller input read manually via [[MMIO_registers#JOYSER0|JOYSER0]] D1..0 or automatically via [[MMIO_registers#JOY1|JOY1]] (D0) and [[MMIO_registers#JOY2|JOY2]] (D1).
* '''joypad 2 D1..0''': Controller input read manually via [[MMIO_registers#JOYSER1|JOYSER1]] D1..0 or automatically via [[MMIO_registers#JOY3|JOY3]] (D0) and [[MMIO_registers#JOY4|JOY4]] (D1).
* '''joypad IO D7..6''': Bidirectional IO bits accessed through [[MMIO_registers#RDIO|RDIO]] and [[MMIO_registers#WRIO|WRIO]] D7..6. D7 also functions specially as a light pen input via [[PPU_registers#OPHCT|OPHCT]] and [[PPU_registers#OPVCT|OPVCT]].


== Standard controller wiring ==
{| class="wikitable"
{| class="wikitable"
! Line !! Port 1 !! Port 2 !! Wire Color
! Color !! Pin !! Name
|-
|-
! 1
| White || 1 || +5V
| '''+5V''' || '''+5V''' || White
|-
|-
! 2
| Yellow || 2 || joypad /OE
| '''Clock'''<br/> [[MMIO_registers#JOYSER0|JOYSER0]] read<br/> autoread
| '''Clock'''<br/> [[MMIO_registers#JOYSER1|JOYSER1]] read<br/> autoread
| Yellow
|-
|-
! 3
| Orange || 3 || OUT0
| '''Latch'''<br/> [[MMIO_registers#JOYOUT|JOYOUT]] D0 write<br/> autoread
| '''Latch'''<br/> [[MMIO_registers#JOYOUT|JOYOUT]] D0 write<br/> autoread
| Orange
|-
|-
! 4
| Red || 4 || joypad D0
| '''Data 1'''<br/> [[MMIO_registers#JOYSER0|JOYSER0]] D0<br/> autoread: [[MMIO_registers#JOY1|JOY1]]
| '''Data 1'''<br/> [[MMIO_registers#JOYSER1|JOYSER1]] D0<br/> autoread: [[MMIO_registers#JOY3|JOY3]]
| Red
|-
|-
! 5
| Brown || 7 || GND
| '''Data 2'''<br/> [[MMIO_registers#JOYSER0|JOYSER0]] D1<br/> autoread: [[MMIO_registers#JOY2|JOY2]]
| '''Data 2'''<br/> [[MMIO_registers#JOYSER1|JOYSER1]] D1<br/> autoread: [[MMIO_registers#JOY4|JOY4]]
|
|-
! 6
| '''IO'''<br/> [[MMIO_registers#WRIO|WRIO]] D6
| '''IO'''<br/> [[MMIO_registers#WRIO|WRIO]] D7
|
|-
! 7
| '''Ground''' || '''Ground'''
| Brown
|}
|}

Revision as of 09:39, 12 January 2024

Pinout

Port 1
  _
 / \
| 7 | -- GND
| 6 | <> joypad IO D6
| 5 | <- joypad 1 D1
|---|
| 4 | <- joypad 1 D0
| 3 | -> OUT0
| 2 | -> joypad 1 /OE
| 1 | -- +5V 
|___|

Port 2
 ___
|   |
| 1 | -- +5V
| 2 | -> joypad 2 /OE
| 3 | -> OUT0
| 4 | <- joypad 2 D0
|---|
| 5 | <- joypad 2 D1
| 6 | <> joypad IO D7
| 7 | -- GND
 \_/

Signal descriptions

  • OUT0: Output to the controller, used on standard controllers to latch the current button state. Written manually via JOYOUT D0 or automatically during autoread.
  • joypad 1 /OE, joypad 2 /OE: Clocks the joypad. Asserted when reading JOYSER0 (joypad 1) or JOYSER1 (joypad 2) and during autoread.
  • joypad 1 D1..0: Controller input read manually via JOYSER0 D1..0 or automatically via JOY1 (D0) and JOY2 (D1).
  • joypad 2 D1..0: Controller input read manually via JOYSER1 D1..0 or automatically via JOY3 (D0) and JOY4 (D1).
  • joypad IO D7..6: Bidirectional IO bits accessed through RDIO and WRIO D7..6. D7 also functions specially as a light pen input via OPHCT and OPVCT.

Standard controller wiring

Color Pin Name
White 1 +5V
Yellow 2 joypad /OE
Orange 3 OUT0
Red 4 joypad D0
Brown 7 GND