MegaPlay adapter lets you play Atari 5200 using a 6 button Sega Genesis controller yet providing full keypad control.
The circuit can be built using an Arduino Nano and two analog multiplexers. Interface with analog joystick can be borrowed from "Low Priced MasterPlay clone adapter".
Keypad presses can be emulated by activating a pair of analog multiplexers. This scheme allow the simulation of 1 (one) keypress at a time, but frees the software from critical timing.
Buttons can be mapped as follows: