Libkernel: Implement/stub some functions (#3774)

* Define latest released firmware version, use that for sceKernelGetSystemSwVersion

I feel this is less hacky and error-prone than just returning the game firmware.

* sceKernelGetAllowedSdkVersionOnSystem

* sceKernelHasNeoMode

* sceKernelGetAppInfo stub

* sceKernelGetCurrentCpu

* fixups

* sceKernelGetMainSocId

Used by libSceAvPlayer to determine if console is a pro or not.

* Update process.cpp

* Set has_param_sfo to true

* Clang
This commit is contained in:
Stephen Miller
2025-11-05 18:58:15 -06:00
committed by GitHub
parent 7031f5968e
commit 19e974bf21
3 changed files with 85 additions and 6 deletions

View File

@@ -36,6 +36,8 @@ struct OrbisWrapperImpl<PS4_SYSV_ABI R (*)(Args...), f> {
#define ORBIS(func) (Libraries::Kernel::OrbisWrapperImpl<decltype(&(func)), func>::wrap)
#define CURRENT_FIRMWARE_VERSION 0x13020011
s32* PS4_SYSV_ABI __Error();
struct SwVersionStruct {
@@ -51,6 +53,30 @@ struct AuthInfoData {
u64 ucred[8];
};
struct OrbisKernelTitleWorkaround {
s32 version;
s32 align;
u64 ids[2];
};
struct OrbisKernelAppInfo {
s32 app_id;
s32 mmap_flags;
s32 attribute_exe;
s32 attribute2;
char cusa_name[10];
u8 debug_level;
u8 slv_flags;
u8 mini_app_dmem_flags;
u8 render_mode;
u8 mdbg_out;
u8 required_hdcp_type;
u64 preload_prx_flags;
s32 attribute1;
s32 has_param_sfo;
OrbisKernelTitleWorkaround title_workaround;
};
void RegisterLib(Core::Loader::SymbolsResolver* sym);
} // namespace Libraries::Kernel