Both configs are correct. Your new configuration has axis for the directional buttons, most likely you've configured the joystick as a D-Pad this time ? EmulationStation should work with both D-pad and Joysticks.
As for MAME2003, what game are you trying out ? It may be that the same has no analog controls and thus it expects digital (i.e. D-pad) controls. You can play with RetroArch's settings for this - in the Controls section of the RGUI, you can switch the P1 device type to RetroPad w/ Analog and change the User 1 Analog to Digital to either Left Analog or Right Analog, depending on how you mapped your joystick in MAME.
Sorry I couldn't reply sooner, I only just woke up.
Glad you got it sorted, if you haven't set everything up it's often easier just to re-flash the sd as you have.
Once you do get everything setup how you want it's a good idea to make a backup img of the SD card, that way if something major goes wrong in the future you just have to re-flash the card and you're up and running again.