sceImpose

This commit is contained in:
Henrik Rydgard 2012-11-09 12:31:58 +01:00
parent d02d66fcfb
commit d671afdef4
8 changed files with 78 additions and 10 deletions

View File

@ -25,6 +25,7 @@ set(SRCS
HLE/sceGe.cpp
HLE/sceHprm.cpp
HLE/sceHttp.cpp
HLE/sceImpose.cpp
HLE/sceIo.cpp
HLE/sceKernel.cpp
HLE/sceKernelAlarm.cpp

View File

@ -135,6 +135,7 @@
<ClCompile Include="HLE\sceGe.cpp" />
<ClCompile Include="HLE\sceHprm.cpp" />
<ClCompile Include="HLE\sceHttp.cpp" />
<ClCompile Include="HLE\sceImpose.cpp" />
<ClCompile Include="HLE\sceIo.cpp" />
<ClCompile Include="HLE\sceKernel.cpp" />
<ClCompile Include="HLE\sceKernelAlarm.cpp" />
@ -264,6 +265,7 @@
<ClInclude Include="HLE\sceGe.h" />
<ClInclude Include="HLE\sceHprm.h" />
<ClInclude Include="HLE\sceHttp.h" />
<ClInclude Include="HLE\sceImpose.h" />
<ClInclude Include="HLE\sceIo.h" />
<ClInclude Include="HLE\sceKernel.h" />
<ClInclude Include="HLE\sceKernelAlarm.h" />

View File

@ -288,6 +288,9 @@
<ClCompile Include="HW\MemoryStick.cpp">
<Filter>HW</Filter>
</ClCompile>
<ClCompile Include="HLE\sceImpose.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ELF\ElfReader.h">
@ -524,6 +527,9 @@
<ClInclude Include="HW\MemoryStick.h">
<Filter>HW</Filter>
</ClInclude>
<ClInclude Include="HLE\sceImpose.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />

View File

@ -28,6 +28,7 @@
#include "scePower.h"
#include "sceNet.h"
#include "sceMpeg.h"
#include "sceImpose.h"
#include "sceGe.h"
#include "scePsmf.h"
#include "sceRtc.h"
@ -277,14 +278,6 @@ const HLEFunction sceUsbstorBoot[] =
{0xA55C9E16, 0, "sceUsbstorBootUnregisterNotify"},
};
//OSD stuff? home button?
const HLEFunction sceImpose[] =
{
{0x36aa6e91, 0, "sceImposeSetLanguageMode"}, // Seen
{0x381bd9e7, 0, "sceImposeHomeButton"},
{0x24fd7bcf, 0, "sceImposeGetLanguageMode"},
{0x8c943191, 0, "sceImposeGetBatteryIconStatus"},
};
const HLEFunction sceOpenPSID[] =
{
@ -314,7 +307,6 @@ const HLEModule moduleList[] =
{"sceSsl"},
{"sceSIRCS_IrDA_Driver"},
{"sceRtc"},
{"sceImpose",SZ(sceImpose),sceImpose}, //r: [UNK:36aa6e91] : 08b2cd68 //305: [MIPS32 R4K 00000000 ]: Loader: [UNK:24fd7bcf] : 08b2cd70
{"Pspnet_Scan"},
{"Pspnet_Show_MacAddr"},
{"pspeDebug", SZ(pspeDebug), pspeDebug},
@ -346,6 +338,7 @@ void RegisterAllModules() {
Register_sceMp3();
Register_sceHttp();
Register_scePower();
Register_sceImpose();
Register_sceSuspendForUser();
Register_sceGe_user();
Register_sceUmdUser();

45
Core/HLE/sceImpose.cpp Normal file
View File

@ -0,0 +1,45 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "HLE.h"
#include "FunctionWrappers.h"
#include "../MIPS/MIPS.h"
u32 sceImposeGetBatteryIconStatus(u32 chargingPtr, u32 iconStatusPtr)
{
DEBUG_LOG(HLE,"%i=sceImposeGetBatteryIconStatus(%08x, %08x)", chargingPtr, iconStatusPtr);
if (Memory::IsValidAddress(chargingPtr))
Memory::Write_U32(1, chargingPtr);
if (Memory::IsValidAddress(iconStatusPtr))
Memory::Write_U32(3, iconStatusPtr);
return 0;
}
//OSD stuff? home button?
const HLEFunction sceImpose[] =
{
{0x36aa6e91, 0, "sceImposeSetLanguageMode"}, // Seen
{0x381bd9e7, 0, "sceImposeHomeButton"},
{0x24fd7bcf, 0, "sceImposeGetLanguageMode"},
{0x8c943191, &WrapU_UU<sceImposeGetBatteryIconStatus>, "sceImposeGetBatteryIconStatus"},
};
void Register_sceImpose()
{
RegisterModule("sceImpose", ARRAY_SIZE(sceImpose), sceImpose);
}

20
Core/HLE/sceImpose.h Normal file
View File

@ -0,0 +1,20 @@
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#pragma once
void Register_sceImpose();

View File

@ -1696,7 +1696,7 @@ u32 __KernelUnregisterCallback(RegisteredCallbackType type, SceUID cbId)
t->registeredCallbacks[type].erase(cbId);
return 0;
} else {
return SCE_KERNEL_ERROR_INVAL;
return 0x80010016;
}
}

View File

@ -104,6 +104,7 @@ LOCAL_SRC_FILES := \
$(SRC)/Core/HLE/sceGe.cpp \
$(SRC)/Core/HLE/sceHprm.cpp \
$(SRC)/Core/HLE/sceHttp.cpp \
$(SRC)/Core/HLE/sceImpose.cpp \
$(SRC)/Core/HLE/sceIo.cpp \
$(SRC)/Core/HLE/sceKernel.cpp \
$(SRC)/Core/HLE/sceKernelAlarm.cpp \