MAME emulates old arcade machines. The tricky part is you have to use the PC keyboard if you don't have a joystick. But any joystick has to have at least 2 separate buttons AND be USB compatible.
The cheapest solution is to get a Speedlink Competition Pro USB Joystick. It comes with 99 pirated Commodore 64 games, but you can ignore them.
In MAME, hit Tab, 'Input (This Game)'. Move up and down the list and hit Enter, then wiggle the joystick or press a button on it. Then go back into the game.
You've now configured that game for your new Competition Pro!
Click here to get it.