void __SasDoState(PointerWrap &p) { p.DoClass(sas); p.DoMarker("sceSas"); }
void VideoCommon_DoState(PointerWrap &p) { // BP Memory p.Do(bpmem); p.DoMarker("BP Memory"); // CP Memory DoCPState(p); // XF Memory p.Do(xfmem); p.DoMarker("XF Memory"); // Texture decoder p.DoArray(texMem); p.DoMarker("texMem"); // FIFO Fifo::DoState(p); p.DoMarker("Fifo"); CommandProcessor::DoState(p); p.DoMarker("CommandProcessor"); PixelEngine::DoState(p); p.DoMarker("PixelEngine"); // the old way of replaying current bpmem as writes to push side effects to pixel shader manager doesn't really work. PixelShaderManager::DoState(p); p.DoMarker("PixelShaderManager"); VertexShaderManager::DoState(p); p.DoMarker("VertexShaderManager"); GeometryShaderManager::DoState(p); p.DoMarker("GeometryShaderManager"); VertexManagerBase::DoState(p); p.DoMarker("VertexManager"); BoundingBox::DoState(p); p.DoMarker("BoundingBox"); // TODO: search for more data that should be saved and add it here }
void __PsmfPlayerDoState(PointerWrap &p) { p.Do(psmfPlayerMap); p.DoMarker("scePsmfPlayer"); }
virtual void DoState(PointerWrap &p) { p.Do(alm); p.DoMarker("Alarm"); }
virtual void DoState(PointerWrap &p) { p.Do(moduleID_); p.Do(retValAddr); p.DoMarker("AfterModuleEntryCall"); }
void __KernelMbxDoState(PointerWrap &p) { p.Do(mbxWaitTimer); CoreTiming::RestoreRegisterEvent(mbxWaitTimer, "MbxTimeout", __KernelMbxTimeout); p.DoMarker("sceKernelMbx"); }
void __PowerDoState(PointerWrap &p) { p.DoArray(powerCbSlots, ARRAY_SIZE(powerCbSlots)); p.Do(volatileMemLocked); p.DoMarker("scePower"); }
void DoState(PointerWrap &p) { p.Do(savedCpu); p.DoMarker("InterruptState"); }
void __SasDoState(PointerWrap &p) { if (sas != NULL) { sas->DoState(p); } p.DoMarker("sceSas"); }
void IntrHandler::DoState(PointerWrap &p) { p.Do(intrNumber); p.Do<int, SubIntrHandler>(subIntrHandlers); p.DoMarker("IntrHandler"); }
void PendingInterrupt::DoState(PointerWrap &p) { p.Do(intr); p.Do(subintr); p.DoMarker("PendingInterrupt"); }
void DoState(PointerWrap &p) { p.Do(fontLibID_); p.DoMarker("PostOpenCallback"); }
void DoState(PointerWrap &p) { p.Do(pgf_); p.Do(style_); p.DoMarker("Font"); }
void __RtcDoState(PointerWrap &p) { p.Do(rtcBaseTime); p.DoMarker("sceRtc"); }
void DoState(PointerWrap &p) { p.Do(ringAddr_); p.DoMarker("PostPutAction"); }
virtual void DoState(PointerWrap &p) { p.Do(nm); p.Do(memoryBlockAddr); p.DoMarker("Module"); }
void __FontDoState(PointerWrap &p) { p.Do(fontLib); p.DoMarker("sceFont"); }
void __KernelTimeDoState(PointerWrap &p) { p.Do(start_time); p.DoMarker("sceKernelTime"); }
virtual void DoState(PointerWrap &p) { p.Do(address); p.DoArray(name, sizeof(name)); p.DoMarker("PMB"); }
void GPUCommon::DoState(PointerWrap &p) { p.Do(dlIdGenerator); p.Do<DisplayList>(dlQueue); p.DoMarker("GPUCommon"); }
void __KernelAlarmDoState(PointerWrap &p) { p.Do(alarmTimer); CoreTiming::RestoreRegisterEvent(alarmTimer, "Alarm", __KernelTriggerAlarm); p.DoMarker("sceKernelAlarm"); }
void __KernelVTimerDoState(PointerWrap &p) { p.Do(vtimerTimer); p.Do(vtimers); CoreTiming::RestoreRegisterEvent(vtimerTimer, "VTimer", __KernelTriggerVTimer); p.DoMarker("sceKernelVTimer"); }
virtual void DoState(PointerWrap &p) { SubIntrHandler::DoState(p); p.Do(alarmID); p.DoMarker("AlarmIntrHandler"); }
virtual void DoState(PointerWrap &p) { p.Do(nvt); p.Do(memoryPtr); p.DoMarker("VTimer"); }
void __AtracDoState(PointerWrap &p) { p.Do(atracMap); p.Do(nextAtracID); p.DoMarker("sceAtrac"); }
// This feels like a dubious proposition, mostly... void __NetDoState(PointerWrap &p) { p.Do(netInited); p.Do(netAdhocInited); p.DoMarker("net"); }
void __PsmfDoState(PointerWrap &p) { p.Do(psmfMap); p.DoMarker("scePsmf"); }
void __KernelEventFlagDoState(PointerWrap &p) { p.Do(eventFlagWaitTimer); CoreTiming::RestoreRegisterEvent(eventFlagWaitTimer, "EventFlagTimeout", __KernelEventFlagTimeout); p.DoMarker("sceKernelEventFlag"); }
void DoState(PointerWrap &p) { Memory::DoState(p); p.DoMarker("Memory"); VideoInterface::DoState(p); p.DoMarker("VideoInterface"); SerialInterface::DoState(p); p.DoMarker("SerialInterface"); ProcessorInterface::DoState(p); p.DoMarker("ProcessorInterface"); DSP::DoState(p); p.DoMarker("DSP"); DVDInterface::DoState(p); p.DoMarker("DVDInterface"); GPFifo::DoState(p); p.DoMarker("GPFifo"); ExpansionInterface::DoState(p); p.DoMarker("ExpansionInterface"); AudioInterface::DoState(p); p.DoMarker("AudioInterface"); if (SConfig::GetInstance().bWii) { WII_IPCInterface::DoState(p); p.DoMarker("WII_IPCInterface"); WII_IPC_HLE_Interface::DoState(p); p.DoMarker("WII_IPC_HLE_Interface"); } p.DoMarker("WIIHW"); }
static std::string DoState(PointerWrap& p) { u32 version = STATE_VERSION; { static const u32 COOKIE_BASE = 0xBAADBABE; u32 cookie = version + COOKIE_BASE; p.Do(cookie); version = cookie - COOKIE_BASE; } std::string version_created_by = scm_rev_str; if (version > 42) p.Do(version_created_by); else version_created_by.clear(); if (version != STATE_VERSION) { if (version_created_by.empty() && s_old_versions.count(version)) { // The savestate is from an old version that doesn't // save the Dolphin version number to savestates, but // by looking up the savestate version number, it is possible // to know approximately which Dolphin version was used. std::pair<std::string, std::string> version_range = s_old_versions.find(version)->second; std::string oldest_version = version_range.first; std::string newest_version = version_range.second; version_created_by = "Dolphin " + oldest_version + " - " + newest_version; } // because the version doesn't match, fail. // this will trigger an OSD message like "Can't load state from other revisions" // we could use the version numbers to maintain some level of backward compatibility, but currently don't. p.SetMode(PointerWrap::MODE_MEASURE); return version_created_by; } p.DoMarker("Version"); // Begin with video backend, so that it gets a chance to clear its caches and writeback modified things to RAM g_video_backend->DoState(p); p.DoMarker("video_backend"); if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) Wiimote::DoState(p.GetPPtr(), p.GetMode()); p.DoMarker("Wiimote"); PowerPC::DoState(p); p.DoMarker("PowerPC"); HW::DoState(p); p.DoMarker("HW"); CoreTiming::DoState(p); p.DoMarker("CoreTiming"); Movie::DoState(p); p.DoMarker("Movie"); #if defined(HAVE_LIBAV) || defined (WIN32) AVIDump::DoState(); #endif return version_created_by; }