free memory stick space

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

free memory stick space

Post by dbeyer3069 »

Has someone figured out how the PSP returns the amount of free space on the memory stick? I searched in the documentation, these forums and googled and haven't found anything.

I need a function or way to calculate it for an app.

Thanks.

David Beyer
lS[UMD/2kdlSU]
Posts: 8
Joined: Wed Oct 26, 2005 10:08 pm
Location: Shiga, Japan
Contact:

Post by lS[UMD/2kdlSU] »

This is a code posted on 2ch.

Code: Select all

unsigned int buf[5];
unsigned int *pbuf = buf;
sceIoDevctl("ms0:", 0x02425818, &pbuf, sizeof(pbuf), 0, 0);
Then buf[1]*buf[3]*buf[4] should be free space on MemoryStick.
# buf[0]*buf[3]*buf[4] is total space.

source: here
lS[UMD/2kdlSU] - now working as 67...
----------------------------------------------
site: jap | eng
jap blog: here
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

lS[UMD/2kdlSU] wrote:This is a code posted on 2ch.

Code: Select all

unsigned int buf[5];
unsigned int *pbuf = buf;
sceIoDevctl("ms0:", 0x02425818, &pbuf, sizeof(pbuf), 0, 0);
Then buf[1]*buf[3]*buf[4] should be free space on MemoryStick.
# buf[0]*buf[3]*buf[4] is total space.

source: here
Thanks. I will give this a shot.

David Beyer
Post Reply