They should all be set in your auto controller.
What do you get if you type this
grep -rnw '/opt/retropie/emulators/retroarch/configs/' -e "USB,2-axis 8-button gamepad"
That should show you where your auto controller is (as you have an iBuffalo)
Although you may get multiple results.
This is an older video, but it shows how the auto files work