PWM analog devices for the MSX

The MSX standard has native support for the PWM protocol, and uses it to read analog devices via the General Purpose ports (AKA joystick ports). This document describes how to build yourself some devices and adapters that use it, and how to easily read such devices.

This is the basic circuit of one PWM channel, and will be used as a building block for all devices for the MSX listed on this page:

Schematic of the 72LS123 circuit

The variations on each circuit will be:
Please note that each 74LS123 chip features two PWM channels. When only one of its channels is used, the other must be disabled to avoid interference.


1) MSX-Paddle:

It uses a single PWM channel, and can have up to five digital buttons. It's recommended to assemble them with at least three buttons: A, B and START. The case of an old NES, SNES or SMS controller can be used for that, as shown in the pictures below. You just have to install the potenciometer in the place of the directional buttons.

DIY MSX Paddle - photo 1
DIY MSX Paddle - photo 2

  a) Components

  b) DE9 female connector pinout

     1: (optional) Digital up or shoulder R1
     2: (optional) Digital down or shoulder L1
     3: aX (Q-pin of the 74LS123)
     4: START button
     5: Vcc
     6: A button
     7: B button
     8: B-pin of the 74LS123
     9: GND

All digital buttons must be connected to the pin-8 of the DE9 connector, just like a normal MSX 2-button joystick.
Be sure to connect the inputs of the second channel as described below, to disable it and prefent it from producing spurious oscillations:

2) IBM-PC DA15 joystick adapter (AKA joyDA15 adapter)

This adapter uses two monostable channels.

  a) Components for each channel

  b) DE9 female connector pinout and connections

      1: DA15 pin10
      2: 74LS123 pin5
      3: 74LS123 pin13
      4: DA15 pin14
      5: DA15 pins 1,8,9 and 74LS123 pin16
      6: DA15 pin2
      7: DA15 pin7
      8: 74LS123 pins 2 and 10
      9: DA15 pins 4,5, and 12

3) Atari-2600 dual-paddle adapter

  a) Components

  b) DE9 female connector pinout

     1: N/C
     2: N/C
     3: 74LS123 pin13
     4: 74LS123 pin5
     5: 74LS123 pin16 and Paddle DE9_pin7
     6: Paddle DE9_pin3
     7: Paddle DE9_pin4
     8: 74LS123 pins 2 and 10, and Paddle DE9_pin8
     9: GND

Software Programming

1) Channel mapping

The channels will be mapped as follows. See the Assembly and MSX-BASIC sections on how to read each channel.

 a) MSX-Paddle

     0            : R1 shoulder button
     1            : L1 shoulder button
     2            : aX (analog X)
     3            : START button
     4            : A button
     5            : B button

 b) joyDA15 adapter

     0            : D button
     1            : aY (analog Y)
     2            : aX (analog X)
     3            : C button
     4            : A button
     5            : B button

 c) Atari-2600 dual-Paddle

     2            : Paddle-1 analog X
     3            : Paddle-2 analog X
     4            : Paddle-1 button
     5            : Paddle-2 button

 d) Generic template for a dual-axis joystick

     0            : aZ (analog Z)
     1            : aY (analog Y)
     2            : aX (analog X)
     3            : aC (analog C)
     4            : A button
     5            : B button

     The digital buttons will have the following output: 00=Pressed, FFh=released.

e) Yamaha MMP-01

Check this article for the channel assignment on this device.

2) MSX-BASIC programming

3) Assembly programming

      The bits marked with "?" may contain random values and must be masked out from readings.

  Be careful to handle devices that are different than the standard MSX 2-button joystick, to avoid the infamous bug that some games have, where when a different device is left connected to the joystick port, the game has undesired collateral effects like interpreting a stuck direction.

  The connected devices can be identifyed in assembler via their signatures. The best way is to use HIDlib, as it handles both the detection and the disconnection of all MSX-HID devices.

5) Notes

These are hobbyist projects. Build and use them at your own risk.