Dolphin, the GameCube and Wii emulator - Forums

Full Version: Wiimote forward/backward movements patch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys,

I've whipped up a patch to enable dolphin to emulate wiimote forward/backwards (depth) movement without using a real wiimote or recordings. It works by toggling dolphin to emulate such movement using a button that can be configured via the wiimote plugin config. It simulates forward and backward movement using the IR pointer though, so it wouldn't work for games that require accelerometer-based forward/backward movement.

I've made this patch for the old wiimote plugin and it's built against rev 5576. I've only tested this patch with Trauma Team though, so it'd be great if anyone using this patch could test it with other games.

To use:
1. Go to the wiimote configuration dialog and click on Button Mapping. Assign a key to 'Toggle Key' in the 'Wiimote Depth' section. The default key is 'P'.
2. Start your game.
3. While ingame, press the toggle key to toggle the depth movement emulation on and off. Move your mouse cursor up to simulate a wiimote movement towards the screen; move it downwards to simulate a wiimote movement away from the screen. The faster you move your cursor, the faster the wiimote will move.

P.S. The toggle will only register if the render window is focused.

Thanks and do post if you have any queries!

Edit: Implemented this in the 12-byte IR report - untested though! Also did a bit more testing and found that depth movement works with with a linear increase in x2 as well, so I removed the old non-linear formula to maintain simplicity.

Edit 2: Check my post below for an updated patch.
interesting i was just thinking about it when i tried to play don king boxing game,it requires forward movement of wiimote and nunchuck (left - right) hand.
will try.

btw don't u think it might be nicer to add those movements as key inside plugin incomplite version?
it already has x,y,z but neither can do forward beckward
Hey thanks for testing this with other games. Smile

I'm looking to port it over to the new plugin but it looks like a lot of active work is still being done on it, so I'd rather wait until the dust settles before I start implementing this on the new plugin.

Forward movement of nunchuck seems to imply that the game's looking at accelerometer readings for both the wiimote and the nunchuck instead of IR pointer readings - not sure if this patch will make the game detect the wiimote movement. Faking accelerometer readings sounds easier though; I'm guessing the game just needs to detect a positive value for the y-axis reading to think the wiimote/nunchuck is moving forward and vice versa.
uh now i see u made it for 5576 it has some incompatibilities with last svn,its not problem to integrate into it its just i am in midd of some fifo work my self so can't switch to another rev.but will test it asap,it definitely looks promising.

and yes i agreed that +y might be what game was asking for
No probs man, I've uploaded an updated patch though so you might wanna grab that one instead. (Spotted a todo after uploading my earlier one.)

Hope your fifo work goes well!
btw patching latest svn now,i am eager to play wii play - party pack billiard game was never able to do that :-)
will let u know how it turns up

btw abt fifo i stoped for a bit,it lets me play fifo problematic games and wii play normally which is freezing on clean svn :-) will see ltr more abt fifo.


*EDIT
btw i took liberty to make your patch for 5650 compatibile. :-)

*EDIT again
reson:
tested ,but i guess i am having a bit problem
as u can see from pic when i press P center of circle moves to the left (and it was pointed to middle of ball before pressing P) now up down works fine when moving mouse but somehow center moves to wrong position?since left right is not functional cannot move circle to center of ball.

[Image: 94481624.jpg]
Hey thanks for updating the patch to fix compatibility with rev 5650.

What you were seeing while playing the billard game was the expected behaviour - in my original patch I froze the IR Pointer's X position at an arbitrary value to make the math easier.

I've uploaded an updated patch which gets rid of the fixed X position. It also looks like you'll need to freeze the Y position of the pointer at the billard ball so I've added in the option to freeze either the IR pointer's X or Y position at their positions when depth movements are toggled.

I've also reworked the algorithm in this patch - previously I had totally overlooked the obvious principles of perspective and geometry. *Facepalm* The new algorithm is much simpler and seems to work better. (Previously minute mouse movements weren't registering a depth movement at all - I'm guessing it's due to delta X not being high enough or something. Either way, that problem is gone now.)

Edit: Looks like billard implemented forward/backward IR movement in the new wiimote plugin in r5651 so my patch is for the dudes who're still on the old wiimote plugin or don't want to move to a newer revision.

Edit 2: Here we go, uploaded an updated patch for rev 5669 in my latest post.
u might wanna revise your patch format lines have switched in latest svn for ConfigPadDlg.cpp i am not able to match lines.
Here we go, a patch for r5669.
how to install that patch? now I have to see the dolphin 5669. and download the patch but where it hit? or how to use it?
Pages: 1 2