public void handler() {
            PORT_START(); 	/* IN0 */

            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY);
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_4WAY);
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_4WAY);
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_4WAY);
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED);

            PORT_START();       /* DSW0 */

            PORT_DIPNAME(0x03, 0x00, DEF_STR("Lives"));
            PORT_DIPSETTING(0x00, "3");
            PORT_DIPSETTING(0x01, "4");
            PORT_DIPSETTING(0x02, "5");
            PORT_DIPSETTING(0x03, "6");

            PORT_DIPNAME(0x0c, 0x00, DEF_STR("Coinage"));
            PORT_DIPSETTING(0x08, DEF_STR("2C_1C"));
            PORT_DIPSETTING(0x00, DEF_STR("1C_1C"));
            PORT_DIPSETTING(0x04, DEF_STR("1C_2C"));
            /* 0x0c gives 2 Coins/1 Credit */

            PORT_DIPNAME(0x30, 0x00, DEF_STR("Bonus_Life"));
            PORT_DIPSETTING(0x00, "5000");
            PORT_DIPSETTING(0x10, "7000");
            PORT_DIPSETTING(0x20, "10000");
            PORT_DIPSETTING(0x30, "None");

            PORT_DIPNAME(0x40, 0x00, DEF_STR("Difficulty"));  /* Only on Tomahawk 777 */

            PORT_DIPSETTING(0x00, "Easy");
            PORT_DIPSETTING(0x40, "Hard");

            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_VBLANK);

            PORT_START(); 	/* FAKE */
            /* The coin slots are not memory mapped. Coin insertion causes a NMI. */
            /* This fake input port is used by the interrupt */
            /* handler to be notified of coin insertions. We use IMPULSE to */
            /* trigger exactly one interrupt, without having to check when the */
            /* user releases the key. */
            /* The cabinet selector is not memory mapped, but just disables the */
            /* screen flip logic */

            PORT_BIT_IMPULSE(0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1);
            PORT_DIPNAME(0x02, 0x00, DEF_STR("Cabinet"));
            PORT_DIPSETTING(0x00, DEF_STR("Upright"));
            PORT_DIPSETTING(0x02, DEF_STR("Cocktail"));
            INPUT_PORTS_END();
        }