9 pin D-SUB female connector at the controller
The Sega Mega Drive (released 1988 in Japan, marketed as the Genesis in North America from 1989) uses a DE-9 female socket on the console — the same D-Sub 9-pin shell pioneered by Atari for the 2600 joystick port. Sega extended the Atari layout by placing +5 V on pin 5, a second button on pin 9, and a console-driven select line (TH) on pin 7 that multiplexes additional button states. All signal lines are TTL-compatible and active-low: a pressed button or asserted direction shorts its pin to GND, while unpressed lines are pulled high internally. The console exposes three identical I/O ports (CTRL1, CTRL2, and EXP), each with DATA, CTRL, and serial-mode registers.
| Pin | Signal | Direction | Description |
|---|---|---|---|
| 1 | D0/Up | Input | Up direction / 6-btn: Z |
| 2 | D1/Down | Input | Down direction / 6-btn: Y |
| 3 | D2/Left | Input | Left direction (Sel High); Gnd or A (Sel Low) |
| 4 | D3/Right | Input | Right direction (Sel High); Gnd or Start (Sel Low) |
| 5 | +5V | Power | +5 V supply to controller |
| 6 | D4/TL | Input | Button B (Sel High) / Button A (Sel Low) |
| 7 | TH/Sel | Output | Select line driven by console; multiplexes button states |
| 8 | GND | Power | Ground |
| 9 | D5/TR | Input | Button C (Sel High) / Start (Sel Low) |
Signals
- D0 (Up) — directional up; when TH (Sel) is low, also used for Z button on 6-button pads
- D1 (Down) — directional down; when TH (Sel) is low, also used for Y button on 6-button pads
- D2 (Left) — directional left when TH is high; reads GND or button A depending on TH state for 3-button; X on 6-button pads
- D3 (Right) — directional right when TH is high; reads GND or Start depending on TH state for 3-button; Mode on 6-button pads
- +5V — +5 V logic supply provided by the console to power the controller’s internal circuitry
- D4 (TL) — button B when TH is high; button A when TH is low; maps to DATA register bit PD4
- TH (Sel) — select output driven by the console via the CTRL register (bit PD6 set to output); toggling this line multiplexes the controller button states across the data pins
- GND — signal and power ground reference
- D5 (TR) — button C when TH is high; Start when TH is low; maps to DATA register bit PD5
Notes
The 3-button controller uses a 74HC157 quad 2:1 multiplexer internally. When TH (Sel) is low, pins 1–4 read Up/Down/GND/GND and pins 6/9 read A/Start. When TH is high, pins 1–4 read Up/Down/Left/Right and pins 6/9 read B/C.
The 6-button controller replaces the 74HC157 with a custom logic device. Reading the extra buttons X, Y, Z, and Mode requires the console to toggle TH at least twice within 1.1 ms. Reliable data is available for 1.6 ms after the first Sel rising edge, with a 1.8 ms lockout before the sequence can restart. Software that polls too slowly or too quickly will not correctly read 6-button data.
The I/O port also supports RS-232C serial communication at 300, 1200, 2400, or 4800 bps through the same DE-9 pins, selectable via the S-CTRL register. The port is a general-purpose peripheral interface; supported peripheral types include keyboard, tablet, control ball, paddle, and printer, in addition to joystick.
The DATA register bit assignments in the Genesis I/O map are: PD0=Up, PD1=Down, PD2=Left, PD3=Right, PD4=TL, PD5=TR, PD6=TH. The CTRL register configures each pin as input (0) or output (1); the INT bit enables a TH-line interrupt for peripheral detection.
A PC parallel-port adapter can be wired as follows to use the controller on a PC (requires appropriate driver software):
| DB-25 (male) | DB-9 (male) | Via |
|---|---|---|
| 1 | 1 | — |
| 2 | 7 | — |
| 3, 4, 5, 6, 7, 8, 9 | 5 | each through a 1N4148 diode (diode-OR to pin 5) |
| 10 | 3 | — |
| 11 | 4 | — |
| 12 | 6 | — |
| 13 | 9 | — |
| 14 | 2 | — |
| 18, 19 | 8 | — |
The diodes are best soldered inside the DB25 connector housing.