At the title screen, hold I + II + Select and press Run.
At the 2 Player mode team selection screen, on Controller 2, hold II + Select + Run and press Left. If done right, the cursor will disappear. You can press Left up to 6 times to choose between 6 different hidden teams.
At the 1 Player team selection screen, pick the N Team (Namco Team) and enter the following passwords: