Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,814 Members 43,649 Now Online
XDA Developers Android and Mobile Development Forum

[Aug-20] CobaltController - PS3/Wii Controller Driver for Windows Mobile

Tip us?
 
Cobaltikus
Old
(Last edited by Cobaltikus; 2nd March 2011 at 01:50 PM.)
#1  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
Cool [Aug-20] CobaltController - PS3/Wii Controller Driver for Windows Mobile

CobaltController

Use your Sony Playstation 3 Controller (Sixaxis/Dual Shock 3) or Nintendo Wii Remote (Wiimote) as a Bluetooth Game Controller on your Windows Phone.

It's perfect for game system emulators.

Play PlaystationOne games with FpseCE, Super Nintendo games (and more) with MorphGear (HD2 version), Nintendo, Genesis, GameBoy, GameGear games (and more) with SmartGear - There are many other emulators out there and this program/driver will work for anything that accepts keyboard input.

Compatibility
Post your results and I will update this list
Code:
DEVICE                    PS3  Wii  Confirmed By
------------------------- ---  ---  -------------
Acer beTouch E200         ?    Yes  pmprog
Acer Neotouch S200        Yes  Yes  Fenrir84 (PS3) / Snowball2010 (Wii)
HTC HD2                   Yes  Yes  Cobaltikus
HTC Touch Diamond         Yes  No   koert17 (PS3) / nightly_shadow (Wii)
HTC Touch HD (Blackstone) Yes  Yes  RDilus
HTC Touch Pro             Yes  No   Cobaltikus
HTC Touch Pro2            Yes  Yes  Cobaltikus
HTC Touch2 Mega           Yes  ?    RipNWO
HTC Vogue                 No   No   Mycle78
HTC Wizard                No   ?    shorty66
LG Expo                   Yes  Yes  dalb3 (PS3) / trueg (Wii)
Samsung SCH-i730          No   No   Cobaltikus
Samsung i780              Yes  ?    ShadowswordPL
Samsung SCH-i830          No   No   Cobaltikus
Samsung Omnia I900        Yes  No   Manny-77
Samsung Omnia II i8000    Yes  No   cyber-junkie
Sony Xperia               Yes  No   sashapont (PS3) / stratis10 (Wii)
Toshiba TG01              No   No   Cobaltikus
...                       ...  ...  ...
Your Device               ?    ?    You
You Tube Videos
http://www.youtube.com/watch?v=mH_NBKtj0R8 (Thanks i900frenchaddict)
http://www.youtube.com/watch?v=3dH9J1y0G-8 (Thanks ahmedsaid)
http://www.youtube.com/watch?v=Qo-_nMmYq1Y (Thanks dijay_94)
http://www.youtube.com/watch?v=HauZQWYZxmQ (Thanks ShadowswordPL)

Prerequisites:
  • PS3 Controller
    • A compatible Windows Mobile device. Check the Compatibility list. Is your device not listed? Try out CobaltController and post your results; I'll update this post.
    • A PS3 Controller (I don't know if non-Sony 3rd party controllers work - maybe they do, maybe they don't).
    • A desktop or laptop computer with a USB port to set the controller's master address.
      • Linux - Use sixpair - directions in this thread somewhere, search for "Ubuntu"
      • Windows - Use Motion in Joy, but please note that Motion in Joy uses a different MAC format (little endian vs big endian) so for example, when I run CobaltController on my Touch Pro2 it displays "BT ADDR: 00:23:76:70:6B:4D" so I enter it into Motion in Joy as 4d.6b.70.76.23.00
  • Wii Controller
    • A compatible Windows Mobile device. Check the Compatibility list. Is your device not listed? Try out CobaltController and post your results; I'll update this post. Devices with the Microsoft Bluetooth Stack can't use the Wiimote yet.
    • A Wii Controller.
  • XBOX 360 Controller
    Not Going To Happen
    In order to get the XBOX 360 controller to work in windows you need to purchase a wireless receiver - it doesn't use bluetooth. It needs additional hardware. So if a full desktop Windows PC can't even do it without additional hardware, I seriously doubt it will ever work for our phones. Some company could come up with an xbox 360 wireless receiver for Windows Mobile, but again, very doubtful. And since I don't even have an XBOX of any kind, I know I'm not going to be motivated enough to even try.

Initial One Time Setup for PS3 Controllers:
Setting the PS3 controller's master address to your phone's bluetooth mac address via Windows:
  1. Download and install Motion in Joy.
  2. Run DS3 Tool, installed in the previous step.
  3. Click the "About" tab in DS3 Tool to see the version. If DS3 Tool is less than 0.5.0003 you will need to update.
  4. Connect your PS3 Controller to your computer via the USB cable and wait while Windows recognizes the new device.
  5. Click on the "BluetoothPair" tab.
  6. In the DUALSHOCK 3 drop down list select your controller. If it says "Can't find connected(USB) Playstat":
    • Click "Driver Manager" directly above the drop down list
    • Click "Load" and wait for it to finish
    • Return to the "BluetoothPair" tab
  7. Run CobaltController on your Windows Mobile device to get its BT address.
  8. Enter that BT address into the text box directly above the DUALSHOCK 3 drop down list. Note that Motion in Joy uses a different MAC format (little endian vs big endian) so for example, a bluetooth address of "00:23:76:70:6B:4D" is entered it into Motion in Joy as "4d.6b.70.76.23.00"
  9. Click the radio button next to this textbox to make sure that it uses the one you entered and not the one above it which is to connect your controller to your PC
  10. Click "Pair Now"
  11. If all went well your controller is now configured to talk to your Windows Mobile device. Go to the "Quick Start" tab and click "Disconnect".
  12. Unplug your PS3 Controller.
  13. As long as you don't pair your controller with any other device (like your PS3) then you never have to do this again. If you do pair the controller with a another device and wish to re-pair it with your phone again, repeat the above steps.

Widcomm Stack Specifics:
  • Turn on bluetooth and set it to discoverable. Thanks to ryotgz, skilty, and gorelshv for this information. I believe it is only required the first time you use CobaltController. Once you have successfully connected, BT does not have to be in discoverable mode any longer so you can change it back to invisible to save battery life.
  • Make sure that the checkbox is not checked where it says "Allow only devices listed in 'My Devices' to connect".
  • If you have never tried to connect the PS3 controller to your phone before (or at least not since the last hard reset or rom flash) it will fail to connect at first and you'll get a bunch of pop ups with PLAYSTATION(R)3 Controller shown in bold asking for the pin. Keep tapping cancel as it pops up and wait for everything to stop trying to connect. After all that, try again and it should connect just fine and should always connect right away in the future without the pin prompts. There is no pin (that I know of at least) I'm bypassing security on both the PS3 and Wii connections (even though we do know the pin for the Wiimote is the host's mac backwards.)

Microsoft Stack Specifics:
  • TURN OFF BLUETOOTH The MS stack does not like the PS3 controller and will NOT pair with it. I ended up writing a modified version of this stack to get around this problem, but it will conflict with the real MS stack so they can't both be on at the same time.
  • Your phone will reboot when you disconnect the controller.

PS3 Controller Specifics:
  • Press the PS button to connect and then later to disconnect

Wii Controller Specifics:
  • Press the red Sync button to connect. Hold down the Power button to disconnect.

Common:
  • All 4 LEDs should flash a few times and then only the player one LED should remain lit showing it connected.
  • The driver stops running after you disconnect to save battery life. Run it again to reconnect. It's in Start Menu\Programs\Games
  • Registry Values are stored in HKEY_CURRENT_USER\Software\Cobaltikus\CobaltContro ller
  • Currently only 1 controller can be active at a time but I am exploring the ability to add more.
  • Once you are connected you can tap Menu > Exit to close the configuration program and your controller will remain connected, and the driver will continue to run until your controller is disconnected.

To Do: (not necessarily in this order)
  • Get Wiimote working on devices with the Microsoft Bluetooth stack
  • Figure out why this doesn't work on the TG01 and HTC Vogue and fix it
  • 2 player support
  • Battery meter
  • Integrate LeSScro graphics
  • Clean up Microsoft stack code to eliminate the need to reboot
  • Add support for non-touch-screen devices

Attachments
  • CobaltController.vX.X.cab = Installs to \Program Files\CobaltController\ and a shortcut goes to \Windows\Start Menu\Programs\Games
  • NETCFv35.wm.armv4i.cab = Although the CobaltController driver is written in native C++, the UI is written in .Net 3.5, therefore you will need to have .NetCF 3.5 installed on your device to run the UI. You might already have this by default so try without this first, and come back if you get an error message about needing it.
  • NETCFv35.Messages.EN.wm.cab = Provides more details when .Net errors occur with any program written in .Net 3.5. This is optional and only needed if a .Net error occurs and you wish to see more details about that error.

Change Log
  • v0.7
    • Sorry - no actual driver enhancements yet - just bug fixes
    • IMPORTANT - Different Default Buttons - you may need to remap in your emulator settings
    • Updated instructions (Menu > Instructions)
    • Menu reorganized, some new menu items exist
    • More Bluetooth "stuff" working in the UI
    • UI Settings Bug Fixes (values not sticking etc)
  • v0.6
    • ANALOG STICKS WORKING!
    • Menu reorganized, some new menu items exist
    • More Bluetooth "stuff" in the UI - Mainly for devices with the M$ stack
    • Some other tweaks and changes but these are all the important ones.
  • v0.5
    • New Icon
    • UI Uses .Net 3.5, (driver is still c++)
    • Option to restore default keycodes
    • Bluetooth Address shown on screen so you don't have to search for it
    • 229 fix - it could cause you to not like how the SIP works in other programs but you can always restore, so no worries.
    • I might have forgotten about another change or two but these are all the important ones.
  • v0.4
    • Updated Instructions (Menu > Help > Instructions > [PS3|Wii])
    • Added Menu > Help > About to verify version
The Following User Says Thank You to Cobaltikus For This Useful Post: [ Click to Expand ]
 
Cobaltikus
Old
(Last edited by Cobaltikus; 16th July 2010 at 09:26 PM.)
#2  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
Buttons - There are editable registry values to modify the button mappings - below are the defaults

Code:
Sixaxis Button   Keyboard Equivalent
--------------   -------------------
SELECT           A
LEFTCLICK        B
RIGHTCLICK       C
START            Enter
UP               Up
RIGHT            Right
DOWN             Down
LEFT             Left
L2               D
R2               E
L1               F
R1               G
TRIANGLE         Space
CIRCLE           O
X                X
SQUARE           Backspace
These are all the digital buttons - I will eventually implement the left analog stick to send Up, Right, Down, and Left. Not yet sure what to do with the right stick... window scrolling maybe?
 
rkrishnan2012
Old
#3  
rkrishnan2012's Avatar
Senior Member
Thanks Meter 35
Posts: 518
Join Date: Jan 2009

 
DONATE TO ME
dece. how did u manage to get the drifvers for hid support?
-or-
Donate to further my tech adventures...
 
Cobaltikus
Old
#4  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
Quote:
Originally Posted by rkrishnan2012 View Post
dece. how did u manage to get the drifvers for hid support?
I didn't

I used Visual Studio 2008 + Windows Mobile 6 SDK + Widcomm SDK

I'm using L2CAP

Although the HID GUID is not defined, you can hard code the values for it and vwahlah - it works!

It runs great on my Sprint Touch Pro2 and also the HTC HD2 but should work for any Windows Mobile device with a Widcomm Bluetooth stack - again though I fully plan to tackle the M$ stack as well and also add support for the wiimote.
 
wapvirus
Old
#5  
wapvirus's Avatar
Senior Member
Thanks Meter 70
Posts: 1,716
Join Date: Jan 2008
Location: London
wow can't wait for the wii remote but even ps3 is best thing to happen to wm thanks and i look forward to testing this
HTC Sensation XE with Beats Audio Z715e
Viper S 5.0.0 Sense 5 JB Pro
S-Off Super CID
Revolutionary

HBOOT-1.27.1100
Radio-11.24a 3504.31_M

Kernel: SebastianFM kernel 1.0.3
MODS: Crossbreeder MultiSwap

My Beats Inspired Wallpapers for Sensation


 
Cobaltikus
Old
#6  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
Version 0.1 Available NOW!!!
 
Cobaltikus
Old
#7  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
v0.2 will have M$ stack support - working on it now
 
Cobaltikus
Old
(Last edited by Cobaltikus; 28th May 2010 at 04:22 AM.)
#8  
Cobaltikus's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 338
Join Date: May 2008
Location: Fredericksburg, VA
Request:

That would be really cool if someone would write a nice app to set the sixaxis master bluetooth address that doesn't require a pc with bluetooth and other apps. That would make my app even better - cuz I know the setup really sucks - but believe me it is worth it, especially if your phone also has TV Out.
 
ryotgz
Old
#9  
ryotgz's Avatar
Senior Member
Thanks Meter 66
Posts: 594
Join Date: Dec 2007

 
DONATE TO ME
Have you gotten it to work with Fpsece?
 
Mase_Mase
Old
#10  
Mase_Mase's Avatar
Member
Thanks Meter 1
Posts: 91
Join Date: May 2008
I've been lurking on the other BT controller thread and I must say I was very anxious to see what you guys could pull off! Great, great work!!!

Tags
dualshock 3, wiimote
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes