本文整理汇总了C++中DEVCB_HANDLER函数的典型用法代码示例。如果您正苦于以下问题:C++ DEVCB_HANDLER函数的具体用法?C++ DEVCB_HANDLER怎么用?C++ DEVCB_HANDLER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DEVCB_HANDLER函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: READ8_DEVICE_HANDLER
//logerror("fk1_ppi_1_a_r\n");
return 0xff;
}
static READ8_DEVICE_HANDLER (fk1_ppi_1_b_r )
{
// logerror("fk1_ppi_1_b_r\n");
return 0;
}
static READ8_DEVICE_HANDLER (fk1_ppi_1_c_r )
{
// logerror("fk1_ppi_1_c_r\n");
return 0;
}
static I8255A_INTERFACE( fk1_ppi8255_interface_1 )
{
DEVCB_HANDLER(fk1_ppi_1_a_r),
DEVCB_HANDLER(fk1_ppi_1_b_r),
DEVCB_HANDLER(fk1_ppi_1_c_r),
DEVCB_HANDLER(fk1_ppi_1_a_w),
DEVCB_HANDLER(fk1_ppi_1_b_w),
DEVCB_HANDLER(fk1_ppi_1_c_w)
};
/*
Port A:
Writing data to disk
Port B:
Reading data from disk
Port C:
READING:
7 - / OF A data write to disk,
示例2: READ8_DEVICE_HANDLER
freekick_state *state = device->machine().driver_data<freekick_state>();
state->m_romaddr = (state->m_romaddr & 0x00ff) | (data << 8);
}
static READ8_DEVICE_HANDLER( snd_rom_r )
{
freekick_state *state = device->machine().driver_data<freekick_state>();
return state->memregion("user1")->base()[state->m_romaddr & 0x7fff];
}
static const ppi8255_interface ppi8255_intf[2] =
{
{
DEVCB_NULL, /* Port A read */
DEVCB_NULL, /* Port B read */
DEVCB_HANDLER(snd_rom_r), /* Port C read */
DEVCB_HANDLER(snd_rom_addr_l_w), /* Port A write */
DEVCB_HANDLER(snd_rom_addr_h_w), /* Port B write */
DEVCB_NULL /* Port C write */
},
{
DEVCB_INPUT_PORT("DSW1"), /* Port A read */
DEVCB_INPUT_PORT("DSW2"), /* Port B read */
DEVCB_INPUT_PORT("DSW3"), /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */
DEVCB_NULL /* Port C write */
}
};
示例3: DEVCB_INPUT_PORT
*
* 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
*
*************************************/
static MACHINE_DRIVER_START( bzone_base )
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M6502, BZONE_MASTER_CLOCK / 8)
MDRV_CPU_PROGRAM_MAP(bzone_map)
示例4: TIMER_CALLBACK
static TIMER_CALLBACK(apple1_dsp_ready_start);
static TIMER_CALLBACK(apple1_dsp_ready_end);
/*****************************************************************************
** Structures
*****************************************************************************/
/* Handlers for the PIA. The inputs for Port B, CA1, and CB1 are
handled by writing to them at the moment when their values change,
rather than updating them when they are read; thus they don't need
handler functions. */
const pia6821_interface apple1_pia0 =
{
DEVCB_HANDLER(apple1_pia0_kbdin), /* Port A input (keyboard) */
DEVCB_NULL, /* Port B input (display status) */
DEVCB_NULL, /* CA1 input (key pressed) */
DEVCB_NULL, /* CB1 input (display ready) */
DEVCB_NULL, /* CA2 not used as input */
DEVCB_NULL, /* CB2 not used as input */
DEVCB_NULL, /* Port A not used as output */
DEVCB_HANDLER(apple1_pia0_dspout), /* Port B output (display) */
DEVCB_NULL, /* CA2 not used as output */
DEVCB_HANDLER(apple1_pia0_dsp_write_signal), /* CB2 output (display write) */
DEVCB_NULL, /* IRQA not connected */
DEVCB_NULL /* IRQB not connected */
};
/* Use the same keyboard mapping as on a modern keyboard. This is not
the same as the keyboard mapping of the actual teletype-style
示例5: DEVCB_INPUT_PORT
DEVCB_NULL, /* line CA2 out */
DEVCB_NULL, /* port CB2 out */
DEVCB_NULL, /* IRQA */
DEVCB_NULL /* IRQB */
};
const pia6821_interface qix_pia_2_intf =
{
DEVCB_INPUT_PORT("P2"), /* port A in */
DEVCB_NULL, /* 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_HANDLER(qix_coinctl_w), /* port B out */
DEVCB_NULL, /* line CA2 out */
DEVCB_NULL, /* port CB2 out */
DEVCB_NULL, /* IRQA */
DEVCB_NULL /* IRQB */
};
/***************************************************************************
Games with an MCU need to handle coins differently, and provide
communication with the MCU
***************************************************************************/
示例6: fprintf
return;
}
state->m_infifo[state->m_infifo_head_ptr] = data;
state->m_infifo_head_ptr++;
state->m_infifo_head_ptr&=0x1F;
#ifdef DEBUG_FIFO
fprintf(stderr,"kb input fifo fullness: %d\n",(state->m_infifo_head_ptr-state->m_infifo_tail_ptr)&0x1F);
#endif
// todo: following two should be set so clear happens after one cpu cycle
cputag_set_input_line(device->machine(), "maincpu", MCS51_RX_LINE, ASSERT_LINE);
cputag_set_input_line(device->machine(), "maincpu", MCS51_RX_LINE, CLEAR_LINE);
}
static GENERIC_TERMINAL_INTERFACE( pes_terminal_intf )
{
DEVCB_HANDLER(pes_kbd_input)
};
/* Helper Functions */
static int data_to_i8031(device_t *device)
{
pes_state *state = device->machine().driver_data<pes_state>();
UINT8 data;
data = state->m_infifo[state->m_infifo_tail_ptr];
// if fifo is empty (tail ptr == head ptr), do not increment the tail ptr, otherwise do.
if (state->m_infifo_tail_ptr != state->m_infifo_head_ptr) state->m_infifo_tail_ptr++;
state->m_infifo_tail_ptr&=0x1F;
#ifdef DEBUG_SERIAL_CB
fprintf(stderr,"callback: input to i8031/pes from pc/terminal: %02X\n",data);
#endif
return data;
示例7: DEVCB_INPUT_PORT
{
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) // ??
};
/***************************************************************************
Input Port(s)
***************************************************************************/
static INPUT_PORTS_START( chaknpop )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) // LEFT COIN
示例8: coin_counter_w
{
coin_counter_w(device->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_HANDLER(out_lamps0), DEVCB_HANDLER(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 */
{ DEVCB_NULL, DEVCB_NULL }, /* port write handlers */
NULL /* device */
};
/* TODO: chip #2: test/cocktail, optional buttons */
static MACHINE_CONFIG_START( gaplus, gaplus_state )
示例9: WRITE8_DEVICE_HANDLER
return 0xff;
}
static WRITE8_DEVICE_HANDLER(input_mux_w)
{
bmcbowl_state *state = device->machine().driver_data<bmcbowl_state>();
state->m_bmc_input=data;
}
static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_HANDLER(dips1_r),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(input_mux_w)
};
static const via6522_interface via_interface =
{
/*inputs : A/B */ DEVCB_NULL, DEVCB_HANDLER(via_b_in),
/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B */ DEVCB_HANDLER(via_a_out), DEVCB_HANDLER(via_b_out),
/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(via_ca2_out), DEVCB_NULL,
/*irq */ DEVCB_HANDLER(via_irq)
};
示例10: DEVCB_INPUT_PORT
static const z80_daisy_config daisy_chain_sound[] =
{
{ "ctc" },
{ NULL }
};
static const ppi8255_interface ppi8255_intf[3] =
{
{
DEVCB_INPUT_PORT("P1"), /* Port A read */
DEVCB_NULL, /* Port B read */
DEVCB_NULL, /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */ /* related to sound/music : check code at 0x1c0a */
DEVCB_HANDLER(vidctrl_w) /* Port C write */
},
{
DEVCB_INPUT_PORT("DSW1"), /* Port A read */
DEVCB_INPUT_PORT("DSW2"), /* Port B read */
DEVCB_HANDLER(protection_r), /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */
DEVCB_HANDLER(protection_w) /* Port C write */
},
{
DEVCB_NULL, /* Port A read */
DEVCB_NULL, /* Port B read */
DEVCB_NULL, /* Port C read */
DEVCB_NULL, /* Port A write */
DEVCB_NULL, /* Port B write */
示例11: timer_set
{
// from gameplan.c
/* Kaos sits in a tight loop polling the VIA irq flags register, but that register is
cleared by the irq handler. Therefore, I wait a bit before triggering the irq to
leave time for the program to see the flag change. */
timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, state, via_irq_delayed);
}
static const via6522_interface via_1_interface =
{
/*inputs : A/B */ DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"),
/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B */ DEVCB_NULL, DEVCB_NULL,
/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(trvquest_coin_w), DEVCB_NULL,
/*irq */ DEVCB_NULL
};
static const via6522_interface via_2_interface =
{
/*inputs : A/B */ DEVCB_INPUT_PORT("UNK"), DEVCB_INPUT_PORT("DSW"),
/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
/*outputs: A/B */ DEVCB_NULL, DEVCB_NULL,
/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(trvquest_misc_w), DEVCB_NULL,
/*irq */ DEVCB_LINE(via_irq)
};
static MACHINE_START( trvquest )
{
示例12: READ8_DEVICE_HANDLER
// keyscan
static READ8_DEVICE_HANDLER( mirage_via_read_ca2 )
{
return 0;
}
// keyscan
static READ8_DEVICE_HANDLER( mirage_via_read_cb2 )
{
return 0;
}
const via6522_interface mirage_via =
{
DEVCB_HANDLER(mirage_via_read_porta),
DEVCB_HANDLER(mirage_via_read_portb),
DEVCB_HANDLER(mirage_via_read_ca1),
DEVCB_HANDLER(mirage_via_read_cb1),
DEVCB_HANDLER(mirage_via_read_ca2),
DEVCB_HANDLER(mirage_via_read_cb2),
DEVCB_HANDLER(mirage_via_write_porta),
DEVCB_HANDLER(mirage_via_write_portb),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
};
static ACIA6850_INTERFACE( mirage_acia6850_interface )
示例13: READ8_DEVICE_HANDLER
}
static READ8_DEVICE_HANDLER( get_slave_ack )
{
quakeat_state *state = device->machine().driver_data<quakeat_state>();
if (offset==2) { // IRQ = 2
return pic8259_acknowledge(state->m_pic8259_2);
}
return 0x00;
}
static const struct pic8259_interface quakeat_pic8259_1_config =
{
DEVCB_LINE(quakeat_pic8259_1_set_int_line),
DEVCB_LINE_VCC,
DEVCB_HANDLER(get_slave_ack)
};
static const struct pic8259_interface quakeat_pic8259_2_config =
{
DEVCB_DEVICE_LINE("pic8259_1", pic8259_ir2_w),
DEVCB_LINE_GND,
DEVCB_NULL
};
/*************************************************************/
static INPUT_PORTS_START( quake )
INPUT_PORTS_END
/*************************************************************/
示例14: PORT_START
PORT_START("DSW2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
/**********************************
* AY-3-8910 Interface *
**********************************/
static const ay8910_interface ay8910_config =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_INPUT_PORT("DSW2"),
DEVCB_INPUT_PORT("DSW1"),
DEVCB_HANDLER(mux_w),
DEVCB_NULL
};
/**************************************
* Machine Driver *
**************************************/
static MACHINE_CONFIG_START( big10, big10_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* guess */
MCFG_CPU_PROGRAM_MAP(main_map)
MCFG_CPU_IO_MAP(main_io)
MCFG_TIMER_ADD_SCANLINE("scantimer", big10_interrupt, "screen", 0, 1)
示例15: WRITE8_DEVICE_HANDLER
}
static WRITE8_DEVICE_HANDLER(dummy3_w)
{
// printf("%02x 3\n", data);
}
static const ay8910_interface ay8910_interface_1 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_MEMORY_HANDLER("audiocpu", PROGRAM, soundlatch_r),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(dummy1_w)
};
static const ay8910_interface ay8910_interface_2 =
{
AY8910_LEGACY_OUTPUT,
AY8910_DEFAULT_LOADS,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_HANDLER(dummy2_w),
DEVCB_HANDLER(dummy3_w)
};
static const gfx_layout charlayout =
{
8,8,