mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-29 11:20:40 +00:00
Merge pull request #173 from tmaul/master
Add a few stubs and functions
This commit is contained in:
commit
ffdc96a06a
@ -177,12 +177,20 @@ u32 sceFontOpen(u32 libHandle, u32 index, u32 mode, u32 errorCodePtr)
|
||||
u32 sceFontOpenUserMemory(u32 libHandle, u32 memoryFontAddrPtr, u32 memoryFontLength, u32 errorCodePtr)
|
||||
{
|
||||
ERROR_LOG(HLE, "sceFontOpenUserMemory %x, %x, %x, %x", libHandle, memoryFontAddrPtr, memoryFontLength, errorCodePtr);
|
||||
if (Memory::IsValidAddress(errorCodePtr))
|
||||
{
|
||||
Memory::Write_U32(0, errorCodePtr);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 sceFontOpenUserFile(u32 libHandle, u32 fileNamePtr, u32 mode, u32 errorCodePtr)
|
||||
{
|
||||
ERROR_LOG(HLE, "sceFontOpenUserFile %x, %x, %x, %x", libHandle, fileNamePtr, mode, errorCodePtr);
|
||||
if (Memory::IsValidAddress(errorCodePtr))
|
||||
{
|
||||
Memory::Write_U32(0, errorCodePtr);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -103,9 +103,10 @@ void sceGeListUpdateStallAddr(u32 displayListID, u32 stallAddress)
|
||||
gpu->UpdateStall(displayListID, stallAddress);
|
||||
}
|
||||
|
||||
void sceGeListSync(u32 displayListID, u32 mode) //0 : wait for completion 1:check and return
|
||||
int sceGeListSync(u32 displayListID, u32 mode) //0 : wait for completion 1:check and return
|
||||
{
|
||||
DEBUG_LOG(HLE, "sceGeListSync(dlid=%08x, mode=%08x)", displayListID, mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceGeDrawSync(u32 mode)
|
||||
@ -222,7 +223,7 @@ const HLEFunction sceGe_user[] =
|
||||
{0xAB49E76A,&WrapU_UUUU<sceGeListEnQueue>, "sceGeListEnQueue"},
|
||||
{0x1C0D95A6,&WrapU_UUUU<sceGeListEnQueueHead>, "sceGeListEnQueueHead"},
|
||||
{0xE0D68148,&WrapV_UU<sceGeListUpdateStallAddr>, "sceGeListUpdateStallAddr"},
|
||||
{0x03444EB4,&WrapV_UU<sceGeListSync>, "sceGeListSync"},
|
||||
{0x03444EB4,&WrapI_UU<sceGeListSync>, "sceGeListSync"},
|
||||
{0xB287BD61,&WrapU_U<sceGeDrawSync>, "sceGeDrawSync"},
|
||||
{0xB448EC0D,&WrapV_U<sceGeBreak>, "sceGeBreak"},
|
||||
{0x4C06E472,sceGeContinue, "sceGeContinue"},
|
||||
|
@ -756,11 +756,17 @@ void sceKernelFindModuleByName()
|
||||
}
|
||||
|
||||
u32 sceKernelLoadModuleByID(u32 id, u32 flags, u32 lmoptionPtr) {
|
||||
ERROR_LOG(HLE,"UNIMPL sceKernelLoadModuleById(%08x, %08x)", id, lmoptionPtr);
|
||||
ERROR_LOG(HLE,"UNIMPL %008x=sceKernelLoadModuleById(%08x, %08x)",id,id,lmoptionPtr);
|
||||
// Apparenty, ID is a sceIo File UID. So this shouldn't be too hard when needed.
|
||||
return id;
|
||||
}
|
||||
|
||||
u32 sceKernelLoadModuleDNAS(const char *name, u32 flags)
|
||||
{
|
||||
ERROR_LOG(HLE,"UNIMPL 0=sceKernelLoadModuleDNAS()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const HLEFunction ModuleMgrForUser[] =
|
||||
{
|
||||
{0x977DE386,&WrapU_CU<sceKernelLoadModule>,"sceKernelLoadModule"},
|
||||
@ -776,6 +782,7 @@ const HLEFunction ModuleMgrForUser[] =
|
||||
{0xd8b73127,&WrapU_U<sceKernelGetModuleIdByAddress>, "sceKernelGetModuleIdByAddress"},
|
||||
{0xf0a26395,&sceKernelGetModuleId, "sceKernelGetModuleId"},
|
||||
{0x8f2df740,0,"sceKernelStopUnloadSelfModuleWithStatus"},
|
||||
{0xfef27dc1,&WrapU_CU<sceKernelLoadModuleDNAS> , "sceKernelLoadModuleDNAS"},
|
||||
};
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ const HLEFunction sceNet[] =
|
||||
{0x0bf0a3ae, 0, "sceNetGetLocalEtherAddr"},
|
||||
{0xd27961c9, 0, "sceNetEtherStrton"},
|
||||
{0x50647530, 0, "sceNetFreeThreadinfo"},
|
||||
{0xcc393e48, 0, "sceNetGetMallocStat"}
|
||||
{0xcc393e48, 0, "sceNetGetMallocStat"},
|
||||
};
|
||||
|
||||
const HLEFunction sceNetAdhoc[] =
|
||||
@ -92,6 +92,8 @@ const HLEFunction sceNetAdhoc[] =
|
||||
{0xa0229362, 0, "sceNetAdhocGameModeDeleteMaster"},
|
||||
{0x0b2228e9, 0, "sceNetAdhocGameModeDeleteReplica"},
|
||||
{0x7F75C338, 0, "sceNetAdhocGameModeCreateMaster"},
|
||||
{0x73bfd52d, 0, "sceNetAdhocSetSocketAlert"},
|
||||
{0x7a662d6b, 0, "sceNetAdhocPollSocket"},
|
||||
};
|
||||
|
||||
const HLEFunction sceNetAdhocMatching[] =
|
||||
@ -131,6 +133,7 @@ const HLEFunction sceNetAdhocctl[] =
|
||||
{0x1ff89745, 0, "sceNetAdhocctlJoinEnterGameMode"},
|
||||
{0xcf8e084d, 0, "sceNetAdhocctlExitGameMode"},
|
||||
{0xe162cb14, 0, "sceNetAdhocctlGetPeerList"},
|
||||
{0x362cbe8f, 0, "sceNetAdhocctlGetAdhocId"},
|
||||
};
|
||||
|
||||
const HLEFunction sceNetResolver[] =
|
||||
|
@ -436,6 +436,24 @@ int sceRtcSetTime_t(u32 datePtr, u32 time)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sceRtcSetTime64_t(u32 datePtr, u64 time)
|
||||
{
|
||||
ERROR_LOG(HLE, "HACK sceRtcSetTime64_t(%d,%d)", datePtr, time);
|
||||
if (Memory::IsValidAddress(datePtr))
|
||||
{
|
||||
ScePspDateTime pt;
|
||||
__RtcTicksToPspTime(pt, time*1000000ULL);
|
||||
pt.year += 1969;
|
||||
Memory::WriteStruct(datePtr, &pt);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int sceRtcGetTime_t(u32 datePtr, u32 timePtr)
|
||||
{
|
||||
ERROR_LOG(HLE, "HACK sceRtcGetTime_t(%d,%d)", datePtr, time);
|
||||
@ -454,6 +472,27 @@ int sceRtcGetTime_t(u32 datePtr, u32 timePtr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int sceRtcGetTime64_t(u32 datePtr, u32 timePtr)
|
||||
{
|
||||
ERROR_LOG(HLE, "HACK sceRtcGetTime64_t(%d,%d)", datePtr, time);
|
||||
if (Memory::IsValidAddress(datePtr)&&Memory::IsValidAddress(timePtr))
|
||||
{
|
||||
ScePspDateTime pt;
|
||||
Memory::ReadStruct(datePtr, &pt);
|
||||
pt.year-=1969;
|
||||
u64 result = __RtcPspTimeToTicks(pt)/1000000ULL;
|
||||
Memory::Write_U64(result, timePtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int sceRtcSetDosTime(u32 datePtr, u32 dosTime)
|
||||
{
|
||||
ERROR_LOG(HLE, "HACK sceRtcSetDosTime(%d,%d)", datePtr, dosTime);
|
||||
@ -741,6 +780,8 @@ const HLEFunction sceRtc[] =
|
||||
{0x27F98543, 0, "sceRtcFormatRFC3339LocalTime"},
|
||||
{0xDFBC5F16, WrapI_UU<sceRtcParseDateTime>, "sceRtcParseDateTime"},
|
||||
{0x28E1E988, 0, "sceRtcParseRFC3339"},
|
||||
{0xe1c93e47, WrapI_UU<sceRtcGetTime64_t>, "sceRtcGetTime64_t"},
|
||||
{0x1909c99b, WrapI_UU64<sceRtcSetTime64_t>, "sceRtcSetTime64_t"},
|
||||
};
|
||||
|
||||
|
||||
|
@ -253,11 +253,17 @@ int sceUtilityGamedataInstallGetStatus()
|
||||
#define PSP_SYSTEMPARAM_LANGUAGE_KOREAN 8
|
||||
|
||||
|
||||
//TODO: should save to config file
|
||||
u32 sceUtilitySetSystemParamString(u32 id, u32 strPtr)
|
||||
{
|
||||
DEBUG_LOG(HLE,"sceUtilitySetSystemParamString(%i, %08x)", id,strPtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//TODO: Should load from config file
|
||||
u32 sceUtilityGetSystemParamString(u32 id, u32 destaddr, u32 unknownparam)
|
||||
{
|
||||
//DEBUG_LOG(HLE,"sceUtilityGetSystemParamString(%i, %08x, %i)", id,destaddr,unknownparam);
|
||||
DEBUG_LOG(HLE,"sceUtilityGetSystemParamString(%i, %08x, %i)", id,destaddr,unknownparam);
|
||||
char *buf = (char *)Memory::GetPointer(destaddr);
|
||||
switch (id) {
|
||||
case PSP_SYSTEMPARAM_ID_STRING_NICKNAME:
|
||||
@ -271,6 +277,7 @@ u32 sceUtilityGetSystemParamString(u32 id, u32 destaddr, u32 unknownparam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//TODO: Should load from config file
|
||||
u32 sceUtilityGetSystemParamInt(u32 id, u32 destaddr)
|
||||
{
|
||||
DEBUG_LOG(HLE,"sceUtilityGetSystemParamInt(%i, %08x)", id,destaddr);
|
||||
@ -315,18 +322,31 @@ u32 sceUtilityLoadNetModule(u32 module)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceUtilityUnloadNetModule(u32 module)
|
||||
{
|
||||
DEBUG_LOG(HLE,"FAKE: sceUtilityUnloadNetModule(%i)", module);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const HLEFunction sceUtility[] =
|
||||
{
|
||||
{0x1579a159, &WrapU_U<sceUtilityLoadNetModule>, "sceUtilityLoadNetModule"},
|
||||
{0x64d50c56, &WrapU_U<sceUtilityUnloadNetModule>, "sceUtilityUnloadNetModule"},
|
||||
|
||||
|
||||
{0xf88155f6, &WrapV_U<sceUtilityNetconfShutdownStart>, "sceUtilityNetconfShutdownStart"},
|
||||
{0x4db1e739, &WrapV_U<sceUtilityNetconfInitStart>, "sceUtilityNetconfInitStart"},
|
||||
{0x91e70e35, &WrapV_I<sceUtilityNetconfUpdate>, "sceUtilityNetconfUpdate"},
|
||||
{0x6332aa39, &WrapU_V<sceUtilityNetconfGetStatus>, "sceUtilityNetconfGetStatus"},
|
||||
{0x5eee6548, 0, "sceUtilityCheckNetParam"},
|
||||
{0x434d4b3a, 0, "sceUtilityGetNetParam"},
|
||||
{0x4FED24D8, 0, "sceUtilityGetNetParamLatestID"},
|
||||
|
||||
{0x67af3428, &WrapV_U<sceUtilityMsgDialogShutdownStart>, "sceUtilityMsgDialogShutdownStart"},
|
||||
{0x2ad8e239, &WrapV_U<sceUtilityMsgDialogInitStart>, "sceUtilityMsgDialogInitStart"},
|
||||
{0x95fc253b, &WrapV_I<sceUtilityMsgDialogUpdate>, "sceUtilityMsgDialogUpdate"},
|
||||
{0x9a1c91d7, &WrapU_V<sceUtilityMsgDialogGetStatus>, "sceUtilityMsgDialogGetStatus"},
|
||||
{0x9a1c91d7, &WrapU_V<sceUtilityMsgDialogGetStatus>, "sceUtilityMsgDialogGetStatus"},
|
||||
{0x4928bd96, 0, "sceUtilityMsgDialogAbort"},
|
||||
|
||||
{0x9790b33c, &WrapI_V<sceUtilitySavedataShutdownStart>, "sceUtilitySavedataShutdownStart"},
|
||||
{0x50c4cd57, &WrapI_U<sceUtilitySavedataInitStart>, "sceUtilitySavedataInitStart"},
|
||||
@ -338,30 +358,33 @@ const HLEFunction sceUtility[] =
|
||||
{0x4b85c861, &WrapV_U<sceUtilityOskUpdate>, "sceUtilityOskUpdate"},
|
||||
{0xf3f76017, &WrapI_V<sceUtilityOskGetStatus>, "sceUtilityOskGetStatus"},
|
||||
|
||||
{0x41e30674, 0, "sceUtilitySetSystemParamString"},
|
||||
{0x41e30674, &WrapU_UU<sceUtilitySetSystemParamString>, "sceUtilitySetSystemParamString"},
|
||||
{0x45c18506, 0, "sceUtilitySetSystemParamInt"},
|
||||
{0x34b78343, &WrapU_UUU<sceUtilityGetSystemParamString>, "sceUtilityGetSystemParamString"},
|
||||
{0xA5DA2406, &WrapU_UU<sceUtilityGetSystemParamInt>, "sceUtilityGetSystemParamInt"},
|
||||
|
||||
|
||||
{0xc492f751, 0, "sceUtilityGameSharingInitStart"},
|
||||
{0xefc6f80f, 0, "sceUtilityGameSharingShutdownStart"},
|
||||
{0x7853182d, 0, "sceUtilityGameSharingUpdate"},
|
||||
{0x946963f3, 0, "sceUtilityGameSharingGetStatus"},
|
||||
|
||||
{0x2995d020, 0, "sceUtility_2995d020"},
|
||||
{0xb62a4061, 0, "sceUtility_b62a4061"},
|
||||
{0xed0fad38, 0, "sceUtility_ed0fad38"},
|
||||
{0x88bc7406, 0, "sceUtility_88bc7406"},
|
||||
{0x45c18506, 0, "sceUtilitySetSystemParamInt"},
|
||||
{0x5eee6548, 0, "sceUtilityCheckNetParam"},
|
||||
{0x434d4b3a, 0, "sceUtilityGetNetParam"},
|
||||
{0x64d50c56, 0, "sceUtilityUnloadNetModule"},
|
||||
{0x4928bd96, 0, "sceUtilityMsgDialogAbort"},
|
||||
|
||||
{0xbda7d894, 0, "sceUtilityHtmlViewerGetStatus"},
|
||||
{0xcdc3aa41, 0, "sceUtilityHtmlViewerInitStart"},
|
||||
{0xf5ce1134, 0, "sceUtilityHtmlViewerShutdownStart"},
|
||||
{0x05afb9e4, 0, "sceUtilityHtmlViewerUpdate"},
|
||||
|
||||
{0xc629af26, &WrapV_U<sceUtilityLoadAvModule>, "sceUtilityLoadAvModule"},
|
||||
{0xf7d8d092, 0, "sceUtilityUnloadAvModule"},
|
||||
|
||||
{0x2a2b3de0, &WrapV_U<sceUtilityLoadModule>, "sceUtilityLoadModule"},
|
||||
{0xe49bfe92, 0, "sceUtilityUnloadModule"},
|
||||
|
||||
{0x0251B134, 0, "sceUtilityScreenshotInitStart"},
|
||||
{0xF9E0008C, 0, "sceUtilityScreenshotShutdownStart"},
|
||||
{0xAB083EA9, 0, "sceUtilityScreenshotUpdate"},
|
||||
@ -381,6 +404,12 @@ const HLEFunction sceUtility[] =
|
||||
{0xE19C97D6, 0, "sceUtilityNpSigninShutdownStart"},
|
||||
{0xF3FBC572, 0, "sceUtilityNpSigninUpdate"},
|
||||
{0x86ABDB1B, 0, "sceUtilityNpSigninGetStatus"},
|
||||
|
||||
{0x1281DA8E, 0, "sceUtilityInstallInitStart"},
|
||||
{0x5EF1C24A, 0, "sceUtilityInstallShutdownStart"},
|
||||
{0xA03D29BA, 0, "sceUtilityInstallUpdate"},
|
||||
{0xC4700FA3, 0, "sceUtilityInstallGetStatus"},
|
||||
|
||||
};
|
||||
|
||||
void Register_sceUtility()
|
||||
|
Loading…
Reference in New Issue
Block a user