Some logging tweaks, fix running cpu tests on ARM

This commit is contained in:
Henrik Rydgard 2013-07-29 22:19:53 +02:00
parent 6580d238e6
commit 6ed4e348db
6 changed files with 22 additions and 5 deletions

View File

@ -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() {

View File

@ -224,6 +224,7 @@ void RegisterAllModules() {
Register_Kernel_Library();
Register_ThreadManForUser();
Register_LoadExecForUser();
Register_UtilsForKernel();
Register_SysMemUserForUser();
Register_InterruptManager();
Register_IoFileMgrForUser();

View File

@ -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);
}

View File

@ -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<T*>(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();

View File

@ -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;
}
}

View File

@ -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();