I had some fight with the latest retropie. No matter what I did I was unable to change the jump button on NES super mario bros from my Logitech f310 from b to x.
After 2 days of trying out different configurations with the main retroarch.cfg, NES/retroarch.cfg and retroarch-joypads configurations with no success I stumbled upon a finding where my x-button is actually y-button in the retroarch GUI.
Attached is a picture of a working configuration where my actual x-button acts as NES b-button and my actual a-button is NES a-button.
No that doesn’t explain why y = x in the retroarch remap section. If you don’t have a solution then it must be a bug. My controller works perfectly as it should on every game (x=x, a=a, etc) but with remapping if I want to replace so that x works as b I have to remap b to button y for it to respond for x in my controller.
The FCEUmm core you are using says the B button will be used when the Y RetroPad (not your controller) button is pressed. If you want that to work with the X RetroPad button you could just change it there?
If you want to remap your RetroPad as a whole, you edit the controller file.
RetroPie help guides --> https://goo.gl/Yfy8kj
Please read this before asking for help --> http://goo.gl/eLErnl