Beispiel #1
0
        //static INPUT_PORTS_START( dkong_in2 )
        void construct_ioport_dkong_in2(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            dkong_state dkong_state = (dkong_state)owner;

            /* Bit 0x80 is (SERVICE OR COIN) !
             * Bit 0x40 mcu status (sound feedback) is inverted bit4 from port B (8039)
             * Bit 0x01 is going to the connector but it is not labeled
             */
            PORT_START("IN2");                           /* IN2 */
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE); /* connection not labeled in schematics - diagnostic rom */
            PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN); /* connection not labeled in schematics - freeze or reset */
            PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_START1);
            PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_START2);
            PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN);                                                                                                                                /* not connected - held to high */
            PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN);                                                                                                                                /* not connected - held to high */
            PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_CUSTOM); PORT_READ_LINE_DEVICE_MEMBER("virtual_p2", () => { return(((latch8_device)dkong_state.subdevice("virtual_p2")).bit4_q_r()); }); //latch8_device, bit4_q_r) /* status from sound cpu */
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN1);

            PORT_START("SERVICE1");
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE1);

            INPUT_PORTS_END();
        }
Beispiel #2
0
        //static INPUT_PORTS_START( dkong_dsw0 )
        void construct_ioport_dkong_dsw0(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("DSW0");      /* DSW0 */
            PORT_DIPNAME(0x03, 0x00, DEF_STR(Lives));        PORT_DIPLOCATION("SW1:!1,!2");
            PORT_DIPSETTING(0x00, "3");
            PORT_DIPSETTING(0x01, "4");
            PORT_DIPSETTING(0x02, "5");
            PORT_DIPSETTING(0x03, "6");
            PORT_DIPNAME(0x0c, 0x00, DEF_STR(Bonus_Life));   PORT_DIPLOCATION("SW1:!3,!4");
            PORT_DIPSETTING(0x00, "7000");
            PORT_DIPSETTING(0x04, "10000");
            PORT_DIPSETTING(0x08, "15000");
            PORT_DIPSETTING(0x0c, "20000");
            PORT_DIPNAME(0x70, 0x00, DEF_STR(Coinage));      PORT_DIPLOCATION("SW1:!5,!6,!7");
            PORT_DIPSETTING(0x70, DEF_STR(_5C_1C));
            PORT_DIPSETTING(0x50, DEF_STR(_4C_1C));
            PORT_DIPSETTING(0x30, DEF_STR(_3C_1C));
            PORT_DIPSETTING(0x10, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x00, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x20, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x40, DEF_STR(_1C_3C));
            PORT_DIPSETTING(0x60, DEF_STR(_1C_4C));
            PORT_DIPNAME(0x80, 0x80, DEF_STR(Cabinet));      PORT_DIPLOCATION("SW1:!8");
            PORT_DIPSETTING(0x80, DEF_STR(Upright));
            PORT_DIPSETTING(0x00, DEF_STR(Cocktail));

            INPUT_PORTS_END();
        }
Beispiel #3
0
            //static INPUT_PORTS_START(fixedfreq_base_ports)
            void construct_ioport_fixedfreq_base_ports(device_t owner, ioport_list portlist, ref string errorbuf)
            {
                INPUT_PORTS_START(owner, portlist, ref errorbuf);

                PORT_START("ENABLE");
                PORT_CONFNAME(0x01, 0x00, "Display Monitor sliders");
                PORT_CONFSETTING(0x00, DEF_STR(Off));
                PORT_CONFSETTING(0x01, DEF_STR(On));
                PORT_CONFNAME(0x02, 0x00, "Visual Timing Debug");
                PORT_CONFSETTING(0x00, DEF_STR(Off));
                PORT_CONFSETTING(0x02, DEF_STR(On));
                PORT_CONFNAME(0x04, 0x00, "Display gray test pattern"); PORT_CONDITION("VECTOR", 0x01, ioport_condition.condition_t.EQUALS, 0x00);
                PORT_CONFSETTING(0x00, DEF_STR(Off));
                PORT_CONFSETTING(0x04, DEF_STR(On));

                PORT_ADJUSTERX(fixedfreq_tag_id_e.HVISIBLE, "H Visible", 10, 1000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.HFRONTPORCH, "H Front porch width", 1, 100);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.HSYNC, "H Sync width", 1, 100);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.HBACKPORCH, "H Back porch width", 1, 1000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.VVISIBLE, "V Visible", 1, 1000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.VFRONTPORCH, "V Front porch width", 0, 100);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.VSYNC, "V Sync width", 1, 100);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.VBACKPORCH, "V Back porch width", 1, 100);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.SYNCTHRESHOLD, "Sync threshold mV", 10, 2000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.VSYNCTHRESHOLD, "V Sync threshold mV", 10, 1000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.GAIN, "Signal Gain", 10, 1000);
                PORT_ADJUSTERX(fixedfreq_tag_id_e.SCANLINE_HEIGHT, "Scanline Height", 10, 300);

                INPUT_PORTS_END();
            }
Beispiel #4
0
        //static INPUT_PORTS_START( pong )
        void construct_ioport_pong(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            pong_state pong_state = (pong_state)owner;

            PORT_START("PADDLE0");   /* fake input port for player 1 paddle */
            PORT_BIT(0xff, 0x00, IPT_PADDLE); PORT_SENSITIVITY(2); PORT_KEYDELTA(100); PORT_CENTERDELTA(0);   NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot0", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)pong_state.subdevice("maincpu:pot0")).input_changed(field, param, oldval, newval); });

            PORT_START("PADDLE1");   /* fake input port for player 2 paddle */
            PORT_BIT(0xff, 0x00, IPT_PADDLE); PORT_SENSITIVITY(2); PORT_KEYDELTA(100); PORT_CENTERDELTA(0); PORT_PLAYER(2); NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot1", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)pong_state.subdevice("maincpu:pot1")).input_changed(field, param, oldval, newval); });

            PORT_START("IN0"); /* fake as well */
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1);     NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw", (field, param, oldval, newval) => { ((netlist_mame_logic_input_device)pong_state.subdevice("maincpu:coinsw")).input_changed(field, param, oldval, newval); });

            PORT_DIPNAME(0x06, 0x00, "Game Won");          PORT_DIPLOCATION("SW1A:1,SW1B:1"); PORT_CHANGED_MEMBER(DEVICE_SELF, pong_state.input_changed, (u32)pong_state.input_changed_enum.IC_SWITCH);
            PORT_DIPSETTING(0x00, "11");
            PORT_DIPSETTING(0x06, "15");

            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SERVICE);  PORT_NAME("Antenna"); NETLIST_LOGIC_PORT_CHANGED("maincpu", "antenna", (field, param, oldval, newval) => { ((netlist_mame_logic_input_device)pong_state.subdevice("maincpu:antenna")).input_changed(field, param, oldval, newval); });

            PORT_START("VR1");
            PORT_ADJUSTER(50, "VR1 - 50k, Paddle 1 adjustment");   NETLIST_ANALOG_PORT_CHANGED("maincpu", "vr0", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)pong_state.subdevice("maincpu:vr0")).input_changed(field, param, oldval, newval); });
            PORT_START("VR2");
            PORT_ADJUSTER(50, "VR2 - 50k, Paddle 2 adjustment");   NETLIST_ANALOG_PORT_CHANGED("maincpu", "vr1", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)pong_state.subdevice("maincpu:vr1")).input_changed(field, param, oldval, newval); });

            INPUT_PORTS_END();
        }
Beispiel #5
0
            //static INPUT_PORTS_START(fixedfreq_vector_ports)
            public void construct_ioport_fixedfreq_vector_ports(device_t owner, ioport_list portlist, ref string errorbuf)
            {
                INPUT_PORTS_START(owner, portlist, ref errorbuf);

                PORT_INCLUDE(construct_ioport_fixedfreq_base_ports, ref errorbuf);

                INPUT_PORTS_END();
            }
Beispiel #6
0
        /*************************************
        *
        *  Port definitions
        *
        *************************************/

        /* Same as m57, m58 and m62 (IREM Z80 hardware) */
        //static INPUT_PORTS_START( m52 )
        void construct_ioport_m52(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("IN0");

            /* Start 1 & 2 also restarts and freezes the game with stop mode on
             * and are used in test mode to enter and esc the various tests */
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START2);
            /* coin input must be active for 19 frames to be consistently recognized */
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE1); PORT_IMPULSE(19);
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_COIN1);
            PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED);

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_8WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN);  PORT_8WAY();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP);    PORT_8WAY();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1);

            PORT_START("IN2");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN);  PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP);    PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN2);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2); PORT_COCKTAIL();
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1); PORT_COCKTAIL();

            /* DSW1 is so different from game to game that it isn't included here */

            PORT_START("DSW2");
            PORT_DIPNAME(0x01, 0x01, DEF_STR(Flip_Screen)); PORT_DIPLOCATION("SW2:1");
            PORT_DIPSETTING(0x01, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x02, 0x00, DEF_STR(Cabinet)); PORT_DIPLOCATION("SW2:2");
            PORT_DIPSETTING(0x00, DEF_STR(Upright));
            PORT_DIPSETTING(0x02, DEF_STR(Cocktail));
            PORT_DIPNAME(0x04, 0x04, "Coin Mode"); PORT_DIPLOCATION("SW2:3");
            PORT_DIPSETTING(0x04, "Mode 1");
            PORT_DIPSETTING(0x00, "Mode 2");
            PORT_DIPUNKNOWN_DIPLOC(0x08, IP_ACTIVE_LOW, "SW2:4");
            PORT_DIPUNKNOWN_DIPLOC(0x10, IP_ACTIVE_LOW, "SW2:5");
            PORT_DIPUNKNOWN_DIPLOC(0x20, IP_ACTIVE_LOW, "SW2:6");
            PORT_DIPNAME(0x40, 0x40, "Invulnerability (Cheat)"); PORT_DIPLOCATION("SW2:7");
            PORT_DIPSETTING(0x40, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_SERVICE_DIPLOC(0x80, IP_ACTIVE_LOW, "SW2:8");

            INPUT_PORTS_END();
        }
Beispiel #7
0
        /*************************************
        *
        *  Port definitions
        *
        *************************************/

        //static INPUT_PORTS_START( pacman )
        void construct_ioport_pacman(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("IN0");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP);    PORT_PLAYER(1); PORT_4WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_PLAYER(1); PORT_4WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_PLAYER(1); PORT_4WAY();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN);  PORT_PLAYER(1); PORT_4WAY();
            PORT_DIPNAME(0x10, 0x10, "Rack Test (Cheat)"); PORT_CODE(KEYCODE_F1);
            PORT_DIPSETTING(0x10, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_COIN2);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE1);

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP);    PORT_PLAYER(2); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_PLAYER(2); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_PLAYER(2); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN);  PORT_PLAYER(2); PORT_4WAY(); PORT_COCKTAIL();
            PORT_SERVICE(0x10, IP_ACTIVE_LOW);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2);
            PORT_DIPNAME(0x80, 0x80, DEF_STR(Cabinet));
            PORT_DIPSETTING(0x80, DEF_STR(Upright));
            PORT_DIPSETTING(0x00, DEF_STR(Cocktail));

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x01, DEF_STR(Coinage)); PORT_DIPLOCATION("SW:1,2");
            PORT_DIPSETTING(0x03, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x01, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x00, DEF_STR(Free_Play));
            PORT_DIPNAME(0x0c, 0x08, DEF_STR(Lives)); PORT_DIPLOCATION("SW:3,4");
            PORT_DIPSETTING(0x00, "1");
            PORT_DIPSETTING(0x04, "2");
            PORT_DIPSETTING(0x08, "3");
            PORT_DIPSETTING(0x0c, "5");
            PORT_DIPNAME(0x30, 0x00, DEF_STR(Bonus_Life)); PORT_DIPLOCATION("SW:5,6");
            PORT_DIPSETTING(0x00, "10000");
            PORT_DIPSETTING(0x10, "15000");
            PORT_DIPSETTING(0x20, "20000");
            PORT_DIPSETTING(0x30, DEF_STR(None));
            PORT_DIPNAME(0x40, 0x40, DEF_STR(Difficulty)); PORT_DIPLOCATION("SW:7");     // physical location for difficulty on puckman set is split-pad between R32 and C29
            PORT_DIPSETTING(0x40, DEF_STR(Normal));
            PORT_DIPSETTING(0x00, DEF_STR(Hard));
            PORT_DIPNAME(0x80, 0x80, "Ghost Names"); PORT_DIPLOCATION("SW:8");   // physical location for ghostnames on puckman set is split-pad between C10 and C29
            PORT_DIPSETTING(0x80, DEF_STR(Normal));
            PORT_DIPSETTING(0x00, DEF_STR(Alternate));

            PORT_START("DSW2");
            PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED);

            INPUT_PORTS_END();
        }
Beispiel #8
0
        /* Ms. Pac-Man input ports are identical to Pac-Man, the only difference is */
        /* the missing Ghost Names dip switch. */
        //static INPUT_PORTS_START( mspacman )
        void construct_ioport_mspacman(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("IN0");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_4WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_4WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_4WAY();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_4WAY();
            PORT_DIPNAME(0x10, 0x10, "Rack Test (Cheat)"); PORT_CODE(KEYCODE_F1);
            PORT_DIPSETTING(0x10, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_COIN2);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE1);

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_4WAY(); PORT_COCKTAIL();
            PORT_SERVICE(0x10, IP_ACTIVE_LOW);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2);
            PORT_DIPNAME(0x80, 0x80, DEF_STR(Cabinet));
            PORT_DIPSETTING(0x80, DEF_STR(Upright));
            PORT_DIPSETTING(0x00, DEF_STR(Cocktail));

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x01, DEF_STR(Coinage));
            PORT_DIPSETTING(0x03, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x01, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x00, DEF_STR(Free_Play));
            PORT_DIPNAME(0x0c, 0x08, DEF_STR(Lives));
            PORT_DIPSETTING(0x00, "1");
            PORT_DIPSETTING(0x04, "2");
            PORT_DIPSETTING(0x08, "3");
            PORT_DIPSETTING(0x0c, "5");
            PORT_DIPNAME(0x30, 0x00, DEF_STR(Bonus_Life));
            PORT_DIPSETTING(0x00, "10000");
            PORT_DIPSETTING(0x10, "15000");
            PORT_DIPSETTING(0x20, "20000");
            PORT_DIPSETTING(0x30, DEF_STR(None));
            PORT_DIPNAME(0x40, 0x40, DEF_STR(Difficulty));
            PORT_DIPSETTING(0x40, DEF_STR(Normal));
            PORT_DIPSETTING(0x00, DEF_STR(Hard));
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED);

            PORT_START("DSW2");
            PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED);

            INPUT_PORTS_END();
        }
Beispiel #9
0
        //static INPUT_PORTS_START( dkong )
        void construct_ioport_dkong(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_INCLUDE(construct_ioport_dkong_in0_4, ref errorbuf);
            PORT_INCLUDE(construct_ioport_dkong_in1_4, ref errorbuf);
            PORT_INCLUDE(construct_ioport_dkong_in2, ref errorbuf);
            PORT_INCLUDE(construct_ioport_dkong_dsw0, ref errorbuf);

            PORT_INCLUDE(construct_ioport_dkong_config, ref errorbuf);

            INPUT_PORTS_END();
        }
Beispiel #10
0
            //static INPUT_PORTS_START(fixedfreq_raster_ports)
            public void construct_ioport_fixedfreq_raster_ports(device_t owner, ioport_list portlist, ref string errorbuf)
            {
                INPUT_PORTS_START(owner, portlist, ref errorbuf);

                PORT_START("VECTOR");
                PORT_CONFNAME(0x01, 0x00, "Use vector rendering");
                PORT_CONFSETTING(0x00, DEF_STR(Off));
                PORT_CONFSETTING(0x01, DEF_STR(On));

                PORT_INCLUDE(construct_ioport_fixedfreq_base_ports, ref errorbuf);

                INPUT_PORTS_END();
            }
Beispiel #11
0
        //static INPUT_PORTS_START( gunfight )
        void construct_ioport_gunfight(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            gunfight_state gunfight_state = (gunfight_state)owner;

            PORT_START("IN0");
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP); PORT_8WAY(); PORT_PLAYER(1);
            PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN); PORT_8WAY(); PORT_PLAYER(1);
            PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT); PORT_8WAY(); PORT_PLAYER(1);
            PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_PLAYER(1);
            PORT_BIT(0x70, 0x30, IPT_POSITIONAL_V); PORT_POSITIONS(7); PORT_REMAP_TABLE(gunfight_controller_table); PORT_INVERT(); PORT_SENSITIVITY(5); PORT_KEYDELTA(10); PORT_CENTERDELTA(0); PORT_CODE_DEC(KEYCODE_N); PORT_CODE_INC(KEYCODE_H); PORT_PLAYER(1);
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_BUTTON1); PORT_PLAYER(1);

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP); PORT_8WAY(); PORT_PLAYER(2);
            PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN); PORT_8WAY(); PORT_PLAYER(2);
            PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT); PORT_8WAY(); PORT_PLAYER(2);
            PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_PLAYER(2);
            PORT_BIT(0x70, 0x30, IPT_POSITIONAL_V); PORT_POSITIONS(7); PORT_REMAP_TABLE(gunfight_controller_table); PORT_INVERT(); PORT_SENSITIVITY(5); PORT_KEYDELTA(10); PORT_CENTERDELTA(0); PORT_CODE_DEC(KEYCODE_M); PORT_CODE_INC(KEYCODE_J); PORT_PLAYER(2);
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_BUTTON1); PORT_PLAYER(2);

            PORT_START("IN2");
            PORT_DIPNAME(0x0f, 0x00, DEF_STR(Coinage)); PORT_DIPLOCATION("C1:1,2,3,4");
            PORT_DIPSETTING(0x03, DEF_STR(_4C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_3C_1C));
            PORT_DIPSETTING(0x07, DEF_STR(_4C_2C));
            PORT_DIPSETTING(0x01, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x06, DEF_STR(_3C_2C));
            PORT_DIPSETTING(0x0b, DEF_STR(_4C_3C));
            PORT_DIPSETTING(0x0f, DEF_STR(_4C_4C));
            PORT_DIPSETTING(0x0a, DEF_STR(_3C_3C));
            PORT_DIPSETTING(0x05, DEF_STR(_2C_2C));
            PORT_DIPSETTING(0x00, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x0e, DEF_STR(_3C_4C));
            PORT_DIPSETTING(0x09, DEF_STR(_2C_3C));
            PORT_DIPSETTING(0x0d, DEF_STR(_2C_4C));
            PORT_DIPSETTING(0x04, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x08, DEF_STR(_1C_3C));
            PORT_DIPSETTING(0x0c, DEF_STR(_1C_4C));
            PORT_DIPNAME(0x30, 0x10, DEF_STR(Game_Time)); PORT_DIPLOCATION("C1:5,6");
            PORT_DIPSETTING(0x00, "60 seconds");
            PORT_DIPSETTING(0x10, "70 seconds");
            PORT_DIPSETTING(0x20, "80 seconds");
            PORT_DIPSETTING(0x30, "90 seconds");
            PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_COIN1);
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_START1);

            INPUT_PORTS_END();
        }
Beispiel #12
0
        //static INPUT_PORTS_START( dkong_config )
        void construct_ioport_dkong_config(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("VR2");
            PORT_ADJUSTER(90, "VR2 - DAC Volume");

            PORT_START("VIDHW");
            PORT_CONFNAME(0x01, 0x01, "Video Hardware");
            PORT_CONFSETTING(0x00, "TKG-02 (Radarscope Conversion)");
            PORT_CONFSETTING(0x01, "TKG-04 (Two board set)");

            INPUT_PORTS_END();
        }
Beispiel #13
0
        //static INPUT_PORTS_START( dkong_in1_4 )
        void construct_ioport_dkong_in1_4(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("IN1");      /* IN1 */
            PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN); PORT_4WAY(); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1); PORT_COCKTAIL();
            PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN);   /* not connected - held to high */
            PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN);   /* not connected - held to high */
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN);   /* not connected - held to high */

            INPUT_PORTS_END();
        }
Beispiel #14
0
            /*************************************
            *
            *  Gun Fight
            *
            *************************************/

            // Sound board volume potentiometers. By default, these are all set to their
            // midpoint values.

            //static INPUT_PORTS_START(gunfight_audio)
            public void construct_ioport_gunfight_audio(device_t owner, ioport_list portlist, ref string errorbuf)
            {
                INPUT_PORTS_START(owner, portlist, ref errorbuf);

                PORT_START("POT_1_LEFT_MASTER_VOL");
                PORT_ADJUSTER(50, "Pot: Left Master Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_left_master_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_left_master_vol")).input_changed(field, param, oldval, newval); });
                PORT_START("POT_2_RIGHT_MASTER_VOL");
                PORT_ADJUSTER(50, "Pot: Right Master Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_right_master_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_right_master_vol")).input_changed(field, param, oldval, newval); });
                PORT_START("POT_3_LEFT_SHOT_VOL");
                PORT_ADJUSTER(50, "Pot: Left Shot Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_left_shot_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_left_shot_vol")).input_changed(field, param, oldval, newval); });
                PORT_START("POT_4_RIGHT_SHOT_VOL");
                PORT_ADJUSTER(50, "Pot: Right Shot Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_right_shot_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_right_shot_vol")).input_changed(field, param, oldval, newval); });
                PORT_START("POT_5_LEFT_HIT_VOL");
                PORT_ADJUSTER(50, "Pot: Left Hit Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_left_hit_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_left_hit_vol")).input_changed(field, param, oldval, newval); });
                PORT_START("POT_6_RIGHT_HIT_VOL");
                PORT_ADJUSTER(50, "Pot: Right Hit Volume");  NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_right_hit_vol", (field, param, oldval, newval) => { ((netlist_mame_analog_input_device)m_owner.subdevice("sound_nl:pot_right_hit_vol")).input_changed(field, param, oldval, newval); });

                INPUT_PORTS_END();
            }
Beispiel #15
0
        //static INPUT_PORTS_START( mpatrol )
        void construct_ioport_mpatrol(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_INCLUDE(construct_ioport_m52, ref errorbuf);

            PORT_MODIFY("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_2WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_2WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED);               /* IPT_JOYSTICK_DOWN */
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED);               /* IPT_JOYSTICK_UP */

            PORT_MODIFY("IN2");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_2WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT);  PORT_2WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED);               /* IPT_JOYSTICK_DOWN PORT_COCKTAIL */
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED);               /* IPT_JOYSTICK_UP   PORT_COCKTAIL */

            PORT_MODIFY("DSW2");
            PORT_DIPUNUSED_DIPLOC(0x08, IP_ACTIVE_LOW, "SW2:4");     /* should have been "slow motion" but no conditional jump at 0x00c3 */
            /* In stop mode, press 2 to stop and 1 to restart */
            PORT_DIPNAME(0x10, 0x10, "Stop Mode (Cheat)"); PORT_DIPLOCATION("SW2:5");
            PORT_DIPSETTING(0x10, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x20, 0x20, "Sector Selection (Cheat)"); PORT_DIPLOCATION("SW2:6");
            PORT_DIPSETTING(0x20, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x02, DEF_STR(Lives)); PORT_DIPLOCATION("SW1:1,2");
            PORT_DIPSETTING(0x00, "1");
            PORT_DIPSETTING(0x01, "2");
            PORT_DIPSETTING(0x02, "3");
            PORT_DIPSETTING(0x03, "5");
            PORT_DIPNAME(0x0c, 0x0c, DEF_STR(Bonus_Life)); PORT_DIPLOCATION("SW1:3,4");
            PORT_DIPSETTING(0x0c, "10000 30000 50000");
            PORT_DIPSETTING(0x08, "20000 40000 60000");
            PORT_DIPSETTING(0x04, "10000");
            PORT_DIPSETTING(0x00, DEF_STR(None));
            IREM_Z80_COINAGE_TYPE_1_LOC(this, "SW1");

            INPUT_PORTS_END();
        }
Beispiel #16
0
        /*************************************
        *
        *  Port definitions
        *
        *************************************/

        /* The input ports are identical for the real one and the bootleg one, except
        *  that one of the languages is Italian in the bootleg one instead of Spanish */

        //static INPUT_PORTS_START( centiped )
        void construct_ioport_centiped(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("IN0");
            PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM);     /* trackball data */
            PORT_DIPNAME(0x10, 0x00, DEF_STR(Cabinet));
            PORT_DIPSETTING(0x00, DEF_STR(Upright));
            PORT_DIPSETTING(0x10, DEF_STR(Cocktail));
            PORT_SERVICE(0x20, IP_ACTIVE_LOW);
            PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_CUSTOM); PORT_VBLANK("screen");
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM);     /* trackball sign bit */

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START2);
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON1);
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON1); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_TILT);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN1);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_COIN2);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE1);

            PORT_START("IN2");
            PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM);     /* trackball data */
            PORT_BIT(0x70, IP_ACTIVE_HIGH, IPT_UNKNOWN);
            PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM);     /* trackball sign bit */

            PORT_START("IN3");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY();
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY();
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY();
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY();

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x00, DEF_STR(Language));     PORT_DIPLOCATION("N9:!1,!2");
            PORT_DIPSETTING(0x00, DEF_STR(English));
            PORT_DIPSETTING(0x01, DEF_STR(German));
            PORT_DIPSETTING(0x02, DEF_STR(French));
            PORT_DIPSETTING(0x03, DEF_STR(Spanish));
            PORT_DIPNAME(0x0c, 0x04, DEF_STR(Lives));        PORT_DIPLOCATION("N9:!3,!4");
            PORT_DIPSETTING(0x00, "2");
            PORT_DIPSETTING(0x04, "3");
            PORT_DIPSETTING(0x08, "4");
            PORT_DIPSETTING(0x0c, "5");
            PORT_DIPNAME(0x30, 0x10, DEF_STR(Bonus_Life));   PORT_DIPLOCATION("N9:!5,!6");
            PORT_DIPSETTING(0x00, "10000");
            PORT_DIPSETTING(0x10, "12000");
            PORT_DIPSETTING(0x20, "15000");
            PORT_DIPSETTING(0x30, "20000");
            PORT_DIPNAME(0x40, 0x40, DEF_STR(Difficulty));   PORT_DIPLOCATION("N9:!7");
            PORT_DIPSETTING(0x40, DEF_STR(Easy));
            PORT_DIPSETTING(0x00, DEF_STR(Hard));
            PORT_DIPNAME(0x80, 0x00, "Credit Minimum");        PORT_DIPLOCATION("N9:!8");
            PORT_DIPSETTING(0x00, "1");
            PORT_DIPSETTING(0x80, "2");

            PORT_START("DSW2");
            PORT_DIPNAME(0x03, 0x02, DEF_STR(Coinage));      PORT_DIPLOCATION("N8:!1,!2");
            PORT_DIPSETTING(0x03, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x01, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x00, DEF_STR(Free_Play));
            PORT_DIPNAME(0x0c, 0x00, "Right Coin");            PORT_DIPLOCATION("N8:!3,!4");
            PORT_DIPSETTING(0x00, "*1");
            PORT_DIPSETTING(0x04, "*4");
            PORT_DIPSETTING(0x08, "*5");
            PORT_DIPSETTING(0x0c, "*6");
            PORT_DIPNAME(0x10, 0x00, "Left Coin");             PORT_DIPLOCATION("N8:!5");
            PORT_DIPSETTING(0x00, "*1");
            PORT_DIPSETTING(0x10, "*2");
            PORT_DIPNAME(0xe0, 0x00, "Bonus Coins");           PORT_DIPLOCATION("N8:!6,!7,!8");
            PORT_DIPSETTING(0x00, DEF_STR(None));
            PORT_DIPSETTING(0x20, "3 credits/2 coins");
            PORT_DIPSETTING(0x40, "5 credits/4 coins");
            PORT_DIPSETTING(0x60, "6 credits/4 coins");
            PORT_DIPSETTING(0x80, "6 credits/5 coins");
            PORT_DIPSETTING(0xa0, "4 credits/3 coins");

            PORT_START("TRACK0_X");  /* IN6, fake trackball input port. */
            PORT_BIT(0xff, 0x00, IPT_TRACKBALL_X); PORT_SENSITIVITY(50); PORT_KEYDELTA(10); PORT_REVERSE();

            PORT_START("TRACK0_Y");  /* IN7, fake trackball input port. */
            PORT_BIT(0xff, 0x00, IPT_TRACKBALL_Y); PORT_SENSITIVITY(50); PORT_KEYDELTA(10);

            PORT_START("TRACK1_X");  /* IN8, fake trackball input port. */
            PORT_BIT(0xff, 0x00, IPT_TRACKBALL_X); PORT_SENSITIVITY(50); PORT_KEYDELTA(10); PORT_COCKTAIL();

            PORT_START("TRACK1_Y");  /* IN9, fake trackball input port. */
            PORT_BIT(0xff, 0x00, IPT_TRACKBALL_Y); PORT_SENSITIVITY(50); PORT_KEYDELTA(10); PORT_REVERSE(); PORT_COCKTAIL();

            INPUT_PORTS_END();
        }
Beispiel #17
0
        //static INPUT_PORTS_START( 1942 )
        void construct_ioport_1942(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            PORT_START("SYSTEM");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1);
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START2);
            PORT_BIT(0x0c, IP_ACTIVE_LOW, IPT_UNUSED);
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_SERVICE1);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_COIN2);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_COIN1);

            PORT_START("P1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2);
            PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED);

            PORT_START("P2");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1); PORT_COCKTAIL();
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2); PORT_COCKTAIL();
            PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED);

            PORT_START("DSWA");
            PORT_DIPNAME(0x07, 0x07, DEF_STR(Coin_A));       PORT_DIPLOCATION("SWA:8,7,6");
            PORT_DIPSETTING(0x01, DEF_STR(_4C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_3C_1C));
            PORT_DIPSETTING(0x04, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x07, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x03, DEF_STR(_2C_3C));
            PORT_DIPSETTING(0x06, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x05, DEF_STR(_1C_4C));
            PORT_DIPSETTING(0x00, DEF_STR(Free_Play));
            PORT_DIPNAME(0x08, 0x00, DEF_STR(Cabinet));      PORT_DIPLOCATION("SWA:5");
            PORT_DIPSETTING(0x00, DEF_STR(Upright));
            PORT_DIPSETTING(0x08, DEF_STR(Cocktail));
            PORT_DIPNAME(0x30, 0x30, DEF_STR(Bonus_Life));   PORT_DIPLOCATION("SWA:4,3");
            PORT_DIPSETTING(0x30, "20K 80K 80K+");
            PORT_DIPSETTING(0x20, "20K 100K 100K+");
            PORT_DIPSETTING(0x10, "30K 80K 80K+");
            PORT_DIPSETTING(0x00, "30K 100K 100K+");
            PORT_DIPNAME(0xc0, 0x40, DEF_STR(Lives));        PORT_DIPLOCATION("SWA:2,1");
            PORT_DIPSETTING(0x80, "1");
            PORT_DIPSETTING(0x40, "2");
            PORT_DIPSETTING(0xc0, "3");
            PORT_DIPSETTING(0x00, "5");

            PORT_START("DSWB");
            PORT_DIPNAME(0x07, 0x07, DEF_STR(Coin_B));       PORT_DIPLOCATION("SWB:8,7,6");
            PORT_DIPSETTING(0x01, DEF_STR(_4C_1C));
            PORT_DIPSETTING(0x02, DEF_STR(_3C_1C));
            PORT_DIPSETTING(0x04, DEF_STR(_2C_1C));
            PORT_DIPSETTING(0x07, DEF_STR(_1C_1C));
            PORT_DIPSETTING(0x03, DEF_STR(_2C_3C));
            PORT_DIPSETTING(0x06, DEF_STR(_1C_2C));
            PORT_DIPSETTING(0x05, DEF_STR(_1C_4C));
            PORT_DIPSETTING(0x00, DEF_STR(Free_Play));
            PORT_SERVICE_DIPLOC(0x08, IP_ACTIVE_LOW, "SWB:5");
            PORT_DIPNAME(0x10, 0x10, DEF_STR(Flip_Screen));  PORT_DIPLOCATION("SWB:4");
            PORT_DIPSETTING(0x10, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x60, 0x60, DEF_STR(Difficulty));   PORT_DIPLOCATION("SWB:3,2");
            PORT_DIPSETTING(0x40, DEF_STR(Easy));
            PORT_DIPSETTING(0x60, DEF_STR(Normal));
            PORT_DIPSETTING(0x20, DEF_STR(Difficult));
            PORT_DIPSETTING(0x00, DEF_STR(Very_Difficult));
            PORT_DIPNAME(0x80, 0x80, "Screen Stop");           PORT_DIPLOCATION("SWB:1");
            PORT_DIPSETTING(0x80, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));

            INPUT_PORTS_END();
        }
Beispiel #18
0
        protected machine_static_info(ui_options options, machine_config config, ioport_list ports)
        {
            m_options             = options;
            m_flags               = config.gamedrv().flags;
            m_unemulated_features = config.gamedrv().type.unemulated_features();
            m_imperfect_features  = config.gamedrv().type.imperfect_features();
            m_has_bioses          = false;
            m_has_dips            = false;
            m_has_configs         = false;
            m_has_keyboard        = false;
            m_has_test_switch     = false;
            m_has_analog          = false;


            ioport_list local_ports = new ioport_list();
            string      sink;

            foreach (device_t device in new device_enumerator(config.root_device()))
            {
                // the "no sound hardware" warning doesn't make sense when you plug in a sound card
                if (device.GetClassInterface <device_sound_interface>() != null)  // dynamic_cast<device_sound_interface *>(&device))
                {
                    m_flags &= ~machine_flags.type.NO_SOUND_HW;
                }

                // build overall emulation status
                m_unemulated_features |= device.type().unemulated_features();
                m_imperfect_features  |= device.type().imperfect_features();

                // look for BIOS options
                device_t parent            = device.owner();
                device_slot_interface slot = device.GetClassInterface <device_slot_interface>();  //device_slot_interface const *const slot(dynamic_cast<device_slot_interface const *>(parent));
                if (parent == null || (slot != null && (slot.get_card_device() == device)))
                {
                    for (Pointer <tiny_rom_entry> rom = device.rom_region(); !m_has_bioses && rom != null && !ROMENTRY_ISEND(rom.op); ++rom)  //for (tiny_rom_entry const *rom = device.rom_region(); !m_has_bioses && rom && !ROMENTRY_ISEND(rom); ++rom)
                    {
                        if (ROMENTRY_ISSYSTEM_BIOS(rom.op))
                        {
                            m_has_bioses = true;
                        }
                    }
                }
            }

            // suppress "requires external artwork" warning when external artwork was loaded
            if (config.root_device().has_running_machine())
            {
                for (render_target target = config.root_device().machine().render().first_target(); target != null; target = target.next())
                {
                    if (!target.hidden() && target.external_artwork())
                    {
                        m_flags &= ~machine_flags.type.REQUIRES_ARTWORK;
                        break;
                    }
                }
            }

            // unemulated trumps imperfect when aggregating (always be pessimistic)
            m_imperfect_features &= ~m_unemulated_features;

            // scan the input port array to see what options we need to enable
            foreach (var port in (ports != null ? ports : local_ports))
            {
                foreach (ioport_field field in port.Value.fields())
                {
                    switch (field.type())
                    {
                    case ioport_type.IPT_DIPSWITCH: m_has_dips = true;          break;

                    case ioport_type.IPT_CONFIG:    m_has_configs = true;       break;

                    case ioport_type.IPT_KEYBOARD:  m_has_keyboard = true;      break;

                    case ioport_type.IPT_SERVICE:   m_has_test_switch = true;   break;

                    default: break;
                    }

                    if (field.is_analog())
                    {
                        m_has_analog = true;
                    }
                }
            }
        }
Beispiel #19
0
        //static INPUT_PORTS_START( elevator )
        void construct_ioport_elevator(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            taitosj_state taitosj_state = (taitosj_state)owner;

            COMMON_IN0();

            COMMON_IN1();

            COMMON_IN2();

            COMMON_IN3(IP_ACTIVE_HIGH);

            PORT_START("IN4");
            PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM); PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state.input_port_4_f0_r);      // from sound CPU

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x03, DEF_STR(Bonus_Life));      PORT_DIPLOCATION("SWA:1,2");
            PORT_DIPSETTING(0x03, "10000");
            PORT_DIPSETTING(0x02, "15000");
            PORT_DIPSETTING(0x01, "20000");
            PORT_DIPSETTING(0x00, "25000");
            PORT_DIPNAME(0x04, 0x04, DEF_STR(Free_Play));       PORT_DIPLOCATION("SWA:3");
            PORT_DIPSETTING(0x04, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x18, 0x18, DEF_STR(Lives));           PORT_DIPLOCATION("SWA:4,5");
            PORT_DIPSETTING(0x18, "3");
            PORT_DIPSETTING(0x10, "4");
            PORT_DIPSETTING(0x08, "5");
            PORT_DIPSETTING(0x00, "6");
            PORT_DIPNAME(0x20, 0x20, DEF_STR(Unknown));         PORT_DIPLOCATION("SWA:6");
            PORT_DIPSETTING(0x20, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x40, 0x40, DEF_STR(Flip_Screen));     PORT_DIPLOCATION("SWA:7");
            PORT_DIPSETTING(0x40, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x80, 0x00, DEF_STR(Cabinet));         PORT_DIPLOCATION("SWA:8");
            PORT_DIPSETTING(0x00, DEF_STR(Upright));
            PORT_DIPSETTING(0x80, DEF_STR(Cocktail));

            PORT_START("DSW2");      // Coinage
            DSW2_PORT();

            PORT_START("DSW3");
            PORT_DIPNAME(0x03, 0x03, DEF_STR(Difficulty));      PORT_DIPLOCATION("SWC:1,2");
            PORT_DIPSETTING(0x03, DEF_STR(Easiest));
            PORT_DIPSETTING(0x02, DEF_STR(Easy));
            PORT_DIPSETTING(0x01, DEF_STR(Normal));
            PORT_DIPSETTING(0x00, DEF_STR(Hard));
            PORT_DIPNAME(0x04, 0x04, DEF_STR(Unknown));         PORT_DIPLOCATION("SWC:3");
            PORT_DIPSETTING(0x04, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x08, 0x08, DEF_STR(Unknown));         PORT_DIPLOCATION("SWC:4");
            PORT_DIPSETTING(0x08, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x10, 0x10, "Coinage Display");          PORT_DIPLOCATION("SWC:5");
            PORT_DIPSETTING(0x10, "Coins/Credits");
            PORT_DIPSETTING(0x00, "Insert Coin");
            PORT_DIPNAME(0x20, 0x20, "Year Display");             PORT_DIPLOCATION("SWC:6");
            PORT_DIPSETTING(0x00, DEF_STR(No));
            PORT_DIPSETTING(0x20, DEF_STR(Yes));
            PORT_DIPNAME(0x40, 0x40, "Hit Detection");             PORT_DIPLOCATION("SWC:7");
            PORT_DIPSETTING(0x40, "Normal Game");
            PORT_DIPSETTING(0x00, "No Hit");
            PORT_DIPNAME(0x80, 0x80, "Coin Slots");               PORT_DIPLOCATION("SWC:8");
            PORT_DIPSETTING(0x80, "A and B");
            PORT_DIPSETTING(0x00, "A only");

            INPUT_PORTS_END();
        }
Beispiel #20
0
        //static INPUT_PORTS_START( junglek )
        void construct_ioport_junglek(device_t owner, ioport_list portlist, ref string errorbuf)
        {
            INPUT_PORTS_START(owner, portlist, ref errorbuf);

            taitosj_state taitosj_state = (taitosj_state)owner;

            PORT_START("IN0");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1);
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN);

            PORT_START("IN1");
            PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP); PORT_8WAY(); PORT_COCKTAIL();
            PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1); PORT_COCKTAIL();
            PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN);

            COMMON_IN2();

            COMMON_IN3(IP_ACTIVE_HIGH);

            PORT_START("IN4");
            PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN);
            PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM); PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state.input_port_4_f0_r);      // from sound CPU

            PORT_START("DSW1");
            PORT_DIPNAME(0x03, 0x03, "Finish Bonus");             PORT_DIPLOCATION("SWA:1,2");
            PORT_DIPSETTING(0x03, DEF_STR(None));
            PORT_DIPSETTING(0x02, "Timer x1");
            PORT_DIPSETTING(0x01, "Timer x2");
            PORT_DIPSETTING(0x00, "Timer x3");
            PORT_DIPNAME(0x04, 0x04, DEF_STR(Unused));          PORT_DIPLOCATION("SWA:3");
            PORT_DIPSETTING(0x04, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x18, 0x18, DEF_STR(Lives));           PORT_DIPLOCATION("SWA:4,5");
            PORT_DIPSETTING(0x18, "3");
            PORT_DIPSETTING(0x10, "4");
            PORT_DIPSETTING(0x08, "5");
            PORT_DIPSETTING(0x00, "6");
            PORT_SERVICE(0x20, IP_ACTIVE_LOW);                    PORT_DIPLOCATION("SWA:6");
            PORT_DIPNAME(0x40, 0x00, DEF_STR(Flip_Screen));     PORT_DIPLOCATION("SWA:7");
            PORT_DIPSETTING(0x00, DEF_STR(Off));
            PORT_DIPSETTING(0x40, DEF_STR(On));
            PORT_DIPNAME(0x80, 0x00, DEF_STR(Cabinet));         PORT_DIPLOCATION("SWA:8");
            PORT_DIPSETTING(0x00, DEF_STR(Upright));
            PORT_DIPSETTING(0x80, DEF_STR(Cocktail));

            PORT_START("DSW2");      // Coinage
            DSW2_PORT();

            PORT_START("DSW3");
            PORT_DIPNAME(0x03, 0x03, DEF_STR(Bonus_Life));      PORT_DIPLOCATION("SWC:1,2");
            PORT_DIPSETTING(0x02, "10000");
            PORT_DIPSETTING(0x01, "20000");
            PORT_DIPSETTING(0x00, "30000");
            PORT_DIPSETTING(0x03, DEF_STR(None));
            PORT_DIPNAME(0x04, 0x04, DEF_STR(Unused));          PORT_DIPLOCATION("SWC:3");
            PORT_DIPSETTING(0x04, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x08, 0x08, DEF_STR(Unused));          PORT_DIPLOCATION("SWC:4");
            PORT_DIPSETTING(0x08, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x10, 0x10, DEF_STR(Unused));          PORT_DIPLOCATION("SWC:5");
            PORT_DIPSETTING(0x10, DEF_STR(Off));
            PORT_DIPSETTING(0x00, DEF_STR(On));
            PORT_DIPNAME(0x20, 0x20, "Year Display");             PORT_DIPLOCATION("SWC:6");
            PORT_DIPSETTING(0x00, DEF_STR(No));
            PORT_DIPSETTING(0x20, DEF_STR(Yes));
            PORT_DIPNAME(0x40, 0x40, "Infinite Lives");            PORT_DIPLOCATION("SWC:7");  // Displays 'free game' on screen. Timer disabled with infinite lives
            PORT_DIPSETTING(0x40, DEF_STR(No));
            PORT_DIPSETTING(0x00, DEF_STR(Yes));
            PORT_DIPNAME(0x80, 0x80, "Coin Slots");               PORT_DIPLOCATION("SWC:8");
            PORT_DIPSETTING(0x80, "A and B");
            PORT_DIPSETTING(0x00, "A only");

            INPUT_PORTS_END();
        }
Beispiel #21
0
        protected machine_static_info(machine_config config, ioport_list ports)
        {
            m_flags = config.gamedrv().flags;
            m_unemulated_features = config.gamedrv().type.unemulated_features();
            m_imperfect_features  = config.gamedrv().type.imperfect_features();
            m_has_bioses          = false;
            m_has_dips            = false;
            m_has_configs         = false;
            m_has_keyboard        = false;
            m_has_test_switch     = false;
            m_has_analog          = false;


            ioport_list local_ports = new ioport_list();
            string      sink;

            foreach (device_t device in new device_iterator(config.root_device()))
            {
                // the "no sound hardware" warning doesn't make sense when you plug in a sound card
                if (device.GetClassInterface <device_sound_interface>() != null)  // dynamic_cast<device_sound_interface *>(&device))
                {
                    m_flags &= ~machine_flags.type.NO_SOUND_HW;
                }

                // build overall emulation status
                m_unemulated_features |= device.type().unemulated_features();
                m_imperfect_features  |= device.type().imperfect_features();

                // look for BIOS options
                List <tiny_rom_entry> rom = device.rom_region();
                for (int romOffset = 0; !m_has_bioses && rom != null && rom[romOffset] != null && !romload_global.ROMENTRY_ISEND(rom[romOffset]); ++romOffset)
                {
                    if (romload_global.ROMENTRY_ISSYSTEM_BIOS(rom[romOffset]))
                    {
                        m_has_bioses = true;
                    }
                }

                // if we don't have ports passed in, build here
                if (ports == null)
                {
                    local_ports.append(device, out sink);
                }
            }

            // unemulated trumps imperfect when aggregating (always be pessimistic)
            m_imperfect_features &= ~m_unemulated_features;

            // scan the input port array to see what options we need to enable
            foreach (var port in (ports != null ? ports : local_ports))
            {
                foreach (ioport_field field in port.Value.fields())
                {
                    switch (field.type())
                    {
                    case ioport_type.IPT_DIPSWITCH: m_has_dips = true;          break;

                    case ioport_type.IPT_CONFIG:    m_has_configs = true;       break;

                    case ioport_type.IPT_KEYBOARD:  m_has_keyboard = true;      break;

                    case ioport_type.IPT_SERVICE:   m_has_test_switch = true;   break;

                    default: break;
                    }

                    if (field.is_analog())
                    {
                        m_has_analog = true;
                    }
                }
            }
        }