static InputPortPtr input_ports_pipibibs = new InputPortPtr(){ public void handler() { 
		PORT_START(); 		/* (0) VBlank */
		PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_VBLANK );
		PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNKNOWN );
	
		PORT_START();  																	
		PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 );
		PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 );
		PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 );
		PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 );
		PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1);					
		PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1);					
		PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN );								
		PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNKNOWN );

                PORT_START();  																	
		PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 );
		PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 );
		PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 );
		PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 );
		PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2);					
		PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2);					
		PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN );								
		PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNKNOWN );
                
		PORT_START(); 										
		PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_COIN3 );	
		PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_TILT );
		PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_SERVICE1 );
		PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN1 );
		PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN2 );
		PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 );
		PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_START2 );
		PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNKNOWN );
	
		PORT_START(); 														
		PORT_DIPNAME( 0x01,	0x00, DEF_STR( "Unused") );					
		PORT_DIPSETTING(	0x00, DEF_STR( "Off") );						
		PORT_DIPSETTING(	0x01, DEF_STR( "On") );						
		PORT_DIPNAME( 0x02,	0x00, DEF_STR( "Flip_Screen") );				
		PORT_DIPSETTING(	0x00, DEF_STR( "Off") );						
		PORT_DIPSETTING(	0x02, DEF_STR( "On") );						
		PORT_SERVICE( 0x04, IP_ACTIVE_HIGH );	/* Service Mode */	
		PORT_DIPNAME( 0x08,	0x00, DEF_STR( "Demo_Sounds") );				
		PORT_DIPSETTING(	0x08, DEF_STR( "Off") );						
		PORT_DIPSETTING(	0x00, DEF_STR( "On") );						
		PORT_DIPNAME( 0x30,	0x00, DEF_STR( "Coin_A") );					
		PORT_DIPSETTING(	0x30, DEF_STR( "4C_1C") );					
		PORT_DIPSETTING(	0x20, DEF_STR( "3C_1C") );					
		PORT_DIPSETTING(	0x10, DEF_STR( "2C_1C") );					
		PORT_DIPSETTING(	0x00, DEF_STR( "1C_1C") );					
		PORT_DIPNAME( 0xc0,	0x00, DEF_STR( "Coin_B") );					
		PORT_DIPSETTING(	0x00, DEF_STR( "1C_2C") );					
		PORT_DIPSETTING(	0x40, DEF_STR( "1C_3C") );					
		PORT_DIPSETTING(	0x80, DEF_STR( "1C_4C") );					
		PORT_DIPSETTING(	0xc0, DEF_STR( "1C_6C") );					
	/*	Non-European territories coin setups							
		PORT_DIPNAME( 0x30,	0x00, DEF_STR( "Coin_A") );					
		PORT_DIPSETTING(	0x20, DEF_STR( "2C_1C") );					
		PORT_DIPSETTING(	0x00, DEF_STR( "1C_1C") );					
		PORT_DIPSETTING(	0x30, DEF_STR( "2C_3C") );					
		PORT_DIPSETTING(	0x10, DEF_STR( "1C_2C") );					
		PORT_DIPNAME( 0xc0,	0x00, DEF_STR( "Coin_B") );					
		PORT_DIPSETTING(	0x80, DEF_STR( "2C_1C") );					
		PORT_DIPSETTING(	0x00, DEF_STR( "1C_1C") );					
		PORT_DIPSETTING(	0xc0, DEF_STR( "2C_3C") );					
		PORT_DIPSETTING(	0x40, DEF_STR( "1C_2C") );					
	*/
	
		PORT_START(); 		/* (5) DSWB */
		PORT_DIPNAME( 0x03,	0x00, DEF_STR( "Difficulty") );
		PORT_DIPSETTING(	0x01, "Easy" );
		PORT_DIPSETTING(	0x00, "Medium" );
		PORT_DIPSETTING(	0x02, "Hard" );
		PORT_DIPSETTING(	0x03, "Hardest" );
		PORT_DIPNAME( 0x0c,	0x00, DEF_STR( "Bonus_Life") );
		PORT_DIPSETTING(	0x04, "150K, every 200K" );
		PORT_DIPSETTING(	0x00, "200K, every 300K" );
		PORT_DIPSETTING(	0x08, "200K" );
		PORT_DIPSETTING(	0x0c, "None" );
		PORT_DIPNAME( 0x30,	0x00, DEF_STR( "Lives") );
		PORT_DIPSETTING(	0x30, "1" );
		PORT_DIPSETTING(	0x20, "2" );
		PORT_DIPSETTING(	0x00, "3" );
		PORT_DIPSETTING(	0x10, "5" );
		PORT_BITX(	  0x40,	0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE );
		PORT_DIPSETTING(	0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(	0x40, DEF_STR( "On") );
		PORT_DIPNAME( 0x80,	0x00, DEF_STR( "Unused") );
		PORT_DIPSETTING(	0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(	0x80, DEF_STR( "On") );
	
		PORT_START(); 		/* (6) Territory Jumper block */
		PORT_DIPNAME( 0x07,	0x06, "Territory" );
		PORT_DIPSETTING(	0x06, "Europe" );
		PORT_DIPSETTING(	0x04, "USA" );
		PORT_DIPSETTING(	0x00, "Japan" );
		PORT_DIPSETTING(	0x02, "Hong Kong" );
		PORT_DIPSETTING(	0x03, "Taiwan" );
		PORT_DIPSETTING(	0x01, "Asia" );
		PORT_DIPSETTING(	0x07, "Europe (Nova Apparate GMBH & Co)" );
		PORT_DIPSETTING(	0x05, "USA (Romstar)" );
		PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNKNOWN );
	INPUT_PORTS_END(); }}