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

C++ required_memory_bank类代码示例

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

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



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

示例1: machine_start

void prestige_state::machine_start()
{
	std::string region_tag;
	m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());

	uint8_t *rom = memregion("maincpu")->base();
	uint8_t *cart = nullptr;
	if (m_cart_rom != nullptr)
	{
		cart = m_cart_rom->base();
	}
	else
	{
		cart = rom + 0x40000;   // internal ROM also includes extra contents that are activated by a cartridge that works as a jumper
	}
	uint8_t *ram = m_ram->pointer();
	memset(ram, 0x00, m_ram->size());

	m_bank1->configure_entries(0, 64, rom,  0x4000);
	m_bank1->configure_entries(64,32, cart, 0x4000);
	m_bank2->configure_entries(0, 64, rom,  0x4000);
	m_bank2->configure_entries(64,32, cart, 0x4000);
	m_bank3->configure_entries(0, 64, rom,  0x4000);
	m_bank3->configure_entries(64,32, cart, 0x4000);
	m_bank4->configure_entries(0, 4,  ram,  0x2000);
	m_bank5->configure_entries(0, 4,  ram,  0x2000);

	m_bank1->set_entry(0);
	m_bank2->set_entry(0);
	m_bank3->set_entry(0);
	m_bank4->set_entry(0);
	m_bank5->set_entry(0);

	//pointer to the videoram
	m_vram = ram;
}
开发者ID:qwijibo,项目名称:mame,代码行数:36,代码来源:prestige.cpp


示例2: machine_start

INPUT_PORTS_END


void cms_state::machine_start()
{
	m_bank1->configure_entries(0, 16, m_rom->base(), 0x4000);

	memset(&m_rtc_data, 0, sizeof(m_rtc_data));
	m_rtc_reg = 0;
	m_rtc_state = 0;
	m_rtc_data[0xf] = 1;

	m_rtc_timer = timer_alloc();
	m_rtc_timer->adjust(attotime::zero, 0, attotime(1, 0));
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:15,代码来源:cms.cpp


示例3: memregion

INPUT_PORTS_END

void pc2000_state::machine_start()
{
	std::string region_tag;
	UINT8 *bios = memregion("bios")->base();
	UINT8 *cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base();
	if (!cart)
		cart = memregion("bios")->base();

	m_bank0->configure_entries(0, 0x10, bios, 0x4000);
	m_bank1->configure_entries(0, 0x10, bios, 0x4000);
	m_bank2->configure_entries(0, 0x10, bios, 0x4000);
	m_bank2->configure_entries(0x80, 0x10, cart, 0x4000);
}
开发者ID:robsonfr,项目名称:mame,代码行数:15,代码来源:pc2000.cpp


示例4: machine_start

void sothello_state::machine_start()
{
	m_bank1->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000);
}
开发者ID:DragonMinded,项目名称:mame,代码行数:4,代码来源:sothello.cpp


示例5: sfkick_remap_banks

void sfkick_state::sfkick_remap_banks()
{
	/* 0000-3fff */
	switch(m_bank_cfg&3)
	{
		case 0: /* bios */
		{
			UINT8 *mem = m_region_bios->base();
			m_bank1->set_base(mem);
			m_bank2->set_base(mem+0x2000);
		}
		break;

		case 1: /* ext rom */
		{
			UINT8 *mem = m_region_extrom->base();
			m_bank1->set_base(mem+0x4000);
			m_bank2->set_base(mem+0x6000);
		}
		break;

		case 2: /* banked */
		{
			UINT8 *mem = m_region_banked->base();
			m_bank1->set_base(mem+0x2000*m_bank[0]);
			m_bank2->set_base(mem+0x2000*m_bank[1]);
		}
		break;

		case 3: /* unknown */
		{
			UINT8 *mem = m_region_banked->base();
			m_bank1->set_base(mem+0x18000);
			m_bank2->set_base(mem+0x18000);
		}
		break;
	}

	/* 4000-7fff */
	switch((m_bank_cfg>>2)&3)
	{
		case 0: /* bios - upper part */
		{
			UINT8 *mem = m_region_bios->base();
			m_bank3->set_base(mem+0x4000);
			m_bank4->set_base(mem+0x6000);
		}
		break;

		case 1:  /* unknown */
		case 3:
		{
			UINT8 *mem = m_region_banked->base();
			m_bank3->set_base(mem+0x18000);
			m_bank4->set_base(mem+0x18000);
		}
		break;

		case 2: /* banked */
		{
			UINT8 *mem = m_region_banked->base();
			m_bank3->set_base(mem+0x2000*m_bank[2]);
			m_bank4->set_base(mem+0x2000*m_bank[3]);
		}
		break;
	}

	/* 8000-bfff */
	switch((m_bank_cfg>>4)&3)
	{
		case 0: /* cartridge */
		{
			UINT8 *mem = m_region_cartridge->base();
			m_bank5->set_base(mem+0x4000);
			m_bank6->set_base(mem+0x6000);
		}
		break;

		case 1: /* unknown */
		case 3:
		{
			UINT8 *mem = m_region_banked->base();
			m_bank5->set_base(mem+0x18000);
			m_bank6->set_base(mem+0x18000);
		}
		break;

		case 2: /* banked */
		{
			UINT8 *mem = m_region_banked->base();
			m_bank5->set_base(mem+0x2000*m_bank[4]);
			m_bank6->set_base(mem+0x2000*m_bank[5]);
		}
		break;
	}

	/* c000-ffff */
	switch((m_bank_cfg>>6)&3)
	{
		case 0: /* unknown */
//.........这里部分代码省略.........
开发者ID:h0tw1r3,项目名称:mameuifx,代码行数:101,代码来源:sfkick.cpp


示例6:

void can09_state::machine_start()
{
	LOG("%s()\n", FUNCNAME);
	m_bank1->configure_entries(0, 8, m_ram->pointer(), 0x8000);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:5,代码来源:candela.cpp


示例7: machine_start

void pcat_dyn_state::machine_start()
{
	m_prgbank->configure_entries(0, 256, memregion("game_prg")->base(), 0x1000);
	m_nvram_bank->configure_entries(0, 2, &m_nvram_mem[0], 0x1000);
	machine().device<nvram_device>("nvram")->set_base(&m_nvram_mem[0], 0x2000);
}
开发者ID:Robbbert,项目名称:store1,代码行数:6,代码来源:pcat_dyn.cpp


示例8:

void iq151_state::machine_reset()
{
	m_boot_bank->set_entry(0);

	m_vblank_irq_state = 0;
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:6,代码来源:iq151.cpp


示例9: memregion

void iq151_state::machine_start()
{
	uint8_t *RAM = memregion("maincpu")->base();
	m_boot_bank->configure_entry(0, RAM + 0xf800);
	m_boot_bank->configure_entry(1, RAM + 0x0000);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:6,代码来源:iq151.cpp


示例10: machine_reset

void cms_state::machine_reset()
{
	m_bank1->set_entry(0);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:4,代码来源:cms.cpp


示例11: machine_start

void speglsht_state::machine_start()
{
	m_st0016_bank->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000);
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:4,代码来源:speglsht.cpp


示例12: machine_start

void acvirus_state::machine_start()
{
	m_rombank->configure_entries(0, 15, memregion("maincpu")->base(), 0x8000);
	m_rombank->set_entry(3);
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:5,代码来源:acvirus.cpp


示例13: machine_reset

void taitowlf_state::machine_reset()
{
	// disable RAM access (reads go to BIOS ROM)
	m_bank1->set_entry(0);
}
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:5,代码来源:taitowlf.c


示例14: scv_set_banks

void scv_state::scv_set_banks()
{
	m_cart_ram_enabled = false;

	switch( m_cart_rom_size )
	{
	case 0:
	case 0x2000:
		m_bank0->set_base( m_cart_rom );
		m_bank1->set_base( m_cart_rom );
		m_bank2->set_base( m_cart_rom );
		m_bank3->set_base( m_cart_rom );
		m_bank4->set_base( m_cart_rom + 0x1000 );
		break;
	case 0x4000:
		m_bank0->set_base( m_cart_rom );
		m_bank1->set_base( m_cart_rom + 0x2000 );
		m_bank2->set_base( m_cart_rom );
		m_bank3->set_base( m_cart_rom + 0x2000 );
		m_bank4->set_base( m_cart_rom + 0x3000 );
		break;
	case 0x8000:
		m_bank0->set_base( m_cart_rom );
		m_bank1->set_base( m_cart_rom + 0x2000 );
		m_bank2->set_base( m_cart_rom + 0x4000 );
		m_bank3->set_base( m_cart_rom + 0x6000 );
		m_bank4->set_base( m_cart_rom + 0x7000 );
		break;
	case 0x10000:
		m_bank0->set_base( m_cart_rom + ( ( m_portc & 0x20 ) ? 0x8000 : 0 ) );
		m_bank1->set_base( m_cart_rom + ( ( m_portc & 0x20 ) ? 0xa000 : 0x2000 ) );
		m_bank2->set_base( m_cart_rom + ( ( m_portc & 0x20 ) ? 0xc000 : 0x4000 ) );
		m_bank3->set_base( m_cart_rom + ( ( m_portc & 0x20 ) ? 0xe000 : 0x6000 ) );
		m_bank4->set_base( m_cart_rom + ( ( m_portc & 0x20 ) ? 0xf000 : 0x7000 ) );
		break;
	case 0x20000:   /* Pole Position 2 */
		int base = ( ( m_portc >> 5 ) & 0x03 ) * 0x8000 ;
		m_bank0->set_base( m_cart_rom + base + 0 );
		m_bank1->set_base( m_cart_rom + base + 0x2000 );
		m_bank2->set_base( m_cart_rom + base + 0x4000 );
		m_bank3->set_base( m_cart_rom + base + 0x6000 );
		m_bank4->set_base( m_cart_rom + base + 0x7000 );
		/* On-cart RAM is enabled when PC6 is high */
		if ( m_cart_ram && m_portc & 0x40 )
		{
			m_cart_ram_enabled = true;
			m_bank4->set_base( m_cart_ram );
		}
		break;
	}

	/* Check if cartridge RAM is available and should be enabled */
	if ( m_cart_rom_size < 0x20000 && m_cart_ram && m_cart_ram_size && ( m_portc & 0x20 ) )
	{
		if ( m_cart_ram_size == 0x1000 )
		{
			m_bank4->set_base( m_cart_ram );
		}
		else
		{
			m_bank3->set_base( m_cart_ram );
			m_bank4->set_base( m_cart_ram + 0x1000 );
		}
		m_cart_ram_enabled = true;
	}

}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:67,代码来源:scv.c


示例15: machine_start

void magtouch_state::machine_start()
{
	m_rombank->configure_entries(0, 0x80, memregion("game_prg")->base(), 0x8000 );
	m_rombank->set_entry(0);
	subdevice<nvram_device>("nvram")->set_base(memshare("nvram")->ptr(), 0x2000);
}
开发者ID:MASHinfo,项目名称:mame,代码行数:6,代码来源:magtouch.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ required_memory_region类代码示例发布时间:2022-05-31
下一篇:
C++ required_ioport类代码示例发布时间: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