From 8a8edb1b6231f26b03df56f834218174efebcd4d Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 30 May 2020 20:00:42 +0200 Subject: [PATCH] stub sceNpCommerce2 --- rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp | 258 +++++++++++++--------- rpcs3/Emu/Cell/Modules/sceNpCommerce2.h | 10 +- 2 files changed, 166 insertions(+), 102 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp index f070047182..721b23f029 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.cpp @@ -2,318 +2,376 @@ #include "Emu/Cell/PPUModule.h" #include "sceNpCommerce2.h" +#include "sceNp.h" LOG_CHANNEL(sceNpCommerce2); -s32 sceNpCommerce2ExecuteStoreBrowse() +template <> +void fmt_class_string::format(std::string& out, u64 arg) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + format_enum(out, arg, [](SceNpCommerce2Error value) + { + switch (value) + { + STR_CASE(SCE_NP_COMMERCE2_ERROR_NOT_INITIALIZED); + STR_CASE(SCE_NP_COMMERCE2_ERROR_ALREADY_INITIALIZED); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_ARGUMENT); + STR_CASE(SCE_NP_COMMERCE2_ERROR_UNSUPPORTED_VERSION); + STR_CASE(SCE_NP_COMMERCE2_ERROR_CTX_MAX); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_INDEX); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_SKUID); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_SKU_NUM); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_MEMORY_CONTAINER); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INSUFFICIENT_MEMORY_CONTAINER); + STR_CASE(SCE_NP_COMMERCE2_ERROR_OUT_OF_MEMORY); + STR_CASE(SCE_NP_COMMERCE2_ERROR_CTX_NOT_FOUND); + STR_CASE(SCE_NP_COMMERCE2_ERROR_CTXID_NOT_AVAILABLE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_REQ_NOT_FOUND); + STR_CASE(SCE_NP_COMMERCE2_ERROR_REQID_NOT_AVAILABLE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_ABORTED); + STR_CASE(SCE_NP_COMMERCE2_ERROR_RESPONSE_BUF_TOO_SMALL); + STR_CASE(SCE_NP_COMMERCE2_ERROR_COULD_NOT_RECV_WHOLE_RESPONSE_DATA); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_RESULT_DATA); + STR_CASE(SCE_NP_COMMERCE2_ERROR_UNKNOWN); + STR_CASE(SCE_NP_COMMERCE2_ERROR_SERVER_MAINTENANCE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_SERVER_UNKNOWN); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INSUFFICIENT_BUF_SIZE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_REQ_MAX); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_TARGET_TYPE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_TARGET_ID); + STR_CASE(SCE_NP_COMMERCE2_ERROR_INVALID_SIZE); + STR_CASE(SCE_NP_COMMERCE2_ERROR_DATA_NOT_FOUND); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_BAD_REQUEST); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_UNKNOWN_ERROR); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_SESSION_EXPIRED); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_ACCESS_PERMISSION_DENIED); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_NO_SUCH_CATEGORY); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_NO_SUCH_PRODUCT); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_NOT_ELIGIBILITY); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_INVALID_SKU); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_ACCOUNT_SUSPENDED1); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_ACCOUNT_SUSPENDED2); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_OVER_SPENDING_LIMIT); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_INVALID_VOUCHER); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_VOUCHER_ALREADY_CONSUMED); + STR_CASE(SCE_NP_COMMERCE2_SERVER_ERROR_EXCEEDS_AGE_LIMIT_IN_BROWSING); + STR_CASE(SCE_NP_COMMERCE2_SYSTEM_UTIL_ERROR_INVALID_VOUCHER); + STR_CASE(SCE_NP_COMMERCE_ERROR_REQ_BUSY); + } + + return unknown; + }); +} + +error_code sceNpCommerce2ExecuteStoreBrowse(s32 targetType, vm::cptr targetId, s32 userdata) +{ + sceNpCommerce2.todo("sceNpCommerce2ExecuteStoreBrowse(targetType=%d, targetId=%s, userdata=%d)", targetType, targetId, userdata); return CELL_OK; } -s32 sceNpCommerce2GetStoreBrowseUserdata() +error_code sceNpCommerce2GetStoreBrowseUserdata(vm::ptr userdata) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetStoreBrowseUserdata(userdata=*0x%x)", userdata); return CELL_OK; } -s32 sceNpCommerce2Init() +error_code sceNpCommerce2Init() { sceNpCommerce2.warning("sceNpCommerce2Init()"); return CELL_OK; } -s32 sceNpCommerce2Term() +error_code sceNpCommerce2Term() { sceNpCommerce2.warning("sceNpCommerce2Term()"); return CELL_OK; } -s32 sceNpCommerce2CreateCtx() +error_code sceNpCommerce2CreateCtx(u32 version, vm::cptr npId, vm::ptr handler, vm::ptr arg, vm::ptr ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2ExecuteStoreBrowse(version=%d, npId=*0x%x, handler=*0x%x, arg=*0x%x, ctx_id=*0x%x)", version, npId, handler, arg, ctx_id); return CELL_OK; } -s32 sceNpCommerce2DestroyCtx() +error_code sceNpCommerce2DestroyCtx(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DestroyCtx(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2EmptyStoreCheckStart() +error_code sceNpCommerce2EmptyStoreCheckStart(u32 ctx_id, s32 store_check_type, vm::cptr target_id) { - sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckStart()"); + sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckStart(ctx_id=%d, store_check_type=%d, target_id=%s)", ctx_id, store_check_type, target_id); return CELL_OK; } -s32 sceNpCommerce2EmptyStoreCheckAbort() +error_code sceNpCommerce2EmptyStoreCheckAbort(u32 ctx_id) { - sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckAbort()"); + sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckAbort(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2EmptyStoreCheckFinish() +error_code sceNpCommerce2EmptyStoreCheckFinish(u32 ctx_id, vm::ptr is_empty) { - sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckFinish()"); + sceNpCommerce2.todo("sceNpCommerce2EmptyStoreCheckFinish(ctx_id=%d, is_empty=*0x%x)", ctx_id, is_empty); return CELL_OK; } -s32 sceNpCommerce2CreateSessionStart() +error_code sceNpCommerce2CreateSessionStart(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2CreateSessionStart(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2CreateSessionAbort() +error_code sceNpCommerce2CreateSessionAbort(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2CreateSessionAbort(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2CreateSessionFinish() +error_code sceNpCommerce2CreateSessionFinish(u32 ctx_id, vm::ptr sessionInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2CreateSessionFinish(ctx_id=%d, sessionInfo=*0x%x)", ctx_id, sessionInfo); return CELL_OK; } -s32 sceNpCommerce2GetCategoryContentsCreateReq() +error_code sceNpCommerce2GetCategoryContentsCreateReq(u32 ctx_id, vm::ptr req_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetCategoryContentsCreateReq(ctx_id=%d, req_id=*0x%x)", ctx_id, req_id); return CELL_OK; } -s32 sceNpCommerce2GetCategoryContentsStart() +error_code sceNpCommerce2GetCategoryContentsStart(u32 req_id, vm::cptr categoryId, u32 startPosition, u32 maxCountOfResults) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetCategoryContentsStart(req_id=%d, categoryId=%s, startPosition=%d, maxCountOfResults=%d)", req_id, categoryId, startPosition, maxCountOfResults); return CELL_OK; } -s32 sceNpCommerce2GetCategoryContentsGetResult() +error_code sceNpCommerce2GetCategoryContentsGetResult(u32 req_id, vm::ptr buf, u64 buf_size, vm::ptr fill_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetCategoryContentsGetResult(req_id=%d, buf=*0x%x, buf_size=%d, fill_size=*0x%x)", req_id, buf, buf_size, fill_size); return CELL_OK; } -s32 sceNpCommerce2InitGetCategoryContentsResult() +error_code sceNpCommerce2InitGetCategoryContentsResult(vm::ptr result, vm::ptr data, u64 data_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2InitGetCategoryContentsResult(result=*0x%x, data=*0x%x, data_size=%d)", result, data, data_size); return CELL_OK; } -s32 sceNpCommerce2GetCategoryInfo() +error_code sceNpCommerce2GetCategoryInfo(vm::cptr result, vm::ptr categoryInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetCategoryInfo(result=*0x%x, categoryInfo=*0x%x)", result, categoryInfo); return CELL_OK; } -s32 sceNpCommerce2GetContentInfo() +error_code sceNpCommerce2GetContentInfo(vm::cptr result, u32 index, vm::ptr contentInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetContentInfo(result=*0x%x, index=%d, contentInfo=*0x%x)", result, index, contentInfo); return CELL_OK; } -s32 sceNpCommerce2GetCategoryInfoFromContentInfo() +error_code sceNpCommerce2GetCategoryInfoFromContentInfo(vm::cptr contentInfo, vm::ptr categoryInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetCategoryInfoFromContentInfo(contentInfo=*0x%x, categoryInfo=*0x%x)", contentInfo, categoryInfo); return CELL_OK; } -s32 sceNpCommerce2GetGameProductInfoFromContentInfo() +error_code sceNpCommerce2GetGameProductInfoFromContentInfo(vm::cptr contentInfo, vm::ptr gameProductInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetGameProductInfoFromContentInfo(contentInfo=*0x%x, gameProductInfo=*0x%x)", contentInfo, gameProductInfo); return CELL_OK; } -s32 sceNpCommerce2DestroyGetCategoryContentsResult() +error_code sceNpCommerce2DestroyGetCategoryContentsResult(vm::ptr result) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DestroyGetCategoryContentsResult(result=*0x%x)", result); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoCreateReq() +error_code sceNpCommerce2GetProductInfoCreateReq(u32 ctx_id, vm::ptr req_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoCreateReq(ctx_id=%d, req_id=*0x%x)", ctx_id, req_id); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoStart() +error_code sceNpCommerce2GetProductInfoStart(u32 req_id, vm::cptr categoryId, vm::cptr productId) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoStart(req_id=%d, categoryId=%s, productId=%s)", req_id, categoryId, productId); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoGetResult() +error_code sceNpCommerce2GetProductInfoGetResult(u32 req_id, vm::ptr buf, u64 buf_size, vm::ptr fill_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoGetResult(req_id=%d, buf=*0x%x, buf_size=%d, fill_size=*0x%x)", req_id, buf, buf_size, fill_size); return CELL_OK; } -s32 sceNpCommerce2InitGetProductInfoResult() +error_code sceNpCommerce2InitGetProductInfoResult(vm::ptr result, vm::ptr data, u64 data_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2InitGetProductInfoResult(result=*0x%x, data=*0x%x, data_size=%d)", result, data, data_size); return CELL_OK; } -s32 sceNpCommerce2GetGameProductInfo() +error_code sceNpCommerce2GetGameProductInfo(vm::cptr result, vm::ptr gameProductInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetGameProductInfo(result=*0x%x, gameProductInfo=*0x%x)", result, gameProductInfo); return CELL_OK; } -s32 sceNpCommerce2DestroyGetProductInfoResult() +error_code sceNpCommerce2DestroyGetProductInfoResult(vm::ptr result) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DestroyGetProductInfoResult(result=*0x%x)", result); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoListCreateReq() +error_code sceNpCommerce2GetProductInfoListCreateReq(u32 ctx_id, vm::ptr req_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoListCreateReq(ctx_id=%d, req_id=*0x%x)", ctx_id, req_id); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoListStart() +error_code sceNpCommerce2GetProductInfoListStart(u32 req_id, vm::cptr productIds, u32 productNum) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoListStart(req_id=%d, productIds=*0x%x, productNum=%d)", req_id, productIds, productNum); return CELL_OK; } -s32 sceNpCommerce2GetProductInfoListGetResult() +error_code sceNpCommerce2GetProductInfoListGetResult(u32 req_id, vm::ptr buf, u64 buf_size, vm::ptr fill_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetProductInfoListGetResult(req_id=%d, buf=*0x%x, buf_size=%d, fill_size=*0x%x)", req_id, buf, buf_size, fill_size); return CELL_OK; } -s32 sceNpCommerce2InitGetProductInfoListResult() +error_code sceNpCommerce2InitGetProductInfoListResult(vm::ptr result, vm::ptr data, u64 data_size) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2InitGetProductInfoListResult(result=*0x%x, data=*0x%x, data_size=%d)", result, data, data_size); return CELL_OK; } -s32 sceNpCommerce2GetGameProductInfoFromGetProductInfoListResult() +error_code sceNpCommerce2GetGameProductInfoFromGetProductInfoListResult(vm::cptr result, u32 index, vm::ptr gameProductInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetGameProductInfoFromGetProductInfoListResult(result=*0x%x, index=%d, data=*0x%x)", result, index, gameProductInfo); return CELL_OK; } -s32 sceNpCommerce2DestroyGetProductInfoListResult() +error_code sceNpCommerce2DestroyGetProductInfoListResult(vm::ptr result) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DestroyGetProductInfoListResult(result=*0x%x)", result); return CELL_OK; } -s32 sceNpCommerce2GetContentRatingInfoFromGameProductInfo() +error_code sceNpCommerce2GetContentRatingInfoFromGameProductInfo(vm::cptr gameProductInfo, vm::ptr contentRatingInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetContentRatingInfoFromGameProductInfo(gameProductInfo=*0x%x, contentRatingInfo=*0x%x)", gameProductInfo, contentRatingInfo); return CELL_OK; } -s32 sceNpCommerce2GetContentRatingInfoFromCategoryInfo() +error_code sceNpCommerce2GetContentRatingInfoFromCategoryInfo(vm::cptr categoryInfo, vm::ptr contentRatingInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetContentRatingInfoFromCategoryInfo(categoryInfo=*0x%x, contentRatingInfo=*0x%x)", categoryInfo, contentRatingInfo); return CELL_OK; } -s32 sceNpCommerce2GetContentRatingDescriptor() +error_code sceNpCommerce2GetContentRatingDescriptor(vm::cptr contentRatingInfo, u32 index, vm::ptr contentRatingDescriptor) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetContentRatingDescriptor(contentRatingInfo=*0x%x, index=%d, contentRatingDescriptor=*0x%x)", contentRatingInfo, index, contentRatingDescriptor); return CELL_OK; } -s32 sceNpCommerce2GetGameSkuInfoFromGameProductInfo() +error_code sceNpCommerce2GetGameSkuInfoFromGameProductInfo(vm::cptr gameProductInfo, u32 index, vm::ptr gameSkuInfo) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetGameSkuInfoFromGameProductInfo(gameProductInfo=*0x%x, index=%d, gameSkuInfo=*0x%x)", gameProductInfo, index, gameSkuInfo); return CELL_OK; } -s32 sceNpCommerce2GetPrice() +error_code sceNpCommerce2GetPrice(u32 ctx_id, vm::ptr buf, u64 buflen, u32 price) // TODO: correct size types? { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetPrice(ctx_id=%d, buf=*0x%x, buflen=%d, price=%d)", ctx_id, buf, buflen, price); return CELL_OK; } -s32 sceNpCommerce2DoCheckoutStartAsync() +error_code sceNpCommerce2DoCheckoutStartAsync(u32 ctx_id, vm::cptr sku_ids, u32 sku_num, u32 container) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoCheckoutStartAsync(ctx_id=%d, sku_ids=*0x%x, sku_num=%d, container=%d)", ctx_id, sku_ids, sku_num, container); return CELL_OK; } -s32 sceNpCommerce2DoCheckoutFinishAsync() +error_code sceNpCommerce2DoCheckoutFinishAsync(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoCheckoutFinishAsync(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2DoProductBrowseStartAsync() +error_code sceNpCommerce2DoProductBrowseStartAsync(u32 ctx_id, vm::cptr product_id, u32 container, vm::cptr param) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoProductBrowseStartAsync(ctx_id=%d, product_id=%s, container=%d, param=*0x%x)", ctx_id, product_id, container, param); return CELL_OK; } -s32 sceNpCommerce2DoProductBrowseFinishAsync() +error_code sceNpCommerce2DoProductBrowseFinishAsync(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoProductBrowseFinishAsync(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2DoDlListStartAsync() +error_code sceNpCommerce2DoDlListStartAsync(u32 ctx_id, vm::cptr service_id, vm::cptr sku_ids, u32 sku_num, u32 container) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoDlListStartAsync(ctx_id=%d, service_id=%s, sku_ids=*0x%x, sku_num=%d, container=%d)", ctx_id, service_id, sku_ids, sku_num, container); return CELL_OK; } -s32 sceNpCommerce2DoDlListFinishAsync() +error_code sceNpCommerce2DoDlListFinishAsync(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoDlListFinishAsync(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2DoProductCodeStartAsync() +error_code sceNpCommerce2DoProductCodeStartAsync(u32 ctx_id, u32 container, vm::cptr param) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoProductCodeStartAsync(ctx_id=%d, container=%d, param=*0x%x)", ctx_id, container, param); return CELL_OK; } -s32 sceNpCommerce2DoProductCodeFinishAsync() +error_code sceNpCommerce2DoProductCodeFinishAsync(u32 ctx_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DoProductCodeFinishAsync(ctx_id=%d)", ctx_id); return CELL_OK; } -s32 sceNpCommerce2GetBGDLAvailability() +error_code sceNpCommerce2GetBGDLAvailability(vm::ptr bgdlAvailability) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2GetBGDLAvailability(bgdlAvailability=*0x%x)", bgdlAvailability); return CELL_OK; } -s32 sceNpCommerce2SetBGDLAvailability() +error_code sceNpCommerce2SetBGDLAvailability(b8 bgdlAvailability) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2SetBGDLAvailability(bgdlAvailability=%d)", bgdlAvailability); return CELL_OK; } -s32 sceNpCommerce2AbortReq() +error_code sceNpCommerce2AbortReq(u32 req_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2AbortReq(req_id=%d)", req_id); return CELL_OK; } -s32 sceNpCommerce2DestroyReq() +error_code sceNpCommerce2DestroyReq(u32 req_id) { - UNIMPLEMENTED_FUNC(sceNpCommerce2); + sceNpCommerce2.todo("sceNpCommerce2DestroyReq(req_id=%d)", req_id); return CELL_OK; } -s32 sceNpCommerce2DoServiceListStartAsync() +error_code sceNpCommerce2DoServiceListStartAsync() { sceNpCommerce2.todo("sceNpCommerce2DoServiceListStartAsync()"); return CELL_OK; } -s32 sceNpCommerce2DoServiceListFinishAsync() +error_code sceNpCommerce2DoServiceListFinishAsync() { sceNpCommerce2.todo("sceNpCommerce2DoServiceListFinishAsync()"); return CELL_OK; diff --git a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.h b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.h index 85468754c7..c35fa15798 100644 --- a/rpcs3/Emu/Cell/Modules/sceNpCommerce2.h +++ b/rpcs3/Emu/Cell/Modules/sceNpCommerce2.h @@ -1,11 +1,11 @@ -#pragma once +#pragma once #include "cellRtc.h" #include "Utilities/BEType.h" // Return codes -enum +enum SceNpCommerce2Error { SCE_NP_COMMERCE2_ERROR_NOT_INITIALIZED = 0x80023001, SCE_NP_COMMERCE2_ERROR_ALREADY_INITIALIZED = 0x80023002, @@ -276,4 +276,10 @@ struct SceNpCommerce2ProductCodeParam s8 padding3[3]; }; +struct SceNpCommerce2GetCategoryContentsResult +{ + SceNpCommerce2CommonData commonData; + SceNpCommerce2Range rangeOfContents; +}; + using SceNpCommerce2Handler = void(u32 ctx_id, u32 subject_id, s32 event, s32 error_code, vm::ptr arg);