mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-28 13:28:03 +03:00
Sysmodules (#2826)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Some sysmodules inconsistencies fixed. Based on Visual studio flags if they are irrelevant lmk * Suggestions - info passed to sceKernelGetModuleInfoForUnwind and if name field matches it gets zeroed * Final suggestions * reverting OrbisModuleInfoForUnwind and modifing header.
This commit is contained in:
parent
c01590175a
commit
d370ea32f4
2 changed files with 37 additions and 7 deletions
|
@ -19,11 +19,40 @@ int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal() {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info) {
|
||||
LOG_ERROR(Lib_SysModule, "(STUBBED) called");
|
||||
Kernel::OrbisModuleInfoForUnwind module_info;
|
||||
module_info.st_size = 0x130;
|
||||
s32 res = Kernel::sceKernelGetModuleInfoForUnwind(addr, flags, &module_info);
|
||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags,
|
||||
Kernel::OrbisModuleInfoForUnwind* info) {
|
||||
LOG_TRACE(Lib_SysModule, "sceSysmoduleGetModuleInfoForUnwind(addr=0x{:X}, flags=0x{:X})", addr,
|
||||
flags);
|
||||
|
||||
s32 res = Kernel::sceKernelGetModuleInfoForUnwind(addr, flags, info);
|
||||
if (res != 0) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static constexpr std::array<std::string_view, 17> modules_to_hide = {
|
||||
"libc.prx",
|
||||
"libc.sprx",
|
||||
"libSceAudioLatencyEstimation.prx",
|
||||
"libSceFace.prx",
|
||||
"libSceFaceTracker.prx",
|
||||
"libSceFios2.prx",
|
||||
"libSceFios2.sprx",
|
||||
"libSceFontGsm.prx",
|
||||
"libSceHand.prx",
|
||||
"libSceHandTracker.prx",
|
||||
"libSceHeadTracker.prx",
|
||||
"libSceJobManager.prx",
|
||||
"libSceNpCppWebApi.prx",
|
||||
"libSceNpToolkit.prx",
|
||||
"libSceNpToolkit2.prx",
|
||||
"libSceS3DConversion.prx",
|
||||
"libSceSmart.prx",
|
||||
};
|
||||
|
||||
const std::string_view module_name = info->name.data();
|
||||
if (std::ranges::find(modules_to_hide, module_name) != modules_to_hide.end()) {
|
||||
std::ranges::fill(info->name, '\0');
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -56,7 +85,6 @@ int PS4_SYSV_ABI sceSysmoduleIsLoadedInternal(OrbisSysModuleInternal id) {
|
|||
}
|
||||
|
||||
int PS4_SYSV_ABI sceSysmoduleLoadModule(OrbisSysModule id) {
|
||||
auto color_name = magic_enum::enum_name(id);
|
||||
LOG_ERROR(Lib_SysModule, "(DUMMY) called module = {}", magic_enum::enum_name(id));
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/types.h"
|
||||
#include "core/libraries/kernel/process.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
|
@ -152,7 +153,8 @@ enum class OrbisSysModuleInternal : u32 {
|
|||
};
|
||||
|
||||
int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal();
|
||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info);
|
||||
s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags,
|
||||
Kernel::OrbisModuleInfoForUnwind* info);
|
||||
int PS4_SYSV_ABI sceSysmoduleIsCalledFromSysModule();
|
||||
int PS4_SYSV_ABI sceSysmoduleIsCameraPreloaded();
|
||||
int PS4_SYSV_ABI sceSysmoduleIsLoaded(OrbisSysModule id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue