|
[PATCH] UDPWii: Use iPhone as WiiMote [NEW: Nunchuck and IR support]
|
|
03-28-2010, 08:02 PM
(This post was last modified: 08-27-2010 03:47 AM by da_petcu21.)
Post: #1
|
|||
|
|||
|
[PATCH] UDPWii: Use iPhone as WiiMote [NEW: Nunchuck and IR support]
Hi guys! I'm new around here!
I figured that it would be nice to use an iPhone/iPod Touch or, in fact, anything else network-capable to act as a WiiMote, so I made this quick patch to the Wiimote Plugin that allows recieving of accelerometer and button data through UDP. NEW: This patch was commited to the SVN So here goes: CHANGELOG: iController (client): v4.0.2 - fixed a crash on the settings view http://www.mediafire.com/file/992992tnuq...source.zip (source) binary in Cydia v4.0.1 - iOS4.0 and multitasking support - fixed inverted Z axis bug (sorry... )- new nunchuck layout for left-handed people - even more bugfixes binary was in Cydia v4.0 - customizable skins and layouts - bugfixes http://www.mediafire.com/?346kcbb40gd76xb (source) binary was in Cydia v3.1 - automatic discovery - some UI cleanup - fixed some leaks v3 - a lot of code cleanup and a lot of stuff rewritten - a new way of controlling the IR pointer... AirMouse style... - a new nunchuck-only tab (for use with 2 devices... kinda pricy...) - sending nunchuck accelerometer data v2 - improved UI - nunchuck - IR using trackpad - IR using compass on the 3GS v1 - initial release UDPWii (server): not maintaining this changelog anymore... check my SVN commits SVN r5916 - automatic discovery support - multiple devices support SVN r5840 (linux build fixed) - nunchuck support SVN r5835 - integrated into the new plugin (no nunchuck support yet) SVN r5821 - listening on multiple interfaces - performance improvements - code cleanup SVN r5352 (win build fixed) - bugfix: nunchuck status not saving (typo) - tested on OS X - fixed scons script and XCode project - comitted into SVN v3 - UI - nunchuck - IR v2 - multiple clients v1 - initial release INSTRUCTIONS 1.Open the wiimote plugin configuration dialog 2.Make sure you selected "Emulated Wiimote" and then click on "Configure": ![]() 3.Then under "UDP Wiimote" click "Configure": ![]() 4.Enable UDPWii: ![]() 5.Repeat steps 3-4 for each wiimote you want to emulate with your iPhone 6.Start iController on your iPhone 7.Start the game 8.With the game started or the config dialog open tap on the row that just appeared... only needed once: ![]() 9.Configure the layouts as desired under "Appearance" (optional) 10.Press "Start", select the layout from the tab bar and enjoy! IMPLEMENTATION DETAILS: you send UDP packets to Dolphin like this: 0xde -- signature 0xXX -- or-ed flags: (1<<0) means accelerometer (1<<1) means buttons (1<<2) means IR (1<<3) means nunchuk (1<<4) means nunchuk accel data if flag&accelerometer: 0xXX 0xXX 0xXX 0xXX -- 32bit signed ints in network byte order 0xYY 0xYY 0xYY 0xYY -- (s32)(float_value*1024*1024) 0xZZ 0xZZ 0xZZ 0xZZ if flag&buttons: 0xBB 0xBB 0xBB 0xBB -- 32bit int in net byte order. or-ed flags (see UDPWiimote.h for meaning) if flags&IR 0xXX 0xXX 0xXX 0xXX -- 32bit signed ints in network byte order 0xYY 0xYY 0xYY 0xYY -- (s32)(float_value*1024*1024) if flags&nunchuk 0xBB -- 8bit int flag (c-bit0 and z-bit1 buttons, 1-active) 0xXX 0xXX 0xXX 0xXX -- 32bit signed ints in network byte order (analog stick) 0xYY 0xYY 0xYY 0xYY -- (s32)(float_value*1024*1024) if flags&nunchuk_accel 0xXX 0xXX 0xXX 0xXX -- 32bit signed ints in network byte order 0xYY 0xYY 0xYY 0xYY -- (s32)(float_value*1024*1024) 0xZZ 0xZZ 0xZZ 0xZZ Dolphin broadcasts it's presence over IPv4. Packets are sent to 255.255.255.255 with this format: 0xdf -- signature 0xXX 0xXX -- 16-bit random number unique per-wiimote 0xXX -- wiimote index (from 0 to 3) 0xXX 0xXX -- network-order 16-bit unsigned int, the port witch I am advertising 0xXX -- display name length (max 255) 0xXX ..... the display name (length specified one byte before) Features: should be portable better experience than keyboard (awesome for mario kart) buttons are or-ed with keyboard mappings so it doesn't affect anything works with multiple iphones (new super mario) Known issues: On-screen buttons too small When the iPhone goes to sleep or disconnect from the network (crappy windows ad-hoc networks included) it loses the socket, and you have to go to settings then start sending again. Hackintosh | Intel Core 2 Duo E8400@3.0Ghz | 4GB DDR3@1600 Kingston | Nvidia 8600GT 512MB | OS X 10.6 & Win7 x64 & Ubuntu 9.10 x64 MacBook Pro | Intel C2D @ 2.53Ghz | 4GB DDR3 | Nvidia 9400M 256MB shared | OS X 10.6 & Win7 x64 |
|||
|
03-28-2010, 09:30 PM
Post: #2
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
Greeeeeeeeeeat ! I've a iPhone with a jailbreak ! It could be cool for mario kart Wii, yeeeear that's amasing !
![]() But I will test only if someone make me a 64 bits revision with this patch, and explain how to use my iPhone with it
- Gigabyte P35DS3R rev2.0 ; Core 2 Duo e8500 @ 3,8ghz ; G.skill PK 4go PC6400 ; ATI XFX HD 5850 XXX edition 1go (Catalyst 10.3 + ATI Stream 2.01 OpenCL) ; LCD LG Full HD 23" 1920/1080 ; 250Go+500Go ; OCZ 500watt ; Windows 7 Ultimate 64 bits - |
|||
|
03-28-2010, 11:31 PM
Post: #3
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
Sounds awesome, hopefully ector drops by and gives you svn access.
|
|||
|
03-29-2010, 12:31 AM
Post: #4
|
|||
|
|||
RE: [PATCH] UDPWii: Use iPhone as WiiMote
(03-28-2010 11:31 PM)death-droid Wrote: Sounds awesome, hopefully ector drops by and gives you svn access.Before that i have to add it into the ui. It shouldn't be that hard. Hackintosh | Intel Core 2 Duo E8400@3.0Ghz | 4GB DDR3@1600 Kingston | Nvidia 8600GT 512MB | OS X 10.6 & Win7 x64 & Ubuntu 9.10 x64 MacBook Pro | Intel C2D @ 2.53Ghz | 4GB DDR3 | Nvidia 9400M 256MB shared | OS X 10.6 & Win7 x64 |
|||
|
03-30-2010, 02:31 AM
Post: #5
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
This is really amazing
Can it work with new nokia phones?? |
|||
|
03-30-2010, 02:59 AM
Post: #6
|
|||
|
|||
RE: [PATCH] UDPWii: Use iPhone as WiiMote
(03-30-2010 02:31 AM)smartprogrammer Wrote: This is really amazing Maby. If someone makes a client for them. I think both 5800 and N97 have an accelerometer. But I wont make it. Coding for S60 is nasty (or so I heard). Hackintosh | Intel Core 2 Duo E8400@3.0Ghz | 4GB DDR3@1600 Kingston | Nvidia 8600GT 512MB | OS X 10.6 & Win7 x64 & Ubuntu 9.10 x64 MacBook Pro | Intel C2D @ 2.53Ghz | 4GB DDR3 | Nvidia 9400M 256MB shared | OS X 10.6 & Win7 x64 |
|||
|
03-30-2010, 04:09 AM
(This post was last modified: 03-30-2010 04:11 AM by KiasuKiasiMan.)
Post: #7
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
Sounds awesome.
I wonder if someone who creates Jailbroken apps can create a controller app for the iPhone to use with Dolphin. Then you can press the A, B buttons etc. on your iphone's touchscreen. I think it can be done with people who have used the iPhone as an Airmouse, but no one has used it as a controller yet. EDIT: Didn't read the bottom part of the post. Ignore what I said <_< |
|||
|
03-30-2010, 10:19 PM
Post: #8
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
I might integrate it into the wiimote plugin ui tomorrow.
|
|||
|
03-30-2010, 10:38 PM
Post: #9
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
I tried installing the iControl app on my Jailbroken iPhone.
But I can't seem to launch it, i even rebooted. Whenever i tap the icon it just stays there on the Springboard. I'm using an iPhone 3GS, new bootrom with 3.1.2 |
|||
|
03-30-2010, 11:48 PM
(This post was last modified: 03-30-2010 11:51 PM by my_rig_is_dust.)
Post: #10
|
|||
|
|||
|
RE: [PATCH] UDPWii: Use iPhone as WiiMote
Quick question. Does this work over the network or over bluetooth?
Looks awesome anyways. Im loading Cydia and I'll let you know the results. EDIT: Darn, will someone please upload this to a repo? I have not had the best luck with SSH or terminal and always seem to mess up my ipod and need to restore. My rig isn't dust anymore! AMD Phenom II 965 @3.4 ghz Radeon HD 5770 Super OC version 1gb 4gb ddr3 @ 1600 |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

)![[Image: Screenshot2010-08-21at85913PM-1.png]](http://i885.photobucket.com/albums/ac60/da_petcu21/Screenshot2010-08-21at85913PM-1.png)
![[Image: Screenshot2010-08-21at85920PM-1.png]](http://i885.photobucket.com/albums/ac60/da_petcu21/Screenshot2010-08-21at85920PM-1.png)
![[Image: Screenshot2010-08-21at85936PM-1.png]](http://i885.photobucket.com/albums/ac60/da_petcu21/Screenshot2010-08-21at85936PM-1.png)
![[Image: ss1-1.png]](http://i885.photobucket.com/albums/ac60/da_petcu21/ss1-1.png)
