SNES controller to Genesis/Megadrive adapter

Introduction

If you want to play games on your Genesis/Megadrive console but have a strong preference for SNES controllers, or own many cool arcade sticks for the SNES which you'd like to use, an adapter to connect SNES controllers to your Genesis/Megadrive is exactly what you need.

I used an Atmel atmega8a MCU do build this adapter, and optimising the code until it would react fast enough to the console requests was a fun challenge which I took the time to document.



See also: SNES controller to Atari/Commodore adapter




Button mappings

GenesisSNES 1SNES 2SNES 3SNES 4SNES 5SNES 6
Start Start Start Start Start Start Start
Mode Select Select Select Select Select Select
A A B Y X A B
B B A B Y B A
C X Y A B X R
X Y X L A Y Y
Y L L X R L X
Z R R R L R L
D-Up D-Up D-Up D-Up D-Up D-Down D-Up
D-down D-down D-down D-down D-down D-up D-down
D-left D-left D-left D-left D-left D-right D-left
D-right D-right D-right D-right D-right D-left D-right
Enabling a mapping:
Mappings are enabled by holding buttons on the SNES controller when connecting the adapter or turning the console on.

MappingActivation
SNES 1Default
SNES 2Hold B
SNES 3Hold Y
SNES 4Hold X
SNES 5Hold L
SNES 6Hold R

Note: SNES 6 mapping is not available yet.




Wiring

I used a simplified version of my multiuse pcb2 for this project. The only components present are the microcontroller, capacitors, and a 16 MHz crystal.

Schematic:



Wiring:

Wiring tables for the Genesis/Megadrive (DB9-F connector) and SNES controller:
DB9 PinSignal nameAVR pin name
1UP/UP/Z PC5
2DN/DN/Y PC4
30/LF/X PC3
40/RT/ PC2
5VCC VCC
6A/B PC1
7SELECT PD2 (INT0)
8GND GND
9START/C PC0
SNES pinAVR pin name
VCCVCC
GNDGND
CLOCKPB5
DATAPB4
LATCHPB3


Here are a few pictures of my development setup, all wired according to the above tables. Notice how the standard solder cup DB9-F I used to connect to the console cannot be fully inserted. Ideally a Genesis/Megadrive controller or extension cable should be used.

DB9-F connector

DB9-F connector

Multiuse PCB2

Multiuse PCB2

Testing with Comix Zone

Testing with Comix Zone





Firmware

Warning: Note that while this SNES to Megadrive/Genesis adapter and the SNES to Atari/Commodore adapter share the firmware below, they each have their own specific wiring. Never use an adapter built for Genesis/Megadrive on a Commodore or Atari system.
Version v1.6
October 26, 2019 (Saturday)
  • Add a new mapping (SNES 6 - Hold R)
File(s):
snes2md-1.6.tar.gz (21.4 KB)
snes2md.m168.1.6.hex (6.2 KB)
snes2md.m8.1.6.hex (6 KB)
Show previous releases...
Version v1.5.1
October 22, 2016 (Saturday)
  • Atmega168 support
File(s):
snes2md-1.5.1.tar.gz (21.3 KB)
snes2md.m168.1.5.1.hex (6 KB)
snes2md.m8.1.5.1.hex (5.8 KB)
Version v1.4
July 26, 2014 (Saturday)
  • The adapter is now usable with SMS games running on a Megadrive/Genesis
File(s):
snes2md-1.4.tar.gz (20.6 KB)
snes2md-1.4.hex (5.8 KB)
Version v1.3
June 23, 2014 (Monday)
  • Add a 3 button compatibility mode. Hold SELECT at power up to enable.
File(s):
snes2md-1.3.tar.gz (20.5 KB)
snes2md-1.3.hex (5.4 KB)
Version v1.2
October 29, 2013 (Tuesday)
New features:
  • Added two new Genesis mappings
  • Added a new Atari mapping
  • Added support for 2nd fire button (Amiga)
  • Added auto-fire for Atari mode (Button 1/Fire). Selectable auto-fire speed 30Hz, 25Hz, 20Hz, 16.667Hz, 15Hz and 12.5Hz
  • Auto-fire lock mode for Button 1/Fire. (Toggled by START)
File(s):
snes2md-1.2.tar.gz (19.8 KB)
snes2md-1.2.hex (5.3 KB)
Version v1.1.1
October 20, 2013 (Sunday)
Updated Atari mode mappings.
File(s):
snes2md-1.1.1.tar.gz (18.7 KB)
snes2md-1.1.1.hex (3.4 KB)
Version v1.1
October 8, 2013 (Tuesday)
Implemented Atari/Commodore support:
  • Two selectable button mappings
  • Enabled by grounding PB1. Note: A slightly different DB9 wiring is required.
File(s):
snes2md-1.1.tar.gz (18.6 KB)
snes2md-1.1.hex (3.4 KB)
Version v1.0
September 14, 2013 (Saturday)
Initial release:
  • Genesis/Megadrive 6 button pad emulation
  • 3 Selectable button mappings
File(s):
snes2md-1.0.tar.gz (18.1 KB)
snes2md-1.0.hex (2.8 KB)
This project is also available on GitHub!
To request features, report issues or contribute, you may send me an email or use the GitHub repository:
https://github.com/raphnet/snes2md
Using the .hex files

The micro-controller (Atmega8 or Atmega168) needs to be programmed with the correct .hex file. The "fuse bytes" for this project are:
  • Atmega8: high_byte=0xc9, low_byte=0x9f.
  • Atmega168: high_byte=0xdc, low_byte=0xd7, extended_byte=0x01
For more information about the tools required to program an AVR microcontroller, please visit my AVR programming page.

Source Code (.tar.gz files):
Unless indicated otherwise, the source code is published under the GPL license. Please consult the included LICENSE file for more information. The project compiles using the included makefiles using avr-gcc under Linux.




User pictures

I like seeing how others build my projects. If you build an adapter, please send me pictures and I'll add them here.

January 6, 2015 (Tuesday)
Roman Sysoev from Russia sent me the following pictures of the prototype and final PCB version (enclosure still missing) of the SNES controller to Genesis/Megadrive he built.





References

The following document(s) were useful:


Disclaimer

I cannot be held responsible for any damages that could occur to you or your equipment while following the procedures present on this page. Also, I GIVE ABSOLUTELY NO WARRANTY on the correctness and usability of the informations on this page. Please note, however, that the procedures above have worked in my case without any damages or problems.

Now you cannot say that I did not warn you :)