vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceMsInfo
 

Macros

#define SCE_MSIF_SECTOR_SIZE   (0x200)
 

Enumerations

enum  SceMsifErrorCode { SCE_MSIF_ERROR_INTERNAL = 0x803D0000 , SCE_MSIF_ERROR_INVALID_ARGUMENT = 0x803D0001 , SCE_MSIF_ERROR_UNALIGNED_BUFFER = 0x803D0002 , SCE_MSIF_ERROR_WRITE_PROTECTED = 0x803D0003 }
 MSIF errors returned directly by the FW 3.60 sector APIs. More...
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x40, SceMsInfo)
 
int ksceMsifGetMsInfo (SceMsInfo *info)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceMsifErrorCode)
 
int ksceMsifDisableSlowCardMode (void)
 Disable slow-card mode.
 
int ksceMsifEnableSlowCardMode (void)
 Enable slow-card mode.
 
SceBool ksceMsifGetSlowCardModeState (void)
 Check whether slow-card mode is enabled.
 
int ksceMsifReadSector (SceUInt32 sector, void *buffer, SceUInt32 sector_count)
 Read sectors from the Memory Stick medium.
 
int ksceMsifWriteSector (SceUInt32 sector, const void *buffer, SceUInt32 sector_count)
 Write sectors to the Memory Stick medium.
 

Variables

int SceMsInfo::unk_0x00
 
int SceMsInfo::unk_0x04
 
SceUInt64 SceMsInfo::nbytes
 
SceUInt64 SceMsInfo::nbytes2
 
SceUInt32 SceMsInfo::sector_size
 
int SceMsInfo::unk_0x1C
 
SceUInt32 SceMsInfo::fs_offset
 
SceUInt32 SceMsInfo::unk_0x24
 
SceUInt32 SceMsInfo::unk_0x28
 
SceUInt32 SceMsInfo::unk_0x2C
 
SceUInt8 SceMsInfo::id [0x10]
 

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:

SceMsifForDriver_stub




Data Structure Documentation

◆ SceMsInfo

struct SceMsInfo
Data Fields
int unk_0x00
int unk_0x04
SceUInt64 nbytes
SceUInt64 nbytes2
SceUInt32 sector_size
int unk_0x1C
SceUInt32 fs_offset
SceUInt32 unk_0x24
SceUInt32 unk_0x28
SceUInt32 unk_0x2C
SceUInt8 id[0x10]

Macro Definition Documentation

◆ SCE_MSIF_SECTOR_SIZE

#define SCE_MSIF_SECTOR_SIZE   (0x200)

Enumeration Type Documentation

◆ SceMsifErrorCode

MSIF errors returned directly by the FW 3.60 sector APIs.

Enumerator
SCE_MSIF_ERROR_INTERNAL 
SCE_MSIF_ERROR_INVALID_ARGUMENT 
SCE_MSIF_ERROR_UNALIGNED_BUFFER 
SCE_MSIF_ERROR_WRITE_PROTECTED 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/2]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceMsInfo   
)

◆ ksceMsifGetMsInfo()

int ksceMsifGetMsInfo ( SceMsInfo *  info)

◆ VITASDK_BUILD_ASSERT_EQ() [2/2]

VITASDK_BUILD_ASSERT_EQ ( 4  ,
SceMsifErrorCode   
)

◆ ksceMsifDisableSlowCardMode()

int ksceMsifDisableSlowCardMode ( void  )

Disable slow-card mode.

Slow-card mode does not change the MSIF controller clock. It adds minimum completion delays after successful sector reads and writes, including periodic 350 or 400 ms pauses.

Returns
Always 0.

◆ ksceMsifEnableSlowCardMode()

int ksceMsifEnableSlowCardMode ( void  )

Enable slow-card mode.

Returns
Always 0.
See also
ksceMsifDisableSlowCardMode

◆ ksceMsifGetSlowCardModeState()

SceBool ksceMsifGetSlowCardModeState ( void  )

Check whether slow-card mode is enabled.

Returns
SCE_TRUE when enabled, or SCE_FALSE when disabled.

◆ ksceMsifReadSector()

int ksceMsifReadSector ( SceUInt32  sector,
void *  buffer,
SceUInt32  sector_count 
)

Read sectors from the Memory Stick medium.

Parameters
[in]sector- First logical sector to read.
[out]buffer- Destination for sector_count * SCE_MSIF_SECTOR_SIZE bytes. Must be aligned to 4 bytes.
[in]sector_count- Number of sectors to read. Must not be 0.
Returns
0 on success, a negative SceMsifErrorCode value, a mapped medium error, or a fast-mutex error.

◆ ksceMsifWriteSector()

int ksceMsifWriteSector ( SceUInt32  sector,
const void *  buffer,
SceUInt32  sector_count 
)

Write sectors to the Memory Stick medium.

Parameters
[in]sector- First logical sector to write.
[in]buffer- Source containing sector_count * SCE_MSIF_SECTOR_SIZE bytes. Must be aligned to 4 bytes.
[in]sector_count- Number of sectors to write. Must not be 0.
Returns
0 on success, a negative SceMsifErrorCode value, a mapped medium error, or a fast-mutex error.

Variable Documentation

◆ unk_0x00

int SceMsInfo::unk_0x00

◆ unk_0x04

int SceMsInfo::unk_0x04

◆ nbytes

SceUInt64 SceMsInfo::nbytes

◆ nbytes2

SceUInt64 SceMsInfo::nbytes2

◆ sector_size

SceUInt32 SceMsInfo::sector_size

◆ unk_0x1C

int SceMsInfo::unk_0x1C

◆ fs_offset

SceUInt32 SceMsInfo::fs_offset

◆ unk_0x24

SceUInt32 SceMsInfo::unk_0x24

◆ unk_0x28

SceUInt32 SceMsInfo::unk_0x28

◆ unk_0x2C

SceUInt32 SceMsInfo::unk_0x2C

◆ id

SceUInt8 SceMsInfo::id[0x10]