 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Wed Jul 04, 2007 11:38 pm Post subject: Need some advice for a filesystem project |
|
|
Hi everyone,
I'm thinking about implementing a different filesystem for accessing the memory stick, FAT is really not good for flash devices anyway, i'm able to redirect access to ms0 to my own driver, and it works in a test homebrew.
But i can't find a way to make the redirect stable , so that XMB will use it.
I'm using CF 3.40, in 1.50 kernel mode, to bypass the protection against redirecting ms0 of newer firmwares. |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Thu Jul 05, 2007 5:15 am Post subject: |
|
|
| You'll need to reimplement fatmsmod.prx & co. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Jul 05, 2007 5:40 am Post subject: |
|
|
| You should probably check for FAT anyway and pass calls along to the old functions (or implement FAT yourself) so that "normal" sticks can also be used by your new fs. |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Jul 05, 2007 6:22 am Post subject: |
|
|
| adrahil wrote: | | You'll need to reimplement fatmsmod.prx & co. |
I don't think that it's really needed, i already can open the raw memstick using sceIoOpen("msstor0:",PSP_O_RDWR,0), so it should be possible to write a driver that acces the raw memory, and call sceAssign("ms0", "my_fs",NULL,IOASSIGN_RDWR,NULL,0)
At this moment i have a prototype driver loaded as a plugin by the custom firmware, it registers the "my_fs" driver, but i can't find a way to call it with my homebrew, if i do
sceIoOpen("my_fs:/whatever",PSP_O_RDWR|PSP_O_CREAT,777)
i got a NODEV error.
Is there anything i'm missing to use a driver registered from a plugin?
It worked perfectly when i was loading the module with pspSdkLoadStartModule from the homebrew |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Jul 05, 2007 11:10 am Post subject: |
|
|
| alexp wrote: |
At this moment i have a prototype driver loaded as a plugin by the custom firmware, it registers the "my_fs" driver, but i can't find a way to call it with my homebrew, if i do
sceIoOpen("my_fs:/whatever",PSP_O_RDWR|PSP_O_CREAT,777)
i got a NODEV error.
Is there anything i'm missing to use a driver registered from a plugin?
It worked perfectly when i was loading the module with pspSdkLoadStartModule from the homebrew |
I've solved this problem, it happens using the 1.50 kernel mode, switching to 3.40 fixes it, but now i need to find out how to circumvent the ms0 redirect protection |
|
| Back to top |
|
 |
kururin
Joined: 05 Jul 2006 Posts: 36
|
Posted: Mon Jul 09, 2007 2:24 am Post subject: |
|
|
Why don't you just delete the current fatms driver, and call your driver the same?
I mean, something like:
sceIoDelDrv("fatms");
sceIoAddDrv(&my_driver); // named "fatms" too
sceIoAssign("ms0:", "msstor0p1:", "fatms0:", IOASSIGN_RDWR, NULL, 0);
Also, the option of replacing fatmsmod of the flash with yours (at least in 3.XX kernel) would be fine, you wouldn't need the assign, because some other module would do it for you.
Btw, can i ask which filesystem are you gonna to implement? Just for curiosity :p |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Mon Jul 09, 2007 5:47 am Post subject: |
|
|
I'm now working on a custom log structured filesytem, which is more adapt to flash memory. It's not easy to implement other log structured filesytem (such as jffs2 or yaffs), because we have no access to the raw memory card, only a block device interface to it. I'm working both to a FUSE implementation of the filesytem under linux and to the psp driver
No plan for a windows port, sorry |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Wed Jul 11, 2007 11:45 am Post subject: |
|
|
hi,
i'm having a bit of problems with my fileystem and i feel i'm missing something.
I'm loading my code as a custom firmware plugin, so in XMB i got correct filesystem size, but if i try to select for example PHOTO, i only get a request for /DCIM, which is not present, so i return 0x80010002 (no such file or directory). I think that i should be getting other dopen request, such as /PSP/PHOTO, so i suspect i'm missing something, should i override something else apart ms0: to make XMB happy?
Thanks a lot for your help guys
Alessandro |
|
| Back to top |
|
 |
kururin
Joined: 05 Jul 2006 Posts: 36
|
Posted: Wed Jul 11, 2007 5:15 pm Post subject: |
|
|
| alexp wrote: | hi,
i'm having a bit of problems with my fileystem and i feel i'm missing something.
I'm loading my code as a custom firmware plugin, so in XMB i got correct filesystem size, but if i try to select for example PHOTO, i only get a request for /DCIM, which is not present, so i return 0x80010002 (no such file or directory). I think that i should be getting other dopen request, such as /PSP/PHOTO, so i suspect i'm missing something, should i override something else apart ms0: to make XMB happy?
Thanks a lot for your help guys
Alessandro |
I think there were two fatms drivers. fatms, and fatmsOem (or something like that). Also, i think you should handle the ioctl and devctl of the original drivers... |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Jul 12, 2007 5:18 am Post subject: |
|
|
| kururin wrote: |
I think there were two fatms drivers. fatms, and fatmsOem (or something like that). Also, i think you should handle the ioctl and devctl of the original drivers... |
I'm not writing a new fatms driver, I'm just doing something like this in my plugin:
sceIoUnassign("msoem0:");
sceIoAssign("msoem0:","pspfs0:",NULL,0, IOASSIGN_RDWR , 0);
sceIoUnassign("ms0:");
sceIoAssign("ms0:","pspfs0:",NULL,0, IOASSIGN_RDWR , 0);
sceIoUnassign("fatms0:");
Strangely enough if i do
sceIoAssign("fatms0:","pspfs0:",NULL,0, IOASSIGN_RDWR , 0);
the memory stick disappear from the xmb menu, anyone knows why?
Alessandro |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Jul 12, 2007 9:35 am Post subject: |
|
|
I'm facing other strange behaviours, i hope someone can explain them to me
i have a DCIM directory in the root of my filesystem, it contains
.
..
101MSDCF <- directory
if i select the MC from the PHOTO menu in XMB, after a dopen & dread call to my filestem i get a call to getstat for /PSP/GAME/101MSDCF%/EBOOT.PBP, is there any reason for that? and most important, then i don't get any more calls, while i was expecting a call to dread for listing the file inside 101MSDCF
Any ideas will be really appreciated, the project is now going fairly well, it's possible from linux to create a directory tree and files around it |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Jul 19, 2007 11:48 pm Post subject: |
|
|
hi,
in the end i was successfull in my file system writing attempt, and during the development i found out the meaning of some new devctl and ioctl codes, I want to release the code, so i was wondering what kind of license i can use,
pspsdk is BSD license, i'd like to release my code under GPL2/3 is that possible? |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Fri Jul 20, 2007 12:39 am Post subject: |
|
|
| Yes |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Fri Jul 20, 2007 2:55 am Post subject: |
|
|
| is it possible to publish it on ps2dev svn server or should i find some other storage solution? |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 750
|
Posted: Fri Jul 20, 2007 8:24 am Post subject: |
|
|
| this link doesn't work at all |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Fri Jul 20, 2007 9:10 am Post subject: |
|
|
| hlide wrote: | | this link doesn't work at all |
Try now |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|