HLE: fix sceNpDrmGetTimelimit invalid param error

This commit is contained in:
Megamouse 2020-07-06 23:52:01 +02:00
parent cb08c53f2f
commit 5fae1b3637
2 changed files with 35 additions and 4 deletions

View File

@ -572,6 +572,13 @@ error_code sceNpDrmVerifyUpgradeLicense2(vm::cptr<char> content_id)
error_code sceNpDrmExecuteGamePurchase()
{
sceNp.todo("sceNpDrmExecuteGamePurchase()");
// TODO:
// 0. Check if the game can be purchased (return GAME_ERR_NOT_XMBBUY_CONTENT otherwise)
// 1. Send game termination request
// 2. "Buy game" transaction (a.k.a. do nothing for now)
// 3. Reboot game with CELL_GAME_ATTRIBUTE_XMBBUY attribute set (cellGameBootCheck)
return CELL_OK;
}
@ -581,10 +588,10 @@ error_code sceNpDrmGetTimelimit(vm::cptr<char> path, vm::ptr<u64> time_remain)
if (!path || !time_remain)
{
return SCE_NP_ERROR_INVALID_ARGUMENT;
return SCE_NP_DRM_ERROR_INVALID_PARAM;
}
*time_remain = 0x7FFFFFFFFFFFFFFFULL;
*time_remain = SCE_NP_DRM_TIME_INFO_ENDLESS;
return CELL_OK;
}
@ -611,6 +618,7 @@ error_code sceNpDrmProcessExitSpawn2(ppu_thread& ppu, vm::cptr<u8> klicensee, vm
return error;
}
// TODO: check if SCE_NP_DRM_EXITSPAWN2_EXIT_WO_FINI logic is implemented
ppu_execute<&sys_game_process_exitspawn2>(ppu, path, argv, envp, data, data_size, prio, flags);
return CELL_OK;
}

View File

@ -244,7 +244,6 @@ enum SceNpError : u32
SCE_NP_COMMUNITY_SERVER_ERROR_UNSPECIFIED = 0x8002a4ff,
// DRM
SCE_NP_DRM_ERROR_LICENSE_NOT_FOUND = 0x80029521,
SCE_NP_DRM_ERROR_OUT_OF_MEMORY = 0x80029501,
SCE_NP_DRM_ERROR_INVALID_PARAM = 0x80029502,
SCE_NP_DRM_ERROR_SERVER_RESPONSE = 0x80029509,
@ -260,11 +259,33 @@ enum SceNpError : u32
SCE_NP_DRM_ERROR_DIFFERENT_DRM_TYPE = 0x8002951d,
SCE_NP_DRM_ERROR_SERVICE_NOT_STARTED = 0x8002951e,
SCE_NP_DRM_ERROR_BUSY = 0x80029520,
SCE_NP_DRM_ERROR_LICENSE_NOT_FOUND = 0x80029521,
SCE_NP_DRM_ERROR_IO = 0x80029525,
SCE_NP_DRM_ERROR_FORMAT = 0x80029530,
SCE_NP_DRM_ERROR_FILENAME = 0x80029533,
SCE_NP_DRM_ERROR_K_LICENSEE = 0x80029534,
// DRM Server
SCE_NP_DRM_SERVER_ERROR_SERVICE_IS_END = 0x80029700,
SCE_NP_DRM_SERVER_ERROR_SERVICE_STOP_TEMPORARILY = 0x80029701,
SCE_NP_DRM_SERVER_ERROR_SERVICE_IS_BUSY = 0x80029702,
SCE_NP_DRM_SERVER_ERROR_INVALID_USER_CREDENTIAL = 0x80029721,
SCE_NP_DRM_SERVER_ERROR_INVALID_PRODUCT_ID = 0x80029722,
SCE_NP_DRM_SERVER_ERROR_ACCOUNT_IS_CLOSED = 0x80029730,
SCE_NP_DRM_SERVER_ERROR_ACCOUNT_IS_SUSPENDED = 0x80029731,
SCE_NP_DRM_SERVER_ERROR_ACTIVATED_CONSOLE_IS_FULL = 0x80029750,
SCE_NP_DRM_SERVER_ERROR_CONSOLE_NOT_ACTIVATED = 0x80029751,
SCE_NP_DRM_SERVER_ERROR_PRIMARY_CONSOLE_CANNOT_CHANGED = 0x80029752,
SCE_NP_DRM_SERVER_ERROR_UNKNOWN = 0x80029780,
// DRM Install
SCE_NP_DRM_INSTALL_ERROR_FORMAT = 0x80029563,
SCE_NP_DRM_INSTALL_ERROR_CHECK = 0x80029564,
SCE_NP_DRM_INSTALL_ERROR_UNSUPPORTED = 0x80029566,
// Game purchase processing
GAME_ERR_NOT_XMBBUY_CONTENT = 0x80028F81,
// Auth
SCE_NP_AUTH_EINVAL = 0x8002a002,
SCE_NP_AUTH_ENOMEM = 0x8002a004,
@ -500,7 +521,9 @@ enum
enum
{
SCE_NP_DRM_OPEN_FLAG = 2
SCE_NP_DRM_OPEN_FLAG = 2,
SCE_NP_DRM_EXITSPAWN2_EXIT_WO_FINI = 0x4000000000000000ULL,
SCE_NP_DRM_TIME_INFO_ENDLESS = 0x7FFFFFFFFFFFFFFFULL
};
// NP Manager Utility statuses