diff --git a/CMakeLists.txt b/CMakeLists.txt index cf78e92bf..04534ec26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -573,6 +573,8 @@ set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp set(NP_LIBS src/core/libraries/np/np_error.h src/core/libraries/np/np_common.cpp src/core/libraries/np/np_common.h + src/core/libraries/np/np_commerce.cpp + src/core/libraries/np/np_commerce.h src/core/libraries/np/np_manager.cpp src/core/libraries/np/np_manager.h src/core/libraries/np/np_score.cpp diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index bf6844c7d..fd8386aff 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -104,6 +104,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { SUB(Lib, Move) \ SUB(Lib, NpAuth) \ SUB(Lib, NpCommon) \ + SUB(Lib, NpCommerce) \ SUB(Lib, NpManager) \ SUB(Lib, NpScore) \ SUB(Lib, NpTrophy) \ diff --git a/src/common/logging/types.h b/src/common/logging/types.h index 035a959db..82db477ed 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -70,6 +70,7 @@ enum class Class : u8 { Lib_Http2, ///< The LibSceHttp2 implementation. Lib_SysModule, ///< The LibSceSysModule implementation Lib_NpCommon, ///< The LibSceNpCommon implementation + Lib_NpCommerce, ///< The LibSceNpCommerce implementation Lib_NpAuth, ///< The LibSceNpAuth implementation Lib_NpManager, ///< The LibSceNpManager implementation Lib_NpScore, ///< The LibSceNpScore implementation diff --git a/src/core/libraries/libs.cpp b/src/core/libraries/libs.cpp index eec9ee7c8..1f7ecb75e 100644 --- a/src/core/libraries/libs.cpp +++ b/src/core/libraries/libs.cpp @@ -32,6 +32,7 @@ #include "core/libraries/network/ssl.h" #include "core/libraries/network/ssl2.h" #include "core/libraries/np/np_auth.h" +#include "core/libraries/np/np_commerce.h" #include "core/libraries/np/np_common.h" #include "core/libraries/np/np_manager.h" #include "core/libraries/np/np_party.h" @@ -93,6 +94,7 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) { Libraries::SysModule::RegisterLib(sym); Libraries::Posix::RegisterLib(sym); Libraries::AudioIn::RegisterLib(sym); + Libraries::Np::NpCommerce::RegisterLib(sym); Libraries::Np::NpCommon::RegisterLib(sym); Libraries::Np::NpManager::RegisterLib(sym); Libraries::Np::NpScore::RegisterLib(sym); diff --git a/src/core/libraries/np/np_commerce.cpp b/src/core/libraries/np/np_commerce.cpp new file mode 100644 index 000000000..1e8440ec0 --- /dev/null +++ b/src/core/libraries/np/np_commerce.cpp @@ -0,0 +1,88 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" + +namespace Libraries::Np::NpCommerce { +s32 PS4_SYSV_ABI sceNpCommerceDialogClose() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceDialogGetResult(s32* result) { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s8 PS4_SYSV_ABI sceNpCommerceDialogGetStatus() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceDialogInitialize() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceDialogInitializeInternal() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s16 PS4_SYSV_ABI sceNpCommerceDialogOpen(s64 check) { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceDialogTerminate() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceDialogUpdateStatus() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceHidePsStoreIcon() { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceSetPsStoreIconLayout(s32 layout) { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpCommerceShowPsStoreIcon(s16 icon) { + LOG_ERROR(Lib_NpCommerce, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterLib(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("NU3ckGHMFXo", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogClose); + LIB_FUNCTION("r42bWcQbtZY", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogGetResult); + LIB_FUNCTION("CCbC+lqqvF0", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogGetStatus); + LIB_FUNCTION("0aR2aWmQal4", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogInitialize); + LIB_FUNCTION("9ZiLXAGG5rg", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogInitializeInternal); + LIB_FUNCTION("DfSCDRA3EjY", "libSceNpCommerce", 1, "libSceNpCommerce", sceNpCommerceDialogOpen); + LIB_FUNCTION("m-I92Ab50W8", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogTerminate); + LIB_FUNCTION("LR5cwFMMCVE", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceDialogUpdateStatus); + LIB_FUNCTION("dsqCVsNM0Zg", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceHidePsStoreIcon); + LIB_FUNCTION("uKTDW8hk-ts", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceSetPsStoreIconLayout); + LIB_FUNCTION("DHmwsa6S8Tc", "libSceNpCommerce", 1, "libSceNpCommerce", + sceNpCommerceShowPsStoreIcon); +}; + +} // namespace Libraries::Np::NpCommerce diff --git a/src/core/libraries/np/np_commerce.h b/src/core/libraries/np/np_commerce.h new file mode 100644 index 000000000..003e85a58 --- /dev/null +++ b/src/core/libraries/np/np_commerce.h @@ -0,0 +1,16 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Np::NpCommerce { + +void RegisterLib(Core::Loader::SymbolsResolver* sym); + +} // namespace Libraries::Np::NpCommerce \ No newline at end of file