• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ device_set_input_line函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: WRITE_LINE_DEVICE_HANDLER

static WRITE_LINE_DEVICE_HANDLER( pcjr_pic8259_set_int_line )
{
	if ( cpu_get_reg( device->machine().firstcpu, STATE_GENPC ) == 0xF0454 )
	{
		pc_int_delay_timer->adjust( device->machine().firstcpu->cycles_to_attotime(1), state );
	}
	else
	{
		device_set_input_line(device->machine().firstcpu, 0, state ? ASSERT_LINE : CLEAR_LINE);
	}
}
开发者ID:risico,项目名称:jsmess,代码行数:11,代码来源:pc.c


示例2: INPUT_CHANGED

ADDRESS_MAP_END

/******************************************************************************
 Input Ports
******************************************************************************/

static INPUT_CHANGED( fidelz80_trigger_reset )
{
	fidelz80_state *state = field->port->machine().driver_data<fidelz80_state>();

	device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
}
开发者ID:cdenix,项目名称:psmame,代码行数:12,代码来源:fidelz80.c


示例3: WRITE8_HANDLER

static WRITE8_HANDLER( lkage_sh_nmi_enable_w )
{
	lkage_state *state = space->machine().driver_data<lkage_state>();

	state->m_sound_nmi_enable = 1;
	if (state->m_pending_nmi)
	{
		/* probably wrong but commands may go lost otherwise */
		device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
		state->m_pending_nmi = 0;
	}
}
开发者ID:vikke,项目名称:mame_0145,代码行数:12,代码来源:lkage.c


示例4: WRITE8_HANDLER

static WRITE8_HANDLER( beast_p1_w )
{
	djboy_state *state = space->machine().driver_data<djboy_state>();

	if (data == 0xff)
	{
		state->m_beast_int0_l = 1;
		device_set_input_line(state->m_beast, INPUT_LINE_IRQ0, CLEAR_LINE);
	}

	state->m_beast_p1 = data;
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:12,代码来源:djboy.c


示例5: WRITE8_HANDLER

static WRITE8_HANDLER( mermaid_p1_w )
{
	hvyunit_state *state = space->machine().driver_data<hvyunit_state>();

	if (data == 0xff)
	{
		state->m_mermaid_int0_l = 1;
		device_set_input_line(state->m_mermaid, INPUT_LINE_IRQ0, CLEAR_LINE);
	}

	state->m_mermaid_p[1] = data;
}
开发者ID:cdenix,项目名称:psmame,代码行数:12,代码来源:hvyunit.c


示例6: WRITE8_HANDLER

static WRITE8_HANDLER( brkthru_1803_w )
{
	brkthru_state *state = space->machine().driver_data<brkthru_state>();

	/* bit 0 = NMI enable */
	state->m_nmi_mask = ~data & 1;

	if(data & 2)
		device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);

	/* bit 1 = ? maybe IRQ acknowledge */
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:12,代码来源:brkthru.c


示例7: AM_RANGE

	AM_RANGE(0xff0000, 0xff3fff) AM_MIRROR(0xc000) AM_RAM
ADDRESS_MAP_END

static READ8_HANDLER(irq_latch_r)
{
	dblewing_state *state = space->machine().driver_data<dblewing_state>();

	/* bit 1 of dblewing_sound_irq specifies IRQ command writes */
	state->m_sound_irq &= ~0x02;
	device_set_input_line(state->m_audiocpu, 0, (state->m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
	return state->m_sound_irq;
}
开发者ID:vikke,项目名称:mame_0145,代码行数:12,代码来源:dblewing.c


示例8: switch

void abc77_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
	switch (id)
	{
	case TIMER_SERIAL:
		serial_clock();
		break;

	case TIMER_RESET:
		device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
		break;
	}
}
开发者ID:risico,项目名称:jsmess,代码行数:13,代码来源:abc77.c


示例9: RGN_FRAC

/***********************************************************
                        GFX DECODING
***********************************************************/

static const gfx_layout tilelayout =
{
	16,16,	/* 16*16 sprites */
	RGN_FRAC(1,1),
	4,	/* 4 bits per pixel */
	{ 0, 1, 2, 3 },
	{ 3*4, 2*4, 11*4, 10*4, 1*4, 0*4, 9*4, 8*4, 7*4, 6*4, 15*4, 14*4, 5*4, 4*4, 13*4, 12*4 },
	{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
	128*8	/* every sprite takes 128 consecutive bytes */
};

static const gfx_layout charlayout =
{
	8,8,	/* 8*8 characters */
	RGN_FRAC(1,1),
	4,	/* 4 bits per pixel */
	{ 0, 1, 2, 3 },
	{ 2*4, 3*4, 0*4, 1*4, 6*4, 7*4, 4*4, 5*4 },
	{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
	32*8	/* every sprite takes 32 consecutive bytes */
};

static GFXDECODE_START( warriorb )
	GFXDECODE_ENTRY( "gfx2", 0, tilelayout,  0, 256 )	/* sprites */
	GFXDECODE_ENTRY( "gfx1", 0, charlayout,  0, 256 )	/* scr tiles (screen 1) */
	GFXDECODE_ENTRY( "gfx3", 0, charlayout,  0, 256 )	/* scr tiles (screen 2) */
GFXDECODE_END


/**************************************************************
                           YM2610 (SOUND)
**************************************************************/

/* handler called by the YM2610 emulator when the internal timers cause an IRQ */
static void irqhandler( device_t *device, int irq )
{
	warriorb_state *state = device->machine().driver_data<warriorb_state>();
	device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:cdenix,项目名称:psmame,代码行数:43,代码来源:warriorb.c


示例10: namco_50xx_irq_set

static void namco_50xx_irq_set(device_t *device)
{
	namco_50xx_state *state = get_safe_token(device);

	device_set_input_line(state->m_cpu, 0, ASSERT_LINE);

	// The execution time of one instruction is ~4us, so we must make sure to
	// give the cpu time to poll the /IRQ input before we clear it.
	// The input clock to the 06XX interface chip is 64H, that is
	// 18432000/6/64 = 48kHz, so it makes sense for the irq line to be
	// asserted for one clock cycle ~= 21us.
	device->machine().scheduler().timer_set(attotime::from_usec(21), FUNC(namco_50xx_irq_clear), 0, (void *)device);
}
开发者ID:kkalmaz,项目名称:psmame,代码行数:13,代码来源:namco50.c


示例11: INTERRUPT_GEN

INPUT_PORTS_END


/***************************************************************************
                                Machine Drivers
***************************************************************************/

static INTERRUPT_GEN( unknown_interrupt )
{
	lastfght_state *state = device->machine().driver_data<lastfght_state>();

	device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
}
开发者ID:j4y4r,项目名称:j4ymame,代码行数:13,代码来源:lastfght.c


示例12: sound_irq

INPUT_PORTS_END

static void sound_irq( device_t *device, int state )
{
	dblewing_state *driver_state = device->machine().driver_data<dblewing_state>();

	/* bit 0 of dblewing_sound_irq specifies IRQ from sound chip */
	if (state)
		driver_state->m_sound_irq |= 0x01;
	else
		driver_state->m_sound_irq &= ~0x01;
	device_set_input_line(driver_state->m_audiocpu, 0, (driver_state->m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:vikke,项目名称:mame_0145,代码行数:13,代码来源:dblewing.c


示例13: WRITE8_HANDLER

static WRITE8_HANDLER( bking_soundlatch_w )
{
	bking_state *state = space->machine().driver_data<bking_state>();
	int i, code = 0;

	for (i = 0;i < 8;i++)
		if (data & (1 << i))
			code |= 0x80 >> i;

	soundlatch_w(space, offset, code);
	if (state->m_sound_nmi_enable)
		device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
}
开发者ID:esn3s,项目名称:mame-rr,代码行数:13,代码来源:bking.c


示例14: TIMER_CALLBACK

static TIMER_CALLBACK( nmi_generate )
{
	namco_06xx_state *state = get_safe_token((device_t *)ptr);

	if (!state->m_nmicpu->suspended(SUSPEND_REASON_HALT | SUSPEND_REASON_RESET | SUSPEND_REASON_DISABLE))
	{
		LOG(("NMI cpu '%s'\n",state->m_nmicpu->tag()));

		device_set_input_line(state->m_nmicpu, INPUT_LINE_NMI, PULSE_LINE);
	}
	else
		LOG(("NMI not generated because cpu '%s' is suspended\n",state->m_nmicpu->tag()));
}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:13,代码来源:namco06.c


示例15: WRITE8_HANDLER

static WRITE8_HANDLER( sonson_sh_irqtrigger_w )
{
	sonson_state *state = space->machine().driver_data<sonson_state>();
	data &= 1;

	if (state->m_last_irq == 0 && data == 1)
	{
		/* setting bit 0 low then high triggers IRQ on the sound CPU */
		device_set_input_line(state->m_audiocpu, M6809_FIRQ_LINE, HOLD_LINE);
	}

	state->m_last_irq = data;
}
开发者ID:cdenix,项目名称:psmame,代码行数:13,代码来源:sonson.c


示例16: INTERRUPT_GEN

static INTERRUPT_GEN (megaplay_bios_irq)
{
	int sline;
	sline = device->machine().primary_screen->vpos();

	if (sline ==0) {
		hintcount = segae_vdp_regs[0][10];
	}

	if (sline <= 192) {

//      if (sline != 192) segae_drawscanline(sline,1,1);

		if (sline == 192)
			segae_vintpending = 1;

		if (hintcount == 0) {
			hintcount = segae_vdp_regs[0][10];
			segae_hintpending = 1;

			if  ((segae_vdp_regs[0][0] & 0x10)) {
				device_set_input_line(device, 0, HOLD_LINE);
				return;
			}

		} else {
			hintcount--;
		}
	}

	if (sline > 192) {
		hintcount = segae_vdp_regs[0][10];

		if ( (sline<0xe0) && (segae_vintpending) ) {
			device_set_input_line(device, 0, HOLD_LINE);
		}
	}

}
开发者ID:risico,项目名称:jsmess,代码行数:39,代码来源:megaplay.c


示例17: machine

void ngp_state::machine_reset()
{
	m_old_to3 = 0;
	m_tlcs900 = machine().device( "maincpu" );
	m_z80 = machine().device( "soundcpu" );
	m_t6w28 = machine().device( "t6w28" );
	m_dac_l = machine().device( "dac_l" );
	m_dac_r = machine().device( "dac_r" );
	m_k1ge = machine().device( "k1ge" );

	device_suspend( m_z80, SUSPEND_REASON_HALT, 1 );
	device_set_input_line( m_z80, 0, CLEAR_LINE );
}
开发者ID:poliva,项目名称:mame-rr,代码行数:13,代码来源:ngp.c


示例18: INPUT_CHANGED

ADDRESS_MAP_END


static INPUT_CHANGED( power_callback )
{
	ngp_state *state = field.machine().driver_data<ngp_state>();

	if ( state->m_io_reg[0x33] & 0x04 )
	{
		device_set_input_line( state->m_tlcs900, TLCS900_NMI,
			(input_port_read(field.machine(), "Power") & 0x01 ) ? CLEAR_LINE : ASSERT_LINE );
	}
}
开发者ID:poliva,项目名称:mame-rr,代码行数:13,代码来源:ngp.c


示例19: irqhandler

GFXDECODE_END


/******************************************************************************

    Sound definitions

******************************************************************************/

static void irqhandler( device_t *device, int irq )
{
	inufuku_state *state = device->machine().driver_data<inufuku_state>();
	device_set_input_line(state->m_audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
开发者ID:esn3s,项目名称:mame-rr,代码行数:14,代码来源:inufuku.c


示例20: TIMER_DEVICE_CALLBACK

// interrupt generation is NOT understood
//  but the order must be something like this,
//  if it is incorrect jchan2 will crash when
//  certain characters win/lose but no finish
//  move was performed
static TIMER_DEVICE_CALLBACK( jchan_vblank )
{
	jchan_state *state = timer.machine().driver_data<jchan_state>();
	int scanline = param;

	if(scanline == 240)
		device_set_input_line(state->m_maincpu, 1, HOLD_LINE);

	if(scanline == 11)
		device_set_input_line(state->m_maincpu, 2, HOLD_LINE);

	if (state->m_irq_sub_enable)
	{
		if(scanline == 240)
			device_set_input_line(state->m_subcpu, 1, HOLD_LINE);

		if(scanline == 249)
			device_set_input_line(state->m_subcpu, 2, HOLD_LINE);

		if(scanline == 11)
			device_set_input_line(state->m_subcpu, 3, HOLD_LINE);
	}
}
开发者ID:broftkd,项目名称:mess-svn,代码行数:28,代码来源:jchan.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ device_set_ivars函数代码示例发布时间:2022-05-30
下一篇:
C++ device_set_desc_copy函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap