EDIT: Try suggestion in last post first
If you got the autoconfig to work I would delete everything in retroarch,cfg and run that again. Then you can adjust the controls to your liking using jtest (it will display the buttons you are pressing so you can work out which is which and edit accordingly):
sudo apt-get install joystick
jstest /dev/input/js* (replace * with js number you used for auto config)