Hacking Nintendont

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,719
Trophies
2
Age
33
XP
8,690
Country
Portugal
I have the latest nintendon't build and I got the wii u forwarder in this very forum. I forgot who made it but it does the job except for these issues so I have a few questions regarding nintendont being launched though wiiVC (for gamepad compatibility):

1- is it possible to enable the rumble feature on the gamepad? player 2 rumble on wiiu pro works just fine.
2- is it possible to set a button combo on the gamepad to return to the nintendont loader? something like ZR+ZL+minus (since the gc controller doesn't have a select button they wouldn't interfere, right?).
3- is it possible to change what the home button on the gamepad does? sometimes I press it instinctively to look at the battery state or hour (as I do in wii u mode normally) but it closes nintendont and brings me back to wii u menu. It would be great if it behaved just like any other wiiVC or at least let the button do nothing at all to prevent this.
4- making the power button on the wii u console actually turn off the console as it would normally do on any other wiiVC title instead of rebooting the whole system.
1-NO gamepad is emulating a CC and CC has no rumble, and nintendo didnt coded any rumbling on the CC emulation.
2-NO like greywolf said abode.
3-Yes if you recompile nintendont yourself and change the codding, but everytime since version 1 nintendont home button on every controller was made to exit wich has been for 2 years plus...
4-you can turn off wiiu just fine just hit the gamepad power button and when it says press again you press it again and the wiiu will shutdown instead of rebooting.
 
  • Like
Reactions: september796

PinkDragonCourts

Member
Newcomer
Joined
Dec 19, 2016
Messages
8
Trophies
0
Age
27
XP
77
Country
there is no global "home menu" on the wii, every game runs on bare metal, so every game has its own implementation of the home menu, the GUI assets etc are provided by the official nintendo wii sdk that the game was compiled with which we obviously cant use. Thats why the home menu on older games sometimes looks and works a bit different from newer games.

Well, for execution to be fast and reliable its best to use a single .iso file, that way only one file handle gets loaded and cached helping out performance immensely and on top of that, the game gives disc read commands by disc offset and length, so you only need to do a file seek and then a file read command to give the game that data. There is the FST format that makes it possible to more easily replace files as all files are extracted from that .iso but to be honest it is rather slow because then nintendont does a ton of directory reads, opening and closing file handles constantly and decrypting the disc read commands back into file locations by going through the disc file table every time.

that bit of code is part of the cheats handler debugger via a usb gecko and doesnt reliably freeze every game, certain games still can do background executions, often times you get graphic corruptions from doing it too and on every freeze the audio just does a "beep" sound until you unfreeze. That handler also only gets used when cheats or debugging get enabled, by default it is not patched in.

i was thinking more of custom made home menu. like Wii Explora's
So there be a beep issue tho on breakpoint tho.
i can see where your coming from on disc read. but why does it have to go through the file table everytime? cant you load that to ram or more faster format?
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,174
Trophies
2
XP
33,408
Country
Mexico
Hi @FIX94.
Sorry to bother you, I sent you a PM previously but thought about posting in here just in case there are others interested in compiling Nintendont.

I am making a custom build of Nintendont for myself and two of my friends, in which the buttons are changed to this:
  • Minus = GC Z Button
  • L/R = Half analog presses (0x7F)
  • ZR/ZL = Full analog presses (0xFF)
  • Buttons are mapped in the clockwise mapping (B=A, etc) by default.
I managed to get all of them to do what I want, including L and ZL, except for R and ZR.
For some weird reason, the R button acts as if it was pressed very slightly, or I don't exactly know what is going on with it.

I modified PADReadGC.c with the following code:
Code:
       /*BEING COMMENT 
       //swap abxy when minus is pressed
       if((!(PrevDRCButton & WIIDRC_EXTRA_BUTTON_L3)) && drcbutton & WIIDRC_EXTRA_BUTTON_L3)
           PrevDRCButton ^= DRC_SWAP;
       PrevDRCButton = (PrevDRCButton & DRC_SWAP) | drcbutton;
       if(PrevDRCButton & DRC_SWAP)
       {   //turn buttons quarter clockwise
           if(drcbutton & WIIDRC_BUTTON_B) button |= PAD_BUTTON_B;
           if(drcbutton & WIIDRC_BUTTON_Y) button |= PAD_BUTTON_Y;
           if(drcbutton & WIIDRC_BUTTON_A) button |= PAD_BUTTON_A;
           if(drcbutton & WIIDRC_BUTTON_X) button |= PAD_BUTTON_X;
       }
       else
       { END COMMENT */

       if(drcbutton & WIIDRC_BUTTON_A) button |= PAD_BUTTON_X;
       if(drcbutton & WIIDRC_BUTTON_B) button |= PAD_BUTTON_A;
       if(drcbutton & WIIDRC_BUTTON_X) button |= PAD_BUTTON_Y;
       if(drcbutton & WIIDRC_BUTTON_Y) button |= PAD_BUTTON_B;

       if(drcbutton & WIIDRC_BUTTON_LEFT) button |= PAD_BUTTON_LEFT;
       if(drcbutton & WIIDRC_BUTTON_RIGHT) button |= PAD_BUTTON_RIGHT;
       if(drcbutton & WIIDRC_BUTTON_UP) button |= PAD_BUTTON_UP;
       if(drcbutton & WIIDRC_BUTTON_DOWN) button |= PAD_BUTTON_DOWN;

       //also sets left analog trigger
       if(drcbutton & WIIDRC_BUTTON_L)
       {
           button |= PAD_TRIGGER_L;
           Pad[0].triggerLeft = 0x7F;
       }
       else
           Pad[0].triggerLeft = 0;

       if(drcbutton & WIIDRC_BUTTON_ZL)
       {
           button |= PAD_TRIGGER_L;
           Pad[0].triggerLeft = 0xFF;
       }
       else
           Pad[0].triggerLeft = 0;

       //also sets right analog trigger
       if(drcbutton & WIIDRC_BUTTON_R)
       {
           button |= PAD_TRIGGER_R;
           Pad[0].triggerRight = 0x7F;
       }
       else
           Pad[0].triggerRight = 0;

       if(drcbutton & WIIDRC_BUTTON_ZR)
       {

           button |= PAD_TRIGGER_R;

           Pad[0].triggerRight = 0xFF;
       }
       else
           Pad[0].triggerRight = 0;

       if(drcbutton & WIIDRC_BUTTON_PLUS) button |= PAD_BUTTON_START;
       if(drcbutton & WIIDRC_BUTTON_MINUS) button |= PAD_TRIGGER_Z;
       if(drcbutton & WIIDRC_BUTTON_HOME) goto DoExit;
Everything else in the .C file is exactly the same as with the original code you made.

And here's a video of the issue:


The ZR button in the video seems to work fine.
However, the weird thing here is that if I swap the order of the R and ZR code, it's ZR the one that starts having that behaviour, while R acts normally now.

I don't know what is going on with the R button exactly, but do you have an idea on what might be causing that odd behaviour?

Any kind of help would be greatly appreciated.
It's just the R/ZR buttons right now that I can't seem to get working sadly, everything else seems fine.
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
I don't know what is going on with the R button exactly, but do you have an idea on what might be causing that odd behaviour?
you are setting the button being fully pressed even on the half-presses which causes oddities, only when you fully press down the analog triggers should the button press be set (you can hear and feel that physical "click" on a real gc controller too when that happens), so you really want to do something among the lines of this:
Code:
if(drcbutton & WIIDRC_BUTTON_ZL)
{
    button |= PAD_TRIGGER_L;
    Pad[0].triggerLeft = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_L)
    Pad[0].triggerLeft = 0x7F;
else
    Pad[0].triggerLeft = 0;

if(drcbutton & WIIDRC_BUTTON_ZR)
{
    button |= PAD_TRIGGER_R;
    Pad[0].triggerRight = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_R)
    Pad[0].triggerRight = 0x7F;
else
    Pad[0].triggerRight = 0;
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,174
Trophies
2
XP
33,408
Country
Mexico
you are setting the button being fully pressed even on the half-presses which causes oddities, only when you fully press down the analog triggers should the button press be set (you can hear and feel that physical "click" on a real gc controller too when that happens), so you really want to do something among the lines of this:
Code:
if(drcbutton & WIIDRC_BUTTON_ZL)
{
    button |= PAD_TRIGGER_L;
    Pad[0].triggerLeft = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_L)
    Pad[0].triggerLeft = 0x7F;
else
    Pad[0].triggerLeft = 0;

if(drcbutton & WIIDRC_BUTTON_ZR)
{
    button |= PAD_TRIGGER_R;
    Pad[0].triggerRight = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_R)
    Pad[0].triggerRight = 0x7F;
else
    Pad[0].triggerRight = 0;
Ah so that's what I was doing wrong.
Thanks for the explanation, very enlightening as I was hitting a wall with the code for the triggers.
So if I wanted it to be the other way around (L/R being full presses while ZL/ZR are half press) should I simply swap WIIDRC_BUTTON_L with WIIDRC_BUTTON_ZL like this?

Code:
if(drcbutton & WIIDRC_BUTTON_L)
{
    button |= PAD_TRIGGER_L;
    Pad[0].triggerLeft = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_ZL)
    Pad[0].triggerLeft = 0x7F;
else
    Pad[0].triggerLeft = 0;

if(drcbutton & WIIDRC_BUTTON_R)
{
    button |= PAD_TRIGGER_R;
    Pad[0].triggerRight = 0xFF;
}
else if(drcbutton & WIIDRC_BUTTON_ZR)
    Pad[0].triggerRight = 0x7F;
else
    Pad[0].triggerRight = 0;
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,174
Trophies
2
XP
33,408
Country
Mexico
sure, not much more needed.
Awesome!
So far it seems Sunshine's working wonderfully with the new code :)
Only thing is it seems Sunshine is not good enough to test half presses with L, since doesn't have any effect with half presses in the L button in the original game haha so we'll try it out with Luigi's Mansion for testing, but it should work right out the box.

Thanks for the help! :)
 
Last edited by ShadowOne333,

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,174
Trophies
2
XP
33,408
Country
Mexico
@FIX94 I was playing yesterday with the custom build and I stumbled into something rather interesting.
So I started playing Luigi's Mansion, the triggers worked fine and all, but there is one trick in particular which I couldn't pull off normally.

The trick I'm talking about is the Elemental Ball which you can shoot by quickly pressing the L trigger all the way down with a Gamecube controller, you can see it in action here at around 1:20:


You can perform this with any of the three elemental ghosts.
In Nintendont however, by pressing the button assigned to Full analog press (L button), all Luigi does is simply a more powerful elemental blow out of the Poltergust.

The ONLY way to activate it is by pressing the half press button first (0x7F) and then pressing the full press button (0xFF), that's the only way it activates the trick.
If I do the full press button (0xFF) by itself, the trick does not activate at all.

I found this odd, so I wanted to test out if this same issue in the official latest Nintendont (v480), and interestingly enough, it happens there too.
If I press L first and then ZL, the trick does not activate, it's only when I press ZL first and THEN L that it activates.

I don't know how Luigi's Mansion checks for a full press or if there is something missing on the full press code, but this certainly is a weird instance :lol:
 
Last edited by ShadowOne333,

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,719
Trophies
2
Age
33
XP
8,690
Country
Portugal
@FIX94 I was playing yesterday with the custom build and I stumbled into something rather interesting.
So I started playing Luigi's Mansion, the triggers worked fine and all, but there is one trick in particular which I couldn't pull off normally.

The trick I'm talking about is the Elemental Ball which you can shoot by quickly pressing the L trigger all the way down with a Gamecube controller, you can see it in action here at around 1:20:


You can perform this with any of the three elemental ghosts.
In Nintendont however, by pressing the button assigned to Full analog press (L button), all Luigi does is simply a more powerful elemental blow out of the Poltergust.

The ONLY way to activate it is by pressing the half press button first (0x7F) and then pressing the full press button (0xFF), that's the only way it activates the trick.
If I do the full press button (0xFF) by itself, the trick does not activate at all.

I found this odd, so I wanted to test out if this same issue in the official latest Nintendont (v480), and interestingly enough, it happens there too.
If I press L first and then ZL, the trick does not activate, it's only when I press ZL first and THEN L that it activates.

I don't know how Luigi's Mansion checks for a full press or if there is something missing on the full press code, but this certainly is a weird instance :lol:

preety easy to figure out, probably the game check how fast you go from pressing to full press if and if its fast you do that with analog buttons they get zero values so they probably dont get the estimative right, if you use a regular gc controller or a ps3 controller or even original wiimote you can do that easily becuase the values change from full press to mid.

theres isnt much we can do since its how the game works, you just need a analog triggers one for it to work perfectly.
 

ccfman2004

Well-Known Member
Member
Joined
Mar 5, 2008
Messages
2,832
Trophies
2
XP
3,187
Country
United States
preety easy to figure out, probably the game check how fast you go from pressing to full press if and if its fast you do that with analog buttons they get zero values so they probably dont get the estimative right, if you use a regular gc controller or a ps3 controller or even original wiimote you can do that easily becuase the values change from full press to mid.

theres isnt much we can do since its how the game works, you just need a analog triggers one for it to work perfectly.
Actually you can press the L Trigger almost all the way down and then stop. Then you can rapidly press the L button in fully without having to completely releasing the L Button to rapidly fire elemental shots.
 
  • Like
Reactions: ShadowOne333

september796

Well-Known Member
Member
Joined
May 4, 2015
Messages
300
Trophies
0
XP
1,485
Country
Cote d'Ivoire
4-you can turn off wiiu just fine just hit the gamepad power button and when it says press again you press it again and the wiiu will shutdown instead of rebooting.
it doesn't seem to work for me. A white screen message appears after I hit the gamepad power button for a couple of seconds indeed but when I hit it again it doesn't do anything and the game still runs. If I press (and hold) the power button again it just turn off the gamepad not the console.
 

pedro702

Well-Known Member
Member
Joined
Mar 3, 2014
Messages
12,719
Trophies
2
Age
33
XP
8,690
Country
Portugal
it doesn't seem to work for me. A white screen message appears after I hit the gamepad power button for a couple of seconds indeed but when I hit it again it doesn't do anything and the game still runs. If I press (and hold) the power button again it just turn off the gamepad not the console.
probably have outdated nintendont dol since that was added latter, what version do you have say the actual number.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: :rofl2: +1