Yeah, like Butter said, you can't run the emulator in a single instance - it'll just hang. The example SailorSat was using in her post, with the download link is for a 4 player setup. For a two player (on a single PC) use this code (using Super Monaco as an example)
@echo off
start xbd.exe smgp -nvram_directory nvram1 -cfg_directory cfg1 -comm_localport 15112 -comm_remoteport 15113 %1 %2 %3
start xbd.exe smgp -nvram_directory nvram2 -cfg_directory cfg2 -comm_localport 15113 -comm_remoteport 15112 %1 %2 %3
This is with a regular copy of MAME in the folder, plus the xbd.exe, and an smgp rom in your roms folder.
Edit: Oh, and don't forget to change the dipswitches in the game like in SailorS's picture.