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


C++ write8_delegate函数代码示例

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


在下文中一共展示了write8_delegate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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,代码来源:nubus_asntmc3b.cpp

示例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,代码来源:starwars.c

示例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,代码来源:svga_trident.cpp

示例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,代码来源:vsnes.cpp

示例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,代码来源:vsnes.cpp

示例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,代码来源:3c503.cpp

示例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,代码来源:tk02.cpp

示例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,代码来源:sc499.c

示例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,代码来源:v53.c

示例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,代码来源:k220.cpp

示例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,代码来源:avc.cpp

示例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,代码来源:svga_cirrus.c

示例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,代码来源:scramble.c

示例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,代码来源:svga_tseng.cpp

示例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,代码来源:k230.cpp


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