@ken-tipton yes you can do that, you just need to create a joystick mapping for pacman or whatever game you want to have custom. The instructions to do this would depend on what emulator you are using. In some cases it could be just hitting tab and setting the controls in that menu.
I normally have 8 way joystick as p1 and a 8/4 way switchable for p2 and I'll map games like pacman/dk etc p2 joystick as player1 so I don't get stuck walking up those ladders ;)