Controller Port

From Archaic Pixels
Jump to: navigation, search

The 8 pins of the joypad connector are:

  • pin 1 - Vcc
  • pin 2 - D0
  • pin 3 - D1
  • pin 4 - D2
  • pin 5 - D3
  • pin 6 - SEL
  • pin 7 - CLR
  • pin 8 - GND

The joypad port is accessible at the address $1000.

Reading $1000 returns the states of pins 2, 3, 4 and 5 as long as the following informations :

  • bit 7 - CD-ROM base unit presence.
  • bit 6 - Country detection (0: Japan, 1: US)
  • bit 5 - Unused (always 1)
  • bit 4 - Unused (always 1)
  • bit 3 - Joypad port 5 (D3)
  • bit 2 - Joypad port 4 (D2)
  • bit 1 - Joypad port 3 (D1)
  • bit 0 - Joypad port 2 (D0)

Writing bit 0 and 1 of $1000 will update pin 6 and 7 states.

  • bit 1 - Joypad port 7 (CLR)
  • bit 0 - Joypad port 6 (SEL)