Hi,
for my program I need raw access to the memorystick. My Idea is to open 'ms0:' like a block device (in linux I would simply open '/dev/ms0' or something like that), but sceIoOpen denies that.
I already searched the forum and found other names for the memorystick device, like 'mscm', mscm0', msstore' ... and so on.
Most of these devices I can sceIoOpen but when I try to read from them, I just get an error.
I am able to raw-access 'umd0:' or any files on the memorystick, but I cant access ms0 as a block-device.
The purpose for this is for example the ability to format the stick by myself through the psp (yes yes, I know, you could do it from the xmb) or to measure the rawspeed of the memorystick (without going through the file-system).
Memorystick Raw Access
The following code works fine.
It seems that the size to read has to be multiple of 512.
I guess that the same goes for writing, but not tested that.
Unlike umd0: where the unit is the sector (2048 bytes), the unit here is the byte.
Code: Select all
SceUID fd = sceIoOpen("msstor0:", PSP_O_RDONLY, 0);
if (fd < 0)
{
// Error handling here
}
int read = sceIoRead(fd, buf, 512);
sceIoClose(fd);
I guess that the same goes for writing, but not tested that.
Unlike umd0: where the unit is the sector (2048 bytes), the unit here is the byte.