![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceNpDrmCheckActDataOpt |
| struct | SceNpDrmCheckDrmResetOpt |
| struct | SceNpDrmGetRifInfoOpt |
| Optional outputs for _sceNpDrmGetRifInfo. More... | |
Functions | |
| int | _sceNpDrmGetRifName (char *rif_name, uint64_t aid) |
| Get rif name. | |
| int | _sceNpDrmGetFixedRifName (char *rif_name, uint64_t aid) |
| Get fixed rif name. | |
| int | _sceNpDrmCheckActData (int *act_type, int *version_flag, SceUInt64 *account_id, SceUInt64 opt[2]) |
| Check you have npdrm activation data, and get information from it. | |
| int | _sceNpDrmGetRifNameForInstall (char *rif_name, const SceNpDrmLicense *rif_data, int is_fixed) |
| Get rif name for install. | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceNpDrmCheckActDataOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x18, SceNpDrmCheckDrmResetOpt) | |
| VITASDK_BUILD_ASSERT_EQ (0x28, SceNpDrmGetRifInfoOpt) | |
| int | _sceNpDrmCheckDrmReset (const void *input, SceSize input_size, const SceNpDrmCheckDrmResetOpt *opt) |
| Check whether activation data must be reset. | |
| int | _sceNpDrmGetRifInfo (const SceNpDrmLicense *license, SceSize license_size, SceBool check_sign, const SceNpDrmGetRifInfoOpt *opt) |
| Get RIF information. | |
| int | _sceNpDrmPresetRifProvisionalFlag (SceNpDrmLicense *license) |
| Set the provisional flag in a RIF. | |
| int | _sceNpDrmRemoveActData (SceUInt64 *account_id) |
| Remove tm0:/npdrm/act.dat and clear the cached activation data. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
| struct SceNpDrmCheckActDataOpt |
| Data Fields | ||
|---|---|---|
| SceRtcTick * | act_start_time | Optional activation start time output. |
| SceRtcTick * | act_exp_time | Optional activation expiration time output. |
| SceUInt32 | reserved[2] | Ignored on FW 3.60. |
| struct SceNpDrmCheckDrmResetOpt |
| Data Fields | ||
|---|---|---|
| SceUInt64 | account_id | Account ID to compare with the current activation data. |
| SceBool * | reset | Optional output set to SCE_TRUE if this call reset act.dat. |
| SceSize | input_copy_size | Number of input bytes to copy; set to input_size and do not exceed 0x40. |
| SceUInt32 | reserved[2] | Ignored on FW 3.60. |
| struct SceNpDrmGetRifInfoOpt |
Optional outputs for _sceNpDrmGetRifInfo.
On FW 3.60, flags receives a derived bit field: bit 0 is set when the DRM type contains 0x2000 or the SKU flags equal 1, bit 1 mirrors the RIF provisional flag, bit 16 denotes OpenPsId binding, and bit 17 denotes game-card binding.
| Data Fields | ||
|---|---|---|
| char * | content_id | Optional 0x30-byte content ID output buffer. |
| SceUInt64 * | account_id | Optional license account ID output. |
| SceUInt32 * | license_version | Optional license version output. |
| SceUInt32 * | drm_type | Optional DRM type output. |
| SceUInt32 * | flags | Optional derived license flags output. |
| SceUInt32 * | sku_flags | Optional SKU flags output. |
| SceRtcTick * | lic_start_time | Optional license start time output. |
| SceRtcTick * | lic_exp_time | Optional license expiration time output. |
| SceUInt64 * | rif_data_0x98 | Optional raw 8-byte RIF field output. |
| SceUInt32 | reserved | Ignored on FW 3.60. |
| int _sceNpDrmGetRifName | ( | char * | rif_name, |
| uint64_t | aid | ||
| ) |
Get rif name.
| [out] | rif_name | - Required RIF name buffer (48 bytes) |
| [in] | aid | - Account ID |
| int _sceNpDrmGetFixedRifName | ( | char * | rif_name, |
| uint64_t | aid | ||
| ) |
Get fixed rif name.
| [out] | rif_name | - Required RIF name buffer (48 bytes) |
| [in] | aid | - Account ID |
| int _sceNpDrmCheckActData | ( | int * | act_type, |
| int * | version_flag, | ||
| SceUInt64 * | account_id, | ||
| SceUInt64 | opt[2] | ||
| ) |
Check you have npdrm activation data, and get information from it.
| [out] | act_type | - Optional activation type output. |
| [out] | version_flag | - Optional activation version flag output. |
| [out] | account_id | - Optional activated account ID output. |
| [in] | opt | - Required pointer to a SceNpDrmCheckActDataOpt structure, passed as a SceUInt64 pointer for backwards compatibility. Both pointer types have the same ABI. |
| int _sceNpDrmGetRifNameForInstall | ( | char * | rif_name, |
| const SceNpDrmLicense * | rif_data, | ||
| int | is_fixed | ||
| ) |
Get rif name for install.
| [out] | rif_name | - Required RIF name buffer (48 bytes) |
| [in] | rif_data | - Required RIF data (512 bytes) |
| [in] | is_fixed | - Set to 0 to derive the name from the RIF content ID, or 1 to request the fixed account-based name |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceNpDrmCheckActDataOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x18 | , |
| SceNpDrmCheckDrmResetOpt | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x28 | , |
| SceNpDrmGetRifInfoOpt | |||
| ) |
| int _sceNpDrmCheckDrmReset | ( | const void * | input, |
| SceSize | input_size, | ||
| const SceNpDrmCheckDrmResetOpt * | opt | ||
| ) |
Check whether activation data must be reset.
| [in] | input | - Required input data. If its first byte is zero, FW 3.60 returns success without checking or resetting act.dat. |
| [in] | input_size | - Size of the input data; must be in the range [2, 0x40] |
| [in] | opt | - Required structure containing the account ID, optional reset-result pointer, and input copy size. Set input_copy_size to input_size. |
| int _sceNpDrmGetRifInfo | ( | const SceNpDrmLicense * | license, |
| SceSize | license_size, | ||
| SceBool | check_sign, | ||
| const SceNpDrmGetRifInfoOpt * | opt | ||
| ) |
Get RIF information.
| [in] | license | - Required RIF data (0x200 bytes) |
| [in] | license_size | - Size of the RIF data |
| [in] | check_sign | - Set to SCE_TRUE to check the RIF signature |
| [in] | opt | - Required option structure containing optional output pointers |
| int _sceNpDrmPresetRifProvisionalFlag | ( | SceNpDrmLicense * | license | ) |
Set the provisional flag in a RIF.
The 0x200-byte RIF is modified in place. Its existing signature is validated with the provisional bit normalized.
| [in,out] | license | - RIF to update |
| int _sceNpDrmRemoveActData | ( | SceUInt64 * | account_id | ) |
Remove tm0:/npdrm/act.dat and clear the cached activation data.
| [out] | account_id | - Optional account ID from the removed act.dat |
| SceRtcTick* SceNpDrmCheckActDataOpt::act_start_time |
Optional activation start time output.
| SceRtcTick* SceNpDrmCheckActDataOpt::act_exp_time |
Optional activation expiration time output.
| SceUInt32 SceNpDrmCheckActDataOpt::reserved[2] |
Ignored on FW 3.60.
| SceUInt64 SceNpDrmCheckDrmResetOpt::account_id |
Account ID to compare with the current activation data.
| SceBool* SceNpDrmCheckDrmResetOpt::reset |
Optional output set to SCE_TRUE if this call reset act.dat.
| SceSize SceNpDrmCheckDrmResetOpt::input_copy_size |
Number of input bytes to copy; set to input_size and do not exceed 0x40.
| SceUInt32 SceNpDrmCheckDrmResetOpt::reserved[2] |
Ignored on FW 3.60.
| char* SceNpDrmGetRifInfoOpt::content_id |
Optional 0x30-byte content ID output buffer.
| SceUInt64* SceNpDrmGetRifInfoOpt::account_id |
Optional license account ID output.
| SceUInt32* SceNpDrmGetRifInfoOpt::license_version |
Optional license version output.
| SceUInt32* SceNpDrmGetRifInfoOpt::drm_type |
Optional DRM type output.
| SceUInt32* SceNpDrmGetRifInfoOpt::flags |
Optional derived license flags output.
| SceUInt32* SceNpDrmGetRifInfoOpt::sku_flags |
Optional SKU flags output.
| SceRtcTick* SceNpDrmGetRifInfoOpt::lic_start_time |
Optional license start time output.
| SceRtcTick* SceNpDrmGetRifInfoOpt::lic_exp_time |
Optional license expiration time output.
| SceUInt64* SceNpDrmGetRifInfoOpt::rif_data_0x98 |
Optional raw 8-byte RIF field output.
| SceUInt32 SceNpDrmGetRifInfoOpt::reserved |
Ignored on FW 3.60.