Connect PC gameport joysticks to MSX computers.
Note
No build instructions are yet provided, but if you are brave enough go for the recommended build.
The msx-joypc v1 is an adapter that allows connecting PC gameport joysticks to MSX general purpose I/O ports.
The main features of the msx-joypc v1 adapter are:
- small footprint
- made of widely available electronic components
- behaves as a cord extension between the MSX computer and the PC gameport joystick
- uses a female standard DE9 connector on the adapter's MSX joystick side
- uses a DA-15 socket on the adapter's PC gameport joystick side
- no need for external power supply, the adapter draws current from the MSX port
- low power consumption (<20mA)
- serial debug provides information about the operation of the adapter
The msx-joypc v1 adapter uses an Atmega328p to convert the PC gameport joystick signalling to the MSX joystick standard signalling.
A two-sided printed circuit board (PCB) is used to put together all components:
- An Atmega328p as the main MCU, running at 5V 16MHz
- Two 74LS03 quad 2-input NAND gates with open collectors to completely mimic the standard MSX joystick behavior
- A PTC fuse to minimize damage to the MSX computer in case something goes wrong with the board
- Several additional required components (crystal, diode, leds, resistors, ceramic capacitors and a tantalum capacitor)
- An angled DA-15 socket is used to directly connect the PC gameport joystick
- A PH2.0 connector is used to connect the MSX cable extension
- A 2.54 pitch debug header is added for serial debug and programming
- An ICSP header is provided for burning a bootloader or to flash the chip using a hardware programmer
- A DIP switch to configure the adapter for compatibility with different PC joysticks
Connection to the MSX general purpose I/O port is implemented using a DE9 joystick extension cable with a female DE9 connector on one side and a loose end on the other side. The MSX joystick extension cable loose end is wired according to the following pinout mapping.
MSX joystick connector pinout, from controller plug side |
MSX side pin | Cable color (may vary) | Signal |
---|---|---|
5 | Brown | +5v |
4 | Orange | RIGHT |
3 | Grey | LEFT |
2 | Black | DOWN |
1 | Red | UP |
6 | Green | TRIGA |
7 | White | TRIGB |
8 | Blue | OUT |
9 | Yellow | GND |
The msx-joypc v1 is fully compatible with MSX joysticks and honors the pin8 (OUT) signal.
The adapter uses open collector outputs (using 74LS03 Quad 2-Input NAND gates with open collector outputs) which makes the adapter safer 1 than the standard MSX joystick schematic depicted in the MSX Technical Data Book, as it avoids a series of undesired conditions that can lead to bus contention/short circuits.
Power is drawn from the +5V signal of the MSX general purpose I/O port, which is capable of delivering up to 50mA 2. The msx-joypc v1 draws below 20mA from the port when a controller is connected, so it is on the safe side. Anyway, the msx-joypc adapter uses a Positive Temperature Coeficient (PTC) resettable fuse of 50mA (F1) to limit current in case something goes wrong.
Also on the power side, a 1N5819 Schottky diode (D1) is used to avoid leaking current from the msx-joypc adapter to the MSX in case power is applied to one of the VCC pins available on the ICSP or Debug headers while the adapter is plugged into an MSX.
Connection to the PC gameport joystick is done via a PC gameport joystick socket.
Gameport connector pinout, from PC gameport joystick side |
Gameport pin | Signal | Comment |
---|---|---|
1 | +5V | +5V power |
2 | B1 | Button1 |
3 | X1 | Joystick 1 - X axis |
4 | GND | ground |
5 | GND | ground |
6 | Y1 | Joystick 1 - Y axis |
7 | B2 | Button2 |
8 | +5V | +5V power |
9 | +5V | +5V power |
10 | B3 | Button3 |
11 | X2 | Joystick 2 - X axis |
12 | GND/MIDI_OUT | ground / MIDI out |
13 | Y2 | Joystick 2 - Y axis |
14 | B4 | Button4 |
15 | +5V/MIDI_IN | +5V power / MIDI_IN |
The PC gameport joystick uses 5V for power and logic.
Power for the PC gameport joystick is provided by the MSX +5V rail.
Please, use msx-joypc-v1 Build2 for making new boards.
This build fixes the following errata:
- make the ICSP header work again
- add (optional) RN1 and RN2 4k7 pull-downs to joystick signals to avoid spurious button joystick actions while powering up
This board has been successfully built and works fine.
Warning
This build is broken. I messed up the ICSP header after a last-minute pin reordering. Meh. It can be fixed by cutting two traces, exposing two traces and using a pair of jumper wires to bridge the necessary points.
Do NOT build. Use the recommended build instead.
The msx-joypc v1 adapter firmware uses a slightly modified version of Necroware's GamePort adapter firmware to read the PC gameport joystick status.
The following elements are used as inputs:
- joystick X and Y axis as direction arrows
- button 1, as Trigger 1
- button 2, as Trigger 2
Those elements' status are processed by the msx-joypc firmware and transformed into MSX general purpose I/O port's signals on the fly.
A simple acrylic enclosure design for the project is provided to protect the electronic components and provide strain relief for the extension cord.
The enclosure uses a 3mm acrylic sheet.
Joystick Model | Buttons | Axes | Hat | SW1-4 | Protocol | Comments |
---|---|---|---|---|---|---|
Generic Analog | 2 | 2 | 0 | 0000 | Analogue | |
Generic Analog | 4 | 2 | 0 | 1000 | Analogue | |
Generic Analog | 4 | 3 | 0 | 0100 | Analogue | 3rd Axis is throttle |
Generic Analog | 4 | 4 | 0 | 1100 | Analogue | |
CH FlightStick | 4 | 4 | 1 | 0010 | Analogue | |
CH F16 Combat Stick | 10 | 3 | 1 | 0110 | Analogue | |
ThrustMaster | 4 | 3 | 1 | 1010 | Analogue | |
Sidewinder GamePad | 10 | 2 | 0 | 1110 | Sidewinder | |
Sidewinder 3D Pro | 8 | 4 | 1 | 1110 | Sidewinder | |
Sidewinder 3D Pro Plus | 9 | 4 | 1 | 1110 | Sidewinder | First version of Precision Pro |
Sidewinder Precision Pro | 9 | 4 | 1 | 1110 | Sidewinder | |
Sidewinder FFB Pro | 9 | 4 | 1 | 1110 | Sidewinder | FFB not yet implemented |
Sidewinder FFB Wheel | 8 | 3 | 0 | 1110 | Sidewinder | FFB not yet implemented |
Gravis GamePad Pro | 10 | 2 | 0 | 0001 | GrIP | |
Logitech WingMan Extreme | 6 | 3 | 1 | 1001 | ADI | |
Logitech CyberMan 2 | 8 | 6 | 0 | 1001 | ADI | |
Logitech WingMan Interceptor | 9 | 3 | 3 | 1001 | ADI | 2 hats are mapped as 4 axes |
Logitech ThunderPad Digital | 8 | 2 | 0 | 1001 | ADI | Directional buttons mapped as 2 axes |
Logitech WingMan Gamepad | 11 | 2 | 0 | 1001 | ADI | Directional buttons mapped as 2 axes |
Logitech WingMan Light | 2 | 2 | 0 | 0000 | Analogue |
For an up to date information see Which joysticks does this adapter support on Necroware's GamePort adapter project.
LED | State | Indication |
---|---|---|
POWER | Off | board is not receiving 5V power |
POWER | Solid Red | board is receiving 5V power |
JoyPort | Off | no PC joystick connected or recognized |
JoyPort | Solid Green | PC joystick connected and ready to use |
MSX general purpose I/O port
Atmega328p pinout
Joystick PC Gameport pinout
PC joystick interface
Necroware's GamePort adapter project
Using a PC Joystick with the Arduino
Arduino gameport interface
DIY gameport to USB adapter
- https://www.oshwa.org/open-source-hardware-logo/
- https://en.wikipedia.org/wiki/File:Numbered_DE9_Diagram.svg
Footnotes
-
https://www.msx.org/wiki/Joystick/joypad_controller (see "Undesired Conditions") ↩