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

C++ MDFNSS_StateAction函数代码示例

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

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



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

示例1: StateAction

static int StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
  SFVAR(z80_runtime),
  SFARRAY(CPUExRAM, 16384),
  SFVAR(FlashStatusEnable),
  SFEND
 };

 SFORMAT TLCS_StateRegs[] =
 {
  SFVARN(pc, "PC"),
  SFVARN(sr, "SR"),
  SFVARN(f_dash, "F_DASH"),
  SFARRAY32N(gpr, 4, "GPR"),
  SFARRAY32N(gprBank[0], 4, "GPRB0"),
  SFARRAY32N(gprBank[1], 4, "GPRB1"),
  SFARRAY32N(gprBank[2], 4, "GPRB2"),
  SFARRAY32N(gprBank[3], 4, "GPRB3"),
  SFEND
 };

 if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAIN"))
  return(0);

 if(!MDFNSS_StateAction(sm, load, data_only, TLCS_StateRegs, "TLCS"))
  return(0);

 if(!MDFNNGPCDMA_StateAction(sm, load, data_only))
  return(0);

 if(!MDFNNGPCSOUND_StateAction(sm, load, data_only))
  return(0);

 if(!NGPGfx->StateAction(sm, load, data_only))
  return(0);

 if(!MDFNNGPCZ80_StateAction(sm, load, data_only))
  return(0);

 if(!int_timer_StateAction(sm, load, data_only))
  return(0);

 if(!BIOSHLE_StateAction(sm, load, data_only))
  return(0);

 if(!FLASH_StateAction(sm, load, data_only))
  return(0);

 if(load)
 {
  RecacheFRM();
  changedSP();
 }
 return(1);
}
开发者ID:Nukotan,项目名称:beetle-ngp-libretro,代码行数:57,代码来源:libretro.cpp


示例2: SFVAR

void CMemMap::StateAction(StateMem *sm, const unsigned load, const bool data_only)
{
    SFORMAT MemMapRegs[] =
    {
        SFVAR(mMikieEnabled),
        SFVAR(mSusieEnabled),
        SFVAR(mRomEnabled),
        SFVAR(mVectorsEnabled),
        SFEND
    };
    MDFNSS_StateAction(sm, load, data_only, MemMapRegs, "MMAP");

    if(load)
    {
        // The peek will give us the correct value to put back
        uint8 mystate=Peek(0);

        // Now set to un-initialised so the poke will set correctly
        mSusieEnabled=-1;
        mMikieEnabled=-1;
        mRomEnabled=-1;
        mVectorsEnabled=-1;

        // Set banks correctly
        Poke(0,mystate);
    }
}
开发者ID:Talintid,项目名称:Mednafen-Core,代码行数:27,代码来源:memmap.cpp


示例3: SFVAR

void InputDevice_Gamepad::StateAction(StateMem* sm, const unsigned load, const bool data_only, const char* sname_prefix)
{
 SFORMAT StateRegs[] =
 {
  SFVAR(dtr),

  SFARRAY(buttons, sizeof(buttons)),

  SFVAR(command_phase),
  SFVAR(bitpos),
  SFVAR(receive_buffer),

  SFVAR(command),

  SFARRAY(transmit_buffer, sizeof(transmit_buffer)),
  SFVAR(transmit_pos),
  SFVAR(transmit_count),

  SFEND
 };
 char section_name[32];
 trio_snprintf(section_name, sizeof(section_name), "%s_Gamepad", sname_prefix);

 if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, section_name, true) && load)
  Power();
 else if(load)
 {
  if((transmit_pos + transmit_count) > sizeof(transmit_buffer))
  {
   transmit_pos = 0;
   transmit_count = 0;
  }
 }
}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:34,代码来源:gamepad.cpp


示例4: GBZ80_StateAction

int GBZ80_StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
  SFVAR(PC.W),
  SFVAR(SP.W),
  SFVAR(AF.W),
  SFVAR(BC.W),
  SFVAR(DE.W),
  SFVAR(HL.W),
  SFVAR(IFF),
  SFVAR(InHALT),
  SFVAR(RepeatNextByte),
  SFVAR(EI_Delayed),
  SFEND
 };
 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "CPU");

 if(load)
 {

 }

 return(ret);
}
开发者ID:RobertSzkutak,项目名称:mednafenPSP,代码行数:25,代码来源:z80.cpp


示例5: HuC_StateAction

int HuC_StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
  SFARRAY(PopRAM, IsPopulous ? 32768 : 0),
  SFARRAY(TsushinRAM, IsTsushin ? 32768 : 0),
  SFARRAY(SaveRAM, (IsPopulous || IsTsushin || BRAM_Disabled) ? 0 : 2048),
  SFARRAY(CDRAM, CDRAM ? (8192 * 8) : 0),
  SFARRAY(SysCardRAM, SysCardRAM ? (8192 * 24) : 0),
  SFVAR(HuCSF2Latch),
  SFEND
 };

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "HuC");

 if(load)
  HuCSF2Latch &= 0xF;

 if(PCE_IsCD)
 {
  if(arcade_card)
   ret &= arcade_card->StateAction(sm, load, data_only);

  ret &= PCECD_StateAction(sm, load, data_only);
 }

 if(mcg)
  ret &= mcg->StateAction(sm, load, data_only);

 return(ret);
}
开发者ID:beaumanvienna,项目名称:mednafen-git,代码行数:31,代码来源:huc.cpp


示例6: SMS_SoundStateAction

int SMS_SoundStateAction(StateMem *sm, int load, int data_only)
{
 Sms_ApuState sn_state;
 int ret = 1;

 memset(&sn_state, 0, sizeof(Sms_ApuState));

 if(!load)
 {
  apu.save_state(&sn_state);
 }

 SFORMAT StateRegs[] =
 {
  SFARRAY32N(sn_state.volume, 4, "Volume"),
  SFARRAY32N(sn_state.sq_period, 3, "SQPeriod"),
  SFARRAY32N(sn_state.sq_phase, 3, "SQPhase"),
  SFVARN(sn_state.noise_period, "NPeriod"),
  SFVARN(sn_state.noise_shifter, "NShifter"),
  SFVARN(sn_state.noise_feedback, "NFeedback"),
  SFVARN(sn_state.latch, "Latch"),
  SFVARN(sn_state.ggstereo, "GGStereo"),
  SFEND
 };

 if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, "PSG"))
  ret = 0;
 else if(load)
 {
  apu.load_state(&sn_state);
 }
 return(ret);
}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:33,代码来源:sound.cpp


示例7: StateAction

 int StateAction(StateMem *sm, int load, int data_only, const char *sname)
 {
  SFORMAT StateRegs[] = 
  {
   SFARRAY(mem, mem_size),
   SFVAR(prev_sda_in),
   SFVAR(prev_scl_in),
   SFVAR(phase),
   SFVAR(buf),
   SFVAR(bitpos),
   SFVAR(sda_out),

   SFVAR(slave_addr),
   SFVAR(rw_bit),
   SFVAR(mem_addr),

   SFEND
  };
  int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, sname);

  if(load)
  {
   mem_addr &= (mem_size - 1);
  }

  return(ret);
 }
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:27,代码来源:16.cpp


示例8: StateAction

static int StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[]={
        {&cmd, 1, "CMD"},
        {&mir, 1, "MIR"},
        {&rmode, 1, "RMOD"},
        {&IRQmode, 1, "IRQM"},
        {&IRQCount, 1, "IRQC"},
        {&IRQa, 1, "IRQA"},
        {&IRQLatch, 1, "IRQL"},
        {DRegs, 11, "DREG"},
        SFEND
 };

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAPR");

 if(load)
 {
  Synco();
  if(!nomirror)
   setmirror(mir^1);
 }

 return(ret);
}
开发者ID:ben401,项目名称:OpenEmu,代码行数:25,代码来源:tengen.cpp


示例9: StateAction

static int StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
  SFARRAY(BaseRAM, IsSGX? 32768 : 8192),
  SFVAR(PCEIODataBuffer),
  SFEND
 };

 //for(int i = 8192; i < 32768; i++)
 // if(BaseRAM[i] != 0xFF)
 //  printf("%d %02x\n", i, BaseRAM[i]);

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAIN");

 ret &= HuC6280_StateAction(sm, load, data_only);
 ret &= VDC_StateAction(sm, load, data_only);
 ret &= psg->StateAction(sm, load, data_only);
 ret &= INPUT_StateAction(sm, load, data_only);
 ret &= HuC_StateAction(sm, load, data_only);

 if(load)
 {

 }

 return(ret);
}
开发者ID:acgleader,项目名称:emu-ex-plus-alpha,代码行数:28,代码来源:pce.cpp


示例10: HuC_StateAction

void HuC_StateAction(StateMem *sm, const unsigned load, const bool data_only)
{
 SFORMAT StateRegs[] =
 {
  SFARRAY(PopRAM, IsPopulous ? 32768 : 0),
  SFARRAY(TsushinRAM, IsTsushin ? 32768 : 0),
  SFARRAY(SaveRAM, (IsPopulous || IsTsushin || BRAM_Disabled) ? 0 : 2048),
  SFARRAY(CDRAM, CDRAM ? (8192 * 8) : 0),
  SFARRAY(SysCardRAM, SysCardRAM ? (8192 * 24) : 0),
  SFVAR(HuCSF2Latch),
  SFEND
 };

 MDFNSS_StateAction(sm, load, data_only, StateRegs, "HuC");

 if(load)
  HuCSF2Latch &= 0xF;

 if(PCE_IsCD)
 {
  if(arcade_card)
   arcade_card->StateAction(sm, load, data_only);

  PCECD_StateAction(sm, load, data_only);
 }

 if(mcg)
  mcg->StateAction(sm, load, data_only);
}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:29,代码来源:huc.cpp


示例11: SFVAR

int InputDevice_Multitap::StateAction(StateMem* sm, int load, int data_only, const char* section_name)
{
 SFORMAT StateRegs[] =
 {
  SFVAR(dtr),

  SFVAR(selected_device),
  SFVAR(full_mode_setting),

  SFVAR(full_mode),
  SFVAR(mc_mode),

  SFVAR(fm_dp),
  SFARRAY(&fm_buffer[0][0], sizeof(fm_buffer) / sizeof(fm_buffer[0][0])),

  SFVAR(fm_deferred_error_temp),
  SFVAR(fm_deferred_error),
  SFVAR(fm_command_error),

  SFVAR(command),
  SFVAR(receive_buffer),
  SFVAR(bit_counter),
  SFVAR(byte_counter),

  SFEND
 };
 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, section_name);

 if(load)
 {

 }

 return(ret);
}
开发者ID:XeresRazor,项目名称:Provenance,代码行数:35,代码来源:multitap.cpp


示例12: SFVAR

int InputDevice_Gamepad::StateAction(StateMem* sm, int load, int data_only, const char* section_name)
{
   SFORMAT StateRegs[] =
   {
      SFVAR(dtr),

      SFARRAY(buttons, sizeof(buttons)),

      SFVAR(command_phase),
      SFVAR(bitpos),
      SFVAR(receive_buffer),

      SFVAR(command),

      SFARRAY(transmit_buffer, sizeof(transmit_buffer)),
      SFVAR(transmit_pos),
      SFVAR(transmit_count),

      SFEND
   };
   int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, section_name);

   if(load)
   {
      if(((uint64_t)transmit_pos + transmit_count) > sizeof(transmit_buffer))
      {
         transmit_pos = 0;
         transmit_count = 0;
      }
   }

   return(ret);
}
开发者ID:aliaspider,项目名称:beetle-psx-libretro,代码行数:33,代码来源:gamepad.cpp


示例13: MDFNGBSOUND_StateAction

int MDFNGBSOUND_StateAction(StateMem *sm, int load, int data_only)
{
 gb_apu_state_t gb_state;
 int ret = 1;

 //if(!load) // always save state, in case there is none to load
 {
  gb_apu.save_state(&gb_state);
 }

 SFORMAT StateRegs[] =
 {
  SFVARN(gb_state, "apu_state"),
  SFEND
 };

 if(!MDFNSS_StateAction(sm, load, data_only, StateRegs, "APU"))
  ret = 0;
 else if(load)
 {
  // TODO: set hardware mode to mode_dmg, mode_cgb, or mode_agb
  // (latter if you're running classic GB game on Game Boy Advance)
  gb_apu.reset();
  gb_apu.load_state(gb_state);
 }
 return(ret);
}
开发者ID:IcooN,项目名称:OpenEmu,代码行数:27,代码来源:sound.cpp


示例14: StateAction

static void StateAction(StateMem *sm, const unsigned load, const bool data_only)
{
 SFORMAT StateRegs[] =
 {
  SFARRAY(BaseRAM, IsSGX? 32768 : 8192),
  SFVAR(PCEIODataBuffer),
  SFEND
 };

 //for(int i = 8192; i < 32768; i++)
 // if(BaseRAM[i] != 0xFF)
 //  printf("%d %02x\n", i, BaseRAM[i]);

 MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAIN");

 HuC6280_StateAction(sm, load, data_only);
 VDC_StateAction(sm, load, data_only);
 psg->StateAction(sm, load, data_only);
 INPUT_StateAction(sm, load, data_only);
 HuC_StateAction(sm, load, data_only);

 if(load)
 {

 }
}
开发者ID:aerdnar,项目名称:emu-ex-plus-alpha,代码行数:26,代码来源:pce.cpp


示例15: MDINPUT_StateAction

int MDINPUT_StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
  SFARRAY(PortData, 3),
  SFARRAY(PortCtrl, 3),
  SFARRAY(PortTxData, 3),
  SFARRAY(PortSCtrl, 3),

  SFARRAY(PortDataBus, 3),
  SFEND
 };

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "IO");

 ret &= port[0]->StateAction(sm, load, data_only, "PRTA");
 ret &= port[1]->StateAction(sm, load, data_only, "PRTB");
 ret &= port[2]->StateAction(sm, load, data_only, "PRTC");

 if(load)
 {

 }
 return(ret);
}
开发者ID:XeresRazor,项目名称:Provenance,代码行数:25,代码来源:genio.cpp


示例16: StateAction

static int StateAction(StateMem *sm, int load, int data_only)
{
 //uint32 NWCIRQCount;
 //uint8 NWCRec;

 SFORMAT StateRegs[] =
 {
  SFARRAY(WRAM, WRAM_Size),
  SFARRAY(CHRRAM, 8192),
  SFARRAY(DRegs, 4),
  SFVAR(lreset),
  SFVAR(Buffer),
  SFVAR(BufferShift),
  SFEND
 };

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAPR");
 if(load)
 {
  MMC1MIRROR();
  MMC1CHR();
  MMC1PRG();
  lreset=0;      /* timestamp(base) is not stored in save states. */
 }
 return(ret);
}
开发者ID:gameblabla,项目名称:mednafen-gcw,代码行数:26,代码来源:mmc1.cpp


示例17: HuC_StateAction

int HuC_StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] = 
 {
  SFARRAY(ROMSpace + 0x40 * 8192, IsPopulous ? 32768 : 0),
  SFARRAY(TsushinRAM, IsTsushin ? 32768 : 0),
  SFARRAY(SaveRAM, (IsPopulous || IsTsushin) ? 0 : 2048),
  SFARRAY(ROMSpace + 0x68 * 8192, PCE_IsCD ? 262144 : 0),
  SFVAR(HuCSF2Latch),
  SFEND
 };
 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "HuC");

 if(load)
  HuCSF2Latch &= 0x3;

 if(PCE_IsCD)
 {
  ret &= PCECD_StateAction(sm, load, data_only);

  if(arcade_card)
   ret &= arcade_card->StateAction(sm, load, data_only);
 }
 return(ret);
}
开发者ID:acgleader,项目名称:emu-ex-plus-alpha,代码行数:25,代码来源:huc.cpp


示例18: StateAction

static int StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT StateRegs[] =
 {
        SFVARN(reg_select, "FM7S"),
        SFVARN(wram_control, "FM7W"),
        SFARRAYN(sr, 0x10, "FM7SR"),
        SFVARN(sr_index, "FM7I"),
	SFARRAY(PRGRegs, 3),
	SFARRAY(CHRRegs, 8),
	SFVAR(Mirroring),
	SFARRAY32(vcount, 3),
	SFARRAY32(dcount, 3),

	SFVAR(IRQa),
	SFVAR(IRQCount),
	
	SFARRAY(WRAM, 8192),

	SFEND
 };

 int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "MAPR");

 if(load)
 {
  SyncCHR();
  SyncPRG();
  SyncMirroring();
 }

 return(ret);
}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:33,代码来源:fme7.cpp


示例19: SFVAR

void CCart::StateAction(StateMem *sm, const unsigned load, const bool data_only)
{
 SFORMAT CartRegs[] =
 {
        SFVAR(mCounter),
        SFVAR(mShifter),
        SFVAR(mAddrData),
        SFVAR(mStrobe),
        SFVAR(mShiftCount0),
        SFVAR(mCountMask0),
        SFVAR(mShiftCount1),
        SFVAR(mCountMask1),
        SFVAR(mBank),
        SFVAR(mWriteEnableBank0),
        SFVAR(mWriteEnableBank1),
	SFVAR(last_strobe),
	SFARRAYN(mCartBank1.get(), mCartRAM ? mMaskBank1 + 1 : 0, "mCartBank1"),
	SFEND
 };

 MDFNSS_StateAction(sm, load, data_only, CartRegs, "CART");

 if(load)
 {

 }
}
开发者ID:Oggom,项目名称:mednafen-git,代码行数:27,代码来源:cart.cpp


示例20: MDFNSS_StateAction

int MDFNSS_StateAction(StateMem *st, int load, int data_only, SFORMAT *sf, const char *name, bool optional)
{
	std::vector <SSDescriptor> love;

	love.push_back(SSDescriptor(sf, name, optional));
	return(MDFNSS_StateAction(st, load, data_only, love));
}
开发者ID:CaoCaoBeard,项目名称:pcejin,代码行数:7,代码来源:state.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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