當前位置: 首頁>>代碼示例>>C++>>正文


C++ DEVCB_HANDLER函數代碼示例

本文整理匯總了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,
開發者ID:cdenix,項目名稱:psmame,代碼行數:31,代碼來源:fk1.c

示例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 */
	}
};

開發者ID:risico,項目名稱:jsmess,代碼行數:29,代碼來源:freekick.c

示例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)
開發者ID:nitrologic,項目名稱:emu,代碼行數:31,代碼來源:bzone.c

示例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
開發者ID:rogerjowett,項目名稱:ClientServerMAME,代碼行數:30,代碼來源:apple1.c

示例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

***************************************************************************/
開發者ID:j4y4r,項目名稱:j4ymame,代碼行數:30,代碼來源:qix.c

示例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;
開發者ID:poliva,項目名稱:mame-rr,代碼行數:31,代碼來源:pes.c

示例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
開發者ID:DarrenBranford,項目名稱:MAME4iOS,代碼行數:31,代碼來源:chaknpop.c

示例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 )
開發者ID:rogerjowett,項目名稱:ClientServerMAME,代碼行數:31,代碼來源:gaplus.c

示例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)
};
開發者ID:vikke,項目名稱:mame_0145,代碼行數:30,代碼來源:bmcbowl.c

示例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 */
開發者ID:vikke,項目名稱:mame_0145,代碼行數:30,代碼來源:pipeline.c

示例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 )
{
開發者ID:DarrenBranford,項目名稱:MAME4iOS,代碼行數:31,代碼來源:trvquest.c

示例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 )
開發者ID:risico,項目名稱:jsmess,代碼行數:31,代碼來源:mirage.c

示例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

/*************************************************************/
開發者ID:risico,項目名稱:jsmess,代碼行數:31,代碼來源:quakeat.c

示例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)
開發者ID:risico,項目名稱:jsmess,代碼行數:31,代碼來源:big10.c

示例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,
開發者ID:esn3s,項目名稱:mame-rr,代碼行數:31,代碼來源:ksayakyu.c


注:本文中的DEVCB_HANDLER函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。