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

C++ AddExState函数代码示例

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

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



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

示例1: UNLSB2000_Init

void UNLSB2000_Init(CartInfo *info) {
	info->Reset = UNLSB2000Reset;
	info->Power = UNLSB2000Power;
	info->Close = UNLSB2000Close;
//	GameHBIRQHook = UNLSB2000IRQHook;
	GameStateRestore = StateRestore;
/*
	CHRRAMSIZE = 8192;
	CHRRAM = (uint8*)FCEU_gmalloc(CHRRAMSIZE);
	SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSIZE, 1);
	AddExState(CHRRAM, CHRRAMSIZE, 0, "CRAM");
*/

//	SetupCartCHRMapping(0, PRGptr[0], PRGsize[0], 0);

	WRAMSIZE = 512 * 1024;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");
	if (info->battery) {
		info->SaveGame[0] = WRAM;
		info->SaveGameLen[0] = WRAMSIZE;
	}

	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:ryanwmoore,项目名称:fceux,代码行数:26,代码来源:sb-2000.cpp


示例2: Mapper111_Init

void Mapper111_Init(CartInfo *info) {
	info->Power = M111Power;
	info->Close = M111Close;

	CHRRAM = (uint8*)FCEU_gmalloc(CHRRAMSIZE);
	SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSIZE, 1);

	GameStateRestore = StateRestore;
	AddExState(&StateRegs, ~0, 0, 0);
	AddExState(CHRRAM, CHRRAMSIZE, 0, "CRAM");

	flash = (info->battery != 0);
	if (flash)
	{
		FLASHROM = (uint8*)FCEU_gmalloc(FLASHROMSIZE);
		info->SaveGame[0] = FLASHROM;
		info->SaveGameLen[0] = FLASHROMSIZE;
		AddExState(FLASHROM, FLASHROMSIZE, 0, "FROM");
		AddExState(&FlashRegs, ~0, 0, 0);

		// copy PRG ROM into FLASHROM, use it instead of PRG ROM
		const uint32 PRGSIZE = ROM_size * 16 * 1024;
		for (uint32 w=0, r=0; w<FLASHROMSIZE; ++w)
		{
			FLASHROM[w] = ROM[r];
			++r;
			if (r >= PRGSIZE) r = 0;
		}
		SetupCartPRGMapping(0x10, FLASHROM, FLASHROMSIZE, 0);
	}
}
开发者ID:Rakashazi,项目名称:emu-ex-plus-alpha,代码行数:31,代码来源:cheapocabra.cpp


示例3: Latch_Init

static void Latch_Init(CartInfo *info, void (*proc)(void), readfunc func, uint16 linit, uint16 adr0, uint16 adr1, uint8 wram) {
	latcheinit = linit;
	addrreg0 = adr0;
	addrreg1 = adr1;
	WSync = proc;
	if (func != NULL)
		defread = func;
	else
		defread = CartBROB;
	info->Power = LatchPower;
	info->Reset = LatchReset;
	info->Close = LatchClose;
	if (wram) {
		WRAMSIZE = 8192;
		WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
		SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
		if (info->battery) {
			info->SaveGame[0] = WRAM;
			info->SaveGameLen[0] = WRAMSIZE;
		}
		AddExState(WRAM, WRAMSIZE, 0, "WRAM");
	}
	GameStateRestore = StateRestore;
	AddExState(&latche, 2, 0, "LATC");
}
开发者ID:CharlexH,项目名称:Provenance,代码行数:25,代码来源:addrlatch.cpp


示例4: Mapper163_Init

void Mapper163_Init(CartInfo *info)
{
    info->Power=Power2;
    GameHBIRQHook=M163HB;
    GameStateRestore=StateRestore;
    AddExState(&StateRegs, ~0, 0, 0);
    AddExState(WRAM, 8192, 0, "WRAM");
}
开发者ID:buliaoyin,项目名称:fce360,代码行数:8,代码来源:164.cpp


示例5: Mapper112_Init

void Mapper112_Init(CartInfo *info)
{
  info->Power=M112Power;
  info->Close=M112Close;
  GameStateRestore=StateRestore;
  WRAM=(uint8*)malloc(8192);
  SetupCartPRGMapping(0x10,WRAM,8192,1);
  AddExState(WRAM, 8192, 0, "WRAM");
  AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:CatalystG,项目名称:fceu-next,代码行数:10,代码来源:112.cpp


示例6: Mapper168_Init

void Mapper168_Init(CartInfo *info) {
	info->Power = M168Power;
	info->Close = MNNNClose;
	GameStateRestore = StateRestore;
	AddExState(&StateRegs, ~0, 0, 0);

	CHRRAMSIZE = 8192 * 8;
	CHRRAM = (uint8*)FCEU_gmalloc(CHRRAMSIZE);
	SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSIZE, 1);
	AddExState(CHRRAM, CHRRAMSIZE, 0, "CRAM");
}
开发者ID:AKuHAK,项目名称:Fceumm-PS2,代码行数:11,代码来源:168.c


示例7: UNLSHeroes_Init

void UNLSHeroes_Init(CartInfo *info) {
	GenMMC3_Init(info, 256, 512, 0, 0);
	cwrap = MSHCW;
	info->Power = MSHPower;
	info->Reset = MSHReset;
	info->Close = MSHClose;
	CHRRAM = (uint8*)FCEU_gmalloc(8192);
	SetupCartCHRMapping(0x10, CHRRAM, 8192, 1);
	AddExState(EXPREGS, 4, 0, "EXPR");
	AddExState(&tekker, 1, 0, "DIPSW");
}
开发者ID:AKuHAK,项目名称:Fceumm-PS2,代码行数:11,代码来源:sheroes.c


示例8: BMCFK23C_Init

void BMCFK23C_Init(CartInfo *info)
{
  GenMMC3_Init(info, 512, 256, 128, 0);
  cwrap=BMCFK23CCW;
  pwrap=BMCFK23CPW;
  info->Power=BMCFK23CPower;
  info->Reset=BMCFK23CReset;
  AddExState(EXPREGS, 8, 0, "EXPR");
  AddExState(&unromchr, 1, 0, "UCHR");
  AddExState(&dipswitch, 1, 0, "DPSW");
}
开发者ID:ficoos,项目名称:fceu-next,代码行数:11,代码来源:fk23c.c


示例9: UNLKS7030_Init

void UNLKS7030_Init(CartInfo *info) {
	info->Power = UNLKS7030Power;
	info->Close = UNLKS7030Close;
	GameStateRestore = StateRestore;

	WRAMSIZE = 8192;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");

	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:Brunnis,项目名称:libretro-fceumm,代码行数:11,代码来源:ks7030.cpp


示例10: UNLSC127_Init

void UNLSC127_Init(CartInfo *info) {
	info->Reset = UNLSC127Reset;
	info->Power = UNLSC127Power;
	info->Close = UNLSC127Close;
	GameHBIRQHook = UNLSC127IRQ;
	GameStateRestore = StateRestore;
	WRAMSIZE = 8192;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");
	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:HerbFargus,项目名称:FCE3D,代码行数:12,代码来源:sc-127.cpp


示例11: Mapper96_init

void Mapper96_init(void)
{
 SetWriteHandler(0x8000,0xffff,Mapper96_write);
 PPU_hook=M96Hook;
 AddExState(&latche, 1, 0, "LATC");
 AddExState(&M96LA, 1, 0, "LAVA");
 SetupCartCHRMapping(0x10, MapperExRAM, 32768, 1);
 latche=M96LA=0;
 M96Sync(0);
 setmirror(MI_0);
 GameStateRestore=M96Sync;
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:12,代码来源:simple.c


示例12: LH32_Init

void LH32_Init(CartInfo *info) {
    info->Power = LH32Power;
    info->Close = LH32Close;

    WRAMSIZE = 8192;
    WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
    SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
    AddExState(WRAM, WRAMSIZE, 0, "WRAM");

    GameStateRestore = StateRestore;
    AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:DanielFontes,项目名称:Provenance,代码行数:12,代码来源:lh32.cpp


示例13: Mapper73_Init

void Mapper73_Init(CartInfo *info) {
	info->Power = M73Power;
	info->Close = M73Close;
	MapIRQHook = M73IRQHook;

	WRAMSIZE = 8192;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");

	AddExState(&StateRegs, ~0, 0, 0);
	GameStateRestore = StateRestore;
}
开发者ID:GinBunBun,项目名称:Fceumm-PS2,代码行数:13,代码来源:vrc3.c


示例14: Mapper199_Init

void Mapper199_Init(CartInfo *info)
{
  int CHRRAMSize=1024*8;
  GenMMC3_Init(info, 512, 256, 8, info->battery);
  cwrap=M199CW;
  pwrap=M199PW;
  mwrap=M199MW;
  info->Power=M199Power;
  CHRRAM=(uint8*)FCEU_gmalloc(CHRRAMSize);
  SetupCartCHRMapping(0x10, CHRRAM, CHRRAMSize, 1);
  AddExState(CHRRAM, CHRRAMSize, 0, "CHRR");
  AddExState(EXPREGS, 4, 0, "EXPR");
}
开发者ID:Cancerous,项目名称:fceux-xenon,代码行数:13,代码来源:199.cpp


示例15: SSSNROM_Init

void SSSNROM_Init(CartInfo *info) {
	info->Reset = SSSNROMReset;
	info->Power = SSSNROMPower;
	info->Close = SSSNROMClose;
	GameHBIRQHook = SSSNROMIRQHook;
	GameStateRestore = StateRestore;

	WRAMSIZE = 16384;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");
	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:frangarcj,项目名称:libretro-fceumm,代码行数:13,代码来源:famicombox.c


示例16: Mapper34_Init

void Mapper34_Init(CartInfo *info) {
	info->Power = M34Power;
	info->Close = M34Close;
	GameStateRestore = StateRestore;

	WRAMSIZE = 8192;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	FCEU_CheatAddRAM(WRAMSIZE >> 10, 0x6000, WRAM);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");

	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:Plombo,项目名称:fceux,代码行数:13,代码来源:34.cpp


示例17: Super24_Init

void Super24_Init(CartInfo *info)
{
  GenMMC3_Init(info, 128, 256, 0, 0);
  info->Power=Super24Power;
  info->Reset=Super24Reset;
  info->Close=Super24Close;
  cwrap=Super24CW;
  pwrap=Super24PW;
  CHRRAM=(uint8*)FCEU_gmalloc(8192);
  SetupCartCHRMapping(0x10, CHRRAM, 8192, 1);
  AddExState(CHRRAM, 8192, 0, "CHRR");
  AddExState(EXPREGS, 3, 0, "BIG2");
}
开发者ID:Kcchouette,项目名称:AndroidEmu,代码行数:13,代码来源:super24.c


示例18: GenMMC3_Init

void GenMMC3_Init(CartInfo *info, int prg, int chr, int wram, int battery)
{
 pwrap=GENPWRAP;
 cwrap=GENCWRAP;
 mwrap=GENMWRAP;

 wrams=wram<<10;

 PRGmask8[0]&=(prg>>13)-1;
 CHRmask1[0]&=(chr>>10)-1;
 CHRmask2[0]&=(chr>>11)-1;

 if(wram)
 {
  mmc3opts|=1;
  WRAM=(uint8*)FCEU_gmalloc(wrams);
  AddExState(WRAM, wrams, 0, "WRAM");
 }

 if(battery)
 {
  mmc3opts|=2;
  info->SaveGame[0]=WRAM;
  info->SaveGameLen[0]=wrams;
 }

// if(!chr) // duplicated CHR RAM set up
// {
//  CHRRAM=(uint8*)FCEU_gmalloc(8192);
//  CHRRAMSize=8192;
//  SetupCartCHRMapping(0, CHRRAM, 8192, 1);
//  AddExState(CHRRAM, 8192, 0, "CHRR");
// }

 AddExState(MMC3_StateRegs, ~0, 0, 0);

 info->Power=GenMMC3Power;
 info->Reset=MMC3RegReset;
 info->Close=GenMMC3Close;

 if(info->CRC32 == 0x5104833e)        // Kick Master
  GameHBIRQHook = MMC3_hb_KickMasterHack;
 else if(info->CRC32 == 0x5a6860f1 || info->CRC32 == 0xae280e20) // Shougi Meikan '92/'93
  GameHBIRQHook = MMC3_hb_KickMasterHack;
 else if(info->CRC32 == 0xfcd772eb)    // PAL Star Wars, similar problem as Kick Master.
  GameHBIRQHook = MMC3_hb_PALStarWarsHack;
 else
  GameHBIRQHook=MMC3_hb;
// PPU_hook=MMC3_PPU;
 GameStateRestore=GenMMC3Restore;
}
开发者ID:Cancerous,项目名称:fceux-xenon,代码行数:51,代码来源:mmc3.cpp


示例19: UNLKS7037_Init

void UNLKS7037_Init(CartInfo *info) {
	info->Power = UNLKS7037Power;
	info->Close = Close;

	WSync = SyncKS7037;

	WRAMSIZE = 8192;
	WRAM = (uint8*)FCEU_gmalloc(WRAMSIZE);
	SetupCartPRGMapping(0x10, WRAM, WRAMSIZE, 1);
	AddExState(WRAM, WRAMSIZE, 0, "WRAM");

	GameStateRestore = StateRestore;
	AddExState(&StateRegs, ~0, 0, 0);
}
开发者ID:BigMacStorm,项目名称:NES_machine,代码行数:14,代码来源:ks7037.cpp


示例20: UNLEDU2000_Init

void UNLEDU2000_Init(CartInfo *info)
{
  info->Power=UNLEDU2000Power;
  info->Close=UNLEDU2000Close;
  GameStateRestore=UNLEDU2000Restore;
  WRAM=(uint8*)FCEU_gmalloc(32768);
  SetupCartPRGMapping(0x10,WRAM,32768,1);
  if(info->battery)
  {
    info->SaveGame[0]=WRAM;
    info->SaveGameLen[0]=32768;
  }
  AddExState(WRAM, 32768, 0, "WRAM");
  AddExState(StateRegs, ~0, 0, 0);
}
开发者ID:glennimoss,项目名称:marionet,代码行数:15,代码来源:edu2000.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AddExampleScripts函数代码示例发布时间:2022-05-30
下一篇:
C++ AddEvent函数代码示例发布时间: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