If your controller was not recognized by RetroArch, it will need to be manually configured. Once configured, we will save it so RetroArch will recognize it on it's next restart.
In order for RetroArch to work with multiple emulator cores, it uses a unified controller configuration it calls the "RetroPad". The RetroPad layout is just like an SNES controller. It internally maps certain buttons for other emulator cores. For example, for a Genesis emulator core, RetroPad buttons Y, B and A are mapped to the Genesis A, B, and C buttons respectively.
Below are a few photos of Genesis controllers with their buttons labeled with their RetroPad equivalents:
To set your controls, go to Settings->Input->Input User 1 Binds. If you have analog sticks, and would like to use them, set "User 1 Device Type" to "RetroPad w/ Analog". Select "User 1 Bind All". This will cycle through the inputs. Assign the RetroPad buttons to the buttons on your controller.
For Genesis players:
All other buttons can be ignored. You can set the values for an analog stick if your controller has one. If you would like to use the analog stick instead of the D-Pad for movement, after you are done with setting the controls, go up to "User 1 Analog to Digital Type" and select "Left Analog", or "Right Analog", whichever you prefer.
For SNES players, since the RetroPad is the same as an SNES controller, and there should be no confusion. Just skip the button settings your controller doesn't have.
To save the configuration, select "User 1 Save Autoconfig". Now your controller will be recognized the next time you play!