Sega Genesis/Megadrive controller adapter with keypad emulation for Atari 5200

Similar projects worth following
This adapter lets you play Atari 5200 using either a 3 button or a 6 button Sega Genesis/Megadrive controller yet providing full keypad control.

The circuit is built around an Arduino Nano and two analog multiplexers.

Potentiometer Inputs

Interface with analog joystick is borrowed from "Low Priced MasterPlay clone adapter" and uses two resistors and a capacitor on each axis to convert the digital directionals into equivalent charging current that provides charging time for minimum, medium and maximum position on each axis.

Potentiomenter Inputs
Potentiomenter Inputs

Table below describes the possible states to apply on H (half) and F (full) lines to obtain the possible states of X and Y axes. 

HFCharging ResistancePositon
OpenOpen47k + 47kDown/Right
Dont' careHigh0Up/Left

Cav (Vpot) input is monitored and provides the same behaviour as a Joystick so the games will always detect the device as a Joystick and not as a Trackball. A Zener diode and a current limiting resistors are added to the input of the AVR as the Cav Voltage can reach up to 6.4 Volts.

Keypad Emulation

Keypad presses are emulated by activating a pair of analog multiplexers. Only 1 (one) keypress can be simulated at a time. When there is no key pressed the "output" multiplexer is inhibited.

6 button controllers  uses the MODE key on the right shoulder to alternate functions assigned to the buttons, according with the following layout:

3 button controllers use the keys C, C+B and C+B+A to switch between alternate functons and yet provide full keyboard coverage.

  • 1 × Arduino Nano V3 AVR based development board
  • 2 × 220nf/63V Polyester capacitor
  • 1 × 100nF/63V Polyester capacitor
  • 4 × 47k/0.25W Resistor PTH
  • 1 × 4k7/.25W Resistor PTH

View all 10 components

  • Unified button mapping for 3/6 button controllers

    danjovic03/13/2020 at 03:13 0 comments

    Created a new button mapping for 3 and 6 button. Now both controller types sheare the same button mapping and there is no need to use the MODE key.

  • Support for 6 button controlles w/o MODE key

    danjovic03/02/2020 at 02:02 0 comments

    Added support for 6 button controllers that do not have a MODE button on the shoulder.

    At the very beginning of the code there is one directive:
    #define NOMODEKEY

    if the line with such directive is not commented the code generated will allow the 6 button controller to use the button C as a modifier, behaving exactly like the 3 button controller. In that case the keys X,Y,Z will still be mapped to '*', '0', and '#' respectively.

  • Prototype wholly working

    danjovic03/01/2020 at 20:32 0 comments

    Have just finished to assemble the circuit and performed some tests.. As everything worked fine I can call it a release!

    When no directional is being pushed the central positioning is well into the middle of the scale. When either direction is pressed the Pot values changes to 0 and 227 accordingly.

  • Testing the keypad emulation

    danjovic03/01/2020 at 07:13 0 comments

    Keypad emulation is working great, either with 3 button or 6 button genesis controller.

    LEDs are mounted on protoboard to monitor the state of the lines driving the multiplexers.

    Verified interrupt mechanism to cut the directional outputs when voltage CAV drops down to zero and keep like that until the next rise. This should deal with ATARI 5200 trackball/joystick detection.

    Activation of trigger buttons and axes was tested with leds on outputs. Need to finish the wire on protoboard and test on port emulator but I consider that the firmware reached a beta stage.

View all 4 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates