本文整理匯總了C++中DEVCB_INPUT_PORT函數的典型用法代碼示例。如果您正苦於以下問題:C++ DEVCB_INPUT_PORT函數的具體用法?C++ DEVCB_INPUT_PORT怎麽用?C++ DEVCB_INPUT_PORT使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DEVCB_INPUT_PORT函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: GFXDECODE_START
/* Graphics Decode Information */
static GFXDECODE_START( aquarius )
GFXDECODE_ENTRY( "gfx1", 0x0000, aquarius_charlayout, 0, 256 )
GFXDECODE_END
/***************************************************************************
MACHINE DRIVERS
***************************************************************************/
static const ay8910_interface aquarius_ay8910_interface =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("RIGHT"),
DEVCB_INPUT_PORT("LEFT"),
DEVCB_NULL,
DEVCB_NULL
};
static const cassette_config aquarius_cassette_config =
{
cassette_default_formats,
NULL,
(cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED),
NULL
};
static MACHINE_CONFIG_START( aquarius, aquarius_state )
/* basic machine hardware */
示例2: GFXDECODE_START
{ 8, 12, 0, 4 },
{ 3, 2, 1, 0, 19, 18, 17, 16},
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
8*8*4
};
#endif
static GFXDECODE_START( dfruit )
GFXDECODE_ENTRY( "gfx1", 0, bg2_layout, 0, 16 )
GFXDECODE_ENTRY( "gfx1", 0, sp2_layout, 0, 16 )
//GFXDECODE_ENTRY( NULL, 0, char_layout, 0, 16 ) // Ram-based
GFXDECODE_END
static I8255A_INTERFACE( ppi8255_intf )
{
DEVCB_INPUT_PORT("IN0"), /* Port A read */
DEVCB_NULL, /* Port A write */
DEVCB_INPUT_PORT("IN1"), /* Port B read */
DEVCB_NULL, /* Port B write */
DEVCB_INPUT_PORT("IN2"), /* Port C read */
DEVCB_NULL /* Port C write */
};
TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::dfruit_irq_scanline)
{
int scanline = param;
if (scanline == 240 && (m_irq_enable & 4))
{
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]);
}
示例3: GFXDECODE_ENTRY
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 64 )
GFXDECODE_ENTRY( "gfx1", 0x0000, spritelayout, 0, 64 )
GFXDECODE_END
/*************************************
*
* Sound interfaces
*
*************************************/
static const ay8910_interface ay8912_interface_1 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("SYSTEM"),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
static const ay8910_interface ay8912_interface_2 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("INPUTS"),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
示例4: DEVCB_INPUT_PORT
BZONEADJ
INPUT_PORTS_END
/*************************************
*
* Sound interfaces
*
*************************************/
static const pokey_interface bzone_pokey_interface =
{
{ DEVCB_NULL },
DEVCB_INPUT_PORT("IN3")
};
static const pokey_interface redbaron_pokey_interface =
{
{ DEVCB_NULL },
DEVCB_HANDLER(redbaron_joy_r)
};
/*************************************
*
* Machine driver
*
示例5: PORT_BIT
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
INPUT_PORTS_END
/***************************************************************************
Machine Drivers
***************************************************************************/
static I8255A_INTERFACE( lordgun_ppi8255_0_intf )
{
DEVCB_INPUT_PORT("DIP"), /* Port A read */
DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port A write */
DEVCB_NULL, /* Port B read */
DEVCB_DRIVER_MEMBER(lordgun_state,lordgun_eeprom_w), /* Port B write */
DEVCB_INPUT_PORT("SERVICE"), /* Port C read */
DEVCB_DRIVER_MEMBER(lordgun_state,fake2_w) /* Port C write */
};
static I8255A_INTERFACE( lordgun_ppi8255_1_intf )
{
DEVCB_INPUT_PORT("START1"), /* Port A read */
DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port A write */
DEVCB_INPUT_PORT("START2"), /* Port B read */
DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port B write */
DEVCB_INPUT_PORT("COIN"), /* Port C read */
DEVCB_DRIVER_MEMBER(lordgun_state,fake_w) /* Port C write */
示例6: GFXDECODE_START
static GFXDECODE_START( runaway )
GFXDECODE_ENTRY( "gfx1", 0x000, runaway_tile_layout, 0, 1 )
GFXDECODE_ENTRY( "gfx1", 0x800, runaway_sprite_layout, 8, 1 )
GFXDECODE_END
static GFXDECODE_START( qwak )
GFXDECODE_ENTRY( "gfx1", 0x800, qwak_tile_layout, 0, 1 )
GFXDECODE_ENTRY( "gfx1", 0x000, qwak_sprite_layout, 0, 1 )
GFXDECODE_END
static const pokey_interface pokey_interface_1 =
{
{ DEVCB_NULL },
DEVCB_INPUT_PORT("6008")
};
static const pokey_interface pokey_interface_2 =
{
{
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r),
DEVCB_HANDLER(runaway_pot_r)
}
};
示例7: PORT_BIT
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // used to get test mode
INPUT_PORTS_END
INTERRUPT_GEN_MEMBER(hotblock_state::hotblocks_irq)/* right? */
{
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("P1"),
DEVCB_INPUT_PORT("P2"),
DEVCB_NULL,
DEVCB_NULL
};
static MACHINE_CONFIG_START( hotblock, hotblock_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8088, 10000000)
MCFG_CPU_PROGRAM_MAP(hotblock_map)
MCFG_CPU_IO_MAP(hotblock_io)
MCFG_CPU_VBLANK_INT_DRIVER("screen", hotblock_state, hotblocks_irq)
/* video hardware */
示例8: WRITE8_MEMBER
}
WRITE8_MEMBER(toypop_state::out_coin1)
{
coin_counter_w(machine(), 1, ~data & 1);
}
WRITE8_MEMBER(toypop_state::flip)
{
flip_screen_set(data & 1);
}
/* chip #0: player inputs, buttons, coins */
static const namcoio_interface intf0_coin =
{
{ DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1_RIGHT"), DEVCB_INPUT_PORT("P2_RIGHT"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */
{ DEVCB_DRIVER_MEMBER(toypop_state,out_coin0), DEVCB_DRIVER_MEMBER(toypop_state,out_coin1) }, /* port write handlers */
NULL /* device */
};
static const namcoio_interface intf0 =
{
{ DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1_RIGHT"), DEVCB_INPUT_PORT("P2_RIGHT"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */
{ DEVCB_NULL, DEVCB_NULL }, /* port write handlers */
NULL /* device */
};
/* chip #1: dip switches */
static const namcoio_interface intf1 =
{
{ DEVCB_DRIVER_MEMBER(toypop_state,dipA_h), DEVCB_DRIVER_MEMBER(toypop_state,dipB_l), DEVCB_DRIVER_MEMBER(toypop_state,dipB_h), DEVCB_DRIVER_MEMBER(toypop_state,dipA_l) }, /* port read handlers */
{ DEVCB_DRIVER_MEMBER(toypop_state,flip), DEVCB_NULL }, /* port write handlers */
示例9: irq_handler
Sand Scorpion
***************************************************************************/
/* YM3014B + YM2203C */
static void irq_handler(device_t *device, int irq)
{
cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
static const ym2203_interface ym2203_intf_sandscrp =
{
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSW1"), /* Port A Read */
DEVCB_INPUT_PORT("DSW2"), /* Port B Read */
DEVCB_NULL, /* Port A Write */
DEVCB_NULL, /* Port B Write */
},
irq_handler /* IRQ handler */
};
static const kaneko_pandora_interface sandscrp_pandora_config =
{
"screen", /* screen tag */
0, /* gfx_region */
0, 0 /* x_offs, y_offs */
};
示例10: DEVCB_INPUT_PORT
PIA 5 = U7: (never actually used, mapped to $2000 on the sound CPU)
port A = unused
port B = sound CPU to TMS5220 communication
CA1 = interrupt signal from TMS5220
CA2 = write signal to TMS5220
CB1 = ready signal from TMS5220
CB2 = read signal to TMS5220
IRQA = /SINT2 signal
IRQB = /SINT2 signal
***************************************************************************/
const pia6821_interface qix_pia_0_intf =
{
DEVCB_INPUT_PORT("P1"), /* port A in */
DEVCB_INPUT_PORT("COIN"), /* port B in */
DEVCB_NULL, /* line CA1 in */
DEVCB_NULL, /* line CB1 in */
DEVCB_NULL, /* line CA2 in */
DEVCB_NULL, /* line CB2 in */
DEVCB_NULL, /* port A out */
DEVCB_NULL, /* port B out */
DEVCB_NULL, /* line CA2 out */
DEVCB_NULL, /* port CB2 out */
DEVCB_NULL, /* IRQA */
DEVCB_NULL /* IRQB */
};
const pia6821_interface qix_pia_1_intf =
{
示例11: AM_RANGE
AM_RANGE(0x880a, 0x880a) AM_READ_PORT("SYSTEM")
AM_RANGE(0x880b, 0x880b) AM_READ_PORT("P2")
AM_RANGE(0x880c, 0x880c) AM_READWRITE(chaknpop_gfxmode_r, chaknpop_gfxmode_w)
AM_RANGE(0x880d, 0x880d) AM_WRITE(coinlock_w) // coin lock out
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(chaknpop_txram_w) AM_BASE_MEMBER(chaknpop_state, tx_ram) // TX tilemap
AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(chaknpop_attrram_w) AM_BASE_MEMBER(chaknpop_state, attr_ram) // Color attribute
AM_RANGE(0x9840, 0x98ff) AM_RAM AM_BASE_SIZE_MEMBER(chaknpop_state, spr_ram, spr_ram_size) // sprite
AM_RANGE(0xa000, 0xbfff) AM_ROM
AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank1") // bitmap plane 1-4
ADDRESS_MAP_END
static const ay8910_interface ay8910_interface_1 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSWA"), // DSW A
DEVCB_INPUT_PORT("DSWB"), // DSW B
DEVCB_NULL,
DEVCB_NULL
};
static const ay8910_interface ay8910_interface_2 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(unknown_port_1_w), // ??
DEVCB_HANDLER(unknown_port_2_w) // ??
};
示例12: MACHINE_START
static MACHINE_START(merit)
{
slotcarn_state *state = machine.driver_data<slotcarn_state>();
state->m_ram_palette = auto_alloc_array(machine, UINT8, RAM_PALETTE_SIZE);
state_save_register_global_pointer(machine, state->m_ram_palette, RAM_PALETTE_SIZE);
}
/***************************************
* PPI 8255 (x3) Interfaces *
***************************************/
static const ppi8255_interface scarn_ppi8255_intf[3] =
{
{ /* A, B & C set as input */
DEVCB_INPUT_PORT("IN0"), /* Port A read */
DEVCB_INPUT_PORT("IN1"), /* Port B read */
DEVCB_INPUT_PORT("IN2"), /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */
DEVCB_NULL /* Port C write */
},
{ /* A set as input */
DEVCB_INPUT_PORT("DSW1"), /* Port A read */
DEVCB_NULL, /* Port B read */
DEVCB_NULL, /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */
DEVCB_NULL /* Port C write */
},
{ /* A & B set as input */
示例13: PORT_BIT
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
/***************************************************************************
Machine Config
***************************************************************************/
static I8255A_INTERFACE( ppi8255_0_intf )
{
// $4008 - always $83 (PPI mode 0, ports B & lower C as input)
DEVCB_NULL, /* Port A read */
DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_output_w), /* Port A write */
DEVCB_INPUT_PORT("IN0"), /* Port B read */
DEVCB_NULL, /* Port B write */
DEVCB_INPUT_PORT("IN1"), /* Port C read */
DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_control_w) /* Port C write */
};
static I8255A_INTERFACE( ppi8255_1_intf )
{
// $400c - always $80 (PPI mode 0, all ports as output)
DEVCB_NULL, /* Port A read */
DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch1_w), /* Port A write */
DEVCB_NULL, /* Port B read */
DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch2_w), /* Port B write */
DEVCB_NULL, /* Port C read */
DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch3_w) /* Port C write */
};
示例14: set_led_status
{
set_led_status(machine(), 0, data & 1);
set_led_status(machine(), 1, data & 2);
coin_lockout_global_w(machine(), data & 4);
coin_counter_w(machine(), 0, ~data & 8);
}
WRITE8_MEMBER(gaplus_state::out_lamps1)
{
coin_counter_w(machine(), 1, ~data & 1);
}
/* chip #0: player inputs, buttons, coins */
static const namcoio_interface intf0 =
{
{ DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1"), DEVCB_INPUT_PORT("P2"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */
{ DEVCB_NULL, DEVCB_NULL }, /* port write handlers */
NULL /* device */
};
static const namcoio_interface intf0_lamps =
{
{ DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1"), DEVCB_INPUT_PORT("P2"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */
{ DEVCB_DRIVER_MEMBER(gaplus_state,out_lamps0), DEVCB_DRIVER_MEMBER(gaplus_state,out_lamps1) }, /* port write handlers */
NULL /* device */
};
/* chip #1: dip switches */
static const namcoio_interface intf1 =
{
{ DEVCB_INPUT_PORT("DSWA_HIGH"), DEVCB_INPUT_PORT("DSWB_LOW"), DEVCB_INPUT_PORT("DSWB_HIGH"), DEVCB_INPUT_PORT("DSWA_LOW") }, /* port read handlers */
示例15: WRITE8_MEMBER
WRITE8_MEMBER(albazg_state::yumefuda_output_w)
{
coin_counter_w(machine(), 0, ~data & 4);
coin_counter_w(machine(), 1, ~data & 2);
coin_lockout_global_w(machine(), data & 1);
//data & 0x10 hopper-c (active LOW)
//data & 0x08 divider (active HIGH)
flip_screen_set(~data & 0x20);
}
static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSW1"),
DEVCB_INPUT_PORT("DSW2"),
DEVCB_DRIVER_MEMBER(albazg_state,yumefuda_output_w),
DEVCB_NULL
};
static const mc6845_interface mc6845_intf =
{
"screen", /* screen we are acting on */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
NULL, /* row update callback */
NULL, /* after pixel update callback */
DEVCB_NULL, /* callback for display state changes */
DEVCB_NULL, /* callback for cursor state changes */
DEVCB_NULL, /* HSYNC callback */