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 Again

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



Joined: 03 Aug 2005
Posts: 43

PostPosted: Wed Feb 22, 2006 12:33 am    Post subject: USB Again Reply with quote

Has anyone made any headway with the USB protocol drivers on the PSP? I've managed to make some sense of it, but there are a few calls which register protocol drivers which pass in an unknown structure to set it all up, and I've had no time to look into further recently due to work and having to free time.

If anyone else has make any progress I'd be interested to chat with them about it.

-Jw
Back to top
View user's profile Send private message
psx-frogger



Joined: 16 Jan 2006
Posts: 5

PostPosted: Thu Feb 23, 2006 12:24 am    Post subject: Reply with quote

Hi Jabberwocky,

I think first of all, to ba able to use Usb driver or write own Usb driver we have to discover what it the embedded usb chip enclosed into the PSP.

Do you know it,
or anybody else know usb chip enclosed ?

Regards

psp-frogger
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Thu Feb 23, 2006 3:05 am    Post subject: Reply with quote

You don't need to know the embedded chip I would guess, reversing the USB driver is probably good enough, not sure if anyone has done it yet (at least publically). Of course if we wanted to write our own firmware stuff at somepoint that would be a different matter.
Back to top
View user's profile Send private message
Jabberwocky



Joined: 03 Aug 2005
Posts: 43

PostPosted: Thu Feb 23, 2006 11:14 pm    Post subject: Reply with quote

I have been hacking around with the USB code on the PSP and there appears to be a USB subsystem which you can register custom protocol drivers with. This is how things like the USB mass storage and inter console communication are handled - ie. through different "plugins" for the USB subsystem. You need to know nothing about the USB chipset, just about how to use the USB API. This is the part which is a mystery at the moment.

You appear to be able to register these drivers, then the USB subsystem will call them when connections are made and lost on the USB bus (at least this is my understanding). It looks like you pass a structure to a register your driver which contains callbacks, protocol name and so on. The actual format of this structure and what all the callbacks are for it what is currently eluding me. Although, saying that, I've not had much time to look into it... I was hoping someone out there had done something similar so we could exchange ideas and get things moving again. To me, this has to be the most important thing left to solve in PSP homebrew development.

-Jw
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Feb 27, 2006 12:13 am    Post subject: Reply with quote

*sigh* look at pspusbbus.h in pspsdk, you'll owe me for this one ;)
Back to top
View user's profile Send private message
Jabberwocky



Joined: 03 Aug 2005
Posts: 43

PostPosted: Mon Feb 27, 2006 11:13 pm    Post subject: Reply with quote

Sounds intriguing, although I cant find it in /trunk/pspsdk/src/usb/ or usbstor/ through the SVN web interface (no native TCP client installed here). Is that where it should be?

Thanks!

-Jw
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Feb 28, 2006 2:46 am    Post subject: Reply with quote

http://svn.pspdev.org/filedetails.php?repname=psp&path=%2Ftrunk%2Fpspsdk%2Fsrc%2Fusb%2Fpspusbbus.h&rev=0&sc=0
Back to top
View user's profile Send private message
Timale-Kun



Joined: 14 Jan 2006
Posts: 13
Location: Paris

PostPosted: Tue Feb 28, 2006 4:33 am    Post subject: Reply with quote

As u talk about USB, I've a question, ignore it, if it's too silly for U. It claims that PSP USB is Target (can't send data by itself) but i've notice on PSP-OSS firsts Releases that when I plugged the USB cable the USB Mode started...So does it means it only react with the USB supply Voltage or it can lead to send data via USB from PSP???!! Sorry if it's annoying U
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Feb 28, 2006 4:52 am    Post subject: Reply with quote

Having neither used PSP-OSS or looked at the source (if it is even available) I can only guess they poll for the precence of the USB cable (there is a function to do it). When it detects a USB cable has been plugged in it starts up the USB mass storage driver, nothing too clever about it really.
Back to top
View user's profile Send private message
Timale-Kun



Joined: 14 Jan 2006
Posts: 13
Location: Paris

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

Thanks for the reply
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jabberwocky



Joined: 03 Aug 2005
Posts: 43

PostPosted: Tue Feb 28, 2006 8:02 pm    Post subject: Reply with quote

That's exactly the info I was after, cheers fella! :o) I take it these are fairly standard USB structures? From my little experience of USB a lot of the PSP stuff was quite familiar.

Have you tried writing a USB protocol driver yet, TyRaNiD? I've got a kernel mode PRX build environment setup ready to try this stuff out, and I was just missing the struct definitions, so I'll give it a go when I get a minute. We may not be too far away from getting USB file serving now -- about time.


-- Jw
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Wed Mar 01, 2006 2:54 am    Post subject: Reply with quote

Some bits (the descriptors) are standard USB structures, some of proprietry to the Sony driver.

Quote:
Have you tried writing a USB protocol driver yet, TyRaNiD? I've got a kernel mode PRX build environment setup ready to try this stuff out, and I was just missing the struct definitions, so I'll give it a go when I get a minute. We may not be too far away from getting USB file serving now -- about time.


a) Do you think I would have reversed this and _not_ done something with it?
b) Does no one bother to read the SVN commit logs?

http://svn.pspdev.org/listing.php?repname=psp&path=%2Ftrunk%2Fpsplink%2Fusbhostfs%2F&rev=0&sc=1

There you will find a USB based Host driver which sounds like exactly what you are planning on writing. Then again don't let me stop you doing your own.
Back to top
View user's profile Send private message
Jabberwocky



Joined: 03 Aug 2005
Posts: 43

PostPosted: Wed Mar 01, 2006 3:49 am    Post subject: Reply with quote

a) I was hoping you would have.
b) Nope, tend to read the forums for news. ;o)

Nice one, much kudos to you. Time to get a debug and file server sorted out for Windows.

- Jw
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