2012-11-06 14:45:13 +00:00
|
|
|
#include "MemoryStick.h"
|
2013-02-04 04:31:46 +00:00
|
|
|
#include "ChunkFile.h"
|
2012-11-06 14:45:13 +00:00
|
|
|
|
|
|
|
// MS and FatMS states.
|
|
|
|
static MemStickState memStickState = PSP_MEMORYSTICK_STATE_DRIVER_READY;
|
|
|
|
static MemStickFatState memStickFatState = PSP_FAT_MEMORYSTICK_STATE_ASSIGNED;
|
|
|
|
|
2012-12-27 19:58:15 +00:00
|
|
|
void MemoryStick_DoState(PointerWrap &p)
|
|
|
|
{
|
|
|
|
p.Do(memStickState);
|
|
|
|
p.Do(memStickFatState);
|
|
|
|
p.DoMarker("MemoryStick");
|
|
|
|
}
|
|
|
|
|
2012-11-06 14:45:13 +00:00
|
|
|
MemStickState MemoryStick_State()
|
|
|
|
{
|
|
|
|
return memStickState;
|
|
|
|
}
|
|
|
|
|
|
|
|
MemStickFatState MemoryStick_FatState()
|
|
|
|
{
|
|
|
|
return memStickFatState;
|
|
|
|
}
|
|
|
|
|
|
|
|
u64 MemoryStick_SectorSize()
|
|
|
|
{
|
|
|
|
return 32 * 1024; // 32KB
|
|
|
|
}
|
|
|
|
|
|
|
|
u64 MemoryStick_FreeSpace()
|
|
|
|
{
|
|
|
|
return 1ULL * 1024 * 1024 * 1024; // 1GB
|
2012-11-09 09:01:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void MemoryStick_SetFatState(MemStickFatState state)
|
|
|
|
{
|
|
|
|
memStickFatState = state;
|
|
|
|
}
|