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

C++ optional_device类代码示例

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

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



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

示例1: XTAL

void by133_state::granny(machine_config &config)
{
	babypac(config);

	MC6809(config.replace(), m_videocpu, XTAL(8'000'000)); // MC68B09P (XTAL value hard to read)
	m_videocpu->set_addrmap(AS_PROGRAM, &by133_state::granny_map);

	TMS9928A(config, m_crtc2, XTAL(10'738'635)).set_screen("screen");
	m_crtc2->set_vram_size(0x4000);
	m_crtc2->int_callback().set_inputline(m_videocpu, M6809_IRQ_LINE);

	subdevice<screen_device>("screen")->set_screen_update(FUNC(by133_state::screen_update_granny));
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:13,代码来源:byvid.cpp


示例2:

UINT32 zr107_state::screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(machine().pens[0], cliprect);

	m_k056832->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0);
	K001005_draw(bitmap, cliprect);
	m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0);

	draw_7segment_led(bitmap, 3, 3, m_led_reg0);
	draw_7segment_led(bitmap, 9, 3, m_led_reg1);

	sharc_set_flag_input(machine().device("dsp"), 1, ASSERT_LINE);
	return 0;
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:14,代码来源:zr107.c


示例3: memregion

void pb1000_state::machine_start()
{
	std::string region_tag;
	m_rom_reg = memregion("rom");
	if (m_card1)
		m_card1_reg = memregion(region_tag.assign(m_card1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
	if (m_card2)
		m_card2_reg = memregion(region_tag.assign(m_card2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());

	membank("bank1")->set_base(m_rom_reg->base());

	m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pb1000_state::keyboard_timer),this));
	m_kb_timer->adjust(attotime::from_hz(192), 0, attotime::from_hz(192));
}
开发者ID:ursine,项目名称:mame,代码行数:14,代码来源:pb1000.cpp


示例4:

uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	// sprites are flipped relative to tilemaps
	m_sprgen->set_flip_screen(true);

	screen.priority().fill(0);
	bitmap.fill(0);

	m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);

	m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800);
	m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
	return 0;
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:15,代码来源:deco156.cpp


示例5:

void bfmsys85_state::machine_reset()
{
	m_alpha_clock       = 0;
	m_mmtr_latch        = 0;
	m_triac_latch       = 0;
	m_irq_status        = 0;
	m_is_timer_enabled  = 1;
	m_coin_inhibits     = 0;
	m_mux_output_strobe = 0;
	m_mux_input_strobe  = 0;
	m_mux_input         = 0;

	m_vfd->reset();	// reset display1

// reset stepper motors ///////////////////////////////////////////////////
	{
		int pattern =0, i;

		for ( i = 0; i < 6; i++)
		{
			stepper_reset_position(i);
			if ( stepper_optic_state(i) ) pattern |= 1<<i;
		}
	m_optic_pattern = pattern;
	}
	m_locked		  = 0x00; // hardware is open
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:27,代码来源:bfmsys85.c


示例6: screen_update_speglsht

UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
    int x,y,dy;

    dy=(m_videoreg&0x20)?(256*512):0; //visible frame

    for(y=0; y<256; y++)
    {
        for(x=0; x<512; x++)
        {
            int tmp=dy+y*512+x;
            PLOT_PIXEL_RGB(x-67,y-5,(m_framebuffer[tmp]>>0)&0xff,(m_framebuffer[tmp]>>8)&0xff,(m_framebuffer[tmp]>>16)&0xff);
        }
    }

    //draw st0016 gfx to temporary bitmap (indexed 16)
    m_bitmap->fill(0);
    m_maincpu->st0016_draw_screen(screen, *m_bitmap, cliprect);

    //copy temporary bitmap to rgb 32 bit bitmap
    for(y=cliprect.min_y; y<cliprect.max_y; y++)
    {
        UINT16 *srcline = &m_bitmap->pix16(y);
        for(x=cliprect.min_x; x<cliprect.max_x; x++)
        {
            if(srcline[x])
            {
                rgb_t color=m_maincpu->m_palette->pen_color(srcline[x]);
                PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
            }
        }
    }

    return 0;
}
开发者ID:richard42,项目名称:mame,代码行数:35,代码来源:speglsht.c


示例7: machine_start

void apf_state::machine_start()
{
    m_apf_ints = 0;

    if (m_cass) // apfimag only
        m_cass->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:7,代码来源:apf.c


示例8: power_off

void tispellb_state::power_off()
{
	hh_tms1k_state::power_off();

	if (m_subcpu)
		m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:7,代码来源:tispellb.cpp


示例9:

UINT32 by133_state::screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	//bitmap.fill(0xff000000, cliprect);
	copybitmap(bitmap, m_crtc->get_bitmap(), 0, 0, 0, 0, cliprect);
	copybitmap_trans(bitmap, m_crtc2->get_bitmap(), 0, 0, 0, 0, cliprect, 0xff000000);
	return 0;
}
开发者ID:Fulg,项目名称:mame,代码行数:7,代码来源:byvid.cpp


示例10:

void mu100_state::regs_int_read_tap(offs_t address, u16 data, u16 mem_mask)
{
	offs_t pc = m_maincpu->pc();
	offs_t reg = (address - 0x214ca2-0x320)/2;
	if(pc != 0x729c6)
		logerror("regs_int_r %03x, %04x @ %04x (%06x)\n", reg, data, mem_mask, pc);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:7,代码来源:ymmu100.cpp


示例11: power_off

void tispellb_state::power_off()
{
	m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
	if (m_subcpu)
		m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);

	m_power_on = false;
}
开发者ID:dlabi,项目名称:mame,代码行数:8,代码来源:tispellb.cpp


示例12: screen_update

UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(0, cliprect);

	screen.priority().fill(0, cliprect);

	m_view2_0->kaneko16_prepare(bitmap, cliprect);

	for ( int i = 0; i < 8; i++ )
	{
		m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i);
	}

	// copy sprite bitmap to screen
	m_pandora->update(bitmap, cliprect);
	return 0;
}
开发者ID:dinkc64,项目名称:mame,代码行数:17,代码来源:sandscrp.c


示例13: machine_reset

void ngen_state::machine_reset()
{
	m_port00 = 0;
	m_control = 0;
	m_xbus_current = 0;
	m_viduart->write_dsr(0);
	m_viduart->write_cts(0);
	m_fd0->get_device()->set_rpm(300);
}
开发者ID:RalfVB,项目名称:mame,代码行数:9,代码来源:ngen.cpp


示例14: if

bool mc10_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
	if (m_mc6847)		//mc10, alice
		return mc6847_update(m_mc6847, &bitmap, &cliprect);
	else if (m_ef9345)	//alice32
		m_ef9345->video_update(&bitmap, &cliprect);

	return 0;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:9,代码来源:mc10.c


示例15: resolution

void fastinvaders_state::fastinvaders_8275(machine_config &config)
{
	fastinvaders(config);
	m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_8275_io);

	I8275(config, m_crtc8275, 10000000); /* guess */ // does not configure a very useful resolution(!)
	m_crtc8275->set_character_width(16);
//  m_crtc8275->set_display_callback(FUNC(apogee_state::display_pixels));
//  m_crtc8275->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:10,代码来源:fastinvaders.cpp


示例16: screen_update_mirage

UINT32 miragemi_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	address_space &space = machine().driver_data()->generic_space();
	UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);

	flip_screen_set(BIT(flip, 7));

	m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);

	deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll);

	bitmap.fill(256, cliprect); /* not verified */

	deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
	m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff);
	deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
	m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0x1ff);

	return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:20,代码来源:mirage.c


示例17: FUNC

void s4_state::s4a(machine_config &config)
{
	s4(config);
	/* Add the soundcard */
	M6808(config, m_audiocpu, 3580000);
	m_audiocpu->set_addrmap(AS_PROGRAM, &s4_state::s4_audio_map);
	MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4a)

	SPEAKER(config, "speaker").front_center();
	MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
	voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
	vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
	vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);

	PIA6821(config, m_pias, 0);
	m_pias->readpb_handler().set(FUNC(s4_state::sound_r));
	m_pias->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
	m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
	m_pias->irqb_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:20,代码来源:s4.cpp


示例18:

void m24_state::machine_reset()
{
	m_sysctl = 0;
	m_pa = 0x40;
	m_kbcibf = false;
	m_kbdata = true;
	m_i86_halt = false;
	m_i86_halt_perm = false;
	if(m_z8000_apb)
		m_z8000_apb->halt_w(ASSERT_LINE);
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:11,代码来源:m24.cpp


示例19: screen_update_sandscrp

UINT32 sandscrp_state::screen_update_sandscrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
    device_t *pandora = machine().device("pandora");
    bitmap.fill(0, cliprect);

    int i;

    machine().priority_bitmap.fill(0, cliprect);

    m_view2_0->kaneko16_prepare(bitmap, cliprect);

    for ( i = 0; i < 8; i++ )
    {
        m_view2_0->render_tilemap_chip(bitmap,cliprect,i);
    }

    // copy sprite bitmap to screen
    pandora_update(pandora, bitmap, cliprect);
    return 0;
}
开发者ID:,项目名称:,代码行数:20,代码来源:


示例20: bitgrpha

void bitgraph_state::bitgrpha(machine_config &config)
{
	M68000(config, m_maincpu, XTAL(6'900'000));
	m_maincpu->set_addrmap(AS_PROGRAM, &bitgraph_state::bitgrapha_mem);

	bg_motherboard(config);

	CLOCK(config, "system_clock", 40).signal_handler().set(FUNC(bitgraph_state::system_clock_write));

	ACIA6850(config, m_acia3, 0);
	m_acia3->txd_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_txd));
	m_acia3->rts_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_rts));
	m_acia3->irq_handler().set_inputline(M68K_TAG, M68K_IRQ_1);

	rs232_port_device &rs232m(RS232_PORT(config, RS232_M_TAG, default_rs232_devices, nullptr));
	rs232m.rxd_handler().set(m_acia3, FUNC(acia6850_device::write_rxd));
	rs232m.dcd_handler().set(m_acia3, FUNC(acia6850_device::write_dcd));
	rs232m.cts_handler().set(m_acia3, FUNC(acia6850_device::write_cts));

	RAM(config, RAM_TAG).set_default_size("128K");
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:21,代码来源:bitgraph.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ options类代码示例发布时间:2022-05-31
下一篇:
C++ optional类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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