vitasdk
Documentation of the vitasdk

Exports for User. More...

Data Structures

struct  SceVshNpDrmEbootSigOpt
 FW 3.60 copies the entire option block but ignores its contents. More...
 
struct  SceVshAppMgrCheckPfsMountedOpt
 
struct  SceVshAppMgrBgdlQueueStatusEntry
 
struct  SceVshAppMgrBgdlQueueStatus
 
struct  SceVshSblAuthMgrVerifySpsfoOpt
 
struct  SceVshNpDrmGetLegacyDocKeyOpt
 
struct  SceVshSblSsCreatePassPhraseOpt
 

Enumerations

enum  SceVshMountId {
  SCE_VSH_MOUNT_SD0 = 0x00100 , SCE_VSH_MOUNT_OS0 = 0x00200 , SCE_VSH_MOUNT_VS0 = 0x00300 , SCE_VSH_MOUNT_VD0 = 0x00400 ,
  SCE_VSH_MOUNT_TM0 = 0x00500 , SCE_VSH_MOUNT_UR0 = 0x00600 , SCE_VSH_MOUNT_UD0 = 0x00700 , SCE_VSH_MOUNT_UX0 = 0x00800 ,
  SCE_VSH_MOUNT_GRO0 = 0x00900 , SCE_VSH_MOUNT_GRW0 = 0x00A00 , SCE_VSH_MOUNT_SA0 = 0x00B00 , SCE_VSH_MOUNT_PD0 = 0x00C00 ,
  SCE_VSH_MOUNT_IMC0 = 0x00D00 , SCE_VSH_MOUNT_XMC0 = 0x00E00 , SCE_VSH_MOUNT_UMA0 = 0x00F00 , SCE_VSH_MOUNT_LMA0 = 0x10000 ,
  SCE_VSH_MOUNT_LMB0 = 0x20000 , SCE_VSH_MOUNT_MFA0 = 0x50000 , SCE_VSH_MOUNT_MFB0 = 0x60000
}
 

Functions

int _vshSblGetSystemSwVersion (SceKernelFwInfo *data)
 Gets real system firmware information.
 
int _vshSblAimgrGetSMI (SceUInt32 *info)
 Get service/manufacturing information (factory/minimum firmware).
 
int _vshSblAimgrGetConsoleId (char console_id[0x10])
 Get the console identifier.
 
SceUID _vshKernelSearchModuleByName (const char *module_name, const void *buffer)
 Check if a module is loaded.
 
int _vshIoMount (SceVshMountId id, const char *path, int permission, void *buf)
 Mount a partition.
 
int vshIoUmount (SceVshMountId id, int force, int unk2, int unk3)
 Unmount a partition.
 
int vshIdStorageIsDirty (void)
 
int vshIdStorageIsFormatted (void)
 
int vshIdStorageIsReadOnly (void)
 
int vshIdStorageReadLeaf (SceSize leafnum, void *buf)
 
int vshIdStorageWriteLeaf (SceSize leafnum, const void *buf)
 
int _vshNpDrmEbootSigVerify (const char *eboot_pbp_path, const char *eboot_signature, char **eboot_signature_header)
 Verify a eboot.pbp signature "__sce_ebootpbp".
 
int _vshNpDrmPspEbootVerify (const char *eboot_pbp_path, const char *eboot_signature, char **eboot_signature_header)
 Verify an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" from firmware <2.00.
 
 VITASDK_BUILD_ASSERT_EQ (8, SceVshNpDrmEbootSigOpt)
 
int _vshNpDrmPspEbootSigGen (const char *eboot_pbp_path, const void *eboot_sha256, void *eboot_signature)
 Generate an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" for a PSP game - this is unused in firmware >2.00.
 
int _vshNpDrmEbootSigConvert (const char *eboot_pbp_path, const void *old_eboot_signature, void *new_eboot_signature)
 Convert an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" to a 0x200 byte one used in firmwares >2.00.
 
int _vshNpDrmEbootSigGenPsp (const char *eboot_pbp_path, const void *eboot_sha256, void *eboot_signature, int *sw_version)
 Generate eboot.pbp signature "__sce_ebootpbp" for a PSP game.
 
int _vshNpDrmEbootSigGenPs1 (const char *eboot_pbp_path, const void *eboot_sha256, void *eboot_signature, int *sw_version)
 Generate eboot.pbp signature "__sce_ebootpbp" for a single-disc PS1 game.
 
int _vshNpDrmEbootSigGenMultiDisc (const char *eboot_pbp_path, const void *sce_discinfo, void *eboot_signature, int *sw_version)
 Generate eboot.pbp signature "__sce_discinfo" for a multi-disc PS1 game.
 
int vshSblAimgrIsCEX (void)
 
int vshSblAimgrIsDEX (void)
 
int vshSblAimgrIsVITA (void)
 
int vshSblAimgrIsGenuineVITA (void)
 
int vshSblAimgrIsDolce (void)
 
int vshSblAimgrIsGenuineDolce (void)
 
int vshSblAimgrIsTest (void)
 
int vshSblAimgrIsTool (void)
 
int vshSblSsIsDevelopmentMode (void)
 
int vshSysconHasWWAN (void)
 
int vshSysconIsDownLoaderMode (void)
 
int vshSysconIsIduMode (void)
 
int vshSysconIsMCEmuCapable (void)
 
int vshSysconIsShowMode (void)
 
int vshSysconIduModeSet (void)
 
int vshSysconIduModeClear (void)
 
int vshSysconShowModeSet (void)
 
int vshSysconShowModeClear (void)
 
int vshMemoryCardGetCardInsertState (void)
 
int vshRemovableMemoryGetCardInsertState (void)
 
int vshMsifGetMsInfo (SceMsInfo *info)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceVshAppMgrCheckPfsMountedOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x38, SceVshAppMgrBgdlQueueStatusEntry)
 
 VITASDK_BUILD_ASSERT_EQ (0x700, SceVshAppMgrBgdlQueueStatus)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceVshSblAuthMgrVerifySpsfoOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceVshNpDrmGetLegacyDocKeyOpt)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceVshSblSsCreatePassPhraseOpt)
 
int _vshAppMgrAcInstGetAcdirParam (const char title_id[0x10], const char addcont_id[0x14], SceAppMgrAcInstResult *result)
 Get add-on-content installation data.
 
int _vshAppMgrBgdlSetQueueStatus (const SceVshAppMgrBgdlQueueStatus *queue_status)
 Update the background-download queue status table.
 
int _vshAppMgrCheckPfsMounted (const char *path, const SceVshAppMgrCheckPfsMountedOpt *opt)
 Check whether a PFS path is mounted.
 
int _vshAppMgrCloudDataCreateHeader (const SceUInt8 setup_key[0x18], SceSize data_size, const SceUInt8 digest[0x20], SceUInt8 header[0x170])
 Create and sign a cloud-data header.
 
int _vshIoChstat (const char *file, const SceIoStat *stat, unsigned int bits, const sceIoChstatOpt *opt)
 Change selected attributes of a path.
 
int _vshIoDread (SceUID fd, SceIoDirent *dir)
 Read the next directory entry.
 
int _vshIoGetstat (const char *file, SceIoStat *stat, const sceIoGetstatOpt *opt)
 Get path metadata.
 
int _vshKernelGetCompiledSdkVersionByPid (ScePID pid, SceUInt32 *sdk_version)
 Get the compiled SDK version of a process.
 
int _vshNpDrmGetLegacyDocKey (const SceUInt8 rif_data[0x200], const void *document_data, SceSize document_data_size, const SceVshNpDrmGetLegacyDocKeyOpt *opt)
 Derive the 16-byte key for a legacy document.
 
int _vshSblAimgrGetPscode (ScePsCode *pscode)
 Get the primary platform security code.
 
int _vshSblAimgrGetPscode2 (ScePsCode *pscode)
 Get the secondary platform security code.
 
int _vshSblAimgrGetVisibleId (SceVisibleId *visible_id)
 Get the 0x20-byte visible ID when the system is in product mode.
 
int _vshSblAuthMgrVerifySpsfo (const char *path, void *verified_data, SceSize verified_data_capacity, const SceVshSblAuthMgrVerifySpsfoOpt *opt)
 Verify a signed PARAM.SFO file and copy its embedded payload.
 
int _vshSblSsCreatePassPhrase (const SceSblSsCreatePassPhraseParam *args, void *pass_phrase, const SceVshSblSsCreatePassPhraseOpt *opt)
 Create a 0x200-byte account pass phrase.
 
int _vshSysconGetManufacturesStatus (SceUInt32 *manufacturing_status)
 Get the manufacturing-status value.
 
SceUID vshIoCreateMountEvent (SceVshMountId mount_id, SceUInt32 event_bits)
 Create a mount event.
 
int vshKernelSendSysEvent (SceUInt32 event_id)
 Notify the kernel that SceShell is ready.
 
int vshSblUtMgrHasComTestFlag (void)
 Check whether the communication-test flag is set.
 
int vshSblUtMgrHasNpTestFlag (void)
 Check whether the NP-test flag is set.
 
int vshSblUtMgrHasStoreFlag (void)
 Check whether the store flag is set.
 

Variables

SceUInt32 SceVshNpDrmEbootSigOpt::reserved [2]
 
SceUInt32 SceVshAppMgrCheckPfsMountedOpt::reserved [2]
 Ignored on FW 3.60.
 
SceUInt32 SceVshAppMgrBgdlQueueStatusEntry::download_status
 Set from SceShell's 4-bit state: 7 maps to 2, 8 to 1, 9 to 3, 0xC to 4, and every other value to 0.
 
SceBool SceVshAppMgrBgdlQueueStatusEntry::unknown_boolean
 Set for SceShell state 9, or when an unidentified source word is zero, flags 0x300 are clear, and flag 0x40000 is set. AppMgr preserves but does not test this field; its purpose is unknown.
 
char SceVshAppMgrBgdlQueueStatusEntry::identifier [0x30]
 NUL-terminated BGDL identifier; AppMgr treats bytes 7 through 15 as a title ID.
 
SceVshAppMgrBgdlQueueStatusEntry SceVshAppMgrBgdlQueueStatus::entries [32]
 
SceUInt32 SceVshSblAuthMgrVerifySpsfoOpt::reserved [2]
 Ignored on FW 3.60.
 
SceUInt8 * SceVshNpDrmGetLegacyDocKeyOpt::document_key
 Destination for the 16-byte document key.
 
SceSize SceVshNpDrmGetLegacyDocKeyOpt::document_data_size
 Number of bytes to copy from the document data, at most 0x200.
 
SceUInt32 SceVshNpDrmGetLegacyDocKeyOpt::reserved [2]
 Ignored on FW 3.60.
 
SceSize SceVshSblSsCreatePassPhraseOpt::pass_phrase_size
 Number of pass-phrase bytes to copy, at most 0x200.
 
SceUInt32 SceVshSblSsCreatePassPhraseOpt::reserved
 Ignored on FW 3.60.
 

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceVshBridge_stub




Data Structure Documentation

◆ SceVshNpDrmEbootSigOpt

struct SceVshNpDrmEbootSigOpt

FW 3.60 copies the entire option block but ignores its contents.

Data Fields
SceUInt32 reserved[2]

◆ SceVshAppMgrCheckPfsMountedOpt

struct SceVshAppMgrCheckPfsMountedOpt
Data Fields
SceUInt32 reserved[2] Ignored on FW 3.60.

◆ SceVshAppMgrBgdlQueueStatusEntry

struct SceVshAppMgrBgdlQueueStatusEntry
Data Fields
SceUInt32 download_status Set from SceShell's 4-bit state: 7 maps to 2, 8 to 1, 9 to 3, 0xC to 4, and every other value to 0.
SceBool unknown_boolean Set for SceShell state 9, or when an unidentified source word is zero, flags 0x300 are clear, and flag 0x40000 is set. AppMgr preserves but does not test this field; its purpose is unknown.
char identifier[0x30] NUL-terminated BGDL identifier; AppMgr treats bytes 7 through 15 as a title ID.

◆ SceVshAppMgrBgdlQueueStatus

struct SceVshAppMgrBgdlQueueStatus
Data Fields
SceVshAppMgrBgdlQueueStatusEntry entries[32]

◆ SceVshSblAuthMgrVerifySpsfoOpt

struct SceVshSblAuthMgrVerifySpsfoOpt
Data Fields
SceUInt32 reserved[2] Ignored on FW 3.60.

◆ SceVshNpDrmGetLegacyDocKeyOpt

struct SceVshNpDrmGetLegacyDocKeyOpt
Data Fields
SceUInt8 * document_key Destination for the 16-byte document key.
SceSize document_data_size Number of bytes to copy from the document data, at most 0x200.
SceUInt32 reserved[2] Ignored on FW 3.60.

◆ SceVshSblSsCreatePassPhraseOpt

struct SceVshSblSsCreatePassPhraseOpt
Data Fields
SceSize pass_phrase_size Number of pass-phrase bytes to copy, at most 0x200.
SceUInt32 reserved Ignored on FW 3.60.

Enumeration Type Documentation

◆ SceVshMountId

Enumerator
SCE_VSH_MOUNT_SD0 
SCE_VSH_MOUNT_OS0 
SCE_VSH_MOUNT_VS0 
SCE_VSH_MOUNT_VD0 
SCE_VSH_MOUNT_TM0 
SCE_VSH_MOUNT_UR0 
SCE_VSH_MOUNT_UD0 
SCE_VSH_MOUNT_UX0 
SCE_VSH_MOUNT_GRO0 
SCE_VSH_MOUNT_GRW0 
SCE_VSH_MOUNT_SA0 
SCE_VSH_MOUNT_PD0 
SCE_VSH_MOUNT_IMC0 
SCE_VSH_MOUNT_XMC0 
SCE_VSH_MOUNT_UMA0 
SCE_VSH_MOUNT_LMA0 
SCE_VSH_MOUNT_LMB0 
SCE_VSH_MOUNT_MFA0 
SCE_VSH_MOUNT_MFB0 

Function Documentation

◆ _vshSblGetSystemSwVersion()

int _vshSblGetSystemSwVersion ( SceKernelFwInfo *  data)

Gets real system firmware information.

Parameters
[out]data- firmware information.

◆ _vshSblAimgrGetSMI()

int _vshSblAimgrGetSMI ( SceUInt32 *  info)

Get service/manufacturing information (factory/minimum firmware).

Parameters
[out]info- The info output pointer
Returns
0 on success, < 0 on error.

◆ _vshSblAimgrGetConsoleId()

int _vshSblAimgrGetConsoleId ( char  console_id[0x10])

Get the console identifier.

Parameters
[out]console_id- Receives 16 bytes with the layout of SceConsoleId.
Note
The calling process must be authorized as a system program.
Returns
0 on success, < 0 on error.

◆ _vshKernelSearchModuleByName()

SceUID _vshKernelSearchModuleByName ( const char *  module_name,
const void *  buffer 
)

Check if a module is loaded.

Parameters
[in]module_name- The module's name
[in]buffer- Set a buffer with a size of 8 bytes
Returns
the SceUID of the module on success, < 0 on error.

◆ _vshIoMount()

int _vshIoMount ( SceVshMountId  id,
const char *  path,
int  permission,
void *  buf 
)

Mount a partition.

Parameters
[in]id- Mount ID (one of SceVshMountId).
[in]path- Mount path (optional, can be NULL).
[in]permission- 1 for read-only, 2 for read-write.
[in]buf- Work buffer. Allocate 0x100 and (important!) fill with 0.
Returns
>= 0 on success, < 0 on error.

◆ vshIoUmount()

int vshIoUmount ( SceVshMountId  id,
int  force,
int  unk2,
int  unk3 
)

Unmount a partition.

Warning
Unmounting system partitions can cause system instability, even if you remount them back. For example, FIOS overlays used by the Shell won't get recreated and would effectively render the Shell unusable
Parameters
[in]id- Mount ID (one of SceVshMountId).
[in]force- 1 to force unmount, 0 otherwise.
[in]unk2- Unknown, set to 0.
[in]unk3- Unknown, set to 0.
Returns
>= 0 on success, < 0 on error.

◆ vshIdStorageIsDirty()

int vshIdStorageIsDirty ( void  )

◆ vshIdStorageIsFormatted()

int vshIdStorageIsFormatted ( void  )

◆ vshIdStorageIsReadOnly()

int vshIdStorageIsReadOnly ( void  )

◆ vshIdStorageReadLeaf()

int vshIdStorageReadLeaf ( SceSize  leafnum,
void *  buf 
)
Parameters
[in]leafnum- The read target leaf number
[out]buf- The leaf data buffer pointer, size is 512 byte
Returns
0 on success, < 0 on error.

◆ vshIdStorageWriteLeaf()

int vshIdStorageWriteLeaf ( SceSize  leafnum,
const void *  buf 
)
Parameters
[in]leafnum- The write target leaf number
[in]buf- The leaf data buffer pointer, size is 512 byte
Returns
0 on success, < 0 on error.

note - Writing to leaf requires manufacturing mode.

◆ _vshNpDrmEbootSigVerify()

int _vshNpDrmEbootSigVerify ( const char *  eboot_pbp_path,
const char *  eboot_signature,
char **  eboot_signature_header 
)

Verify a eboot.pbp signature "__sce_ebootpbp".

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]eboot_signature- The pointer of data of __sce_ebootpbp signature. size is 0x200
[in]eboot_signature_magic- The pointer of a pointer of magic number within __sce_ebootpbp, "NPUMDSIG" or "PSISOSIG"
Returns
0 on success, < 0 on error.

◆ _vshNpDrmPspEbootVerify()

int _vshNpDrmPspEbootVerify ( const char *  eboot_pbp_path,
const char *  eboot_signature,
char **  eboot_signature_header 
)

Verify an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" from firmware <2.00.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]eboot_signature- The pointer of data of __sce_ebootpbp signature. size is 0x100
[in]eboot_signature_magic- The pointer of a pointer of magic number within __sce_ebootpbp, "NPUMDSIG" or "PSISOSIG"
Returns
0 on success, < 0 on error.

◆ VITASDK_BUILD_ASSERT_EQ() [1/7]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceVshNpDrmEbootSigOpt   
)

◆ _vshNpDrmPspEbootSigGen()

int _vshNpDrmPspEbootSigGen ( const char *  eboot_pbp_path,
const void *  eboot_sha256,
void *  eboot_signature 
)

Generate an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" for a PSP game - this is unused in firmware >2.00.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]eboot_sha256- The pointer of SHA256 hash of first (data.psar offset + 0x1C0000) bytes into the EBOOT.PBP file
[out]eboot_signature- The pointer of the output eboot signature data. size is 0x100
[in]opt- Required 8-byte option block; ignored after being copied on FW 3.60.
Returns
eboot_signature size on success, < 0 on error.

◆ _vshNpDrmEbootSigConvert()

int _vshNpDrmEbootSigConvert ( const char *  eboot_pbp_path,
const void *  old_eboot_signature,
void *  new_eboot_signature 
)

Convert an older 0x100 byte eboot.pbp signature "__sce_ebootpbp" to a 0x200 byte one used in firmwares >2.00.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]old_eboot_signature- The pointer of old eboot signature data. size is 0x100
[out]new_eboot_signature- The pointer of new eboot signature data. size is 0x200
[in]opt- Required 8-byte option block; ignored after being copied on FW 3.60.
Returns
eboot_signature size on success, < 0 on error.

◆ _vshNpDrmEbootSigGenPsp()

int _vshNpDrmEbootSigGenPsp ( const char *  eboot_pbp_path,
const void *  eboot_sha256,
void *  eboot_signature,
int *  sw_version 
)

Generate eboot.pbp signature "__sce_ebootpbp" for a PSP game.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]eboot_sha256- The pointer of SHA256 hash of first (data.psar offset + 0x1C0000) bytes into the EBOOT.PBP file
[out]eboot_signature- The pointer of the output eboot signature data. size is 0x200
[in]sw_version- The pointer of the minimum firmware version the signature can be used on. cannot be lower than current firmware
Returns
eboot_signature size on success, < 0 on error.

◆ _vshNpDrmEbootSigGenPs1()

int _vshNpDrmEbootSigGenPs1 ( const char *  eboot_pbp_path,
const void *  eboot_sha256,
void *  eboot_signature,
int *  sw_version 
)

Generate eboot.pbp signature "__sce_ebootpbp" for a single-disc PS1 game.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]eboot_sha256- The pointer of SHA256 hash of first (data.psar offset + 0x1C0000) bytes into the EBOOT.PBP file
[out]eboot_signature- The pointer of the output eboot signature data. size is 0x200
[in]sw_version- The pointer of the minimum firmware version the signature can be used on. cannot be lower than current firmware
Returns
eboot_signature size on success, < 0 on error.

◆ _vshNpDrmEbootSigGenMultiDisc()

int _vshNpDrmEbootSigGenMultiDisc ( const char *  eboot_pbp_path,
const void *  sce_discinfo,
void *  eboot_signature,
int *  sw_version 
)

Generate eboot.pbp signature "__sce_discinfo" for a multi-disc PS1 game.

Parameters
[in]eboot_pbp_path- The pointer of the file path of the EBOOT.PBP file
[in]sce_discinfo- The pointer of contents of vs0:/app/NPXS10028/__sce_discinfo
[out]eboot_signature- The pointer of the output eboot signature data. size is 0x100
[in]sw_version- The pointer of the minimum firmware version the signature can be used on. cannot be lower than current firmware
Returns
eboot_signature size on success, < 0 on error.

◆ vshSblAimgrIsCEX()

int vshSblAimgrIsCEX ( void  )

◆ vshSblAimgrIsDEX()

int vshSblAimgrIsDEX ( void  )

◆ vshSblAimgrIsVITA()

int vshSblAimgrIsVITA ( void  )

◆ vshSblAimgrIsGenuineVITA()

int vshSblAimgrIsGenuineVITA ( void  )

◆ vshSblAimgrIsDolce()

int vshSblAimgrIsDolce ( void  )

◆ vshSblAimgrIsGenuineDolce()

int vshSblAimgrIsGenuineDolce ( void  )

◆ vshSblAimgrIsTest()

int vshSblAimgrIsTest ( void  )

◆ vshSblAimgrIsTool()

int vshSblAimgrIsTool ( void  )

◆ vshSblSsIsDevelopmentMode()

int vshSblSsIsDevelopmentMode ( void  )

◆ vshSysconHasWWAN()

int vshSysconHasWWAN ( void  )

◆ vshSysconIsDownLoaderMode()

int vshSysconIsDownLoaderMode ( void  )

◆ vshSysconIsIduMode()

int vshSysconIsIduMode ( void  )

◆ vshSysconIsMCEmuCapable()

int vshSysconIsMCEmuCapable ( void  )

◆ vshSysconIsShowMode()

int vshSysconIsShowMode ( void  )

◆ vshSysconIduModeSet()

int vshSysconIduModeSet ( void  )

◆ vshSysconIduModeClear()

int vshSysconIduModeClear ( void  )

◆ vshSysconShowModeSet()

int vshSysconShowModeSet ( void  )

◆ vshSysconShowModeClear()

int vshSysconShowModeClear ( void  )

◆ vshMemoryCardGetCardInsertState()

int vshMemoryCardGetCardInsertState ( void  )

◆ vshRemovableMemoryGetCardInsertState()

int vshRemovableMemoryGetCardInsertState ( void  )

◆ vshMsifGetMsInfo()

int vshMsifGetMsInfo ( SceMsInfo *  info)

◆ VITASDK_BUILD_ASSERT_EQ() [2/7]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceVshAppMgrCheckPfsMountedOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/7]

VITASDK_BUILD_ASSERT_EQ ( 0x38  ,
SceVshAppMgrBgdlQueueStatusEntry   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/7]

VITASDK_BUILD_ASSERT_EQ ( 0x700  ,
SceVshAppMgrBgdlQueueStatus   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/7]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceVshSblAuthMgrVerifySpsfoOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/7]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceVshNpDrmGetLegacyDocKeyOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/7]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceVshSblSsCreatePassPhraseOpt   
)

◆ _vshAppMgrAcInstGetAcdirParam()

int _vshAppMgrAcInstGetAcdirParam ( const char  title_id[0x10],
const char  addcont_id[0x14],
SceAppMgrAcInstResult *  result 
)

Get add-on-content installation data.

Parameters
[in]title_id- Pointer to a 0x10-byte buffer containing a NUL-terminated, nine-character title ID.
[in]addcont_id- Pointer to a 0x14-byte buffer containing a NUL-terminated, 16-character add-on-content ID.
[out]result- Output SceAppMgrAcInstResult structure containing the add-on-content keystone and localized game title.
Note
The title ID must contain four uppercase letters followed by five decimal digits. The add-on-content ID must contain exactly 16 uppercase alphanumeric characters. The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshAppMgrBgdlSetQueueStatus()

int _vshAppMgrBgdlSetQueueStatus ( const SceVshAppMgrBgdlQueueStatus *  queue_status)

Update the background-download queue status table.

Parameters
[in]queue_status- Pointer to a SceVshAppMgrBgdlQueueStatus structure.

All 0x700 bytes are copied before this function returns. The caller still owns the structure.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshAppMgrCheckPfsMounted()

int _vshAppMgrCheckPfsMounted ( const char *  path,
const SceVshAppMgrCheckPfsMountedOpt *  opt 
)

Check whether a PFS path is mounted.

Parameters
[in]path- NUL-terminated ux0: path shorter than 0x124 bytes.
[in]opt- Required 8-byte structure whose contents are ignored on FW 3.60.
Note
The calling process must be authorized as a system program.
Returns
0 when the path is a mounted PFS directory, or a negative error code.

◆ _vshAppMgrCloudDataCreateHeader()

int _vshAppMgrCloudDataCreateHeader ( const SceUInt8  setup_key[0x18],
SceSize  data_size,
const SceUInt8  digest[0x20],
SceUInt8  header[0x170] 
)

Create and sign a cloud-data header.

Parameters
[in]setup_key- 0x18-byte setup-key buffer. Its first 0x10 bytes contain the ASCII account ID.
[in]data_size- Size of the cloud-data payload, at most 0x40000000 bytes.
[in]digest- 0x20-byte payload digest.
[out]header- 0x170-byte "PSVB" header containing the timestamp, data size, account ID, digest, and RSA signature.

The last eight setup-key bytes are copied by the bridge but ignored by AppMgr on FW 3.60. An all-zero ASCII account ID is rejected. The output header is cleared when creation fails.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshIoChstat()

int _vshIoChstat ( const char *  file,
const SceIoStat *  stat,
unsigned int  bits,
const sceIoChstatOpt *  opt 
)

Change selected attributes of a path.

Parameters
[in]file- NUL-terminated path of at most 0x3FF characters.
[in]stat- Input SceIoStat structure.
[in]bits- Bitmask selecting which attributes to change.
[in]opt- Required 8-byte structure whose contents are ignored on FW 3.60.
Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshIoDread()

int _vshIoDread ( SceUID  fd,
SceIoDirent *  dir 
)

Read the next directory entry.

Parameters
[in]fd- Directory descriptor.
[in,out]dir- SceIoDirent structure copied from the caller to the kernel and back.

The descriptor is a PUID in the calling process. It is converted to its kernel GUID before reading the directory.

Note
The calling process must be authorized as a system program.
Returns
1 when an entry is read, 0 at end of directory, or a negative error code.

◆ _vshIoGetstat()

int _vshIoGetstat ( const char *  file,
SceIoStat *  stat,
const sceIoGetstatOpt *  opt 
)

Get path metadata.

Parameters
[in]file- NUL-terminated path of at most 0x3FF characters.
[out]stat- Output SceIoStat structure.
[in]opt- Required 8-byte structure whose contents are ignored on FW 3.60.
Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshKernelGetCompiledSdkVersionByPid()

int _vshKernelGetCompiledSdkVersionByPid ( ScePID  pid,
SceUInt32 *  sdk_version 
)

Get the compiled SDK version of a process.

Parameters
[in]pid- Process ID.
[out]sdk_version- Receives the compiled SDK version as a SceUInt32.
Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshNpDrmGetLegacyDocKey()

int _vshNpDrmGetLegacyDocKey ( const SceUInt8  rif_data[0x200],
const void *  document_data,
SceSize  document_data_size,
const SceVshNpDrmGetLegacyDocKeyOpt *  opt 
)

Derive the 16-byte key for a legacy document.

Parameters
[in]rif_data- Optional 0x200-byte RIF data buffer. Some PSPEDAT document modes require it.
[in]document_data- PSPEDAT document data, at least 0x90 bytes.
[in]document_data_size- Size of document_data in bytes; must match opt->document_data_size.
[in]opt- Required structure specifying the document-data copy size and key output buffer.

The bridge can copy at most 0x200 bytes of document data. The caller owns every buffer. Exactly 16 key bytes are written before this function returns.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSblAimgrGetPscode()

int _vshSblAimgrGetPscode ( ScePsCode *  pscode)

Get the primary platform security code.

Parameters
[out]pscode- Output ScePsCode structure.
Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSblAimgrGetPscode2()

int _vshSblAimgrGetPscode2 ( ScePsCode *  pscode)

Get the secondary platform security code.

Parameters
[out]pscode- Output ScePsCode structure.

This variant gets the value from the secure module instead of the cached primary value and is available only while product mode is enabled.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSblAimgrGetVisibleId()

int _vshSblAimgrGetVisibleId ( SceVisibleId *  visible_id)

Get the 0x20-byte visible ID when the system is in product mode.

Parameters
[out]visible_id- Output SceVisibleId structure.
Note
Product mode must be enabled and the calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSblAuthMgrVerifySpsfo()

int _vshSblAuthMgrVerifySpsfo ( const char *  path,
void *  verified_data,
SceSize  verified_data_capacity,
const SceVshSblAuthMgrVerifySpsfoOpt *  opt 
)

Verify a signed PARAM.SFO file and copy its embedded payload.

Parameters
[in]path- NUL-terminated path to the signed PARAM.SFO file, at most 0xFF characters.
[out]verified_data- Output payload buffer.
[in]verified_data_capacity- Capacity of verified_data in bytes.
[in]opt- Required 8-byte structure whose contents are ignored on FW 3.60.

The verified embedded payload must not be empty and must fit completely in verified_data. The function does not copy part of a payload.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSblSsCreatePassPhrase()

int _vshSblSsCreatePassPhrase ( const SceSblSsCreatePassPhraseParam *  args,
void *  pass_phrase,
const SceVshSblSsCreatePassPhraseOpt *  opt 
)

Create a 0x200-byte account pass phrase.

Parameters
[in]args- Pass-phrase input parameters.
[out]pass_phrase- Output pass-phrase buffer.
[in]opt- Required structure specifying how many pass-phrase bytes to copy.

SceSblSsMgr always creates 0x200 bytes internally. The bridge copies the first opt->pass_phrase_size bytes to pass_phrase; this size must not exceed 0x200. The caller owns all buffers.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ _vshSysconGetManufacturesStatus()

int _vshSysconGetManufacturesStatus ( SceUInt32 *  manufacturing_status)

Get the manufacturing-status value.

Parameters
[out]manufacturing_status- Receives the manufacturing status as a SceUInt32.

FW 3.60 returns the four-byte response to Syscon command 0x15. No observed caller interprets its individual bits, so their purposes are unknown.

Note
Product mode must be enabled and the calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ vshIoCreateMountEvent()

SceUID vshIoCreateMountEvent ( SceVshMountId  mount_id,
SceUInt32  event_bits 
)

Create a mount event.

Parameters
[in]mount_id- One of SceVshMountId.
[in]event_bits- Bitwise OR of SceIoMountEvent values. FW 3.60 discards bits outside 0x333; at least one accepted bit must remain.

The returned UID is a PUID belonging to the calling process.

Note
The calling process must be authorized as a system program.
Returns
Event UID on success, or a negative error code.

◆ vshKernelSendSysEvent()

int vshKernelSendSysEvent ( SceUInt32  event_id)

Notify the kernel that SceShell is ready.

Parameters
[in]event_id- Event ID. FW 3.60 accepts only 0, meaning that SceShell is ready.

The notification is sent to SceSysroot only on the first successful call; later calls with zero still return success.

Note
The calling process must be authorized as a system program.
Returns
0 on success, or a negative error code.

◆ vshSblUtMgrHasComTestFlag()

int vshSblUtMgrHasComTestFlag ( void  )

Check whether the communication-test flag is set.

Note
The calling process must be authorized as a system program.
Returns
1 when set, 0 when clear, or a negative authorization error.

◆ vshSblUtMgrHasNpTestFlag()

int vshSblUtMgrHasNpTestFlag ( void  )

Check whether the NP-test flag is set.

Note
The calling process must be authorized as a system program.
Returns
1 when set, 0 when clear, or a negative authorization error.

◆ vshSblUtMgrHasStoreFlag()

int vshSblUtMgrHasStoreFlag ( void  )

Check whether the store flag is set.

Note
The calling process must be authorized as a system program.
Returns
1 when set, 0 when clear, or a negative authorization error.

Variable Documentation

◆ reserved [1/5]

SceUInt32 SceVshNpDrmEbootSigOpt::reserved[2]

◆ reserved [2/5]

SceUInt32 SceVshAppMgrCheckPfsMountedOpt::reserved[2]

Ignored on FW 3.60.

◆ download_status

SceUInt32 SceVshAppMgrBgdlQueueStatusEntry::download_status

Set from SceShell's 4-bit state: 7 maps to 2, 8 to 1, 9 to 3, 0xC to 4, and every other value to 0.

◆ unknown_boolean

SceBool SceVshAppMgrBgdlQueueStatusEntry::unknown_boolean

Set for SceShell state 9, or when an unidentified source word is zero, flags 0x300 are clear, and flag 0x40000 is set. AppMgr preserves but does not test this field; its purpose is unknown.

◆ identifier

char SceVshAppMgrBgdlQueueStatusEntry::identifier[0x30]

NUL-terminated BGDL identifier; AppMgr treats bytes 7 through 15 as a title ID.

◆ entries

SceVshAppMgrBgdlQueueStatusEntry SceVshAppMgrBgdlQueueStatus::entries[32]

◆ reserved [3/5]

SceUInt32 SceVshSblAuthMgrVerifySpsfoOpt::reserved[2]

Ignored on FW 3.60.

◆ document_key

SceUInt8* SceVshNpDrmGetLegacyDocKeyOpt::document_key

Destination for the 16-byte document key.

◆ document_data_size

SceSize SceVshNpDrmGetLegacyDocKeyOpt::document_data_size

Number of bytes to copy from the document data, at most 0x200.

◆ reserved [4/5]

SceUInt32 SceVshNpDrmGetLegacyDocKeyOpt::reserved[2]

Ignored on FW 3.60.

◆ pass_phrase_size

SceSize SceVshSblSsCreatePassPhraseOpt::pass_phrase_size

Number of pass-phrase bytes to copy, at most 0x200.

◆ reserved [5/5]

SceUInt32 SceVshSblSsCreatePassPhraseOpt::reserved

Ignored on FW 3.60.