Did any one ever use the memory stick driver from IPL SDK?
Did any one ever use the memory stick driver from IPL SDK?
I am trying to utlize the memory stick driver from the IPL SDK to create something useful, but i am getting increasingly frustrated on it as the ms driver seems not working as expected. The existing driver provides a simple interface to read out one sector (512 bytes) of data at a time. My problem is, when I try to read out the first sector (sector 0), I didn't get the sector 0's data but instead 512 bytes of junk data preceding with lots of zeros. Normally, sector 0 should be something like this:
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 EB 58 90 20 20 20 20 20 20 20 20 00 02 40 20 00 隭? ..@ .
00000010 02 00 00 00 00 F8 00 00 3E 00 A0 00 DE 00 00 00 .....?.>.??..
00000020 E2 07 78 00 C1 03 00 00 00 00 00 00 02 00 00 00 ?x.?..........
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 00 01 29 00 00 00 00 20 20 20 20 20 20 20 20 20 ..)....
00000050 20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00 FAT32 ......
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
But what i was getting was like:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 03800000
9F0C0025 00DE18FE 07E20000 00000078 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 AA550000
Only the last few bytes seem making sense. Is there a different sector numbering system in this physical level compared to the logical level?(whereby sector 0 is actually not sector "0"?) Or, is the memory stick driver from the IPL SDK specifically targetting certain type of psp hardware that is not compatible with mine?
Thanks!
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 EB 58 90 20 20 20 20 20 20 20 20 00 02 40 20 00 隭? ..@ .
00000010 02 00 00 00 00 F8 00 00 3E 00 A0 00 DE 00 00 00 .....?.>.??..
00000020 E2 07 78 00 C1 03 00 00 00 00 00 00 02 00 00 00 ?x.?..........
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 00 01 29 00 00 00 00 20 20 20 20 20 20 20 20 20 ..)....
00000050 20 20 46 41 54 33 32 20 20 20 00 00 00 00 00 00 FAT32 ......
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
But what i was getting was like:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 03800000
9F0C0025 00DE18FE 07E20000 00000078 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 AA550000
Only the last few bytes seem making sense. Is there a different sector numbering system in this physical level compared to the logical level?(whereby sector 0 is actually not sector "0"?) Or, is the memory stick driver from the IPL SDK specifically targetting certain type of psp hardware that is not compatible with mine?
Thanks!
You don't even know how drive formatting works and you're trying to read/write the stick directly? Remind me not to use whatever you're working on when it gets released. :)
A memstick is formatted like a harddrive, not a floppy. If you don't know the difference, you shouldn't be attempting to mess with the memstick.
A memstick is formatted like a harddrive, not a floppy. If you don't know the difference, you shouldn't be attempting to mess with the memstick.
actually I do want to get the first physical sector which, in my mind, should look more like the first table I showed (the one with a text of "FAT32" in between), because that's what i got when i mounted ms0 to my pc through the usb cable and read out sector 0 of that mounted disk via some other tool. But now it seems to me that I could have been having wrong pictures about sector 0 all along. Are you folks suggesting that the first table I showed is just a logical sector while the second one I got is genuinely the first physical sector of the memory stick? I think I should probably do more readings about sectors and file systems...
Well, maybe that other tool showed the first sector of the logical unit. In windows, this would have a drive letter. The physical device wouldn't have any letter, but a name such as \\.\PhysicalDrive0M.Jackson wrote:actually I do want to get the first physical sector which, in my mind, should look more like the first table I showed (the one with a text of "FAT32" in between), because that's what i got when i mounted ms0 to my pc through the usb cable and read out sector 0 of that mounted disk via some other tool. But now it seems to me that I could have been having wrong pictures about sector 0 all along. Are you folks suggesting that the first table I showed is just a logical sector while the second one I got is genuinely the first physical sector of the memory stick? I think I should probably do more readings about sectors and file systems...
You can use the dd command in linux/cygwin like this to get the first sector:
dd if=/dev/sda of=sector.bin bs=512 count=1
where /dev/sda should be replaced with your memory stick device.
The MS Driver works really well -.-
And for FAT support, just look at Tiny-FatFs (http://elm-chan.org/fsw/ff/00index_e.html) where the code was taken from.
And for FAT support, just look at Tiny-FatFs (http://elm-chan.org/fsw/ff/00index_e.html) where the code was taken from.
Haha i got it. the "FAT32" sector is indeed in sector 222. it turns out the "junk data" i got actually tells all the things i needed to know. previously i did roughly know the difference between harddrive and floppy, but it just never came to my mind that the memory stick could have been constructed as complex as a harddrive that can contain multiple partitions. looking back it now makes more sense to me that why ms0 is called ms"0", because theoretically there could be ms1, ms2 and more.
You guys are just amazingly helpful. Great thanks!
You guys are just amazingly helpful. Great thanks!
Cool! I just successfully mounted a vfat fs on the block device controlling the memory stick so that my linux port can now access the ms just the way I wanted to. The only drawback is that i got so excited that i forgot to unmount the thing before shutting down the psp. luckly i didn't damage the fat fs beyond repair -_-!!! Still, this makes me feeling so good right now. Thanks to you guys again!
Ah, good news indeed. Linux isn't very useful if it doesn't have a decent storage medium to load from.M.Jackson wrote:Cool! I just successfully mounted a vfat fs on the block device controlling the memory stick so that my linux port can now access the ms just the way I wanted to. The only drawback is that i got so excited that i forgot to unmount the thing before shutting down the psp. luckly i didn't damage the fat fs beyond repair -_-!!! Still, this makes me feeling so good right now. Thanks to you guys again!
Anyways, this driver is much slower than firmware one, so there is not a "decent" storage medium yet :)J.F. wrote:Ah, good news indeed. Linux isn't very useful if it doesn't have a decent storage medium to load from.M.Jackson wrote:Cool! I just successfully mounted a vfat fs on the block device controlling the memory stick so that my linux port can now access the ms just the way I wanted to. The only drawback is that i got so excited that i forgot to unmount the thing before shutting down the psp. luckly i didn't damage the fat fs beyond repair -_-!!! Still, this makes me feeling so good right now. Thanks to you guys again!
The memory stick reading in mscm is much more complex that this driver that is based on the pre-ipl. Adrahil, you have to make a V2 with whatever trick mscm use to speed things ;)
still its a huge improvement some time ago I was fiddling with the psp Linux ramdisk (porting some small apps like my own address book.) it was hell on wheels trying to fit things in the psps ram 2 times. so any ms access is better than none.Anyways, this driver is much slower than firmware one, so there is not a "decent" storage medium yet :)moonlight wrote: Ah, good news indeed. Linux isn't very useful if it doesn't have a decent storage medium to load from.
The memory stick reading in mscm is much more complex that this driver that is based on the pre-ipl. Adrahil, you have to make a V2 with whatever trick mscm use to speed things ;)
sorry for spelling!