void PSP_Shutdown() { pspFileSystem.UnmountAll(); TextureCache_Clear(true); shaderManager.ClearCache(true); CoreTiming::ClearPendingEvents(); CoreTiming::UnregisterAllEvents(); if (coreParameter.enableSound) { host->ShutdownSound(); } __KernelShutdown(); HLEShutdown(); Memory::Shutdown() ; currentCPU = 0; }
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) { coreParameter = coreParam; currentCPU = &mipsr4k; numCPUs = 1; Memory::Init(); mipsr4k.Reset(); mipsr4k.pc = 0; if (coreParameter.enableSound) { host->InitSound(new PSPMixer()); } // Init all the HLE modules HLEInit(); // TODO: Check Game INI here for settings, patches and cheats, and modify coreParameter accordingly if (!LoadFile(coreParameter.fileToStart.c_str(), error_string)) { pspFileSystem.UnmountAll(); CoreTiming::ClearPendingEvents(); CoreTiming::UnregisterAllEvents(); __KernelShutdown(); HLEShutdown(); host->ShutdownSound(); Memory::Shutdown(); coreParameter.fileToStart = ""; return false; } shaderManager.DirtyShader(); shaderManager.DirtyUniform(DIRTY_ALL); // Setup JIT here. if (coreParameter.startPaused) coreState = CORE_STEPPING; else coreState = CORE_RUNNING; return true; }