![]() |
|
How does Wiimote rumble strength work? - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Controllers (https://forums.dolphin-emu.org/Forum-controllers) +--- Thread: How does Wiimote rumble strength work? (/Thread-how-does-wiimote-rumble-strength-work) |
How does Wiimote rumble strength work? - livingsilver94 - 10-16-2014 Hi all! First time here ![]() I'm writing an application for a hobby project (actually I don't know whether this is section is correct). Well, my troubles start when I need to control rumble intensity of a Wiimote. A Wiimote can only be set to on or off, but I've read that a square wave could fake the intensity. Dolphin does have this kind of control, hence I've looked up in source code but... I can understand nearly nothing I'm just a novice programmer. Could someone provide me a clue on how to implement it? I don't need code (I'm working in C#, BTW), what I'm looking for is a link to Dolphin git, or maybe an idea of how it works. Thank you very much!
RE: How does Wiimote rumble strength work? - DJBarry004 - 10-16-2014 AFAIK most of Dolphin´s code is written in C++. And here´s the Git page: https://github.com/dolphin-emu/dolphin EDIT: You did look in there, didn´t you? RE: How does Wiimote rumble strength work? - livingsilver94 - 10-16-2014 Yes, I did, but I could not locate the code involved in rumble intensity... I'm noob about this. RE: How does Wiimote rumble strength work? - ulao - 10-17-2014 With a one motor at one given speed the only way to set a "speed" is to throttle the motor. Full speed. On.........off Fake lower speed on...off...on..off...on...off...on..off...on...off...on..off...on...off...on..off The wiki has very little to say on the matter. Quote: Rumble RE: How does Wiimote rumble strength work? - livingsilver94 - 10-17-2014 I appreciate your reply, but what you've said is also what I've said: a square wave. On and off repeatedly. To be more technical, my implementation consists of a thread that does: 1) set rumble to on 2) wait a certain amount of milliseconds 3) set rumble to off 4) wait another amount of ms (may be different from the former, in order to enable duty cycle variation made by user) All this in a loop. The problem is: is this a good way to implement ruble intensity? An endless loop, a huge amount of bluetooth data sent... sound to me an inefficient algorithm. Sorry if I'm asking for a small piece of Dolphin features, but since it is a Wii emulator, I am pretty sure this is a good place to learn
RE: How does Wiimote rumble strength work? - ulao - 10-17-2014 I'm sorry I may have went too far, but I did mean to make it very clear. "is this a good way to implement ruble intensity?", No, its the only way. You could experiment with the timing in delays like below (as yo suggested in 4) but I dont think it will help much. loop(on, off, wait x^2) then at some point come back down loop(on, off, wait (x^2)*-1) I'm not sure if slowly increasing the wait time while on or off is best. Again, I'm not sure it will effect much. After all you are trying to control the speed of the motor, and the best way to do that programmatically is to introduce waits. RE: How does Wiimote rumble strength work? - livingsilver94 - 11-05-2014 Although this is the only correct way, I can notice a pause between two states... Oh I'd wish to implement it like in Wii games! |