• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 266 267 268 269 270 ... 320 Next »

Nunchuck "move quick" motion problem
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Nunchuck "move quick" motion problem
05-06-2011, 10:31 AM
#1
Dragonlord Offline
Member
***
Posts: 57
Threads: 9
Joined: Mar 2009
Got around to test Dolphin again (SVN r7319). To my surprise one of my test games I use to test the progress of the emulator (a Wii game) got past the initial screen and thus gets ingame. Nice so far. Tried to test the tutorial mode which is useful to test Emulation support as it requests the player to do certain moves with the Nunchuck (I use a gamepad for this not a real Wiimote) and if you do it continues. So if the Emulation works you can do the requested move otherwise more fixing is required.

Moving around with the Nunchuck stick works, good.

Button A and B on the mouse works too, good.

Now it starts to fail. The game requests a move they call something like "quickly move the nunchuck in any direction". According to the image this is a motion like swinging the nunchuck up quickly. To my understanding this should be covered by the "swing" property in the Nunchuck config window. This though does not work. Swing is not recognized. I also tried tilt. This one is also not recognized.

So the Nunchuck support is broken somehow as Swing/Tilt is not supported properly if using a gamepad. Now I don't know at all how the Wii hardware is constructed so I don't know what kind of parameters a Wii game can read from a Nunchuck to figure out a movement of that thing. Otherwise I could see if I find the problem in the Nunchuck code there.
Find
Reply
05-06-2011, 10:55 AM
#2
ExtremeDude2 Offline
Gotta post fast
*******
Posts: 9,310
Threads: 273
Joined: Dec 2010
(05-06-2011, 10:31 AM)Dragonlord Wrote: Got around to test Dolphin again (SVN r7319). To my surprise one of my test games I use to test the progress of the emulator (a Wii game) got past the initial screen and thus gets ingame. Nice so far. Tried to test the tutorial mode which is useful to test Emulation support as it requests the player to do certain moves with the Nunchuck (I use a gamepad for this not a real Wiimote) and if you do it continues. So if the Emulation works you can do the requested move otherwise more fixing is required.

Moving around with the Nunchuck stick works, good.

Button A and B on the mouse works too, good.

Now it starts to fail. The game requests a move they call something like "quickly move the nunchuck in any direction". According to the image this is a motion like swinging the nunchuck up quickly. To my understanding this should be covered by the "swing" property in the Nunchuck config window. This though does not work. Swing is not recognized. I also tried tilt. This one is also not recognized.

So the Nunchuck support is broken somehow as Swing/Tilt is not supported properly if using a gamepad. Now I don't know at all how the Wii hardware is constructed so I don't know what kind of parameters a Wii game can read from a Nunchuck to figure out a movement of that thing. Otherwise I could see if I find the problem in the Nunchuck code there.

Shake?
Check out my videos (dead)
[Image: sig-22354.png]
Website Find
Reply
05-07-2011, 06:57 AM (This post was last modified: 05-09-2011, 12:53 AM by Dragonlord.)
#3
Dragonlord Offline
Member
***
Posts: 57
Threads: 9
Joined: Mar 2009
(05-06-2011, 10:55 AM)ryancollins Wrote:
(05-06-2011, 10:31 AM)Dragonlord Wrote: Got around to test Dolphin again (SVN r7319). To my surprise one of my test games I use to test the progress of the emulator (a Wii game) got past the initial screen and thus gets ingame. Nice so far. Tried to test the tutorial mode which is useful to test Emulation support as it requests the player to do certain moves with the Nunchuck (I use a gamepad for this not a real Wiimote) and if you do it continues. So if the Emulation works you can do the requested move otherwise more fixing is required.

Moving around with the Nunchuck stick works, good.

Button A and B on the mouse works too, good.

Now it starts to fail. The game requests a move they call something like "quickly move the nunchuck in any direction". According to the image this is a motion like swinging the nunchuck up quickly. To my understanding this should be covered by the "swing" property in the Nunchuck config window. This though does not work. Swing is not recognized. I also tried tilt. This one is also not recognized.

So the Nunchuck support is broken somehow as Swing/Tilt is not supported properly if using a gamepad. Now I don't know at all how the Wii hardware is constructed so I don't know what kind of parameters a Wii game can read from a Nunchuck to figure out a movement of that thing. Otherwise I could see if I find the problem in the Nunchuck code there.

Shake?
I tried that too. Neither swing, tilt nor shake does work. I'll see if I can hack around in the code to get a testing setup working (maybe mouse as nunchuck movement) to see if a game is looking for certain movement. Might help debug such problems. But for that I'd have to first dig into the code base first.
Find
Reply
05-09-2011, 01:01 AM (This post was last modified: 05-09-2011, 01:02 AM by Dragonlord.)
#4
Dragonlord Offline
Member
***
Posts: 57
Threads: 9
Joined: Mar 2009
Experimented now a bit with the stuff. Looked at the code and did a small change to the Force controller (ControllerEmu::Force) to make it permanent during Swing not just first-frame only. Got it working now by assigning buttons in a particular way to the controls. For example the game expects the user to swing the Nunchuk upwards. Now a Swing-Up doesn't work. Looks like it has to be a Swing-Down with Swing-Forward at the same time. Bound the same button to both of them and it works. A similar case is with the game expecting the user to flick the Wiimote and Nunchuk forward-down at the same time. Got this only working by binding the same button to Nunchuk-Swing-Down, Nunchuk-Swing-Forward, Wiimote-SwingDown and Wiimote-SwingForward. Using that combination it works (most of the time). This also works with the existing code without modifications.

Nevertheless I think it would be more logical for the Swing to be set the acceleration while the button is pressed instead of the very first frame the button is pressed and then it goes down to 0 again. The file in question is:
Code:
Source/Core/InputCommon/Src/ControllerEmu.h @ 287
The line currently reads:
Code:
*axis++    = (C)((tmpf - ax) * range + base);
which causes axis to be set to the right acceleration on the first frame the button is pressed but for all upcoming frames it is set to 0 because ax contains the last-frame value and thus if the button has been pressed already in the previous frame the difference is 0. I used this line instead:
Code:
*axis++    = (C)(tmpf * range + base);
which causes the axis to be set to the acceleration for all frames the button is pressed not just the first one. No idea why it has been set to first-frame only. But maybe a dev can tell me what the idea behind this choice has been.
Find
Reply
01-30-2012, 05:07 PM
#5
ryancairns
Unregistered
 
(05-09-2011, 01:01 AM)Dragonlord Wrote: Experimented now a bit with the stuff. Looked at the code and did a small change to the Force controller (ControllerEmu::Force) to make it permanent during Swing not just first-frame only. Got it working now by assigning buttons in a particular way to the controls. For example the game expects the user to swing the Nunchuk upwards. Now a Swing-Up doesn't work. Looks like it has to be a Swing-Down with Swing-Forward at the same time. Bound the same button to both of them and it works. A similar case is with the game expecting the user to flick the Wiimote and Nunchuk forward-down at the same time. Got this only working by binding the same button to Nunchuk-Swing-Down, Nunchuk-Swing-Forward, Wiimote-SwingDown and Wiimote-SwingForward. Using that combination it works (most of the time). This also works with the existing code without modifications.

Nevertheless I think it would be more logical for the Swing to be set the acceleration while the button is pressed instead of the very first frame the button is pressed and then it goes down to 0 again. The file in question is:
Code:
Source/Core/InputCommon/Src/ControllerEmu.h @ 287
The line currently reads:
Code:
*axis++    = (C)((tmpf - ax) * range + base);
which causes axis to be set to the right acceleration on the first frame the button is pressed but for all upcoming frames it is set to 0 because ax contains the last-frame value and thus if the button has been pressed already in the previous frame the difference is 0. I used this line instead:
Code:
*axis++    = (C)(tmpf * range + base);
which causes the axis to be set to the acceleration for all frames the button is pressed not just the first one. No idea why it has been set to first-frame only. But maybe a dev can tell me what the idea behind this choice has been.

Hi, rather new to this Wii thing but i need to cange the behavoiur of the nunchuck. How do i find and get into the file you mention here. do i need a special version? I'm just having problems with a game 'Trauma Team' asking me to tilt the 'nunchuck' gently to the side and hold it there for a bit, but when i use the keys i bound for tilting the nunchuck, the nunchuck just spins rapidly around to the other side and then goes back to its original position when you let it go. How can i get the tilt function to 'stick' or 'hold' in the right place for a bit? Got any help please?
Reply
06-09-2012, 04:40 PM
#6
sexyshinobu Offline
Kitteh Goddess
**
Posts: 9
Threads: 2
Joined: Jun 2012
Quote:Hi, rather new to this Wii thing but i need to cange the behavoiur of the nunchuck. How do i find and get into the file you mention here. do i need a special version? I'm just having problems with a game 'Trauma Team' asking me to tilt the 'nunchuck' gently to the side and hold it there for a bit, but when i use the keys i bound for tilting the nunchuck, the nunchuck just spins rapidly around to the other side and then goes back to its original position when you let it go. How can i get the tilt function to 'stick' or 'hold' in the right place for a bit? Got any help please?

Welcome to my problem... The only time that issue is a real nasty pain is during the Orthopedic chisel crap. I was only able to remove 2 fragments by sheer luck, but can't get the soft tilt to get anything else, as you have to have it held IN a place to USE the hammer... which sucks.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 3 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode