mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
sceKernelMapFlexibleMemory, fixed a non-named thread , sceUserServiceGetEvent
This commit is contained in:
parent
7661bc26a6
commit
4692dbf1b7
6 changed files with 31 additions and 6 deletions
|
@ -65,8 +65,14 @@ s32 PS4_SYSV_ABI sceKernelMapNamedFlexibleMemory(void** addr_in_out, std::size_t
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceKernelMapFlexibleMemory(void** addr_in_out, std::size_t len, int prot,
|
||||
int flags) {
|
||||
return sceKernelMapNamedFlexibleMemory(addr_in_out, len, prot, flags, "");
|
||||
}
|
||||
|
||||
void RegisterKernelMemory(Core::Loader::SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("mL8NDH86iQI", "libkernel", 1, "libkernel", 1, 1, sceKernelMapNamedFlexibleMemory);
|
||||
LIB_FUNCTION("IWIBBdTHit4", "libkernel", 1, "libkernel", 1, 1, sceKernelMapFlexibleMemory);
|
||||
}
|
||||
|
||||
} // namespace Libraries::Kernel
|
|
@ -12,6 +12,7 @@ class SymbolsResolver;
|
|||
namespace Libraries::Kernel {
|
||||
s32 PS4_SYSV_ABI sceKernelMapNamedFlexibleMemory(void** addrInOut, std::size_t len, int prot,
|
||||
int flags, const char* name);
|
||||
|
||||
s32 PS4_SYSV_ABI sceKernelMapFlexibleMemory(void** addr_in_out, std::size_t len, int prot,
|
||||
int flags);
|
||||
void RegisterKernelMemory(Core::Loader::SymbolsResolver* sym);
|
||||
} // namespace Libraries::Kernel
|
|
@ -103,6 +103,10 @@ int PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, u64 len, int prot, int fl
|
|||
if (flags == 0) {
|
||||
out_addr = VirtualMemory::memory_alloc_aligned(in_addr, len, cpu_mode, alignment);
|
||||
}
|
||||
else
|
||||
{
|
||||
UNREACHABLE();
|
||||
}
|
||||
LOG_INFO(Kernel_Vmm, "in_addr = {:#x}, out_addr = {:#x}", in_addr, out_addr);
|
||||
|
||||
*addr = reinterpret_cast<void*>(out_addr); // return out_addr to first functions parameter
|
||||
|
|
|
@ -827,7 +827,11 @@ int PS4_SYSV_ABI scePthreadCreate(ScePthread* thread, const ScePthreadAttr* attr
|
|||
int result = pthread_copy_attributes(&(*thread)->attr, attr);
|
||||
|
||||
if (result == 0) {
|
||||
(*thread)->name = name;
|
||||
if (name != NULL) {
|
||||
(*thread)->name = name;
|
||||
} else {
|
||||
(*thread)->name = "no-name";
|
||||
}
|
||||
(*thread)->entry = start_routine;
|
||||
(*thread)->arg = arg;
|
||||
(*thread)->is_almost_done = false;
|
||||
|
|
|
@ -103,9 +103,19 @@ int PS4_SYSV_ABI sceUserServiceGetDiscPlayerFlag() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceUserServiceGetEvent() {
|
||||
LOG_ERROR(Lib_UserService, "(STUBBED) called");
|
||||
return ORBIS_OK;
|
||||
s32 PS4_SYSV_ABI sceUserServiceGetEvent(OrbisUserServiceEvent* event) {
|
||||
LOG_INFO(Lib_UserService, "(DUMMY) called");
|
||||
// fake a loggin event
|
||||
static bool logged_in = false;
|
||||
|
||||
if (!logged_in) {
|
||||
logged_in = true;
|
||||
event->event = SCE_USER_SERVICE_EVENT_TYPE_LOGIN;
|
||||
event->userId = 1;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
return ORBIS_USER_SERVICE_ERROR_NO_EVENT;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceUserServiceGetEventCalendarType() {
|
||||
|
|
|
@ -76,7 +76,7 @@ int PS4_SYSV_ABI sceUserServiceGetCurrentUserGroupIndex();
|
|||
int PS4_SYSV_ABI sceUserServiceGetDefaultNewUserGroupName();
|
||||
int PS4_SYSV_ABI sceUserServiceGetDeletedUserInfo();
|
||||
int PS4_SYSV_ABI sceUserServiceGetDiscPlayerFlag();
|
||||
int PS4_SYSV_ABI sceUserServiceGetEvent();
|
||||
s32 PS4_SYSV_ABI sceUserServiceGetEvent(OrbisUserServiceEvent* event);
|
||||
int PS4_SYSV_ABI sceUserServiceGetEventCalendarType();
|
||||
int PS4_SYSV_ABI sceUserServiceGetEventFilterTeamEvent();
|
||||
int PS4_SYSV_ABI sceUserServiceGetEventSortEvent();
|
||||
|
|
Loading…
Add table
Reference in a new issue