diff --git a/orbis-kernel/include/orbis/sys/sysproto.hpp b/orbis-kernel/include/orbis/sys/sysproto.hpp index 80dc3fdd3..09e7c90bb 100644 --- a/orbis-kernel/include/orbis/sys/sysproto.hpp +++ b/orbis-kernel/include/orbis/sys/sysproto.hpp @@ -611,7 +611,7 @@ SysResult sys_netgetiflist(Thread *thread /* TODO */); SysResult sys_kqueueex(Thread *thread, ptr name, sint flags); SysResult sys_mtypeprotect(Thread *thread /* TODO */); SysResult sys_regmgr_call(Thread *thread, uint32_t op, uint32_t id, - ptr result, ptr value, uint64_t type); + ptr result, ptr value, uint64_t len); SysResult sys_jitshm_create(Thread *thread /* TODO */); SysResult sys_jitshm_alias(Thread *thread /* TODO */); SysResult sys_dl_get_list(Thread *thread /* TODO */); diff --git a/orbis-kernel/src/sys/sys_sce.cpp b/orbis-kernel/src/sys/sys_sce.cpp index 2b329f6bb..9fe3536bc 100644 --- a/orbis-kernel/src/sys/sys_sce.cpp +++ b/orbis-kernel/src/sys/sys_sce.cpp @@ -59,15 +59,45 @@ orbis::SysResult orbis::sys_mtypeprotect(Thread *thread /* TODO */) { } orbis::SysResult orbis::sys_regmgr_call(Thread *thread, uint32_t op, uint32_t id, ptr result, - ptr value, uint64_t type) { - ORBIS_LOG_ERROR(__FUNCTION__, op, id, type); - thread->where(); + ptr value, uint64_t len) { + // ORBIS_LOG_ERROR(__FUNCTION__, op, id, len); + // thread->where(); if (op == 2) { + // get int + if (len != sizeof(uint32_t)) { + return ErrorCode::INVAL; + } + if (id == 0x2010000) { return uwrite((ptr)value, 0u); } + if (id == 0x7802c000) { + return uwrite((ptr)value, 0u); + } + if (id == 0x78020500) { + return uwrite((ptr)value, 0u); + } + if (id == 0x78020b00) { + return uwrite((ptr)value, 0u); + } + + return{}; } + + if (op == 4) { + // get string + + if (id == 0x7802e601) { + // std::strcpy((ptr)value, "Application/app.exe.self"); + return ErrorCode::INVAL; + } + + ORBIS_LOG_ERROR(__FUNCTION__, op, id, len); + thread->where(); + return {}; + } + if (op == 25) { struct nonsys_int { union {