diff --git a/Core/CwCheat.cpp b/Core/CwCheat.cpp index af0effc425..3d5d8cc54c 100644 --- a/Core/CwCheat.cpp +++ b/Core/CwCheat.cpp @@ -19,6 +19,9 @@ void trim2(std::string& str); void __CheatInit() { //Moved createFullPath to CheatInit from the constructor because it spams the log and constantly checks if exists. In here, only checks once. + + // Cheats aren't working on Android yet - need to figure out the directory structure +#ifndef ANDROID gameTitle = g_paramSFO.GetValueString("DISC_ID"); activeCheatFile = CHEATS_DIR + "/" + gameTitle +".ini"; @@ -35,6 +38,7 @@ void __CheatInit() { CheatEvent = CoreTiming::RegisterEvent("CheatEvent", &hleCheat); CoreTiming::ScheduleEvent(msToCycles(77), CheatEvent, 0); } +#endif } void __CheatShutdown() { diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index e44f436ab0..c2f71a1f0b 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -224,6 +224,7 @@ void RegisterAllModules() { Register_Kernel_Library(); Register_ThreadManForUser(); Register_LoadExecForUser(); + Register_UtilsForKernel(); Register_SysMemUserForUser(); Register_InterruptManager(); Register_IoFileMgrForUser(); diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index ea8b9258cb..30ba9e00ab 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -857,3 +857,14 @@ void Register_ExceptionManagerForKernel() { RegisterModule("ExceptionManagerForKernel", ARRAY_SIZE(ExceptionManagerForKernel), ExceptionManagerForKernel); } + +// Seen in some homebrew +const HLEFunction UtilsForKernel[] = { + {0xC2DF770E, 0, "sceKernelIcacheInvalidateRange"}, +}; + + +void Register_UtilsForKernel() +{ + RegisterModule("UtilsForKernel", ARRAY_SIZE(UtilsForKernel), UtilsForKernel); +} diff --git a/Core/HLE/sceKernel.h b/Core/HLE/sceKernel.h index f874a3ee6c..d47b71d6dc 100644 --- a/Core/HLE/sceKernel.h +++ b/Core/HLE/sceKernel.h @@ -451,7 +451,7 @@ public: { if (handle < handleOffset || handle >= handleOffset+maxCount || !occupied[handle-handleOffset]) { - ERROR_LOG(HLE, "Kernel: Bad object handle %i (%08x)", handle, handle); + WARN_LOG(HLE, "Kernel: Bad object handle %i (%08x)", handle, handle); outError = T::GetMissingErrorCode(); return 0; } @@ -463,7 +463,7 @@ public: T* t = static_cast(pool[handle - handleOffset]); if (t == 0 || t->GetIDType() != T::GetStaticIDType()) { - ERROR_LOG(HLE, "Kernel: Wrong object type for %i (%08x)", handle, handle); + WARN_LOG(HLE, "Kernel: Wrong object type for %i (%08x)", handle, handle); outError = T::GetMissingErrorCode(); return 0; } @@ -558,3 +558,4 @@ extern u32 registeredExitCbId; void Register_ThreadManForUser(); void Register_LoadExecForUser(); +void Register_UtilsForKernel(); diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index f6f1ca42cd..caad0ab6b5 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -388,7 +388,7 @@ retry: } else { - ERROR_LOG(HLE, "sceKernelSignalSema : Trying to signal invalid semaphore %i", id); + WARN_LOG(HLE, "sceKernelSignalSema : Trying to signal invalid semaphore %i", id); return error; } } diff --git a/Core/System.cpp b/Core/System.cpp index 3258a7bc07..9f0dcdf984 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -108,8 +108,8 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) // TODO: Check Game INI here for settings, patches and cheats, and modify coreParameter accordingly - if (!LoadFile(filename, error_string) || coreState == CORE_POWERDOWN) - { + // Why did we check for CORE_POWERDOWN here? + if (!LoadFile(filename, error_string)) { // || coreState == CORE_POWERDOWN) { pspFileSystem.Shutdown(); CoreTiming::Shutdown(); __KernelShutdown();