vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceAppMgrPhotoMountParam
 
struct  SceAppMgrAcInstResult
 
struct  SceAppMgrLaunchParam
 
struct  SceAppMgrLaunchAppByPathOpt
 Path-mapping options for ksceAppMgrLaunchAppByPath. More...
 
struct  SceAppMgrDrmOpt
 

Typedefs

typedef char SceTitleId[16]
 

Enumerations

enum  SceAppMgrLaunchParamAttr {
  SCE_APPMGR_LAUNCH_PARAM_ATTR_CPU_AFFINITY_MASK = 0x00001000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_BUDGET_ID = 0x00004000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_PARENT_PROCESS_ID = 0x00010000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_PROCESS_EXIT_SPAWN = 0x00020000 ,
  SCE_APPMGR_LAUNCH_PARAM_ATTR_KLICENSEE = 0x00040000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_MAX_FILE_HANDLES = 0x00080000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_UNIQUE_HEAP_SIZE = 0x00200000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_INIT_PRIORITY = 0x10000000 ,
  SCE_APPMGR_LAUNCH_PARAM_ATTR_STACK_SIZE = 0x20000000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_REPORT_LOAD_PROGRESS = 0x40000000 , SCE_APPMGR_LAUNCH_PARAM_ATTR_SKIP_START_CALLBACKS = 0x80000000
}
 Attribute bits accepted in ::SceAppMgrLaunchParam::attr. More...
 
enum  SceAppMgrProcessExitSpawnMode { SCE_APPMGR_PROCESS_EXIT_SPAWN_MODE_NORMAL = 0 , SCE_APPMGR_PROCESS_EXIT_SPAWN_MODE_ENABLED = 1 }
 Process-replacement modes for Processmgr's exit-spawn mechanism. More...
 
enum  SceAppMgrCloudDataMcIdLocation { SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_AUTO = 0 , SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_EXTERNAL = 1 , SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_INTERNAL = 2 }
 
enum  SceAppMgrDebugSetting {
  SCE_APPMGR_DEBUG_SETTING_FAKE_NO_MEMORY_CARD = 0 , SCE_APPMGR_DEBUG_SETTING_UPGRADABLE = 1 , SCE_APPMGR_DEBUG_SETTING_BUTTON_ASSIGN = 2 , SCE_APPMGR_DEBUG_SETTING_TRC_CHECK_NOTIFY = 3 ,
  SCE_APPMGR_DEBUG_SETTING_SHOW_DEBUG_INFO = 4
}
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x10, SceTitleId)
 
 VITASDK_BUILD_ASSERT_EQ (0x84, SceAppMgrPhotoMountParam)
 
 VITASDK_BUILD_ASSERT_EQ (0xE0, SceAppMgrAcInstResult)
 
int ksceAppMgrKillProcess (SceUID pid)
 Kill a process.
 
 VITASDK_BUILD_ASSERT_EQ (0x34, SceAppMgrLaunchParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x814, SceAppMgrLaunchAppByPathOpt)
 
int ksceAppMgrLaunchAppByPath (const char *path, const char *args, SceSize arg_size, unsigned int type, const SceAppMgrLaunchParam *launch_param, void *path_mapping_opt)
 Launch an application from an executable path.
 
 VITASDK_BUILD_ASSERT_EQ (0x28, SceAppMgrDrmOpt)
 
int ksceAppMgrAcInstGetAcdirParam (const char *title_id, const char *addcont_id, SceAppMgrAcInstResult *output_data)
 
int ksceAppMgrAppDataMount (int mount_id, char mount_point[16])
 Mount application data for the calling process.
 
int ksceAppMgrAppDataMountById (int mount_id, const char *title_id, char mount_point[16])
 FW 3.60 accepts mount IDs 104, 106, 107, and 110.
 
int ksceAppMgrCheckContentInstallPeriod (ScePID process_id)
 
int ksceAppMgrCheckPfsMounted (const char *path)
 
int ksceAppMgrCloudDataClearMcId (int location)
 
int ksceAppMgrCloudDataDstCreateMount (const char *title_id, char mount_point[16])
 
int ksceAppMgrCloudDataSrcMount (int mode, const char *title_id, char mount_point[16])
 
int ksceAppMgrDebugSettingNotifyUpdate (int setting)
 
int ksceAppMgrDrmOpen (const SceAppMgrDrmOpt *drm_opt)
 
int ksceAppMgrFakeSaveDataCreateMount (const char *path, char mount_point[16])
 
int ksceAppMgrGameDataMount (const char *app_path, const char *patch_path, const char *rif_path, char mount_point[16])
 
int ksceAppMgrIsExclusiveProcessRunning (const char *title_id)
 Check whether an exclusive process is running.
 
int ksceAppMgrMmsMount (int mount_id, char mount_point[16])
 
int ksceAppMgrPhotoMount (const SceAppMgrPhotoMountParam *param)
 
int ksceAppMgrTrophyMount (int mount_id, ScePID process_id, char mount_point[16])
 
int ksceAppMgrUmount (const char *mount_point)
 
int ksceAppMgrWorkDirMount (int mount_id, char mount_point[16])
 

Variables

SceSize SceAppMgrPhotoMountParam::size
 Must be the size of this structure.
 
char SceAppMgrPhotoMountParam::reserved [0x80]
 Ignored on FW 3.60.
 
SceUInt8 SceAppMgrAcInstResult::keystone [0x60]
 Add-on-content keystone.
 
char SceAppMgrAcInstResult::game_title [0x80]
 NUL-terminated localized game title.
 
SceSize SceAppMgrLaunchParam::size
 Ignored on FW 3.60; initialize to the size of this structure.
 
unsigned int SceAppMgrLaunchParam::unk_4
 
unsigned int SceAppMgrLaunchParam::unk_8
 
unsigned int SceAppMgrLaunchParam::unk_C
 
unsigned int SceAppMgrLaunchParam::unk_10
 
unsigned int SceAppMgrLaunchParam::unk_14
 
unsigned int SceAppMgrLaunchParam::unk_18
 
unsigned int SceAppMgrLaunchParam::unk_1C
 
unsigned int SceAppMgrLaunchParam::unk_20
 
unsigned int SceAppMgrLaunchParam::unk_24
 
unsigned int SceAppMgrLaunchParam::unk_28
 
unsigned int SceAppMgrLaunchParam::unk_2C
 
unsigned int SceAppMgrLaunchParam::unk_30
 
SceSize SceAppMgrLaunchAppByPathOpt::size
 Must be the size of this structure.
 
char SceAppMgrLaunchAppByPathOpt::mapping_file_path [0x400]
 Optional path to a configuration.psp2path file.
 
char SceAppMgrLaunchAppByPathOpt::app0_path [0x400]
 Optional fallback source path for the app0: mount.
 
SceUInt8 SceAppMgrLaunchAppByPathOpt::reserved [0x10]
 Ignored on FW 3.60.
 
SceSize SceAppMgrDrmOpt::size
 Must be the size of this structure.
 
char SceAppMgrDrmOpt::addcont_id [20]
 NUL-terminated additional-content ID of at most 16 characters.
 
char SceAppMgrDrmOpt::mount_point [16]
 addcont0: or addcont1:.
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceAppMgrForDriver_stub




Data Structure Documentation

◆ SceAppMgrPhotoMountParam

struct SceAppMgrPhotoMountParam
Data Fields
SceSize size Must be the size of this structure.
char reserved[0x80] Ignored on FW 3.60.

◆ SceAppMgrAcInstResult

struct SceAppMgrAcInstResult
Data Fields
SceUInt8 keystone[0x60] Add-on-content keystone.
char game_title[0x80] NUL-terminated localized game title.

◆ SceAppMgrLaunchParam

struct SceAppMgrLaunchParam
Data Fields
SceSize size Ignored on FW 3.60; initialize to the size of this structure.
unsigned int unk_4
unsigned int unk_8
unsigned int unk_C
unsigned int unk_10
unsigned int unk_14
unsigned int unk_18
unsigned int unk_1C
unsigned int unk_20
unsigned int unk_24
unsigned int unk_28
unsigned int unk_2C
unsigned int unk_30

◆ SceAppMgrLaunchAppByPathOpt

struct SceAppMgrLaunchAppByPathOpt

Path-mapping options for ksceAppMgrLaunchAppByPath.

FW 3.60 uses the path fields only when size is 0x814. If mapping_file_path is empty, AppMgr looks for configuration.psp2path in the executable's directory. When the selected mapping file contains an app0= entry, that entry takes precedence over app0_path.

An explicit mapping-file path must begin with host0: or sd0: on FW 3.60. The app0: source path is resolved through the current process's FIOS overlays before it is used as the application root.

Data Fields
SceSize size Must be the size of this structure.
char mapping_file_path[0x400] Optional path to a configuration.psp2path file.
char app0_path[0x400] Optional fallback source path for the app0: mount.
SceUInt8 reserved[0x10] Ignored on FW 3.60.

◆ SceAppMgrDrmOpt

struct SceAppMgrDrmOpt
Data Fields
SceSize size Must be the size of this structure.
char addcont_id[20] NUL-terminated additional-content ID of at most 16 characters.
char mount_point[16] addcont0: or addcont1:.

Typedef Documentation

◆ SceTitleId

typedef char SceTitleId[16]

Enumeration Type Documentation

◆ SceAppMgrLaunchParamAttr

Attribute bits accepted in ::SceAppMgrLaunchParam::attr.

FW 3.60 rejects bits outside 0xF02FF000. Bits 0x00002000 and 0x00008000 are accepted but ignored. Bits 0x00040000 and 0x00080000 tell Processmgr to read fields absent from this structure; AppMgr supplies or clears those fields according to the launch class. Bit 0x00100000 is rejected when supplied by the caller, although AppMgr may set it in the Processmgr options it builds internally. Bit 0x00200000 tells Processmgr to read a nonzero unique-heap size from its 0x40-byte process options. This 0x34-byte structure has no corresponding member, so AppMgr leaves SceKernelProcessOpt2::unique_heap_size at zero and process creation fails on FW 3.60.

Bit 0x80000000 prevents Processmgr from calling the process-start callbacks registered through ksceKernelSysrootSetProcessHandler and ksceKernelSysrootRegisterDbgpHandler. Process creation, image loading, and main-thread startup continue normally.

Enumerator
SCE_APPMGR_LAUNCH_PARAM_ATTR_CPU_AFFINITY_MASK 

Use the CPU affinity mask.

SCE_APPMGR_LAUNCH_PARAM_ATTR_BUDGET_ID 

Use ::SceAppMgrLaunchParam::budget_id.

SCE_APPMGR_LAUNCH_PARAM_ATTR_PARENT_PROCESS_ID 

Use AppMgr's parent process ID.

SCE_APPMGR_LAUNCH_PARAM_ATTR_PROCESS_EXIT_SPAWN 

Use the process-replacement mode and exiting-process PID.

SCE_APPMGR_LAUNCH_PARAM_ATTR_KLICENSEE 

Use the klicensee supplied internally by AppMgr.

SCE_APPMGR_LAUNCH_PARAM_ATTR_MAX_FILE_HANDLES 

Use the file-handle limit supplied internally by AppMgr.

SCE_APPMGR_LAUNCH_PARAM_ATTR_UNIQUE_HEAP_SIZE 

Select an unavailable value; process creation fails on FW 3.60.

SCE_APPMGR_LAUNCH_PARAM_ATTR_INIT_PRIORITY 

Use ::SceAppMgrLaunchParam::init_priority.

SCE_APPMGR_LAUNCH_PARAM_ATTR_STACK_SIZE 

Use ::SceAppMgrLaunchParam::stack_size.

SCE_APPMGR_LAUNCH_PARAM_ATTR_REPORT_LOAD_PROGRESS 

Report executable-load progress.

SCE_APPMGR_LAUNCH_PARAM_ATTR_SKIP_START_CALLBACKS 

Skip the Sysroot process-start callbacks.

◆ SceAppMgrProcessExitSpawnMode

Process-replacement modes for Processmgr's exit-spawn mechanism.

On FW 3.60, calling ksceKernelKillProcess with option 2 prepares to replace the process identified by pid: Processmgr allocates a temporary replacement object and preserves an internal 0x90-byte portion of the exiting process's state. A subsequent create request in enabled mode, with ::SceAppMgrLaunchParam::process_exit_spawn_pid set to the same pid, consumes that temporary object and restores the preserved state into the replacement process. The replacement receives its own PID; the exiting PID only identifies the handoff.

Enabled mode with a zero process ID allocates an ordinary new process object instead, but the mode is still passed to Processmgr's process-event handlers. These fields are used only when SCE_APPMGR_LAUNCH_PARAM_ATTR_PROCESS_EXIT_SPAWN is present in ::SceAppMgrLaunchParam::attr.

Enumerator
SCE_APPMGR_PROCESS_EXIT_SPAWN_MODE_NORMAL 

Allocate an ordinary new process object.

SCE_APPMGR_PROCESS_EXIT_SPAWN_MODE_ENABLED 

Consume the prepared replacement for a matching nonzero PID.

◆ SceAppMgrCloudDataMcIdLocation

Enumerator
SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_AUTO 

External when NVS type 5 bit 0 is set, otherwise internal.

SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_EXTERNAL 

sdstor0:xmc-lp-act-mediaid.

SCE_APPMGR_CLOUD_DATA_MC_ID_LOCATION_INTERNAL 

tm0:/clouddata/mcid.dat.

◆ SceAppMgrDebugSetting

Enumerator
SCE_APPMGR_DEBUG_SETTING_FAKE_NO_MEMORY_CARD 
SCE_APPMGR_DEBUG_SETTING_UPGRADABLE 
SCE_APPMGR_DEBUG_SETTING_BUTTON_ASSIGN 
SCE_APPMGR_DEBUG_SETTING_TRC_CHECK_NOTIFY 
SCE_APPMGR_DEBUG_SETTING_SHOW_DEBUG_INFO 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/6]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceTitleId   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/6]

VITASDK_BUILD_ASSERT_EQ ( 0x84  ,
SceAppMgrPhotoMountParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/6]

VITASDK_BUILD_ASSERT_EQ ( 0xE0  ,
SceAppMgrAcInstResult   
)

◆ ksceAppMgrKillProcess()

int ksceAppMgrKillProcess ( SceUID  pid)

Kill a process.

Parameters
[in]pidThe process to kill.
Returns
Zero on success, else < 0.

◆ VITASDK_BUILD_ASSERT_EQ() [4/6]

VITASDK_BUILD_ASSERT_EQ ( 0x34  ,
SceAppMgrLaunchParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/6]

VITASDK_BUILD_ASSERT_EQ ( 0x814  ,
SceAppMgrLaunchAppByPathOpt   
)

◆ ksceAppMgrLaunchAppByPath()

int ksceAppMgrLaunchAppByPath ( const char *  path,
const char *  args,
SceSize  arg_size,
unsigned int  type,
const SceAppMgrLaunchParam *  launch_param,
void *  path_mapping_opt 
)

Launch an application from an executable path.

The args block is scanned as a sequence of NUL-terminated strings. -budget big and -budget game select a game launch; -budget small and -budget mini select a mini-application launch; and -budget sys and -budget shell select a system-application launch.

Parameters
[in]path- Path to the executable to load.
[in]args- Optional sequence of NUL-terminated argument strings.
[in]arg_size- Size of the argument block.
[in]type- Set bit 31 to request a debug launch.
[in]launch_param- Required launch options.
[in]path_mapping_opt- Optional path-mapping options.
Returns
Process ID on success, or a negative error code.

◆ VITASDK_BUILD_ASSERT_EQ() [6/6]

VITASDK_BUILD_ASSERT_EQ ( 0x28  ,
SceAppMgrDrmOpt   
)

◆ ksceAppMgrAcInstGetAcdirParam()

int ksceAppMgrAcInstGetAcdirParam ( const char *  title_id,
const char *  addcont_id,
SceAppMgrAcInstResult *  output_data 
)
Parameters
[in]title_idTitle ID of exactly 9 characters: four uppercase letters followed by five decimal digits.
[in]addcont_idAdditional-content ID of exactly 16 uppercase alphanumeric characters.
[out]output_dataThe 0xE0-byte result.

◆ ksceAppMgrAppDataMount()

int ksceAppMgrAppDataMount ( int  mount_id,
char  mount_point[16] 
)

Mount application data for the calling process.

FW 3.60 accepts mount IDs 100, 101, 102, 103, 105, 108, 109, 111, and 112.

Parameters
[in]mount_idApplication-data mount ID.
[out]mount_pointBuffer that receives a 16-byte randomized mount point.
Returns
0 on success, or a negative error code.

◆ ksceAppMgrAppDataMountById()

int ksceAppMgrAppDataMountById ( int  mount_id,
const char *  title_id,
char  mount_point[16] 
)

FW 3.60 accepts mount IDs 104, 106, 107, and 110.

Parameters
[in]title_idA NUL-terminated identifier whose required syntax depends on mount_id.
[out]mount_pointBuffer that receives a 16-byte randomized mount point.

◆ ksceAppMgrCheckContentInstallPeriod()

int ksceAppMgrCheckContentInstallPeriod ( ScePID  process_id)
Parameters
[in]process_idProcess ID of type ScePID; 0 selects the calling process.
Returns
0 while the process is in a content-install period, or a negative error code otherwise.

◆ ksceAppMgrCheckPfsMounted()

int ksceAppMgrCheckPfsMounted ( const char *  path)
Parameters
[in]pathA NUL-terminated ux0: directory path shorter than 0x124 bytes.
Returns
0 when the path is a mounted PFS directory, or a negative error code.

◆ ksceAppMgrCloudDataClearMcId()

int ksceAppMgrCloudDataClearMcId ( int  location)
Parameters
[in]locationOne of SceAppMgrCloudDataMcIdLocation.

◆ ksceAppMgrCloudDataDstCreateMount()

int ksceAppMgrCloudDataDstCreateMount ( const char *  title_id,
char  mount_point[16] 
)
Parameters
[in]title_idA NUL-terminated identifier containing at most 31 letters, decimal digits, hyphens, or underscores.
[out]mount_pointBuffer that receives a 16-byte randomized mount point.

◆ ksceAppMgrCloudDataSrcMount()

int ksceAppMgrCloudDataSrcMount ( int  mode,
const char *  title_id,
char  mount_point[16] 
)
Parameters
[in]modeValue 1 selects grw0 save data; values 2 and 3 select the per-user ux0 save-data location.
[in]title_idTitle ID of exactly 9 characters: four uppercase letters followed by five decimal digits.
[out]mount_pointBuffer that receives a 16-byte randomized mount point.

◆ ksceAppMgrDebugSettingNotifyUpdate()

int ksceAppMgrDebugSettingNotifyUpdate ( int  setting)
Parameters
[in]settingOne of SceAppMgrDebugSetting.

◆ ksceAppMgrDrmOpen()

int ksceAppMgrDrmOpen ( const SceAppMgrDrmOpt *  drm_opt)

◆ ksceAppMgrFakeSaveDataCreateMount()

int ksceAppMgrFakeSaveDataCreateMount ( const char *  path,
char  mount_point[16] 
)
Parameters
[in]pathSave-data path.
[out]mount_pointA 16-byte mount-point output buffer.

◆ ksceAppMgrGameDataMount()

int ksceAppMgrGameDataMount ( const char *  app_path,
const char *  patch_path,
const char *  rif_path,
char  mount_point[16] 
)

◆ ksceAppMgrIsExclusiveProcessRunning()

int ksceAppMgrIsExclusiveProcessRunning ( const char *  title_id)

Check whether an exclusive process is running.

Parameters
[in]title_idOptional exact nine-character title ID; NULL accepts any qualifying exclusive process.
Returns
1 when found, 0 when not found, or a negative error code.

◆ ksceAppMgrMmsMount()

int ksceAppMgrMmsMount ( int  mount_id,
char  mount_point[16] 
)

◆ ksceAppMgrPhotoMount()

int ksceAppMgrPhotoMount ( const SceAppMgrPhotoMountParam *  param)

◆ ksceAppMgrTrophyMount()

int ksceAppMgrTrophyMount ( int  mount_id,
ScePID  process_id,
char  mount_point[16] 
)

◆ ksceAppMgrUmount()

int ksceAppMgrUmount ( const char *  mount_point)

◆ ksceAppMgrWorkDirMount()

int ksceAppMgrWorkDirMount ( int  mount_id,
char  mount_point[16] 
)

Variable Documentation

◆ size [1/4]

SceSize SceAppMgrPhotoMountParam::size

Must be the size of this structure.

◆ reserved [1/2]

char SceAppMgrPhotoMountParam::reserved[0x80]

Ignored on FW 3.60.

◆ keystone

SceUInt8 SceAppMgrAcInstResult::keystone[0x60]

Add-on-content keystone.

◆ game_title

char SceAppMgrAcInstResult::game_title[0x80]

NUL-terminated localized game title.

◆ size [2/4]

SceSize SceAppMgrLaunchParam::size

Ignored on FW 3.60; initialize to the size of this structure.

◆ unk_4

unsigned int SceAppMgrLaunchParam::unk_4

◆ unk_8

unsigned int SceAppMgrLaunchParam::unk_8

◆ unk_C

unsigned int SceAppMgrLaunchParam::unk_C

◆ unk_10

unsigned int SceAppMgrLaunchParam::unk_10

◆ unk_14

unsigned int SceAppMgrLaunchParam::unk_14

◆ unk_18

unsigned int SceAppMgrLaunchParam::unk_18

◆ unk_1C

unsigned int SceAppMgrLaunchParam::unk_1C

◆ unk_20

unsigned int SceAppMgrLaunchParam::unk_20

◆ unk_24

unsigned int SceAppMgrLaunchParam::unk_24

◆ unk_28

unsigned int SceAppMgrLaunchParam::unk_28

◆ unk_2C

unsigned int SceAppMgrLaunchParam::unk_2C

◆ unk_30

unsigned int SceAppMgrLaunchParam::unk_30

◆ size [3/4]

SceSize SceAppMgrLaunchAppByPathOpt::size

Must be the size of this structure.

◆ mapping_file_path

char SceAppMgrLaunchAppByPathOpt::mapping_file_path[0x400]

Optional path to a configuration.psp2path file.

◆ app0_path

char SceAppMgrLaunchAppByPathOpt::app0_path[0x400]

Optional fallback source path for the app0: mount.

◆ reserved [2/2]

SceUInt8 SceAppMgrLaunchAppByPathOpt::reserved[0x10]

Ignored on FW 3.60.

◆ size [4/4]

SceSize SceAppMgrDrmOpt::size

Must be the size of this structure.

◆ addcont_id

char SceAppMgrDrmOpt::addcont_id[20]

NUL-terminated additional-content ID of at most 16 characters.

◆ mount_point

char SceAppMgrDrmOpt::mount_point[16]

addcont0: or addcont1:.