forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

USB in user mode?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Tue Feb 28, 2006 5:55 am    Post subject: USB in user mode? Reply with quote

Sorry if my question is dumb or has already been answered, but can someone tell me if it's possible to enable USB trough USER mode please? I heard something about this some time ago, but I can't find it anymore...
The method I currently use is the one from PSPSDK SVN samples (load usb driver, etc.), and it needs KERNEL mode to run... :-(
Thanks in advance for your help :-)
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Feb 28, 2006 6:25 am    Post subject: Reply with quote

You theoretically can, but the trouble is you cannot load the USB drivers to begin with. The actual code to startup the USb driver is accessible from user mode.
Back to top
View user's profile Send private message
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Thu Mar 02, 2006 5:01 am    Post subject: Reply with quote

As a side note, the USB drivers appear to all be already loaded appropriately in VSH mode, so if you're running your app via the v2.0 TIFF exploit, then you can have basic USB support in user mode :).

On the topic of kernel mode being required to load kernel modules - has anyone done any digging into how UMD games load their network support? I had a poke around on GTA to try to see how it does it, but all I can see are sceKernelLoadModuleById() calls being called on file descriptors to fairly boring modules (libatrac3, IIRC). No mention whatsoever of the network libs, yet I'm sure that they're loaded dynamically because they're not present in memory dumps taken from the game save exploit.

I aim to take a look at some other apps (e.g. Wipeout) to see if I can see what they're doing to enable infrastructure support, but maybe someone is way ahead of me on this already?
_________________
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Thu Mar 02, 2006 5:33 am    Post subject: Reply with quote

The kernel permits certain device to be used as a target for LoadModule et al. UMD being the obvious case. Unfortunately flash isn't one of them, nor is MS. There is the LoadModuleMS call but from the testing I did a while back that would only load encrypted kernel modules, not user modules which would be necessary for loading the network libraries.

You could theoretically load the network modules straight off the UMD in GTA I would expect using sceKernelLoadModule or sceKernelLoadModuleId unless Sony have changed things around (I doubt it very much).
Back to top
View user's profile Send private message
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Thu Mar 02, 2006 6:42 am    Post subject: Reply with quote

That's the thing, I'm sure that games using the network must be loading their modules from the UMD.

But for the life of me I can't see how GTA is doing it - LoadModuleById() is the only relevant function it imports from ModuleMgr, but that is only called by a small number of code paths, none of which seem related to the network. Plus, the filename for the network modules never appears in BOOT.BIN (whereas the ATRAC3 module does).

Incidentally, vshLoadModule is able to load some modules (I haven't fully explored the exhaustive list) from flash, but not the MS, if you happen to have VSH privileges (and library) available.
_________________
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Thu Mar 02, 2006 6:45 am    Post subject: Reply with quote

Unfortunately I do not have GTA so cannot really help you there but as you say it must be doing it somewhere.

And yesy vsh stuff can load different modules, it needs to be able to do so. I would assume you could also load modules into a ram buffer and call vshLoadModuleBuffer on them but yet to actually try that in practice.
Back to top
View user's profile Send private message
hubevolution



Joined: 17 Mar 2004
Posts: 32

PostPosted: Fri Mar 17, 2006 8:55 pm    Post subject: Reply with quote

Fanjita wrote:
Incidentally, vshLoadModule is able to load some modules (I haven't fully explored the exhaustive list) from flash, but not the MS, if you happen to have VSH privileges (and library) available.


well in any case GTA does not run in VSH mode am I right ? so it cannot call the vshLoadModule.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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