It's easy. Just solder the cartridges' pins together and use a switch to control the voltage on each of them. Here is what I mean:

(It's an SNES cart, but you get what I mean
The wire going to the middle pin of the switch is the voltage in. You cut that trace on the cart so it doesn't receive any voltage. Then, you just wire the switch so that one or the other gets voltage.