当前位置: 首页>>代码示例>>C++>>正文


C++ cpunum_set_input_line函数代码示例

本文整理汇总了C++中cpunum_set_input_line函数的典型用法代码示例。如果您正苦于以下问题:C++ cpunum_set_input_line函数的具体用法?C++ cpunum_set_input_line怎么用?C++ cpunum_set_input_line使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cpunum_set_input_line函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: READ8_HANDLER

static READ8_HANDLER( sound_slave_latch_r )
{
	/* read latch and clear interrupt */
	cpunum_set_input_line(3, M6502_IRQ_LINE, CLEAR_LINE);
	return slave_sound_latch;
}
开发者ID:BirchJD,项目名称:advancemame-0.106.1-RPi,代码行数:6,代码来源:exterm.c

示例2: READ8_HANDLER

static READ8_HANDLER( tubep_sound_irq_ack )
{
	cpunum_set_input_line(2, 0, CLEAR_LINE);
	return 0;
}
开发者ID:CrouchingLlama,项目名称:openlase-mame,代码行数:5,代码来源:tubep.c

示例3: WRITE8_HANDLER

static WRITE8_HANDLER( mrflea_io_w ){
	mrflea_status |= 0x08; // pending command to IO CPU
	mrflea_io = data;
	cpunum_set_input_line( 1, 0, HOLD_LINE );
}
开发者ID:Sunoo,项目名称:nonamemame,代码行数:5,代码来源:mrflea.c

示例4: firqhandler

static void firqhandler(int irq)
{
	cpunum_set_input_line(Machine, 1, 1, irq ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:4,代码来源:capbowl.c

示例5: INTERRUPT_GEN

static INTERRUPT_GEN( bzone_interrupt )
{
	if (readinputport(0) & 0x10)
		cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
开发者ID:Sunoo,项目名称:nonamemame,代码行数:5,代码来源:bzone.c

示例6: irqhandler

static void irqhandler(int irq)
{
	cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:joolswills,项目名称:mameox,代码行数:4,代码来源:cabal.c

示例7: INTERRUPT_GEN

static INTERRUPT_GEN( capbowl_interrupt )
{
	if (input_port_read_indexed(machine, 4) & 1)	/* get status of the F2 key */
		cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);	/* trigger self test */
}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:5,代码来源:capbowl.c

示例8: WRITE8_HANDLER

static WRITE8_HANDLER( megazone_i8039_irq_w )
{
	cpunum_set_input_line(2, 0, ASSERT_LINE);
}
开发者ID:broftkd,项目名称:historic-mame,代码行数:4,代码来源:megazone.c

示例9: ppu_irq

static void ppu_irq( int num, int *ppu_regs )
{
	cpunum_set_input_line(num, INPUT_LINE_NMI, PULSE_LINE );
}
开发者ID:broftkd,项目名称:mess-cvs,代码行数:4,代码来源:vsnes.c

示例10: apple1_kbd_poll

/*****************************************************************************
**	apple1_kbd_poll
**
**	Keyboard polling handles both ordinary keys and the special RESET
**	and CLEAR SCREEN switches.
**
**	For ordinary keys, this implements 2-key rollover to reduce the
**	chance of missed keypresses.  If we press a key and then press a
**	second key while the first hasn't been completely released, as
**	might happen during rapid typing, only the second key is
**	registered; the first key is ignored.
**
**	If multiple newly-pressed keys are found, the one closest to the
**	end of the input ports list is counted; the others are ignored.
*****************************************************************************/
static void apple1_kbd_poll(int dummy)
{
	int port, bit;
	int key_pressed;
	UINT32 shiftkeys, ctrlkeys;

	/* This holds the values of all the input ports for ordinary keys
	   seen during the last scan. */
	static UINT32 kbd_last_scan[] = { 0, 0, 0, 0 };

	static int reset_flag = 0;

	/* First we check the RESET and CLEAR SCREEN pushbutton switches. */

	/* The RESET switch resets the CPU and the 6820 PIA. */
	if (readinputport(5) & 0x0001)
	{
		if (!reset_flag) {
			reset_flag = 1;
			/* using PULSE_LINE does not allow us to press and hold key */
			cpunum_set_input_line(0, INPUT_LINE_RESET, ASSERT_LINE);
			pia_reset();
		}
	}
	else if (reset_flag) {
		/* RESET released--allow the processor to continue. */
		reset_flag = 0;
		cpunum_set_input_line(0, INPUT_LINE_RESET, CLEAR_LINE);
	}

	/* The CLEAR SCREEN switch clears the video hardware. */
	if (readinputport(5) & 0x0002)
	{
		if (!apple1_vh_clrscrn_pressed)
		{
			/* Ignore further video writes, and clear the screen. */
			apple1_vh_clrscrn_pressed = 1;
			apple1_vh_dsp_clr();
		}
	}
	else if (apple1_vh_clrscrn_pressed)
	{
		/* CLEAR SCREEN released--pay attention to video writes again. */
		apple1_vh_clrscrn_pressed = 0;
	}

	/* Now we scan all the input ports for ordinary keys, recording
	   new keypresses while ignoring keys that were already pressed in
	   the last scan. */

	apple1_kbd_data = 0;
	key_pressed = 0;

	/* The keyboard strobe line should always be low when a scan starts. */
	pia_set_input_ca1(0, 0);

	shiftkeys = readinputport(4) & 0x0003;
	ctrlkeys = readinputport(4) & 0x000c;

	for (port = 0; port < 4; port++)
	{
		UINT32 portval = readinputport(port);
		UINT32 newkeys = portval & ~(kbd_last_scan[port]);

		if (newkeys)
		{
			key_pressed = 1;
			for (bit = 0; bit < 16; bit++) {
				if (newkeys & 1)
				{
					apple1_kbd_data = (ctrlkeys)
					  ? apple1_control_keymap[port*16 + bit]
					  : (shiftkeys)
					  ? apple1_shifted_keymap[port*16 + bit]
					  : apple1_unshifted_keymap[port*16 + bit];
				}
				newkeys >>= 1;
			}
		}
		kbd_last_scan[port] = portval;
	}

	if (key_pressed)
	{
		/* The keyboard will pulse its strobe line when a key is
//.........这里部分代码省略.........
开发者ID:Synapseware,项目名称:coco,代码行数:101,代码来源:apple1.c

示例11: WRITE8_HANDLER

static WRITE8_HANDLER( talbot_mcu_halt_w )
{
	data &= 1;
	cpunum_set_input_line(1, INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:CrouchingLlama,项目名称:openlase-mame,代码行数:5,代码来源:talbot.c

示例12: vdp_interrupt

static void vdp_interrupt (int state)
{
	cpunum_set_input_line(0,0, HOLD_LINE);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:4,代码来源:sg1000a.c

示例13: INTERRUPT_GEN

static INTERRUPT_GEN(lethalen_interrupt)
{
	if (K056832_is_IRQ_enabled(0)) cpunum_set_input_line(machine, 0, HD6309_IRQ_LINE, HOLD_LINE);
}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:4,代码来源:lethal.c

示例14: nmi_callback

static void nmi_callback(int param)
{
    if (sound_nmi_enable) cpunum_set_input_line(2,INPUT_LINE_NMI,PULSE_LINE);
    else pending_nmi = 1;
    sound_state &= ~1;
}
开发者ID:RobinDX,项目名称:xmame,代码行数:6,代码来源:bigevglf.c

示例15: WRITE8_HANDLER

static WRITE8_HANDLER( sound_irq_w )
{
	cpunum_set_input_line(machine, 1, 0, HOLD_LINE);
}
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:4,代码来源:lethal.c


注:本文中的cpunum_set_input_line函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。