vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysmem_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x40, SceKernelAllocMemBlockOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelFreeMemorySizeInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceKernelMemBlockInfo)
 
SceUID sceKernelAllocMemBlock (const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockOpt *opt)
 Allocates a new memory block. More...
 
int sceKernelFreeMemBlock (SceUID uid)
 Frees new memory block. More...
 
int sceKernelGetMemBlockBase (SceUID uid, void **base)
 Gets the base address of a memory block. More...
 
SceUID sceKernelFindMemBlockByAddr (const void *addr, SceSize size)
 
int sceKernelGetMemBlockInfoByAddr (void *base, SceKernelMemBlockInfo *info)
 
int sceKernelGetMemBlockInfoByRange (void *base, SceSize size, SceKernelMemBlockInfo *info)
 
SceUID sceKernelAllocMemBlockForVM (const char *name, SceSize size)
 
int sceKernelSyncVMDomain (SceUID uid, void *data, SceSize size)
 
int sceKernelOpenVMDomain (void)
 
int sceKernelCloseVMDomain (void)
 
int sceKernelOpenMemBlock (const char *name, int flags)
 
int sceKernelCloseMemBlock (SceUID uid)
 
int sceKernelGetModelForCDialog (void)
 Get the model number of the device. More...
 
int sceKernelGetModel (void)
 Get the model number of the device. More...
 
int sceKernelGetFreeMemorySize (SceKernelFreeMemorySizeInfo *info)
 Get free memory size in bytes. More...
 
int sceKernelIsPSVitaTV (void)
 

Data Structure Documentation

◆ SceKernelAllocMemBlockOpt

struct SceKernelAllocMemBlockOpt
Data Fields
SceSize size
SceUInt32 attr
SceSize alignment
SceUInt32 uidBaseBlock
const char * strBaseBlockName
int flags
int reserved[10] Unknown flags 0x10 or 0x30 for sceKernelOpenMemBlock.

◆ SceKernelFreeMemorySizeInfo

struct SceKernelFreeMemorySizeInfo
Data Fields
int size sizeof(SceKernelFreeMemorySizeInfo)
int size_user Free memory size for *_USER_RW memory.
int size_cdram Free memory size for USER_CDRAM_RW memory.
int size_phycont Free memory size for USER_MAIN_PHYCONT_*_RW memory.

◆ SceKernelMemBlockInfo

struct SceKernelMemBlockInfo
Data Fields
SceSize size
void * mappedBase
SceSize mappedSize
int memoryType
SceUInt32 access
SceKernelMemBlockType type

Enumeration Type Documentation

◆ SceKernelMemoryAccessType

Enumerator
SCE_KERNEL_MEMORY_ACCESS_X 
SCE_KERNEL_MEMORY_ACCESS_W 
SCE_KERNEL_MEMORY_ACCESS_R 

◆ SceKernelMemoryType

Enumerator
SCE_KERNEL_MEMORY_TYPE_NORMAL_NC 
SCE_KERNEL_MEMORY_TYPE_NORMAL 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceKernelAllocMemBlockOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceKernelFreeMemorySizeInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceKernelMemBlockInfo   
)

◆ sceKernelAllocMemBlock()

SceUID sceKernelAllocMemBlock ( const char *  name,
SceKernelMemBlockType  type,
SceSize  size,
SceKernelAllocMemBlockOpt opt 
)

Allocates a new memory block.

Parameters
[in]name- Name for the memory block
[in]type- Type of the memory to allocate. Use SCE_KERNEL_MEMBLOCK_TYPE_USER_*.
[in]size- Size of the memory to allocate
[in]opt- Memory block options?
Returns
SceUID of the memory block on success, < 0 on error.

◆ sceKernelFreeMemBlock()

int sceKernelFreeMemBlock ( SceUID  uid)

Frees new memory block.

Parameters
[in]uid- SceUID of the memory block to free
Returns
0 on success, < 0 on error.

◆ sceKernelGetMemBlockBase()

int sceKernelGetMemBlockBase ( SceUID  uid,
void **  base 
)

Gets the base address of a memory block.

Parameters
[in]uid- SceUID of the memory block to free
[out]base- Base address of the memory block identified by SceUID
Returns
0 on success, < 0 on error.

◆ sceKernelFindMemBlockByAddr()

SceUID sceKernelFindMemBlockByAddr ( const void *  addr,
SceSize  size 
)

◆ sceKernelGetMemBlockInfoByAddr()

int sceKernelGetMemBlockInfoByAddr ( void *  base,
SceKernelMemBlockInfo info 
)

◆ sceKernelGetMemBlockInfoByRange()

int sceKernelGetMemBlockInfoByRange ( void *  base,
SceSize  size,
SceKernelMemBlockInfo info 
)

◆ sceKernelAllocMemBlockForVM()

SceUID sceKernelAllocMemBlockForVM ( const char *  name,
SceSize  size 
)

◆ sceKernelSyncVMDomain()

int sceKernelSyncVMDomain ( SceUID  uid,
void *  data,
SceSize  size 
)

◆ sceKernelOpenVMDomain()

int sceKernelOpenVMDomain ( void  )

◆ sceKernelCloseVMDomain()

int sceKernelCloseVMDomain ( void  )

◆ sceKernelOpenMemBlock()

int sceKernelOpenMemBlock ( const char *  name,
int  flags 
)

◆ sceKernelCloseMemBlock()

int sceKernelCloseMemBlock ( SceUID  uid)

◆ sceKernelGetModelForCDialog()

int sceKernelGetModelForCDialog ( void  )

Get the model number of the device.

Returns
A value from SCE_KERNEL_MODEL

◆ sceKernelGetModel()

int sceKernelGetModel ( void  )

Get the model number of the device.

Returns
A value from SCE_KERNEL_MODEL

◆ sceKernelGetFreeMemorySize()

int sceKernelGetFreeMemorySize ( SceKernelFreeMemorySizeInfo info)

Get free memory size in bytes.

Parameters
[out]info- Returned free memory size for different kind of memory block types
Returns
0 on success, < 0 on error.

◆ sceKernelIsPSVitaTV()

int sceKernelIsPSVitaTV ( void  )