SceIdStorage

From Vita Development Wiki
Jump to navigation Jump to search

See Idstorage.

Module

Known NIDs

Version Name World Privilege NID
0.931-3.60 SceIdStorage Non-secure Kernel ?

Libraries

Known NIDs

Version Name World Visibility NID
0.931-3.60 SceIdStorageForDriver Non-secure Kernel 0xE1AC6D7C
0.931 SceIdStorage Non-secure Usermode 0xC27594F4

SceIdStorageForDriver

sceIdStorageCreateAtomicLeavesForDriver

Version NID
0.931-3.60 0x99ACCB71

Creates multiple leaves as an atomic operation. Because each leaf is only one block in size (0x200 Bytes), data requiring more than 0x200 bytes will need more than one leaf. This function allows to create multiple leaves as a single operation. This saves from having to call sceIdStorageCreateLeaf for each individual leaf. A good example of this are the UMD keys (0x102-0x106), which hold a single continuous stream of data split over 5 seperate leaves:

SceUInt16 umdKeys[5] = {0x102, 0x103, 0x104, 0x105, 0x106};
sceIdStorageCreateAtomicLeaves(umdKeys, 5);
// keys is the array of leaf keys to create
// numLeaves is the number of leaves to create
// Returns 0 on success.
// Returns 0x80230000 if PSVita is not in manufacturing mode
// Returns 0x80230001 if key > 0xFFEF
// Returns 0x80230002 if out-of-bounds numLeaves
// Returns 0x80230003 if IDStorage is not formatted
// Returns 0x80230004 if SceIdStorage heap error
// Returns 0x80230006 if key already exists
// Returns 0xffffffff if IDStorage is read-only
int sceIdStorageCreateAtomicLeavesForDriver(SceUInt16 *keys, SceUInt32 numLeaves);

sceIdStorageCreateLeafForDriver

Version NID
0.931-3.60 0x08A471A6
int sceIdStorageCreateLeafForDriver(SceUInt16 key);

sceIdStorageDeleteLeafForDriver

Version NID
0.931-3.60 0x2C97AB36
int sceIdStorageDeleteLeafForDriver(SceUInt16 key);

sceIdStorageEnumIdForDriver

Version NID
0.931-3.60 0x31E08AFB

Locks then unlocks the IDStorage enumerator mutex.

Returns 0 on success.

int sceIdStorageEnumIdForDriver(void);

sceIdStorageGetFreeLeavesForDriver

Version NID
0.931-3.60 0x37833CB8
int sceIdStorageGetFreeLeavesForDriver(void);

sceIdStorageGetLeafSizeForDriver

Version NID
0.931-3.60 0xEB830733
SceSize sceIdStorageGetLeafSizeForDriver(void);

sceIdStorageLookupForDriver

Version NID
0.931-3.60 0x6FE062D1

Retrieves the value associated with a key.

// key - idstorage key
// offset - offset within the 512 byte leaf
// buf - buffer with enough storage
// len - amount of data to retrieve (offset + len must be <= 512 bytes)
// Returns 0x80230000 if offset + size > 512.
// Returns 0x80230001 if key > 0xFFEF.
// Returns 0x80230003 if IDStorage is not formatted.
// Returns 0x80230005 for enumerator issue.
int sceIdStorageLookupForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);

sceIdStorageReadLeafForDriver

Version NID
0.931-3.60 0xEB00C509

Reads the whole 512 byte container for the idstorage key.

// key - idstorage key
// buf - buffer with at last 512 bytes of storage
int sceIdStorageReadLeafForDriver(SceUInt16 key, void *buf);

sceIdStorageWriteLeafForDriver

Version NID
0.931-3.60 0x1FA4D135

Writes 512-bytes to the idstorage key.

// key - idstorage key
// buf - buffer of at least 512 bytes
// Returns 0x80230001 if key > 0xFFEF.
// Returns 0x80230003 if IDStorage is not formatted.
// Returns 0x80230005 for enumerator issue.
// Returns 0xffffffff if IDStorage is read-only.
int sceIdStorageWriteLeafForDriver(SceUInt16 key, const void *buf);

sceIdStorageFlushForDriver

Version NID
0.931-3.60 0x3AD32523

Finalizes a write.

int sceIdStorageFlushForDriver(void);

sceIdStorageIsFormattedForDriver

Version NID
0.931-3.60 0xFEFA40C2

Check if the IdStorage is formatted.

char sceIdStorageIsFormattedForDriver(void);

sceIdStorageIsDirtyForDriver

Version NID
0.931-3.60 0xB9069BAD

Check if IdStorage has superficial damage.

char sceIdStorageIsDirtyForDriver(void);

sceIdStorageIsReadOnlyForDriver

Version NID
0.931-3.60 0x2D633688

Checks idstorage for readonly status.

char sceIdStorageIsReadOnlyForDriver(void);

sceIdStorageFormatForDriver

Version NID
0.931-3.60 0x958089DB

Format IDStorage (with values like 0xfff5 and 0xffff).

// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode.
int sceIdStorageFormatForDriver(void);

sceIdStorageUnformatForDriver

Version NID
0.931-3.60 0xF4BCB3EE

Clears IDStorage (zeroes it).

// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode.
int sceIdStorageUnformatForDriver(void);

sceIdStorageUpdateForDriver

Version NID
0.931-3.60 0x683AAC10

Inverse function of sceIdStorageLookupForDriver.

// key - idstorage key
// offset - offset within the 512 byte leaf
// buf - buffer with enough storage
// size - amount of data to write (offset + size must be <= 512 bytes)
// Returns 0 on success.
// Returns 0x80230000 if PSVita is not in manufacturing mode, 0xffffffff if IDStorage is read-only.
// Returns 0x80230000 if offset + size > 512, 0x80230001 if key > 0xFFEF.
// Returns 0x80230003 if IDStorage is not formatted, 0x80230005 for enumerator issue.
int sceIdStorageUpdateForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);

sceIdStorageRestartForDriver

Version NID
0.931-3.60 0x60B647A5
// flush: set to true to call sceIdStorageFlushForDriver
// Returns 0 on success.
// Returns 0x80230000 if PSVita is not in manufacturing mode.
// Returns 0x80230004 if SceIdStorage heap error.
int sceIdStorageRestartForDriver(SceBool flush);

SceIdStorage

sceIdStorageUpdate

Version NID
0.931 0x03D78B85
int sceIdStorageUpdate(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);

sceIdStorageFlush

Version NID
0.931 0x0A9A0ACF
int sceIdStorageFlush(void);

sceIdStorageRestart

Version NID
0.931 0x0E66352F
int sceIdStorageRestart(SceBool flush);

sceIdStorageIsDirty

Version NID
0.931 0x17F41BC5
char sceIdStorageIsDirty(void);

sceIdStorageFormat

Version NID
0.931 0x181BE2F8
int sceIdStorageFormat(void);

sceIdStorageIsReadOnly

Version NID
0.931 0x64395003
char sceIdStorageIsReadOnly(void);

sceIdStorageLookup

Version NID
0.931 0xAA2E5186
int sceIdStorageLookup(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);

sceIdStorageUnformat

Version NID
0.931 0xB41D010F
int sceIdStorageUnformat(void);

sceIdStorageWriteLeaf

Version NID
0.931 0xBB48CAA2
int sceIdStorageWriteLeaf(SceUInt16 key, const void *buf);

sceIdStorageReadLeaf

Version NID
0.931 0xBC17BCBD
int sceIdStorageReadLeaf(SceUInt16 key, void *buf);

sceIdStorageCreateLeaf

Version NID
0.931 0xC78A732C
int sceIdStorageCreateLeaf(SceUInt16 key);

sceIdStorageIsFormatted

Version NID
0.931 0xD2EA13E5
char sceIdStorageIsFormatted(void);

sceIdStorageGetFreeLeaves

Version NID
0.931 0xDE264DBD
int sceIdStorageGetFreeLeaves(void);

sceIdStorageGetLeafSize

Version NID
0.931 0xE68DEF55
SceSize sceIdStorageGetLeafSize(void);

sceIdStorageCreateAtomicLeaves

Version NID
0.931 0xEA05C0D3
int sceIdStorageCreateAtomicLeaves(SceUInt16 *keys, SceUInt32 numLeaves);

sceIdStorageDeleteLeaf

Version NID
0.931 0xFB757107
int sceIdStorageDeleteLeaf(SceUInt16 key);