General Purpose port
This page was last modified 16:19, 28 March 2018 by Rderooy. Based on work by Mars2000you and Tvalenca and others.
MSX Joystick ports

The MSX standard defines two general purpose ports, which can also be used for input devices such as a joystick, joypad, mouse, paddle controllers, trackballs, graphic tablet... and even as a game network (ex: F1 3D Spirit).

Compatibility

The DE9 connector, first used on the Atari 2600 became quite popular at the time, and was used by many game consoles and home computers. As such many peripherals with this connector where made. Unfortunately the Atari 2600 only had a single trigger button, and the different game console and home computer vendors implemented the second trigger button in inconsistent ways which creates incompatibility. Still some Joysticks or gamepads meant for other computer systems can sometimes be used with the MSX.

Some joysticks even had a selector switch to select the system you where connecting it to.

  • Fully Compatible
    • Amstrad CPC-464 (joystick only)
    • Fujitsu FM-77 / FM Towns (joystick & mouse)
    • NEC PC-88 (joystick & mouse)
    • Roland mouse
    • Roland tablet
    • Sharp X1 / X68000 (joystick only)
  • Partially Compatible
    • Atari 400/800/2600 (single button only)
    • SEGA SG-1000, Mark III and Master System (single button only)
  • Not Compatible
    • Atari 7800
    • Commodore (C64, C128, Amiga)
    • PC Serial Mouse
    • Sega
    • ZX Spectrum
ATTENTION!
An Amiga mouse should not be connected to an MSX! Pin5 is +5V on the MSX, but used for Button 2 on the Amiga. Since on the Amiga the buttons are active low, connecting an Amiga mouse to the MSX and pressing button 2, will short circuit the supply voltage.
ATTENTION!
The connector is the same as used for many RS-232C serial devices, they are electrically incompatible and serial devices should not be plugged into the MSX port, or vice-versa.

Hardware

MSX uses a digital joystick design with a straight forward mapping. The port is a DE-9 type (often incorrectly called DB-9), with the male side on the MSX, and the female side on the game controller side.

Pin Use Type Description
1 UP I Joystick Up
2 DOWN I Joystick Down
3 LEFT I Joystick Left
4 RIGHT I Joystick Right
5 +5V DC +5V power source (50mA)
6 TRG 1 I/O Trigger button A
7 TRG 2 I/O Trigger button B
8 OUT O
9 GND Signal ground


Schematic Circuit:

Schematic circuit of standard joystick, from MSX side
Schematic circuit of standard joystick, from MSX side














If a MSX mouse is connected, the pins are used as follows;

Pin Use Type Description
1 Data b0 I
2 Data b1 I
3 Data b2 I
4 Data b3 I
5 +5V DC +5V power source (50mA)
6 TRG 1 I/O Trigger button A
7 TRG 2 I/O Trigger button A
8 Strobe O
9 GND Signal ground

The system works as follows:

The MSX Mouse sends 2 signed bytes to the computer, X and Y. These bytes must be, respectively, added to the current X and Y location, so it is a relative movement. So X=0 means X is the same, X=1 means X=+1 and X=255 means X=-1. This is very easy to implement, however it poorly supports mouse speed control, because it's a digital signal. Well, anyways, those 2 bytes are transferred in 4 parts. The computer reads pins 1-4 four times, afterwards signalling the mouse to send the next 4 bits by complementing pin 8.

Programming

See Joystick control for more information