Skip to content

3 or 6 Button Sega Genesis/Megadrive Controller converted to USB with a Raspberry Pi Pico and Circuit Python

License

Notifications You must be signed in to change notification settings

thinghacker/PiPicoUSBSegaController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PiPicoUSBSegaController

This is a very simple project to take a Raspberry Pi Pico and turn it USB joystick adapter for a 3 or 6 Button Sega Genesis/Megadrive Controller with supporting Circuit Python code.

Please note that the code requires the following libraries in addition to the base CircuitPython Install

Hardware

This setup is fairly minimal.

A Raspberry Pi Pico https://www.raspberrypi.org/products/raspberry-pi-pico/ and some dupont cables that can provide pins that connect to a 2x5 connector of a DB9 RS232 to 10 pin Ribbon Cable Connector Adapter similar to that below

image

For my case the follow is the pinout used

Pico Pin Pico Signal 2x5 / DB9 Pin Sega Signal Wire Colour
40 VBUS 5 +5V Red
38 GND 5 GND Black
34 GP28 7 Select Brown
32 GP27 1 Up / Z Orange
31 GP26 2 Down / Y Yellow
29 GP22 3 Left / X Green
27 GP21 4 Right / Mode Blue
26 GP20 6 B / A Purple
25 GP19 9 C / Start Grey

Theory of Operation

The Raspberry Pi Pico needs to have boot.py configured to create the custom USB HID Gamepad descriptor. It needs to be done here as by the time code.py begins, the USB interface is set to go The main code initialises the HID device and starts the main loop:

  • Toggle the select line to step through the various gamepad states that give button state information (additionally we can detect if a Sega gamepad is detected and if it is a 3 or 6 button variant)
  • Based on the read states, send HID updates to the host

References

About

3 or 6 Button Sega Genesis/Megadrive Controller converted to USB with a Raspberry Pi Pico and Circuit Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages