Alot of games allow you to set the number of players to match the cab, and others have 2-P versions that were used in conversion kits.
On the ones that were switchable, there is usually a dipswitch set that controls it.
I've got an Atomic Punk PCB (4-P Bomberman) that I use quite often in my 2-P JAMMA cab, and have the dipswitches set so that it appears to be a 2-P game.