Hacking Nintendont - wiimote & nunchuck support discussions

nakata6790

True Player
OP
Member
Joined
Sep 17, 2009
Messages
890
Trophies
0
XP
604
Country
Greece
UPDATE: Due to amazing work done by Howard (& AbdallahTerro's NC patch) we now have a fully working wiimote & nunchuck nintendont mod. It even supports Nunchuck tilt and/or wiimote IR! It is currently in beta, and in order to participate you should donate to the developers. Donate here for Howard (paypal - link fixed, also check the link in Howard's signature in case link stops working again) and here for AbdallahTerro [(skrill.com) pm Abz for his email and name to donate via skrill)].

UPDATE 2: The NC mod is now officially included in the vanilla Nintendont releases!


There are many button configurations for you to choose from, anytime from within the game so that you can comfortably play with NC & wiimote:
  • press button_2 (puts in config mode)
  • press config button (selects the desired config - skip this step for the default, Howard's config)
  • release button_2 (ends configuration)
Also:

IR toggle with Z

You can select to add cStick controlled by the wiimote IR to any configuration by

press button_2 (puts in config mode and turns IR off)
press config button (selects the desired config - skip this step for the default)
release the config button (keep holding button_2)
press button_Z (turns IR on or off for the just selected config. If the wiimotes is pointed at the screen you can see IR toggle on and off if the screen accepts cStick input. )
release button_Z
release button_2 (ends configuration)


Thanks to Troopage & drakorex for the pics below:

Howard (default) config
2.PNG


Shooter config (Great for FPS games)
2 & 1.PNG


Shooter config sans IR
unnamed.png


Nagger's config (personal favorite for anything but FPS and TPS games)
2 & RIGHT.PNG


Abz config
2 & LEFT.PNG


Troopz config
2 & -.png


Digital Racing config
2 & DOWN.PNG


Analog Racing config
2 & UP.PNG































================ Obsolete part of original OP below=================





Title is self explanatory. Some things to keep in mind:

1. Nintendont team is NOT officially supporting nunchuck & wiimote, so please do NOT ask them for it.
So as the project is open source, users interested in NC support will have to make their/our own controller mod of nintendont.
2. Seeing as the official Nintendont thread was filled with request for NC suport & ideas by several users -me included as well-, i made this thread so we can keep the official thread clean. Stop asking for NC support in there.
3. Only post here if you are willing to contribute to the discussion and are open to ideas about NC & wiimote support. If you don't care about it more power to you. But this thread is not for you then, so go back to the official nintendont thread.

So then... Why do it? A. More options are good. B. 100% of the people Nintendont caters to, already have a wiimote & nunckuck. That's more than any other controller type. C.For some types of games it could prove better than the alternatives.


So with the above in mind, this is where we stand at the moment:


A patch for wiimote & nunchuck button mapping was successfully made by AbdallahTerro. It is meant for nintendont build 2.157. The patch however, has not yet been applied to nintendont r2.157 AFAIK (posts got deleted from the official thread, so IDK what other progress was made since then)


Useful info:
A couple of homebrews that incorporate IR perfectly are Wii64 & Quake GX Wii. Source files of those could be looked upon:

Wii64 source files:
https://code.google.com/p/mupen64gc/downloads/list

Quake GX Wii source files:
http://www.fallenacorn.com/piko/quake-wii-piko/quake-wii-0_08.tar.gz


Suggested button mapping for most GC games
Definitive:
  • Gamecube L = Nunchuck Z (left trigger/shoulder button)
  • Gamecube R = Wiimote B (right trigger/shoulder button)
  • Gamecube A = Wiimote A (big main button,always reachable)
  • Gamecube analog stick = Nunchuck analog stick (no-brainer, this)
Wiimote Dpad Up: Gamecube Z button (secondary button ,always reachable)
Wiimote Dpad Down: Gamecube B button (secondary button ,always reachable)
Wiimote Dpad Left: Gamecube Y button (secondary button ,always reachable)
Wiimote Dpad Right : Gamecube X button (secondary button ,always reachable)

Nunchuck C button = modifier
Nunchuck C & Dpad: Gamecube C-stick (secondary stick , always reachable)

Why? Cause you can't press c-stick and ABXY at the same time even on a real GC controller anyways. You can however use 2 sticks and L,R,Z at the same time and that's what we can also do here! :)

All main gameplay buttons are now covered and easily reachable at all times!!


This only leaves wiimote 1,2, - & + for GC d-pad (for minor item management or actions in some games) & Gamecube Start. If anyone has ideas for those, please propose them. Wiimote 1 can be GC start (pause) for example.

We could say wiimote - = modifier as well. When it is pressed once, wiimote d-pad = GC d-pad
And wiimote + = Gamecube start/pause button.

There, with as much as within a thumbs reach, you now have everything on the GC pad available. And you 're even left with free buttons on the wiimote: home, 1 & 2 buttons for nintendont actions like reset, exit, whatever :)


==============================================
Definitive:
  • Gamecube L = Nunchuck Z (left trigger/shoulder button)
  • Gamecube R = Wiimote B (right trigger/shoulder button)
  • Gamecube A = Wiimote A (big main button,always reachable)
  • Gamecube analog stick = Nunchuck analog stick (no-brainer, this)
==============================================
Up for debate:

  • Gamecube B = Nunchuck C (secondary button, always reachable)
  • Gamecube C-Stick = Wiimote d-pad (or IR if it is supported)
  • secondary Gamecube buttons X & Y =Wiimote - and + buttons (or wiimote dpad left and right if IR is used for c-stick)
  • secondary Gamecube button Z = Wiimote 1 button (or wiimote d-pad down if IR is used for c-stick, or nunchuck C)
  • Gamecube Start button = Wiimote 2 button (or wiimote button 1 if IR is used for c-stick)
Some guidance by member ShadowOne333 for NC integration:
Let's see...
You people want Nunchuck+Wiimote support... Right?
Ok then...


Wiimote button values:
Code:
WIIMOTE_BUTTON_TWO => 0x0001,
WIIMOTE_BUTTON_ONE => 0x0002,
WIIMOTE_BUTTON_B => 0x0004,
WIIMOTE_BUTTON_A => 0x0008,
WIIMOTE_BUTTON_MINUS => 0x0010,
WIIMOTE_BUTTON_ZACCEL_BIT6 => 0x0020,
WIIMOTE_BUTTON_ZACCEL_BIT7 => 0x0040,
WIIMOTE_BUTTON_HOME => 0x0080,
WIIMOTE_BUTTON_LEFT => 0x0100,
WIIMOTE_BUTTON_RIGHT => 0x0200,
WIIMOTE_BUTTON_DOWN => 0x0400,
WIIMOTE_BUTTON_UP => 0x0800,
WIIMOTE_BUTTON_PLUS => 0x1000,
WIIMOTE_BUTTON_ZACCEL_BIT4 => 0x2000,
WIIMOTE_BUTTON_ZACCEL_BIT5 => 0x4000,
WIIMOTE_BUTTON_UNKNOWN => 0x8000,
WIIMOTE_BUTTON_ALL => 0x1F9F,


Identification and initialization of the Nunchuck:

2yvpjjm.png



Nunchuck button values:
Code:
NUNCHUK_BUTTON_Z => 0x01,
NUNCHUK_BUTTON_C => 0x02,
NUNCHUK_BUTTON_ALL => 0x03,


For the analog stick, refer to the Classic Controller code for the left analog.
I won't add the accelerometer into this information because it would be quite difficult to get a good response at first.


THERE YOU GO!
For all the people asking for it, there you have all the needed material to start coding and mapping the Nunchuck+Wiimote.
NOW STOP ASKING/BEGGING/COMPLAINING AND START CODING IF YOU WANT IT SO BAD!
 

ShadowOne333

QVID PRO QVO
Developer
Joined
Jan 17, 2013
Messages
10,688
Trophies
1
XP
12,508
Country
Mexico
Thank you for creating this thread, it was needed... so much.
One thing, can you give me a link to the patch made by AbdallahTerro?
I would like to take a look at it too see if I can implement it to the main PADReadGC.c code.

Also, I think it would be better if we add the GC Zbutton to the Nunchuck C button.
And for the Start GC Button it would be good in the 1 Button of the Wiimote.

And do not take Wii64 and QuakeGX code as a base for the Nunchuck implementation.
The code for those 2 apps is quite obsolete and old, it would be better if we take other newer apps into consideration, since I remember those two had issues with some third party controls and with official CCPs not responding properly (I can confirm this)
 

nakata6790

True Player
OP
Member
Joined
Sep 17, 2009
Messages
890
Trophies
0
XP
604
Country
Greece
Thank you :) NC discussion seemed on the way to become the new ''Devo AP removal'' talk. So in order for things to not get more out of hand, this topic was created.

Anyways, about the patch: unfortunately i did not manage to save it before the post was deleted.

However, I have notified AbdallahTerro to this thread so he 'll drop by to offer it himself.
 
  • Like
Reactions: pedrobarca

ShadowOne333

QVID PRO QVO
Developer
Joined
Jan 17, 2013
Messages
10,688
Trophies
1
XP
12,508
Country
Mexico
Thank you :) NC discussion seemed on the way to become the new ''Devo AP removal'' talk. So in order for things to not get more out of hand, this topic was created.

Anyways, about the patch: unfortunately i did not manage to save it before the post was deleted.

However, I have notified AbdallahTerro to this thread so he 'll drop by to offer it himself.

Oh good thing.
If we can apply the patch from him to the main code, and then make some button mapping done properly to apply to a wide variety of NGC games (and don't forget comfortable mapping), then we might be good to go.

The thing is that we might want to set up a good button configuration that most users are happy with.
I am also not very fond of adding the C-Stick to the Wiimote's D-Pad , I don't know why but I think it would be quite a pain uncomfortable.

I remember I was trying to do a similar thing with GlovePIE and RE5, and I ended up dropping the Right Analog Stick camera movement because it could only be implemented properly with IR movement. I left the D-Pad to do the work of the main D-Pad from XBOX 360 controllers.

Out of that I think the rest of the mapping is good, just gotta work with the A and B buttons. :P
 
  • Like
Reactions: pedrobarca

nakata6790

True Player
OP
Member
Joined
Sep 17, 2009
Messages
890
Trophies
0
XP
604
Country
Greece
Cool. If IR can be implemented we can have a toggle/option: map c-stick to IR (fps, tps) OR map c-stick to wiimote d-pad (racers, platformers, puzzle games, 2d games etc).

Anyway button mapping will of course be decided by listening to all of people's suggestions. You are correct i think in suggesting GC start= wiimote1 (and GC Z = NC C if the game makes heavy use of it).
Also, i thought GlovePie registered the gyro sensor and not IR aiming (the former is much less precise than the latter. Wiimote handily beat PS Move on the latter, but was really outclassed on the former)
 
  • Like
Reactions: pedrobarca

ShadowOne333

QVID PRO QVO
Developer
Joined
Jan 17, 2013
Messages
10,688
Trophies
1
XP
12,508
Country
Mexico
Cool. If IR can be implemented we can have a toggle/option: map c-stick to IR (fps, tps) OR map c-stick to wiimote d-pad (racers, platformers, puzzle games, 2d games etc).

Anyway button mapping will of course be decided by listening to all of people's suggestions. You are correct i think in suggesting GC Z= NC C and GC start= wiimote1.

We can get a good idea of how to map the buttons if we take a look at some games from the New Wii Play controls, like Pikmin and the Metroid games.

Here is the comparison:
Pikmin GC: http://www.gamefly.com/Rent-Pikmin/103165/GameplayControls/#.VBHT7Pl5Nws
Pikmin Wii: http://www.gamefly.com/Rent-Pikmin/135160/GameplayControls/#.VBHT2Pl5Nws

Metroid Prime GC: http://www.gamefly.com/Rent-Metroid-Prime/100210/GameplayControls/
Metroid Prime Trilogy Wii: http://www.gamefly.com/Rent-Metroid-Prime-Trilogy/138925/GameplayControls/

That might help us to define some buttons properly.
 
  • Like
Reactions: pedrobarca

nakata6790

True Player
OP
Member
Joined
Sep 17, 2009
Messages
890
Trophies
0
XP
604
Country
Greece
Ok, I supplemented the OP's example button mappings based on your suggestions. I also separated them to definitive (that we all can agree) and ''as yet undecided'' parts.
 
  • Like
Reactions: pedrobarca

jayglass

Well-Known Member
Member
Joined
Jun 2, 2014
Messages
149
Trophies
0
Age
34
XP
513
Country
Chad
  • Gamecube L = Nunchuck C(left trigger/shoulder button)
  • Gamecube R = Wiimote B (right trigger/shoulder button)
  • Gamecube A = Wiimote A (big main button)
  • Gamecube B = Wiimote 1 button (secondary button)
  • Gamecube C-Stick = Wiimote d-pad
  • Gamecube analog stick = Nunchuck analog stick
  • secondary Gamecube buttons X & Y =Wiimote - and + buttons
  • secondary Gamecube button Z =Wiimote B
  • Gamecube Start button = Wiimote 2 button
 

cashonly

Well-Known Member
Member
Joined
Sep 10, 2014
Messages
100
Trophies
0
Age
36
XP
451
Country
wow, nice work with the thread. my opinion also, 100% of those who use nintendont already have wiimote and nuchack. you even start the nintendont app with the wiimote.
 
  • Like
Reactions: pedrobarca

del_delly

Well-Known Member
Member
Joined
Sep 21, 2013
Messages
137
Trophies
0
Age
29
XP
137
Country
Norway
Another suggested mapping:
Wiimote dpad is ABXY
A is also A, because its practical.
Wii_B is R
Z is L, C is Z
Analog is analog. - or + is Start.

This mapping scheme is pretty bad, but it will work for games that has no use of dpad and c stick. So please ignore it, i just wanted to post it.
 
  • Like
Reactions: pedrobarca

LightyKD

Future CEO of OUYA Inc.
Member
Joined
Jun 25, 2008
Messages
5,373
Trophies
1
Age
36
Location
Angel Grove, CA
XP
4,242
Country
United States
Another suggested mapping:
Wiimote dpad is ABXY
A is also A, because its practical.
Wii_B is R
Z is L, C is Z
Analog is analog. - or + is Start.

This mapping scheme is pretty bad, but it will work for games that has no use of dpad and c stick. So please ignore it, i just wanted to post it.


That's a start but here's one better.

(+) = start

Hold (c) + Nunchuck Stick = D-Pad

Hold (c) + Wii Dpad = C Stick

(-) = [Z]
 
  • Like
Reactions: pedrobarca
General chit-chat
Help Users
  • No one is chatting at the moment.
    El_Doot @ El_Doot: very original indeed +1