Setting up the Sega Genesis / MegaDrive gamepad

How to setup this gamepad to play Sega MegaDrive? When connected, RetroArch sees this gamepad as an XBOX Controller. The device name in Windows is “usb gamepad”. It can be seen that there is a config for auto-configuring this device, but how to use it?