您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ write8_delegate函数代码示例

51自学网 2021-06-03 10:03:54
  C++
这篇教程C++ write8_delegate函数代码示例写得很实用,希望能帮到您。

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

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

示例1: rand

void nubus_mac8390_device::device_start(){	uint32_t slotspace;	char mac[7];	uint32_t num = rand();	memset(m_prom, 0x57, 16);	sprintf(mac+2, "/x1b%c%c%c", (num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff);	mac[0] = mac[1] = 0;  // avoid gcc warning	memcpy(m_prom, mac, 6);	m_dp83902->set_mac(mac);	// set_nubus_device makes m_slot valid	set_nubus_device();	install_declaration_rom(this, MAC8390_ROM_REGION, true);	slotspace = get_slotspace();//  printf("[ASNTMC3NB %p] slotspace = %x/n", this, slotspace);	// TODO: move 24-bit mirroring down into nubus.c	uint32_t ofs_24bit = m_slot<<20;	m_nubus->install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));	m_nubus->install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));	m_nubus->install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this));	m_nubus->install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this));}
开发者ID:Enverex,项目名称:mame,代码行数:25,


示例2: DRIVER_INIT_MEMBER

DRIVER_INIT_MEMBER(starwars_state,esb){	UINT8 *rom = memregion("maincpu")->base();	/* init the slapstic */	m_slapstic_device->slapstic_init(machine(), 101);	m_slapstic_source = &rom[0x14000];	m_slapstic_base = &rom[0x08000];	/* install an opcode base handler */	address_space &space = m_maincpu->space(AS_PROGRAM);	space.set_direct_update_handler(direct_update_delegate(FUNC(starwars_state::esb_setdirect), this));	/* install read/write handlers for it */	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x8000, 0x9fff, read8_delegate(FUNC(starwars_state::esb_slapstic_r),this), write8_delegate(FUNC(starwars_state::esb_slapstic_w),this));	/* install additional banking */	m_maincpu->space(AS_PROGRAM).install_read_bank(0xa000, 0xffff, "bank2");	/* prepare the matrix processor */	m_is_esb = 1;	starwars_mproc_init();	/* initialize banking */	membank("bank1")->configure_entries(0, 2, rom + 0x6000, 0x10000 - 0x6000);	membank("bank1")->set_entry(0);	membank("bank2")->configure_entries(0, 2, rom + 0xa000, 0x1c000 - 0xa000);	membank("bank2")->set_entry(0);	/* additional globals for state saving */	save_item(NAME(m_slapstic_current_bank));	save_item(NAME(m_slapstic_last_pc));	save_item(NAME(m_slapstic_last_address));}
开发者ID:dinkc64,项目名称:mame,代码行数:34,


示例3: set_isa_device

void isa16_svga_tgui9680_device::device_start(){	set_isa_device();	m_vga = subdevice<trident_vga_device>("vga");	m_isa->install_rom(this, 0xc0000, 0xc7fff, "tgui9680", "tgui9680");	m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(trident_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03b0_w),m_vga));	m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(trident_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03c0_w),m_vga));	m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(trident_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03d0_w),m_vga));	m_isa->install_device(0x43c4, 0x43cb, read8_delegate(FUNC(trident_vga_device::port_43c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_43c6_w),m_vga));	m_isa->install_device(0x83c4, 0x83cb, read8_delegate(FUNC(trident_vga_device::port_83c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_83c6_w),m_vga));	m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(trident_vga_device::mem_r),m_vga), write8_delegate(FUNC(trident_vga_device::mem_w),m_vga));	// uncomment to test Windows 3.1 TGUI9440AGi driver//  m_isa->install_memory(0x4400000, 0x45fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga));	// win95 drivers//  m_isa->install_memory(0x4000000, 0x41fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga));	// acceleration ports	m_isa->install_device(0x2120, 0x21ff, read8_delegate(FUNC(trident_vga_device::accel_r),m_vga), write8_delegate(FUNC(trident_vga_device::accel_w),m_vga));}
开发者ID:MoochMcGee,项目名称:mame,代码行数:25,


示例4: MACHINE_START_MEMBER

MACHINE_START_MEMBER(vsnes_state,vsdual){	m_vrom[0] = memregion("gfx1")->base();	m_vrom[1] = memregion("gfx2")->base();	m_vrom_size[0] = memregion("gfx1")->bytes();	m_vrom_size[1] = memregion("gfx2")->bytes();	/* establish nametable ram */	m_nt_ram[0] = std::make_unique<uint8_t[]>(0x1000);	m_nt_ram[1] = std::make_unique<uint8_t[]>(0x1000);	/* set mirroring */	m_nt_page[0][0] = m_nt_ram[0].get();	m_nt_page[0][1] = m_nt_ram[0].get() + 0x400;	m_nt_page[0][2] = m_nt_ram[0].get() + 0x800;	m_nt_page[0][3] = m_nt_ram[0].get() + 0xc00;	m_nt_page[1][0] = m_nt_ram[1].get();	m_nt_page[1][1] = m_nt_ram[1].get() + 0x400;	m_nt_page[1][2] = m_nt_ram[1].get() + 0x800;	m_nt_page[1][3] = m_nt_ram[1].get() + 0xc00;	machine().device("ppu1")->memory().space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(vsnes_state::vsnes_nt0_r),this), write8_delegate(FUNC(vsnes_state::vsnes_nt0_w),this));	machine().device("ppu2")->memory().space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(vsnes_state::vsnes_nt1_r),this), write8_delegate(FUNC(vsnes_state::vsnes_nt1_w),this));	// read only!	machine().device("ppu1")->memory().space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "bank2");	// read only!	machine().device("ppu2")->memory().space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "bank3");	membank("bank2")->configure_entries(0, m_vrom_size[0] / 0x2000, m_vrom[0], 0x2000);	membank("bank3")->configure_entries(0, m_vrom_size[1] / 0x2000, m_vrom[1], 0x2000);	membank("bank2")->set_entry(0);	membank("bank3")->set_entry(0);}
开发者ID:qwijibo,项目名称:mame,代码行数:31,


示例5: DRIVER_INIT_MEMBER

DRIVER_INIT_MEMBER(vsnes_state,vsgun){	/* VROM switching is enabled with bit 2 of $4016 */	m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x4016, 0x4016, read8_delegate(FUNC(vsnes_state::gun_in0_r),this), write8_delegate(FUNC(vsnes_state::gun_in0_w),this));	m_do_vrom_bank = 1;}
开发者ID:qwijibo,项目名称:mame,代码行数:6,


示例6: machine

void el2_3c503_device::device_start() {	char mac[7];	uint32_t num = machine().rand();	memset(m_prom, 0x57, 16);	sprintf(mac, "/x02/x60/x8c%c%c%c", (num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff);	memcpy(m_prom, mac, 6);	memset(m_rom, 0, 8*1024); // empty	m_dp8390->set_mac(mac);	set_isa_device();	m_isa->install_device(0x0300, 0x030f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_w), this));	m_isa->install_device(0x0700, 0x070f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_w), this));	// TODO: This is wrong, fix if anything actually uses it	//  DMA can change in runtime	int chan = 0, idcfr = m_regs.idcfr & 0x0f;	if((m_regs.streg & 0x08)) {		while(idcfr) {			chan++;			idcfr >>= 1;		}		m_isa->set_dma_channel(chan, this, false);	}}
开发者ID:broftkd,项目名称:mame,代码行数:23,


示例7: io_space

void tk02_device::device_reset(){	io_space().install_device(0x40, 0x4f, *this, &tk02_device::map);	io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8_delegate(FUNC(tk02_device::ram_r), this), write8_delegate(FUNC(tk02_device::ram_w), this));}
开发者ID:MoochMcGee,项目名称:mame,代码行数:5,


示例8: check_tape

void sc499_device::device_reset(){	m_data = 0;	m_command = SC499_CMD_NO_COMMAND;	m_status  = SC499_STAT_RDY; // | SC499_STAT_EXC;	m_control = 0;	m_first_block_hack = 1;	m_nasty_readahead = 0;	m_read_block_pending = 0;	m_current_command = m_command;	m_data_error_counter = 0;	m_underrun_counter = 0;	m_image_length = 0;	check_tape();	m_data_index = 0;	m_ctape_block_index = 0;	m_tape_pos = 0;	irq_state = CLEAR_LINE;	dma_drq_state = CLEAR_LINE;	if (!m_installed)	{		int base = m_iobase->read();		m_irq = m_irqdrq->read() & 7;		m_drq = m_irqdrq->read()>>4;		m_isa->install_device(base, base+7, 0, 0, read8_delegate(FUNC(sc499_device::read), this), write8_delegate(FUNC(sc499_device::write), this));		m_isa->set_dma_channel(m_drq, this, true);	}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:37,


示例9: space

void v53_base_device::install_peripheral_io(){    // unmap everything in I/O space up to the fixed position registers (we avoid overwriting them, it isn't a valid config)    space(AS_IO).unmap_readwrite(0x1000, 0xfeff); // todo, we need to have a way to NOT unmap things defined in the drivers, but instead have this act as an overlay mapping / unampping only!!    // IOAG determines if the handlers used 8-bit or 16-bit access    // the hng64.c games first set everything up in 8-bit mode, then    // do the procedure again in 16-bit mode before using them?!    int IOAG = m_SCTL & 1;    if (m_OPSEL & 0x01) // DMA Unit available    {        UINT16 base = (m_OPHA << 8) | m_DULA;        base &= 0xfffe;        if (m_SCTL & 0x02) // uPD71037 mode        {            if (IOAG) // 8-bit            {            }            else            {            }        }        else // uPD71071 mode        {            space(AS_IO).install_readwrite_handler(base+0x00, base+0x0f, read8_delegate(FUNC(upd71071_v53_device::read), (upd71071_v53_device*)m_v53dmau), write8_delegate(FUNC(upd71071_v53_device::write),  (upd71071_v53_device*)m_v53dmau), 0xffff);        }    }    if (m_OPSEL & 0x02) // Interupt Control Unit available    {        UINT16 base = (m_OPHA << 8) | m_IULA;        base &= 0xfffe;        if (IOAG) // 8-bit        {        }        else        {            space(AS_IO).install_readwrite_handler(base+0x00, base+0x03, read8_delegate(FUNC(pic8259_device::read), (pic8259_device*)m_v53icu), write8_delegate(FUNC(pic8259_device::write), (pic8259_device*)m_v53icu), 0x00ff);        }    }    if (m_OPSEL & 0x04) // Timer Control Unit available    {        UINT16 base = (m_OPHA << 8) | m_TULA;        //printf("installing TCU to %04x/n", base);        base &= 0xfffe;        if (IOAG) // 8-bit        {        }        else        {            space(AS_IO).install_readwrite_handler(base+0x00, base+0x01, read8_delegate(FUNC(v53_base_device::tmu_tst0_r), this), write8_delegate(FUNC(v53_base_device::tmu_tct0_w), this), 0x00ff);            space(AS_IO).install_readwrite_handler(base+0x02, base+0x03, read8_delegate(FUNC(v53_base_device::tmu_tst1_r), this), write8_delegate(FUNC(v53_base_device::tmu_tct1_w), this), 0x00ff);            space(AS_IO).install_readwrite_handler(base+0x04, base+0x05, read8_delegate(FUNC(v53_base_device::tmu_tst2_r), this), write8_delegate(FUNC(v53_base_device::tmu_tct2_w), this), 0x00ff);            space(AS_IO).install_write_handler(base+0x06, base+0x07, write8_delegate(FUNC(v53_base_device::tmu_tmd_w), this), 0x00ff);        }    }    if (m_OPSEL & 0x08) // Serial Control Unit available    {        UINT16 base = (m_OPHA << 8) | m_SULA;        base &= 0xfffe;        if (IOAG) // 8-bit        {        }        else        {            space(AS_IO).install_readwrite_handler(base+0x00, base+0x01, read8_delegate(FUNC(v53_scu_device::data_r), (v53_scu_device*)m_v53scu), write8_delegate(FUNC(v53_scu_device::data_w), (v53_scu_device*)m_v53scu), 0x00ff);            space(AS_IO).install_readwrite_handler(base+0x02, base+0x03, read8_delegate(FUNC(v53_scu_device::status_r),  (v53_scu_device*)m_v53scu), write8_delegate(FUNC(v53_scu_device::command_w),  (v53_scu_device*)m_v53scu), 0x00ff);            space(AS_IO).install_write_handler(base+0x04, base+0x05, write8_delegate(FUNC(v53_scu_device::mode_w), (v53_scu_device*)m_v53scu), 0x00ff);            space(AS_IO).install_readwrite_handler(base+0x06, base+0x07, read8_delegate(FUNC(v53_base_device::scu_simk_r), this), write8_delegate(FUNC(v53_base_device::scu_simk_w), this), 0x00ff);        }    }}
开发者ID:weihu811102,项目名称:MAMEHub,代码行数:82,


示例10: machine

void dmv_k220_device::device_start(){	address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);	space.install_readwrite_handler(0x08, 0x0b, 0, 0, read8_delegate(FUNC(pit8253_device::read), &(*m_pit)), write8_delegate(FUNC(pit8253_device::write), &(*m_pit)), 0);	space.install_readwrite_handler(0x0c, 0x0f, 0, 0, read8_delegate(FUNC(i8255_device::read), &(*m_ppi)), write8_delegate(FUNC(i8255_device::write), &(*m_ppi)), 0);}
开发者ID:ursine,项目名称:mame,代码行数:6,


示例11: write8_delegate

void nascom_avc_device::device_reset(){	m_nasbus->m_io->install_write_handler(0xb0, 0xb0, write8_delegate(FUNC(mc6845_device::address_w), m_crtc.target()));	m_nasbus->m_io->install_readwrite_handler(0xb1, 0xb1, read8_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8_delegate(FUNC(mc6845_device::register_w), m_crtc.target()));	m_nasbus->m_io->install_write_handler(0xb2, 0xb2, write8_delegate(FUNC(nascom_avc_device::control_w), this));}
开发者ID:DragonMinded,项目名称:mame,代码行数:6,


示例12: set_isa_device

void isa8_svga_cirrus_device::device_start(){    set_isa_device();    m_vga = subdevice<cirrus_vga_device>("vga");    m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "dm_clgd5430");    m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(cirrus_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_vga_device::port_03b0_w),m_vga));    m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(cirrus_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_vga_device::port_03c0_w),m_vga));    m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(cirrus_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_vga_device::port_03d0_w),m_vga));//  m_isa->install_device(0x9ae8, 0x9aeb, 0, 0, read8_delegate(FUNC(cirrus_vga_device::s3_port_9ae8_r),m_vga), write8_delegate(FUNC(cirrus_vga_device::s3_port_9ae8_w),m_vga));    m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(cirrus_vga_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_vga_device::mem_w),m_vga));}
开发者ID:Eduardop,项目名称:mame,代码行数:15,


示例13: DRIVER_INIT

static DRIVER_INIT( scobra ){	scramble_state *state = machine.driver_data<scramble_state>();	machine.device("maincpu")->memory().space(AS_PROGRAM)->install_write_handler(0xa803, 0xa803, write8_delegate(FUNC(scramble_state::scrambold_background_enable_w),state));}
开发者ID:j4y4r,项目名称:j4ymame,代码行数:5,


示例14: set_isa_device

void isa8_svga_et4k_device::device_start(){	set_isa_device();	m_vga = subdevice<tseng_vga_device>("vga");	m_isa->install_rom(this, 0xc0000, 0xc7fff, "et4000", "et4000");	m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(tseng_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03b0_w),m_vga));	m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(tseng_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03c0_w),m_vga));	m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(tseng_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(tseng_vga_device::port_03d0_w),m_vga));	m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(tseng_vga_device::mem_r),m_vga), write8_delegate(FUNC(tseng_vga_device::mem_w),m_vga));}
开发者ID:Fulg,项目名称:mame,代码行数:14,


示例15: read8_delegate

void dmv_k234_device::device_start(){	dmv_k230_device::device_start();	m_io->install_readwrite_handler(0xd8, 0xdf, 0, 0, read8_delegate(FUNC(dmv_k234_device::snr_r), this), write8_delegate(FUNC(dmv_k234_device::snr_w), this), 0);}
开发者ID:Ashura-X,项目名称:mame,代码行数:5,


示例16: MACHINE_START_MEMBER

MACHINE_START_MEMBER(astrocde_mess_state, astrocde){	if (m_cart->exists())		m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(astrocade_cart_slot_device::read_rom),(astrocade_cart_slot_device*)m_cart));	// if no RAM is mounted and the handlers are installed, the system starts with garbage on screen and a RESET is necessary	// thus, install RAM only if an expansion is mounted	if (m_exp->get_card_mounted())		m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x5000, 0xffff, read8_delegate(FUNC(astrocade_exp_device::read),(astrocade_exp_device*)m_exp), write8_delegate(FUNC(astrocade_exp_device::write),(astrocade_exp_device*)m_exp));}
开发者ID:NULUSIOS,项目名称:mame,代码行数:10,


示例17: set_isa_device

void isa8_gblaster_device::device_start(){    set_isa_device();    m_isa->install_device(0x0220, 0x0221, 0, 0, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_1_16_w), this ) );    m_isa->install_device(0x0222, 0x0223, 0, 0, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_2_16_w), this ) );}
开发者ID:Eduardop,项目名称:mame,代码行数:6,


示例18: read8_delegate

void isa8_lpt_device::device_reset(){	m_is_primary = (ioport("DSW")->read() & 1) ? false : true;	if (m_is_primary) {		m_isa->install_device(0x0378, 0x037b, 0, 0, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt")));	} else {		m_isa->install_device(0x0278, 0x027b, 0, 0, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt")));	}}
开发者ID:antervud,项目名称:MAMEHub,代码行数:9,


示例19: MACHINE_START

static MACHINE_START( cham24 ){    cham24_state *state = machine.driver_data<cham24_state>();    /* switch PRG rom */    UINT8* dst = state->memregion("maincpu")->base();    UINT8* src = state->memregion("user1")->base();    memcpy(&dst[0x8000], &src[0x0f8000], 0x4000);    memcpy(&dst[0xc000], &src[0x0f8000], 0x4000);    /* uses 8K swapping, all ROM!*/    machine.device("ppu")->memory().space(AS_PROGRAM)->install_read_bank(0x0000, 0x1fff, "bank1");    state->membank("bank1")->set_base(state->memregion("gfx1")->base());    /* need nametable ram, though. I doubt this uses more than 2k, but it starts up configured for 4 */    state->m_nt_ram = auto_alloc_array(machine, UINT8, 0x1000);    state->m_nt_page[0] = state->m_nt_ram;    state->m_nt_page[1] = state->m_nt_ram + 0x400;    state->m_nt_page[2] = state->m_nt_ram + 0x800;    state->m_nt_page[3] = state->m_nt_ram + 0xc00;    /* and read/write handlers */    machine.device("ppu")->memory().space(AS_PROGRAM)->install_readwrite_handler(0x2000, 0x3eff,read8_delegate(FUNC(cham24_state::nt_r), state), write8_delegate(FUNC(cham24_state::nt_w), state));}
开发者ID:risico,项目名称:jsmess,代码行数:24,


示例20: DRIVER_INIT_MEMBER

ROM_ENDDRIVER_INIT_MEMBER(naughtyb_state,popflame){	/* install a handler to catch protection checks */	machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x9000, 0x9000, read8_delegate(FUNC(naughtyb_state::popflame_protection_r),this));	machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0x9090, 0x9090, read8_delegate(FUNC(naughtyb_state::popflame_protection_r),this));	machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0xb000, 0xb0ff, write8_delegate(FUNC(naughtyb_state::popflame_protection_w),this));}
开发者ID:clobber,项目名称:UME,代码行数:11,


示例21: machine

void cpc_symbiface2_device::device_start(){	device_t* cpu = machine().device("maincpu");	address_space& space = cpu->memory().space(AS_IO);	m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner());	space.install_readwrite_handler(0xfd00,0xfd07,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_w),this));	space.install_readwrite_handler(0xfd08,0xfd0f,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_w),this));	space.install_read_handler(0xfd10,0xfd10,read8_delegate(FUNC(cpc_symbiface2_device::mouse_r),this));	space.install_readwrite_handler(0xfd14,0xfd15,read8_delegate(FUNC(cpc_symbiface2_device::rtc_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rtc_w),this));	space.install_readwrite_handler(0xfd17,0xfd17,read8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_w),this));	// set up ROM space (these can be writable, when mapped to &4000, or completely disabled, allowing the built-in ROMs to be visible)	// 32 banks of 16kB (512kB)	m_rom_space.resize(32*16384);	m_nvram->set_base(&m_rom_space[0],m_rom_space.size());	save_item(NAME(m_rom_space));}
开发者ID:Enverex,项目名称:mame,代码行数:21,


示例22: set_isa_device

void isa16_s3virge_device::device_start(){	set_isa_device();	m_vga = subdevice<s3virge_vga_device>("vga");	m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virge");	m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga));	m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga));	m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga));	m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga));}
开发者ID:Tauwasser,项目名称:mame,代码行数:14,


示例23: set_isa_device

void mc1502_fdc_device::device_start(){	set_isa_device();	// BIOS 5.0-5.2x	m_isa->install_device(0x010c, 0x010f,		READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),		WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );	m_isa->install_device(0x0100, 0x010b, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );	// BIOS 5.3x	m_isa->install_device(0x0048, 0x004b,		READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read),		WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) );	m_isa->install_device(0x004c, 0x004f, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdcv2_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) );	motor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_fdc_device::motor_callback),this));	motor_on = 0;}
开发者ID:GiuseppeGorgoglione,项目名称:mame,代码行数:19,



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


C++ writeAttribute函数代码示例
C++ write8函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。