I/O port pinout
Mega Drive I/O port pinout
Master System peripherals use the same pinout, so you can plug them as-is and use them in your homebrew. Take into mind that often they aren't easy to automatically detect (when it's even possible), so consider supporting a Mega Drive counterpart when possible.
A lot of older systems (mostly computers) used joysticks over DE-9 ports. The pinout is usually not compatible with those, and you should look into an adapter to make sure you don't fry anything (in particular, the pins for VCC and GND are all over the place).
Saturn I/O port pinout
Saturn's I/O ports have the same lines as the Mega Drive ones, but the plugs have a different shape. You can make a passive adapter that simply rewires the connections in order to use Saturn peripherals in your Mega Drive homebrew (and vice versa). Note that Mega Drive and Saturn peripherals are not compatible with each other and you have to explicitly include code to handle them.
A lot of sites seem to give the pins names based on their use with a
Saturn controller rather than their I/O names, the following table
indicates the corresponding names (note that +5V
refers to
the TL
pin which is held high, not the actual power line):
Common name | Mega Drive style name |
---|---|
VCC | VCC
|
GND | GND
|
D0 | DATA0
|
D1 | DATA1
|
D2 | DATA2
|
D3 | DATA3
|
S0 | TH
|
S1 | TR
|
+5V | TL
|