本文整理匯總了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);
}
示例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);
}
}
示例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");
}
示例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");
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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");
}
示例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);
}