vitasdk
Documentation of the vitasdk

Exports for User. More...

Functions

 __attribute__ ((__noreturn__)) void __stack_chk_fail(void)
 Terminates execution after a stack-protector check fails.
 
SceInt32 sceKernelBacktrace (SceUID thread_id, SceKernelCallFrame *call_frame_buffer, SceSize num_bytes_buffer, SceUInt32 *num_frames, SceInt32 mode)
 Gets a thread backtrace.
 
SceInt32 sceKernelBacktraceSelf (SceKernelCallFrame *call_frame_buffer, SceSize num_bytes_buffer, SceUInt32 *num_frames, SceInt32 mode)
 Gets a backtrace of the calling thread.
 
int sceKernelCancelTimer (SceUID timer_id, SceUInt32 *num_wait_threads)
 Disarms a timer event and cancels all waits on the timer.
 
int sceKernelGetTimerBase (SceUID timer_id, SceKernelSysClock *base_time)
 Gets a timer's reference process time.
 
int sceKernelGetTimerEventRemainingTime (SceUID timer_id, SceKernelSysClock *remaining_time)
 Gets the remaining duration before an armed timer event.
 
int sceKernelGetTimerInfo (SceUID timer_id, SceKernelTimerInfo *info)
 Gets timer information.
 
int sceKernelGetTimerTime (SceUID timer_id, SceKernelSysClock *timer_time)
 Gets the current timer time.
 
SceInt32 sceKernelPrintBacktrace (const SceKernelCallFrame *call_frame, SceUInt32 num_frames)
 Prints call frames for the current process.
 
int sceKernelSetTimerEvent (SceUID timer_id, SceKernelTimerType type, const SceKernelSysClock *interval, SceBool repeat)
 Arms a timer event after a relative interval.
 
int sceKernelSetTimerTime (SceUID timer_id, SceKernelSysClock *timer_time)
 Sets the current timer time.
 
int sceSblGcAuthMgrGetMediaIdType01 (SceMediaIdType01 *media_id)
 Gets the 0x20-byte type 01 media ID produced by the game-card authentication state.
 
int sceSblGcAuthMgrPcactActivation (const ScePcactActivationData *act_data, SceSize act_data_size)
 Installs PC activation data.
 
int sceSblGcAuthMgrPcactGetChallenge (SceUInt32 mode, const SceUInt8 *epassword, ScePcactChallenge *challenge)
 Creates a PC activation challenge.
 
int sceSblGcAuthMgrPkgVry (const SceUInt8 *hash, const SceUInt8 *signature)
 Verifies a package ECDSA-160 signature.
 
SceInt32 sceKernelWaitEvent (SceUID event_id, SceUInt32 wait_pattern, SceUInt32 *result_pattern, SceUInt64 *user_data, SceUInt32 *timeout)
 Waits until any requested event bit is present.
 

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceLibKernel_stub



Function Documentation

◆ __attribute__()

__attribute__ ( (__noreturn__)  )

Terminates execution after a stack-protector check fails.

◆ sceKernelBacktrace()

SceInt32 sceKernelBacktrace ( SceUID  thread_id,
SceKernelCallFrame *  call_frame_buffer,
SceSize  num_bytes_buffer,
SceUInt32 *  num_frames,
SceInt32  mode 
)

Gets a thread backtrace.

Parameters
[in]thread_idThread ID, or SCE_KERNEL_BACKTRACE_CONTEXT_CURRENT.
[out]call_frame_bufferBuffer that receives the call frames, or NULL when num_bytes_buffer is 0.
[in]num_bytes_bufferSize of the call-frame buffer in bytes. A non-NULL buffer must hold at least one frame.
[out]num_framesOptional pointer that receives the number of frames written to the output buffer.
[in]modeBitwise OR of SceKernelBacktraceMode values.
Returns
With SCE_KERNEL_BACKTRACE_MODE_DONT_EXCEED, 0 on success. Otherwise, the complete call-stack depth on success, even when the output buffer is too small to contain every frame. Returns < 0 on error.

◆ sceKernelBacktraceSelf()

SceInt32 sceKernelBacktraceSelf ( SceKernelCallFrame *  call_frame_buffer,
SceSize  num_bytes_buffer,
SceUInt32 *  num_frames,
SceInt32  mode 
)

Gets a backtrace of the calling thread.

Parameters
[out]call_frame_bufferBuffer that receives the call frames, or NULL when num_bytes_buffer is 0.
[in]num_bytes_bufferSize of the call-frame buffer in bytes. A non-NULL buffer must hold at least one frame.
[out]num_framesOptional pointer that receives the number of frames written to the output buffer.
[in]modeBitwise OR of SceKernelBacktraceMode values.
Returns
With SCE_KERNEL_BACKTRACE_MODE_DONT_EXCEED, 0 on success. Otherwise, the complete call-stack depth on success, even when the output buffer is too small to contain every frame. Returns < 0 on error.

◆ sceKernelCancelTimer()

int sceKernelCancelTimer ( SceUID  timer_id,
SceUInt32 *  num_wait_threads 
)

Disarms a timer event and cancels all waits on the timer.

Parameters
[in]timer_idTimer identifier.
[out]num_wait_threadsOptional pointer that receives the number of threads whose waits were canceled.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetTimerBase()

int sceKernelGetTimerBase ( SceUID  timer_id,
SceKernelSysClock *  base_time 
)

Gets a timer's reference process time.

Parameters
[in]timer_idTimer identifier.
[out]base_timeMust be non-NULL. Receives 0 while the timer is stopped, or its reference process time as a SceKernelSysClock value while it is active.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetTimerEventRemainingTime()

int sceKernelGetTimerEventRemainingTime ( SceUID  timer_id,
SceKernelSysClock *  remaining_time 
)

Gets the remaining duration before an armed timer event.

Parameters
[in]timer_idTimer identifier.
[out]remaining_timeMust be non-NULL. Receives the remaining duration as a SceKernelSysClock value.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetTimerInfo()

int sceKernelGetTimerInfo ( SceUID  timer_id,
SceKernelTimerInfo *  info 
)

Gets timer information.

Parameters
[in]timer_idTimer identifier.
[in,out]infoMust point to a SceKernelTimerInfo structure. Its first field, size, sets the exact number of bytes copied to and from the structure, up to the full 0x60-byte structure on FW 3.60.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetTimerTime()

int sceKernelGetTimerTime ( SceUID  timer_id,
SceKernelSysClock *  timer_time 
)

Gets the current timer time.

Parameters
[in]timer_idTimer identifier.
[out]timer_timeMust be non-NULL. Receives the current timer time as a SceKernelSysClock value.
Returns
0 on success, or < 0 on error.

◆ sceKernelPrintBacktrace()

SceInt32 sceKernelPrintBacktrace ( const SceKernelCallFrame *  call_frame,
SceUInt32  num_frames 
)

Prints call frames for the current process.

Parameters
[in]call_frameCall frames to print. Must be non-NULL even when num_frames is 0.
[in]num_framesNumber of entries in call_frame.
Returns
0 on success, or < 0 on error.

◆ sceKernelSetTimerEvent()

int sceKernelSetTimerEvent ( SceUID  timer_id,
SceKernelTimerType  type,
const SceKernelSysClock *  interval,
SceBool  repeat 
)

Arms a timer event after a relative interval.

Parameters
[in]timer_idTimer identifier.
[in]typeNotification behavior selected from SceKernelTimerType.
[in]intervalMust be non-NULL. Points to the relative interval expressed as a SceKernelSysClock value.
[in]repeatNonzero to rearm the event periodically.
Returns
0 on success, or < 0 on error.

◆ sceKernelSetTimerTime()

int sceKernelSetTimerTime ( SceUID  timer_id,
SceKernelSysClock *  timer_time 
)

Sets the current timer time.

Parameters
[in]timer_idTimer identifier.
[in,out]timer_timeMust be non-NULL. Contains the new timer time as a SceKernelSysClock value. For callers targeting SDK version 2.00 or newer, it receives the previous timer time on return; older target SDK versions do not receive that value.
Returns
0 on success, or < 0 on error.

◆ sceSblGcAuthMgrGetMediaIdType01()

int sceSblGcAuthMgrGetMediaIdType01 ( SceMediaIdType01 *  media_id)

Gets the 0x20-byte type 01 media ID produced by the game-card authentication state.

Parameters
[out]media_id- Output media ID.
Returns
0 on success, < 0 on error.

◆ sceSblGcAuthMgrPcactActivation()

int sceSblGcAuthMgrPcactActivation ( const ScePcactActivationData *  act_data,
SceSize  act_data_size 
)

Installs PC activation data.

The key envelope is verified against the saved challenge state before the trailing 0x1040-byte activation payload is written.

Parameters
[in]act_data- Pointer to a 0x1090-byte activation object.
[in]act_data_size- Must be 0x1090.
Returns
0 on success, < 0 on error.

◆ sceSblGcAuthMgrPcactGetChallenge()

int sceSblGcAuthMgrPcactGetChallenge ( SceUInt32  mode,
const SceUInt8 *  epassword,
ScePcactChallenge *  challenge 
)

Creates a PC activation challenge.

Parameters
[in]mode- Challenge mode. Mode 0 is rejected until the previously recorded expiration tick has passed. Mode 1 requires that no readable activation data exists and records a new expiration. Mode 2 bypasses the expiration check.
[in]epassword- Pointer to a 0x20-byte input buffer.
[out]challenge- Receives the 0x80-byte challenge.
Returns
0 on success, < 0 on error.

◆ sceSblGcAuthMgrPkgVry()

int sceSblGcAuthMgrPkgVry ( const SceUInt8 *  hash,
const SceUInt8 *  signature 
)

Verifies a package ECDSA-160 signature.

Parameters
[in]hash- Pointer to a 0x14-byte SHA-1 digest.
[in]signature- Pointer to a 0x28-byte ECDSA signature.
Returns
0 if the signature is valid, < 0 on error.

◆ sceKernelWaitEvent()

SceInt32 sceKernelWaitEvent ( SceUID  event_id,
SceUInt32  wait_pattern,
SceUInt32 *  result_pattern,
SceUInt64 *  user_data,
SceUInt32 *  timeout 
)

Waits until any requested event bit is present.

When the event has the auto-clear attribute, the matched bits are removed after a successful wait. This function does not dispatch callbacks while blocked.

Parameters
[in]event_idEvent identifier.
[in]wait_patternPattern of bits to wait for.
[out]result_patternOptional pointer that receives the matched bits.
[out]user_dataOptional pointer that receives the event's user data.
[in,out]timeoutOptional timeout in microseconds. If the call blocks, it receives the remaining duration; it receives 0 when the timeout expires. It is left unchanged when the wait is satisfied immediately.
Returns
0 on success, or < 0 on error.