I followed this intractable to put a PiZero w/ RetroPie in a NES controller:
http://www.instructables.com/id/RetroPie-Inside-an-NES-Controller/
After the initial installation I updated the RetroPie setup script, then installed the Gamecon and db9 drivers. Everything seemed to install ok, no errors. I modified /etc/modules with:
gamecon_gpio_rpi map=0,0,2,0,0,0
After a reboot, the system reported that kernel modules failed to load. I could run the modprobe command manually and the controller would work. I found the solution was to create /etc/modprobe.d/gamecon.conf to specify the mapping, then remove the mapping from /etc/modules, like so-
/etc/modprobe.d/gamecon.conf:
options gamecon_gpio_rpi map=0,0,2,0,0,0
/etc/modules:
gamecon_gpio_rpi
Now the system boots without errors. EmulationStation detected the controller as a NES controller. After setting up the mapping, I can use the controller to navigate around ES. But when I launch NES roms, the controller doesn’t work. As the game booted, it would report NES pad 0/0 configured. I changed an option in RetroPie setup that instructed NES emulators to use the sl joystick driver (sorry if terms are 100% accurate, bad memory..) Now when games are launched, it says NES pad 1/0 configured, but still no action in the games… What am I missing?