Add new sceNp/scePauth and some stubs for unknown functions on THE IDOLM@STER SP.

This commit is contained in:
nachume 2013-04-29 12:40:09 +09:00
parent 31f9d69e5a
commit c2c6adb7c9
15 changed files with 262 additions and 4 deletions

View File

@ -808,6 +808,10 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/HLE/sceVaudio.h
Core/HLE/scePspNpDrm_user.cpp
Core/HLE/scePspNpDrm_user.h
Core/HLE/sceNp.cpp
Core/HLE/sceNp.h
Core/HLE/scePauth.cpp
Core/HLE/scePauth.h
Core/HW/MediaEngine.cpp
Core/HW/MediaEngine.h
Core/HW/MemoryStick.cpp

View File

@ -197,9 +197,11 @@
<ClCompile Include="HLE\sceKernelVTimer.cpp" />
<ClCompile Include="HLE\sceMpeg.cpp" />
<ClCompile Include="HLE\sceNet.cpp" />
<ClCompile Include="HLE\sceNp.cpp" />
<ClCompile Include="HLE\sceOpenPSID.cpp" />
<ClCompile Include="HLE\sceParseHttp.cpp" />
<ClCompile Include="HLE\sceParseUri.cpp" />
<ClCompile Include="HLE\scePauth.cpp" />
<ClCompile Include="HLE\scePower.cpp" />
<ClCompile Include="HLE\scePsmf.cpp" />
<ClCompile Include="HLE\scePspNpDrm_user.cpp" />
@ -367,9 +369,11 @@
<ClInclude Include="HLE\sceKernelTime.h" />
<ClInclude Include="HLE\sceMpeg.h" />
<ClInclude Include="HLE\sceNet.h" />
<ClInclude Include="HLE\sceNp.h" />
<ClInclude Include="HLE\sceOpenPSID.h" />
<ClInclude Include="HLE\sceParseHttp.h" />
<ClInclude Include="HLE\sceParseUri.h" />
<ClInclude Include="HLE\scePauth.h" />
<ClInclude Include="HLE\scePower.h" />
<ClInclude Include="HLE\scePsmf.h" />
<ClInclude Include="HLE\scePspNpDrm_user.h" />
@ -463,4 +467,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -401,6 +401,12 @@
<Filter>ELF</Filter>
</ClCompile>
<ClCompile Include="MIPS\JitCommon\JitBlockCache.cpp" />
<ClCompile Include="HLE\scePauth.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
<ClCompile Include="HLE\sceNp.cpp">
<Filter>HLE\Libraries</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="ELF\ElfReader.h">
@ -740,6 +746,12 @@
<Filter>ELF</Filter>
</ClInclude>
<ClInclude Include="MIPS\JitCommon\JitBlockCache.h" />
<ClInclude Include="HLE\scePauth.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
<ClInclude Include="HLE\sceNp.h">
<Filter>HLE\Libraries</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
@ -747,4 +759,4 @@
<None Include="..\android\jni\Android.mk" />
<None Include="GameLogNotes.txt" />
</ItemGroup>
</Project>
</Project>

View File

@ -59,6 +59,8 @@
#include "sceGameUpdate.h"
#include "sceDeflt.h"
#include "sceMp4.h"
#include "scePauth.h"
#include "sceNp.h"
#define N(s) s
@ -256,6 +258,11 @@ void RegisterAllModules() {
Register_sceGameUpdate();
Register_sceDeflt();
Register_sceMp4();
Register_scePauth();
Register_sceNp();
Register_sceNpCommerce2();
Register_sceNpService();
Regester_sceNpAuth();
for (int i = 0; i < numModules; i++)
{

View File

@ -19,6 +19,11 @@
#include "sceHttp.h"
int sceHttpSetResolveRetry(int connectionID, int retryCount)
{
DEBUG_LOG(HLE, "UNIMPL sceHttpSetResolveRetry()");
return 0;
}
/*
* 0x62411801 sceSircsInit
@ -55,6 +60,7 @@ const HLEFunction sceHttp[] = {
{0xc10b6bd9,0,"sceHttpAbortRequest"},
{0xfcf8c055,0,"sceHttpDeleteTemplate"},
{0xf49934f6,0,"sceHttpSetMallocFunction"},
{0x03D9526F,&WrapI_II<sceHttpSetResolveRetry>, "sceHttpSetResolveRetry"},
{0x47940436,0,"sceHttpSetResolveTimeOut"},
{0x2a6c3296,0,"sceHttpSetAuthInfoCB"},
{0xd081ec8f,0,"sceHttpGetNetworkErrno"},

View File

@ -17,4 +17,6 @@
#pragma once
int sceHttpSetResolveRetry(int connectionID, int retryCount);
void Register_sceHttp();

View File

@ -234,13 +234,18 @@ void sceKernelExitGameWithStatus()
Core_Stop();
}
int LoadExecForUser_362A956B()
{
DEBUG_LOG(HLE,"UNIMPL LoadExecForUser_362A956B()");
return 0;
}
u32 sceKernelRegisterExitCallback(u32 cbId)
{
DEBUG_LOG(HLE,"NOP sceKernelRegisterExitCallback(%i)", cbId);
return 0;
}
u32 sceKernelDevkitVersion()
{
int firmwareVersion = 150;
@ -812,6 +817,7 @@ const HLEFunction LoadExecForUser[] =
{0x4AC57943,&WrapU_U<sceKernelRegisterExitCallback>,"sceKernelRegisterExitCallback"},
{0xBD2F1094,&WrapI_CU<sceKernelLoadExec>,"sceKernelLoadExec"},
{0x2AC9954B,&WrapV_V<sceKernelExitGameWithStatus>,"sceKernelExitGameWithStatus"},
{0x362A956B,&WrapI_V<LoadExecForUser_362A956B>, "LoadExecForUser_362A956B"},
};
void Register_LoadExecForUser()

View File

@ -287,8 +287,10 @@ bool __KernelLoadExec(const char *filename, SceKernelLoadExecParam *param);
int sceKernelLoadExec(const char *filename, u32 paramPtr);
void sceKernelRegisterExitCallback();
void sceKernelExitGame();
void sceKernelExitGameWithStatus();
int LoadExecForUser_362A956B();
void sceKernelRegisterExitCallback();
void sceKernelSleepThread();
void sceKernelSleepThreadCB();

91
Core/HLE/sceNp.cpp Normal file
View File

@ -0,0 +1,91 @@
// 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/.
// This is pretty much a stub implementation. Doesn't actually do anything, just tries to return values
// to keep games happy anyway. So, no ATRAC3 music until someone has reverse engineered Atrac3+.
#include "HLE.h"
#include "sceNp.h"
int sceNp_857B47D3()
{
// No parameters
DEBUG_LOG(HLE, "UNIMPL sceNp_857B47D3()");
return 0;
}
int sceNp_37E1E274()
{
// No parameters
DEBUG_LOG(HLE, "UNIMPL sceNp_37E1E274()");
return 0;
}
const HLEFunction sceNp[] = {
{0x857B47D3, &WrapI_V<sceNp_857B47D3>, "sceNp_857B47D3"},
{0x37E1E274, &WrapI_V<sceNp_37E1E274>, "sceNp_37E1E274"},
};
void Register_sceNp()
{
RegisterModule("sceNp", ARRAY_SIZE(sceNp), sceNp);
}
const HLEFunction sceNpAuth[] = {
{0x4EC1F667, 0, "sceNpAuth_4EC1F667"},
{0xA1DE86F8, 0, "sceNpAuth_A1DE86F8"},
};
void Regester_sceNpAuth()
{
RegisterModule("sceNpAuth", ARRAY_SIZE(sceNpAuth), sceNpAuth);
}
const HLEFunction sceNpService[] = {
{0x00ACFAC3, 0, "sceNpService_00ACFAC3"},
{0x0F8F5821, 0, "sceNpService_0F8F5821"},
};
void Register_sceNpService()
{
RegisterModule("sceNpService", ARRAY_SIZE(sceNpService), sceNpService);
}
const HLEFunction sceNpCommerce2[] = {
{0x005B5F20, 0, "sceNpCommerce2_005B5F20"},
{0x0e9956e3, 0, "sceNpCommerce2_0e9956e3"},
{0x1888a9fe, 0, "sceNpCommerce2_1888a9fe"},
{0x1c952dcb, 0, "sceNpCommerce2_1c952dcb"},
{0x2b25f6e9, 0, "sceNpCommerce2_2b25f6e9"},
{0x3371d5f1, 0, "sceNpCommerce2_3371d5f1"},
{0x4ecd4503, 0, "sceNpCommerce2_4ecd4503"},
{0x590a3229, 0, "sceNpCommerce2_590a3229"},
{0x6f1fe37f, 0, "sceNpCommerce2_6f1fe37f"},
{0xa5a34ea4, 0, "sceNpCommerce2_a5a34ea4"},
{0xaa4a1e3d, 0, "sceNpCommerce2_aa4a1e3d"},
{0xbc61ffc8, 0, "sceNpCommerce2_bc61ffc8"},
{0xc7f32242, 0, "sceNpCommerce2_c7f32242"},
{0xf2278b90, 0, "sceNpCommerce2_f2278b90"},
{0xf297ab9c, 0, "sceNpCommerce2_f297ab9c"},
{0xfc30c19e, 0, "sceNpCommerce2_fc30c19e"},
};
void Register_sceNpCommerce2()
{
RegisterModule("sceNpCommerce2", ARRAY_SIZE(sceNpCommerce2), sceNpCommerce2);
}

23
Core/HLE/sceNp.h Normal file
View File

@ -0,0 +1,23 @@
// 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_sceNp();
void Register_sceNpCommerce2();
void Register_sceNpService();
void Regester_sceNpAuth();

42
Core/HLE/scePauth.cpp Normal file
View File

@ -0,0 +1,42 @@
// 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 "scePauth.h"
int scePauth_F7AA47F6(u32 srcPtr, int srcLength, u32 destLengthPtr, u32 workArea)
{
DEBUG_LOG(HLE, "UNIMPL scePauth_F7AA47F6(%d, %d, %d, %d)", srcPtr, srcLength, destLengthPtr, workArea);
return 0;
}
int scePauth_98B83B5D(u32 srcPtr, int srcLength, u32 destLengthPtr, u32 workArea)
{
DEBUG_LOG(HLE, "UNIMPL scePauth_98B83B5D(%d, %d, %d, %d)", srcPtr, srcLength, destLengthPtr, workArea);
return 0;
}
const HLEFunction scePauth[] = {
{0xF7AA47F6, &WrapI_UIUU<scePauth_F7AA47F6>, "scePauth_F7AA47F6"},
{0x98B83B5D, &WrapI_UIUU<scePauth_98B83B5D>, "scePauth_98B83B5D"},
};
void Register_scePauth()
{
RegisterModule("scePauth", ARRAY_SIZE(scePauth), scePauth);
}

20
Core/HLE/scePauth.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_scePauth();

View File

@ -797,6 +797,15 @@ int sceRtcParseDateTime(u32 destTickPtr, u32 dateStringPtr)
return 0;
}
int sceRtcGetLastAdjustedTime(u32 tickPtr)
{
u64 curTick = __RtcGetCurrentTick();
if (Memory::IsValidAddress(tickPtr))
Memory::Write_U64(curTick, tickPtr);
DEBUG_LOG(HLE, "sceRtcGetLastAdjustedTime(%d)", tickPtr);
return 0;
}
const HLEFunction sceRtc[] =
{
{0xC41C2853, WrapU_V<sceRtcGetTickResolution>, "sceRtcGetTickResolution"},
@ -837,6 +846,7 @@ const HLEFunction sceRtc[] =
{0x28E1E988, 0, "sceRtcParseRFC3339"},
{0xe1c93e47, WrapI_UU<sceRtcGetTime64_t>, "sceRtcGetTime64_t"},
{0x1909c99b, WrapI_UU64<sceRtcSetTime64_t>, "sceRtcSetTime64_t"},
{0x62685E98, WrapI_U<sceRtcGetLastAdjustedTime>, "sceRtcGetLastAdjustedTime"},
};
void Register_sceRtc()

View File

@ -18,6 +18,7 @@
#pragma once
void sceRtcGetCurrentTick();
int sceRtcGetLastAdjustedTime(u32 tickPtr);
void Register_sceRtc();
struct ScePspDateTime {

View File

@ -470,6 +470,30 @@ void sceUtilityInstallInitStart(u32 unknown)
DEBUG_LOG(HLE,"FAKE sceUtilityInstallInitStart()");
}
int sceUtilityStoreCheckoutShutdownStart()
{
DEBUG_LOG(HLE,"UNIMPL sceUtilityStoreCheckoutShutdownStart()");
return 0;
}
int sceUtilityStoreCheckoutInitStart(u32 paramsPtr)
{
DEBUG_LOG(HLE,"UNIMPL sceUtilityStoreCheckoutInitStart(%d)", paramsPtr);
return 0;
}
int sceUtilityStoreCheckoutUpdate(int drawSpeed)
{
DEBUG_LOG(HLE,"UNIMPL sceUtilityStoreCheckoutUpdate(%d)", drawSpeed);
return 0;
}
int sceUtilityStoreCheckoutGetStatus()
{
DEBUG_LOG(HLE,"UNIMPL sceUtilityStoreCheckoutGetStatus()");
return 0;
}
const HLEFunction sceUtility[] =
{
{0x1579a159, &WrapU_U<sceUtilityLoadNetModule>, "sceUtilityLoadNetModule"},
@ -552,6 +576,10 @@ const HLEFunction sceUtility[] =
{0xA03D29BA, 0, "sceUtilityInstallUpdate"},
{0xC4700FA3, 0, "sceUtilityInstallGetStatus"},
{0x54A5C62F, &WrapI_V<sceUtilityStoreCheckoutShutdownStart>, "sceUtilityStoreCheckoutShutdownStart"},
{0xDA97F1AA, &WrapI_U<sceUtilityStoreCheckoutInitStart>, "sceUtilityStoreCheckoutInitStart"},
{0xB8592D5F, &WrapI_I<sceUtilityStoreCheckoutUpdate>, "sceUtilityStoreCheckoutUpdate"},
{0x3AAD51DC, &WrapI_V<sceUtilityStoreCheckoutGetStatus>, "sceUtilityStoreCheckoutGetStatus"},
};
void Register_sceUtility()