PSP as gamepad fo PC
PSP as gamepad fo PC
Hi,
I'm prototyping a project for a PSP and would like to use the PSP itself as a controller for the initial PC prototype. I like fast turnaround times, and I have better framework to get started in PC so I will not make to prototype for PSP yet.
Does anyone know if there is similar projects already available?
If not, I think I have to go and make one :) I do not have the serial cable or IrDA port on my pc, so those solutions for communication are not viable at the moment for me. I think the USB communication (except for enabling the storage) has not been figured out yet. It would be super nice to just write a common joystick protocol for PSP and let the windows understand it as gamepad :).
Wlan is pretty much the only viable solution I can imagine at the moment. I'm a bit puzzled though, since the stuff in svn seems to be outdated (?) compared to the bits and pieces I've heard her at the forums and I have nerver written a piece of net code before. Is there any examples for psp talking to pc and vice versa which I could use to get started?
I'm not really interested for a grand unified solution (like to write an actualy device driver for windows), I'd just like to get the control data from PSP in realtime.
Thanks!
I'm prototyping a project for a PSP and would like to use the PSP itself as a controller for the initial PC prototype. I like fast turnaround times, and I have better framework to get started in PC so I will not make to prototype for PSP yet.
Does anyone know if there is similar projects already available?
If not, I think I have to go and make one :) I do not have the serial cable or IrDA port on my pc, so those solutions for communication are not viable at the moment for me. I think the USB communication (except for enabling the storage) has not been figured out yet. It would be super nice to just write a common joystick protocol for PSP and let the windows understand it as gamepad :).
Wlan is pretty much the only viable solution I can imagine at the moment. I'm a bit puzzled though, since the stuff in svn seems to be outdated (?) compared to the bits and pieces I've heard her at the forums and I have nerver written a piece of net code before. Is there any examples for psp talking to pc and vice versa which I could use to get started?
I'm not really interested for a grand unified solution (like to write an actualy device driver for windows), I'd just like to get the control data from PSP in realtime.
Thanks!
At this point, what you want would be best accomplished using Wlan. I suggest looking at the libnet included in the FTPD source code (http://www.amoks.com/extra/FTPDv0_21.zip) You should be able to adapt this code to your purposes pretty easily. You could even use FTP and simply modify the commands to CROSS, TRIANGLE, SQUARE, CIRCLE instead of USER, PASS, STOR, RETR... but that's up to you and whatever app is getting the data on the PC. Hope that solves your problem.
That FTPd sample was actually reeeally old, so it did not work. Psppet's wifi sample is way better to get started and works brilliantly: http://aibopet.com/psp/wifitest.htm. (I'm pretty sure I could have found that with some more through out search on the forum.)
After a couple of hours I got it all working! There is an interesting problem, though. I only need to send 6 bytes per frame, but unless I add some payload there is huge latency. At the moment I'm sending 256 byte packets resulting 15.3k/s, which seem to work ok.
Does anyone know what would be the best packet size for least altency or is that something that depends in ten different things?
After a couple of hours I got it all working! There is an interesting problem, though. I only need to send 6 bytes per frame, but unless I add some payload there is huge latency. At the moment I'm sending 256 byte packets resulting 15.3k/s, which seem to work ok.
Does anyone know what would be the best packet size for least altency or is that something that depends in ten different things?
Yeah TCP is a lot more regulated, UDP is the way to go if you're looking for speed. I don't even know if you can force the PSP to send TCP data as soon as it can... But I'd recommend spending some time with UDP and just working through it. It will work much faster, although you'll lose a bit of error checking (which might mean something seeing as you're going over a wireless connection) Anyways, good luck, and if you need any help on the PC end of things, I have quite a bit of netcode experience in Windows.
The UDP was the solution :) Now I'm able to send nice 11 byte packets at good rate. I finally settled to a solution, where the psp just sends the data to the server/host/pc at constant rate and the host just listens to a certain port and waits for something to be retrieved. It turned out to be much easier solution than the original with TCP.
If someone is interested, here's the stuff:
http://www.moppiproductions.net/memon/s ... er-010.zip
I bet a lot of people will not find that very usefull, though :)
But for me, it already proved that the controls I tested to work very well with a ps2 style gamepad suck on psp because of the very very badly placed analog nub (why could not they put it above the d-pad, oh why?)
If someone is interested, here's the stuff:
http://www.moppiproductions.net/memon/s ... er-010.zip
I bet a lot of people will not find that very usefull, though :)
But for me, it already proved that the controls I tested to work very well with a ps2 style gamepad suck on psp because of the very very badly placed analog nub (why could not they put it above the d-pad, oh why?)
I've actually done this before it was terribly slow and was very sensetive i had a serial IR device on my computer and a program which you could set certant key to certant IR signals i then simply made a program that sent out different signals. ;) I don't have anymore I think i mentioned it on this board, but that was when it had the other forum and stuff.
Good Luck I hope you have better luck than i did ;)
-EdwardFMA
Good Luck I hope you have better luck than i did ;)
-EdwardFMA
EdwardFMA/IchigoKurosaki - PSP Expert
Athlon 64 - Socket 939 - 3000+
1GB 333 DDR-Ram
Geforce 6600 GT PCI-Express
Orbis PSP Development
Open-Source Development
Athlon 64 - Socket 939 - 3000+
1GB 333 DDR-Ram
Geforce 6600 GT PCI-Express
Orbis PSP Development
Open-Source Development
Nice job... not useful as of yet, but it has potential :) I'm checking out the udp stuff as I am about to get into that.
Not sure what your intentions are with this, but I would like to see profiles for button mapping to keyboard (with maybe an image displayed that describes the button presses for that profile). With little modification, you could have a profile for say... controlling winamp.
Keep up the good work...
LiQuiD8d
p.s. also.. does it really need to send the data if the controllers state hasn't changed?
Not sure what your intentions are with this, but I would like to see profiles for button mapping to keyboard (with maybe an image displayed that describes the button presses for that profile). With little modification, you could have a profile for say... controlling winamp.
Keep up the good work...
LiQuiD8d
p.s. also.. does it really need to send the data if the controllers state hasn't changed?
This would be just excellent. Currently im using the IR receiver, a ps2 to USB adapter and joy to key (http://www.vector.co.jp/soft/win95/util/se101657.html) to use the PSP as a remote for a media center pc, but being able to do it over wifi would be amazing.
Very interested in the outcome of this, keep up the good work!
Very interested in the outcome of this, keep up the good work!
My motovation was to just get the data from the psp to the PC for a game prototype - which at this moment only works on PC - to test the controls on the real thing. So I'm not going to go any forther at this point. As for sending the stuff constantly, you propably could do some optimisation there, but 11B*60Hz = 660bytes/sec is not worrying me too much :) There's still plenty of bandwidth to leach the pr... programming related material.
OH MY GOD! That is amazing!
I can see my self playing all my fravorate PC games with this thing!
Maybe you could write a Windows Joystick Driver that works with it? I dont know!
It seems real fast to me.
Edit: I just got a idea, I can code a server in Visual Basic, I dont know C++ but I own at VB :P. I know people hate that language!
Edit 2: I might have a nice looking server soon. I have figured out your protocol (well most of it). I think I just need it to interface with the keyboard and mouse which is easy :). Right now, it looks like this (Its just a load of debug data):
Not done any GUI just finished figuring out what number does what.
Sorry for turning this post into a blog :P Gonna be playing all my games with a very expensive gamepad soon :)
I can see my self playing all my fravorate PC games with this thing!
Maybe you could write a Windows Joystick Driver that works with it? I dont know!
It seems real fast to me.
Edit: I just got a idea, I can code a server in Visual Basic, I dont know C++ but I own at VB :P. I know people hate that language!
Edit 2: I might have a nice looking server soon. I have figured out your protocol (well most of it). I think I just need it to interface with the keyboard and mouse which is easy :). Right now, it looks like this (Its just a load of debug data):
Not done any GUI just finished figuring out what number does what.
Sorry for turning this post into a blog :P Gonna be playing all my games with a very expensive gamepad soon :)
I am planning a spin off to his project.
I think I might either:
Keep his client software and use my own server.
OR
Recode the whole PSP client in LUA
If you are wondering what the server looks like right now, here it is:
It will look better than that when its done :)
I still have a heap of work to do on it, but it will be worth it. At the moment, I can move my mouse around the screen with my analog stick.
Many thanks to memon for the idea and the origional client/server software, he will get some credit :)
I think I might either:
Keep his client software and use my own server.
OR
Recode the whole PSP client in LUA
If you are wondering what the server looks like right now, here it is:
It will look better than that when its done :)
I still have a heap of work to do on it, but it will be worth it. At the moment, I can move my mouse around the screen with my analog stick.
Many thanks to memon for the idea and the origional client/server software, he will get some credit :)
Looking good so far :-) .Rich43 wrote:I am planning a spin off to his project.
I think I might either:
Keep his client software and use my own server.
OR
Recode the whole PSP client in LUA
If you are wondering what the server looks like right now, here it is:
*IMG Removed*
It will look better than that when its done :)
I still have a heap of work to do on it, but it will be worth it. At the moment, I can move my mouse around the screen with my analog stick.
Many thanks to memon for the idea and the origional client/server software, he will get some credit :)
This project interests me because if they implemented the PSP as a type of controller for the PC, I could then maybe control what music is playing on my computer all around the house by assigning hotkeys to Winamp and then "hitting" those keys through my PSP. Would be one of those programs that I would use if I had, but probably live without.
I have used PPJoy in the past to use a Playstation 1 controller connected to the parallel port as a Gamepad in Windows XP.
The good thing is that PPJoy also supports custom interfaces (Virtual Joystick is the keyword to look for on the PPJoy website). So somebody could just write a PSP specific interface (a DLL I think) for PPJoy without actually having to care about all the windows device driver and direct input stuff.
Have a look here for all the details:
http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm
The good thing is that PPJoy also supports custom interfaces (Virtual Joystick is the keyword to look for on the PPJoy website). So somebody could just write a PSP specific interface (a DLL I think) for PPJoy without actually having to care about all the windows device driver and direct input stuff.
Have a look here for all the details:
http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm
hey rich, how is it going?
i can't wait till this is done, if it only controls keyboard then that can do for now
i can set games to keyboard and assign the keys? :)
how long do you think it will take to be done?
i heard that pspupdates has someone trying to make the same thing
can't find it though
i can't wait till this is done, if it only controls keyboard then that can do for now
i can set games to keyboard and assign the keys? :)
how long do you think it will take to be done?
i heard that pspupdates has someone trying to make the same thing
can't find it though
Edward`
Well I did the stupidest thing a developer could do, Accidentally overwrite one of the source files (full of lots of code) with something else.
So basically, I have lost a load of code but I will re-code it, I do need this myself!
I cant believe what a stupid thing I did!
oh and If anyone is good at making ICO files, ya can make me a PSP Controller icon if u want :)
So basically, I have lost a load of code but I will re-code it, I do need this myself!
I cant believe what a stupid thing I did!
oh and If anyone is good at making ICO files, ya can make me a PSP Controller icon if u want :)
I'm sorry for the source file, I hope you rewrite it soon. I have a PSP icon you can have for your project. Here's a preview:
And here's the icon file:
http://www.sendmefile.com/00208977
And here's the icon file:
http://www.sendmefile.com/00208977
Tnx for the icon, I cant get the File downloading website to work, you can email it to me: RichieS@GMail.com
Or I could take the time to convert the png to a ico
Oh yes, Thanks to the latest 2.00 loader. It now works with firmware 2.00. thats neat cause I can play Grand theft auto and use PSP controller :)
Or I could take the time to convert the png to a ico
Oh yes, Thanks to the latest 2.00 loader. It now works with firmware 2.00. thats neat cause I can play Grand theft auto and use PSP controller :)