As far as i know, you have to do it from inside the game. When u start a game you press Tab. A menu will show up and you'll have "input(General)" or "input (this game)". choose the first if u want ur setting to apply to all games u have on Mame32 or choose the second if u want it to apply to only this perticular game. when you enter one of these menus u'll find stuff like what u said
"buttons for the controller like button a assign to button 1 on controller, move left assign to left analog stick, etc. "
once you're done you just have to press Esc untill you leave the menu.
Hope this helps