You can assign multiple inputs to one 'action' in MAME. Basically, you have to change player 1's config so that player 1's controls accept both joysticks. For example: Press TAB, go to 'Input (this Game)', press return to enter the menu.
Go to 'P1 Up', press return. Now press joy 1 up. Press return. Press joy 2 up. Now you should be able to use both joysticks for 'up'.
Rinse and repeat for the rest of the controls.