diff --git a/core/libs/HitLog.hpp b/core/libs/HitLog.hpp index e94e3228b..bfe0b0397 100644 --- a/core/libs/HitLog.hpp +++ b/core/libs/HitLog.hpp @@ -4,7 +4,6 @@ #include #include -// Logs the first three calls of the surrounding call site, then stays silent (keeps guest logs usable). #define APS5_HIT(tag, ...) \ do { \ static std::atomic aps5HitCount{0}; \ @@ -15,4 +14,4 @@ } \ } while (0) -#endif +#endif // CORE_LIBS_HITLOG_HPP diff --git a/core/libs/prx/libSceConvertKeycode/Export.cpp b/core/libs/prx/libSceConvertKeycode/Export.cpp new file mode 100644 index 000000000..b643fcbb6 --- /dev/null +++ b/core/libs/prx/libSceConvertKeycode/Export.cpp @@ -0,0 +1,24 @@ +#include +#include "SceTypes.hpp" +#include "HitLog.hpp" +#include "prx/libc/include/General.hpp" + +namespace { +constexpr int kErrInvalidAddress = static_cast(0x80BC0031u); +constexpr int kErrInvalidUserId = static_cast(0x80BC0010u); +} // namespace + +extern "C" { + +int APS5_VABI sceConvertKeycodeGetImeKeyboardType(int32_t userId, uint32_t* type) { + if (type == nullptr) return kErrInvalidAddress; + if (userId < 0) return kErrInvalidUserId; + *type = 0; + return 0; +} +int APS5_VABI sceConvertKeycodeGetVirtualKeycode(std::uint64_t a0, std::uint64_t a1, std::uint64_t a2, std::uint64_t a3) { + APS5_HIT("CONVERTKEYCODE", "sceConvertKeycodeGetVirtualKeycode args 0x%llx 0x%llx 0x%llx 0x%llx -> error (signature unknown)", + static_cast(a0), static_cast(a1), static_cast(a2), static_cast(a3)); + return kErrInvalidAddress; +} +} diff --git a/core/libs/prx/libScePlayGo/Export.cpp b/core/libs/prx/libScePlayGo/Export.cpp index 68524329c..f9b308cba 100644 --- a/core/libs/prx/libScePlayGo/Export.cpp +++ b/core/libs/prx/libScePlayGo/Export.cpp @@ -85,12 +85,7 @@ int APS5_VABI scePlayGoGetEta(int handle, const uint16_t* chunk_ids, uint32_t nu } int APS5_VABI scePlayGoGetInstallChunkId(int handle, uint16_t* out_chunk_id_list, uint32_t number_of_entries, uint32_t* out_entries) { - (void)handle; - (void)out_chunk_id_list; - (void)number_of_entries; - (void)out_entries; - NotImplemented_nid_no_patch(__func__); - return 0; + return scePlayGoGetChunkId(handle, out_chunk_id_list, number_of_entries, out_entries); } int APS5_VABI scePlayGoGetInstallSpeed(int handle, int32_t* out_speed) { diff --git a/core/libs/prx/libSceVoiceChat/Export.cpp b/core/libs/prx/libSceVoiceChat/Export.cpp new file mode 100644 index 000000000..4fbb609c9 --- /dev/null +++ b/core/libs/prx/libSceVoiceChat/Export.cpp @@ -0,0 +1,64 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "SceTypes.hpp" +#include "prx/libc/include/General.hpp" + +namespace { +constexpr int VOICECHAT_ERROR_SIGNED_OUT = static_cast(0x80550006u); +} // namespace + +namespace { +void logSoft(const char* func, const char* what) { + static std::mutex mtx; + static std::map hits; + std::lock_guard lk(mtx); + if (++hits[func] > 3) { + return; + } + std::fprintf(stderr, "[SOFT-VOICECHAT] %s -> %s\n", func, what); + std::fflush(stderr); +} +} // namespace + +extern "C" { + +int APS5_VABI sceVoiceChatInitialize(void* param) { (void)param; return 0; } +int APS5_VABI sceVoiceChatTerminate(void) { return 0; } +int APS5_VABI sceVoiceChatRegisterHandlers(void* a) { (void)a; return 0; } +int APS5_VABI sceVoiceChatRegisterMicEventHandler(void* a, void* b) { (void)a; (void)b; return 0; } +int APS5_VABI sceVoiceChatProcessEvent(void) { return 0; } +int APS5_VABI sceVoiceChatDeleteRequest(int requestId) { (void)requestId; return 0; } + +int APS5_VABI sceVoiceChatCreateRequest(void* a, void* b) { + (void)a; + (void)b; + logSoft(__func__, "SIGNED_OUT (offline)"); + return VOICECHAT_ERROR_SIGNED_OUT; +} + +#define VOICECHAT_OFFLINE_REQUEST(NAME) \ + int APS5_VABI NAME(int requestId, void* a, void* b) { \ + (void)requestId; \ + (void)a; \ + (void)b; \ + logSoft(#NAME, "SIGNED_OUT (offline)"); \ + return VOICECHAT_ERROR_SIGNED_OUT; \ + } + +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestRegisterSession) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestUnregisterSession) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestCreateGameSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestDeleteGameSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestJoinGameSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestLeaveGameSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestCreatePlayerSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestDeletePlayerSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestJoinPlayerSessionVoiceChatChannel) +VOICECHAT_OFFLINE_REQUEST(sceVoiceChatRequestLeavePlayerSessionVoiceChatChannel) +}