当前位置: 首页>>代码示例>>C++>>正文


C++ MDFNSS_StateAction函数代码示例

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


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


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