USB Again

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

Moderators: cheriff, TyRaNiD

Post Reply
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

USB Again

Post by Jabberwocky »

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
psx-frogger
Posts: 5
Joined: Mon Jan 16, 2006 7:27 pm

Post by psx-frogger »

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
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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.
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

Post by Jabberwocky »

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
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

*sigh* look at pspusbbus.h in pspsdk, you'll owe me for this one ;)
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

Post by Jabberwocky »

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
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

User avatar
Timale-Kun
Posts: 13
Joined: Sat Jan 14, 2006 8:38 pm
Location: Paris
Contact:

Post by Timale-Kun »

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
Image
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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.
User avatar
Timale-Kun
Posts: 13
Joined: Sat Jan 14, 2006 8:38 pm
Location: Paris
Contact:

Post by Timale-Kun »

Thanks for the reply
Image
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

Post by Jabberwocky »

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
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Some bits (the descriptors) are standard USB structures, some of proprietry to the Sony driver.
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?repna ... 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.
Jabberwocky
Posts: 43
Joined: Wed Aug 03, 2005 6:58 pm

Post by Jabberwocky »

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
Post Reply