Guide showing how to setup a wired PS3 USB controller to use with your RetroPie setup. This is using RetroPie 2.4.2 but it should work in a very similar way in most RetroPie setups.
I used a PS3 DualShock 3, model CECHZC2E
Once configured, its pretty easy to use in those retro games for systems like NES, SNES, Megadrive etc...