This is code for an ATmega32U4 that converts the SFC/SNES or Sega Saturn controller protocols to USB HID. I fit the microcontroller board inside the controller shells and replaced the cords with ordinary USB-A to micro-USB-B cables. An Arduino Micro or same-sized clone will work.
This was my first attempt at microcontroller programming. In the interest of learning, everything was done by hand from specs instead of leveraging the Arduino environment or existing libraries.