當前位置: 首頁>>代碼示例>>C++>>正文


C++ AddExState函數代碼示例

本文整理匯總了C++中AddExState函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddExState函數的具體用法?C++ AddExState怎麽用?C++ AddExState使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddExState函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的AddExState函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。