Skip to content

Commit

Permalink
ps4: proto fw tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Nov 25, 2024
1 parent 28ceb74 commit 6257c0f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions orbis-kernel/include/orbis/module/Module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct Process;

enum class DynType : std::uint8_t {
None,
FreeBsd,
Ps4,
Ps5,
};
Expand Down
2 changes: 1 addition & 1 deletion orbis-kernel/src/sys/sys_sce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ orbis::SysResult orbis::sys_dl_get_info(Thread *thread /* TODO */) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_dl_notify_event(Thread *thread /* TODO */) {
return ErrorCode::NOSYS;
return {};
}
orbis::SysResult orbis::sys_evf_create(Thread *thread, ptr<const char[32]> name,
sint attrs, uint64_t initPattern) {
Expand Down
5 changes: 5 additions & 0 deletions orbis-kernel/src/sys/sys_sysctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ SysResult kern_sysctl(Thread *thread, ptr<sint> name, uint namelen,
// 4.17.0.0.3.0
if (name[0] == net && name[1] == 17 && name[2] == 0 && name[3] == 0 &&
name[4] == 3 && name[5] == 0) {
if (g_context.fwSdkVersion == 0) {
// proto fw
return {};
}

return ErrorCode::OPNOTSUPP;
}
}
Expand Down
5 changes: 4 additions & 1 deletion rpcsx/linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,10 @@ Ref<orbis::Module> rx::linker::loadModule(std::span<std::byte> image,
std::fprintf(stderr, "unexpected import type\n");
std::abort();
}
if (hasPs4Dyn) {

if (!hasPs4Dyn && !hasPs5Dyn && interpPhdrIndex >= 0) {
result->dynType = orbis::DynType::FreeBsd;
} else if (hasPs4Dyn) {
result->dynType = orbis::DynType::Ps4;
} else if (hasPs5Dyn) {
result->dynType = orbis::DynType::Ps5;
Expand Down

0 comments on commit 6257c0f

Please sign in to comment.