Yup, just go into MAME & do the following:
Run Ms. Pac-Man in MAME.
Hit tab to enter menu.
Arrow down to & select (with Enter) the controls for this game
Arrow down to the "up" entry. Hit Enter. Push P1 stick up. Wait a moment. Hit Enter. Push P2 stick up. You should now have "'something 1' or 'something 2'" mapped to P1 Up, where the "something"s are whatever keys are mapped to your joysticks when pressed up.
Repeat for down, left, & right.
Esc until you've exited all menus.
Play.
Settings should be saved automatically when you leave MAME & return to re-run the game.
-Jason