public void handler() { 
	PORT_START();       /* DSW0 */
	/* According to the manual, 0x04, 0x08 and 0x10 should always be off,
	but... */
		PORT_DIPNAME( 0x07, 0x00, "Rank" );	PORT_DIPSETTING(    0x00, "A" );	PORT_DIPSETTING(    0x01, "B" );	PORT_DIPSETTING(    0x02, "C" );	PORT_DIPSETTING(    0x03, "D" );	PORT_DIPSETTING(    0x04, "E" );	PORT_DIPSETTING(    0x05, "F" );	PORT_DIPSETTING(    0x06, "G" );	PORT_DIPSETTING(    0x07, "H" );	PORT_DIPNAME( 0x18, 0x00, DEF_STR( "Coin_B") );
		PORT_DIPSETTING(    0x18, DEF_STR( "2C_1C") );
		PORT_DIPSETTING(    0x00, DEF_STR( "1C_1C") );
		PORT_DIPSETTING(    0x08, DEF_STR( "1C_5C"));
		PORT_DIPSETTING(    0x10, DEF_STR( "1C_7C") );
		PORT_DIPNAME( 0x20, 0x00, DEF_STR( "Demo_Sounds") );
		PORT_DIPSETTING(    0x20, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x00, DEF_STR( "On") );
		PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Test", KEYCODE_F1, IP_JOY_NONE );	PORT_DIPSETTING(    0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x40, DEF_STR( "On") );
		PORT_DIPNAME( 0x80, 0x00, "Freeze" );	PORT_DIPSETTING(    0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x80, DEF_STR( "On") );
		PORT_START();       /* DSW1 */
		PORT_DIPNAME( 0x07, 0x00, DEF_STR( "Coin_A") );
		PORT_DIPSETTING(    0x06, DEF_STR( "3C_1C") );
		PORT_DIPSETTING(    0x04, DEF_STR( "2C_1C") );
		PORT_DIPSETTING(    0x07, DEF_STR( "3C_2C") );
		PORT_DIPSETTING(    0x00, DEF_STR( "1C_1C") );
		PORT_DIPSETTING(    0x05, DEF_STR( "2C_3C") );
		PORT_DIPSETTING(    0x01, DEF_STR( "1C_2C") );
		PORT_DIPSETTING(    0x02, DEF_STR( "1C_3C") );
		PORT_DIPSETTING(    0x03, DEF_STR( "1C_6C") );
		/* TODO: bonus scores are different for 5 lives */
		PORT_DIPNAME( 0x38, 0x00, DEF_STR( "Bonus_Life") );
		PORT_DIPSETTING(    0x28, "20k 70k and every 70k" );	PORT_DIPSETTING(    0x30, "20k 80k and every 80k" );	PORT_DIPSETTING(    0x08, "20k 60k" );	PORT_DIPSETTING(    0x00, "20k 70k" );	PORT_DIPSETTING(    0x10, "20k 80k" );	PORT_DIPSETTING(    0x18, "30k 100k" );	PORT_DIPSETTING(    0x20, "20k" );	PORT_DIPSETTING(    0x38, "None" );/* those are the bonus with 5 lives
		PORT_DIPNAME( 0x38, 0x00, DEF_STR( "Bonus_Life") );
		PORT_DIPSETTING(    0x28, "30k 100k and every 100k" );	PORT_DIPSETTING(    0x30, "40k 120k and every 120k" );	PORT_DIPSETTING(    0x00, "30k 80k" );	PORT_DIPSETTING(    0x08, "30k 100k" );	PORT_DIPSETTING(    0x10, "30k 120k" );	PORT_DIPSETTING(    0x18, "30k" );	PORT_DIPSETTING(    0x20, "40k" );	PORT_DIPSETTING(    0x38, "None" );*/
		PORT_DIPNAME( 0xc0, 0x00, DEF_STR( "Lives") );
		PORT_DIPSETTING(    0x80, "1" );	PORT_DIPSETTING(    0xc0, "2" );	PORT_DIPSETTING(    0x00, "3" );	PORT_DIPSETTING(    0x40, "5" );
		PORT_START();       /* DSW2 */
		PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_DIPNAME( 0x04, 0x00, DEF_STR( "Cabinet") );
		PORT_DIPSETTING(    0x00, DEF_STR( "Upright") );
		PORT_DIPSETTING(    0x04, DEF_STR( "Cocktail") );
		PORT_SERVICE( 0x08, IP_ACTIVE_HIGH );	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START();       /* FAKE */
		/* The player inputs are not memory mapped, they are handled by an I/O chip. */
		/* These fake input ports are read by mappy_customio_data_r() */
		PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY );	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 1 );	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, null, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS );	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START();       /* FAKE */
		PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1 );/* Coin 2 is not working */
		PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 1 );	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_START1, 1 );	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_START2, 1 );	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START(); 	    /* FAKE */
		PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL );	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, 1 );	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, null, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS );
	INPUT_PORTS_END(); }
public void handler() { 
	PORT_START();      

		PORT_DIPNAME( 0x07, 0x00, "Rank" );	PORT_DIPSETTING(    0x00, "A" );	PORT_DIPSETTING(    0x01, "B" );	PORT_DIPSETTING(    0x02, "C" );	PORT_DIPSETTING(    0x03, "D" );	PORT_DIPSETTING(    0x04, "E" );	PORT_DIPSETTING(    0x05, "F" );	PORT_DIPSETTING(    0x06, "G" );	PORT_DIPSETTING(    0x07, "H" );	PORT_DIPNAME( 0x18, 0x00, DEF_STR( "Coin_B") );
		PORT_DIPSETTING(    0x18, DEF_STR( "2C_1C") );
		PORT_DIPSETTING(    0x00, DEF_STR( "1C_1C") );
		PORT_DIPSETTING(    0x08, DEF_STR( "1C_5C"));
		PORT_DIPSETTING(    0x10, DEF_STR( "1C_7C") );
		PORT_DIPNAME( 0x20, 0x00, DEF_STR( "Demo_Sounds") );
		PORT_DIPSETTING(    0x20, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x00, DEF_STR( "On") );
		PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Test", KEYCODE_F1, IP_JOY_NONE );	PORT_DIPSETTING(    0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x40, DEF_STR( "On") );
		PORT_DIPNAME( 0x80, 0x00, "Freeze" );	PORT_DIPSETTING(    0x00, DEF_STR( "Off") );
		PORT_DIPSETTING(    0x80, DEF_STR( "On") );
		PORT_START();      
		PORT_DIPNAME( 0x07, 0x00, DEF_STR( "Coin_A") );
		PORT_DIPSETTING(    0x06, DEF_STR( "3C_1C") );
		PORT_DIPSETTING(    0x04, DEF_STR( "2C_1C") );
		PORT_DIPSETTING(    0x07, DEF_STR( "3C_2C") );
		PORT_DIPSETTING(    0x00, DEF_STR( "1C_1C") );
		PORT_DIPSETTING(    0x05, DEF_STR( "2C_3C") );
		PORT_DIPSETTING(    0x01, DEF_STR( "1C_2C") );
		PORT_DIPSETTING(    0x02, DEF_STR( "1C_3C") );
		PORT_DIPSETTING(    0x03, DEF_STR( "1C_6C") );
	
		PORT_DIPNAME( 0x38, 0x00, DEF_STR( "Bonus_Life") );
		PORT_DIPSETTING(    0x28, "20k 70k and every 70k" );	PORT_DIPSETTING(    0x30, "20k 80k and every 80k" );	PORT_DIPSETTING(    0x08, "20k 60k" );	PORT_DIPSETTING(    0x00, "20k 70k" );	PORT_DIPSETTING(    0x10, "20k 80k" );	PORT_DIPSETTING(    0x18, "30k 100k" );	PORT_DIPSETTING(    0x20, "20k" );	PORT_DIPSETTING(    0x38, "None" )
		PORT_DIPNAME( 0xc0, 0x00, DEF_STR( "Lives") );
		PORT_DIPSETTING(    0x80, "1" );	PORT_DIPSETTING(    0xc0, "2" );	PORT_DIPSETTING(    0x00, "3" );	PORT_DIPSETTING(    0x40, "5" );
		PORT_START();      
		PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_DIPNAME( 0x04, 0x00, DEF_STR( "Cabinet") );
		PORT_DIPSETTING(    0x00, DEF_STR( "Upright") );
		PORT_DIPSETTING(    0x04, DEF_STR( "Cocktail") );
		PORT_SERVICE( 0x08, IP_ACTIVE_HIGH );	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START();      
	
	
		PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY );	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 1 );	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, null, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS );	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START();      
		PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1 )
		PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 1 );	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_START1, 1 );	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_START2, 1 );	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED );
		PORT_START(); 	   
		PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL );	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL );	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, 1 );	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, null, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS );
	INPUT_PORTS_END(); }
public void handler() { port_start(); port_dipname( 0x07, 0x00, "rank" ); port_dipsetting( 0x00, "a" ); port_dipsetting( 0x01, "b" ); port_dipsetting( 0x02, "c" ); port_dipsetting( 0x03, "d" ); port_dipsetting( 0x04, "e" ); port_dipsetting( 0x05, "f" ); port_dipsetting( 0x06, "g" ); port_dipsetting( 0x07, "h" ); port_dipname( 0x18, 0x00, def_str( "coin_b") ); port_dipsetting( 0x18, def_str( "2c_1c") ); port_dipsetting( 0x00, def_str( "1c_1c") ); port_dipsetting( 0x08, def_str( "1c_5c")); port_dipsetting( 0x10, def_str( "1c_7c") ); port_dipname( 0x20, 0x00, def_str( "demo_sounds") ); port_dipsetting( 0x20, def_str( "off") ); port_dipsetting( 0x00, def_str( "on") ); port_bitx( 0x40, 0x00, ipt_dipswitch_name | ipf_cheat, "rack test", keycode_f1, ip_joy_none ); port_dipsetting( 0x00, def_str( "off") ); port_dipsetting( 0x40, def_str( "on") ); port_dipname( 0x80, 0x00, "freeze" ); port_dipsetting( 0x00, def_str( "off") ); port_dipsetting( 0x80, def_str( "on") ); port_start(); port_dipname( 0x07, 0x00, def_str( "coin_a") ); port_dipsetting( 0x06, def_str( "3c_1c") ); port_dipsetting( 0x04, def_str( "2c_1c") ); port_dipsetting( 0x07, def_str( "3c_2c") ); port_dipsetting( 0x00, def_str( "1c_1c") ); port_dipsetting( 0x05, def_str( "2c_3c") ); port_dipsetting( 0x01, def_str( "1c_2c") ); port_dipsetting( 0x02, def_str( "1c_3c") ); port_dipsetting( 0x03, def_str( "1c_6c") ); port_dipname( 0x38, 0x00, def_str( "bonus_life") ); port_dipsetting( 0x28, "20k 70k and every 70k" ); port_dipsetting( 0x30, "20k 80k and every 80k" ); port_dipsetting( 0x08, "20k 60k" ); port_dipsetting( 0x00, "20k 70k" ); port_dipsetting( 0x10, "20k 80k" ); port_dipsetting( 0x18, "30k 100k" ); port_dipsetting( 0x20, "20k" ); port_dipsetting( 0x38, "none" ) port_dipname( 0xc0, 0x00, def_str( "lives") ); port_dipsetting( 0x80, "1" ); port_dipsetting( 0xc0, "2" ); port_dipsetting( 0x00, "3" ); port_dipsetting( 0x40, "5" ); port_start(); port_bit( 0x03, ip_active_high, ipt_unused ); port_dipname( 0x04, 0x00, def_str( "cabinet") ); port_dipsetting( 0x00, def_str( "upright") ); port_dipsetting( 0x04, def_str( "cocktail") ); port_service( 0x08, ip_active_high ); port_bit( 0xf0, ip_active_high, ipt_unused ); port_start(); port_bit( 0x01, ip_active_high, ipt_unused ); port_bit( 0x02, ip_active_high, ipt_joystick_right | ipf_2way ); port_bit( 0x04, ip_active_high, ipt_unused ); port_bit( 0x08, ip_active_high, ipt_joystick_left | ipf_2way ); port_bit_impulse( 0x10, ip_active_high, ipt_button1, 1 ); port_bitx(0x20, ip_active_high, ipt_button1, null, ip_key_previous, ip_joy_previous ); port_bit( 0xc0, ip_active_high, ipt_unused ); port_start(); port_bit_impulse( 0x01, ip_active_high, ipt_coin1, 1 ) port_bit_impulse( 0x02, ip_active_high, ipt_coin2, 1 ); port_bit( 0x0c, ip_active_high, ipt_unused ); port_bit_impulse( 0x10, ip_active_high, ipt_start1, 1 ); port_bit_impulse( 0x20, ip_active_high, ipt_start2, 1 ); port_bit( 0xc0, ip_active_high, ipt_unused ); port_start(); port_bit( 0x02, ip_active_high, ipt_joystick_right | ipf_2way | ipf_cocktail ); port_bit( 0x08, ip_active_high, ipt_joystick_left | ipf_2way | ipf_cocktail ); port_bit_impulse( 0x10, ip_active_high, ipt_button1 | ipf_cocktail, 1 ); port_bitx(0x20, ip_active_high, ipt_button1 | ipf_cocktail, null, ip_key_previous, ip_joy_previous ); input_ports_end(); }