Hacking Nintendont

Adeka

Beta Tester
Member
Joined
Mar 19, 2013
Messages
4,168
Trophies
0
Age
30
XP
1,633
Country
United States
Here's what I found out: I tested games with a 4GB USB, and was getting crappy results. (VERY slow loading times, sound repeating after 2-3 seconds, etc)
Then I tested my 32GB USB to find that the sound doesn't repeat itself, (Sometimes it freezes) the loading times are way faster, and the controller delays aren't as bad. I think it's based on how big your USB hard drive is. The bigger, the better.
I tested Nintendont with a 2tb and a 16gb and they worked the same
 
R

RonaldCoLtd

Guest
I tested Nintendont with a 2tb and a 16gb and they worked the same


Hmm. Strange. Well, I tested Mario Party 4 (With 32GB) and no sound issues and controller delays, so that's a great improvement. Though MP6 has some controller delays.
 

Onion_Knight

Well-Known Member
Member
Joined
Feb 6, 2014
Messages
878
Trophies
0
Age
45
XP
997
Country
I understand why the games lag a bit because of potential slow transfer speeds of the usb ports and/or drives. But sound issues on all of my games seem to have been eliminated. I haven't had time to look at the NintendontUSB code, so the following question may be a dumb one: Why can't we, or the coders, make NintendontUSB work on SD? Maybe change path of where N'tUSB looks. For instance, I'm guessing the dol is coded to look for usb:/games/[name]/game.iso .. How easily can that path be changed? To say the old sd:/[path]? Something that'll allow faster reads.

Is this even feasible?

So...reading through the source code of the kernel shows that the SDI.c/h files have been removed completely, EHCI and USBStorage have been ported over from DIOS MIOS, and diskio.c is now pointing to read/write from USB_Storage calls. You could change the loader code to "see" your SD card but the pointer to your games memory offset would be unable to be read as the kernel couldn't see it. If you wanted to revert this back SD, you could add back in the SDI.c/h files from the original SD repository, modify main.c to call SDHCInit(), change diskio.c to read/write from SD AND than change the loader code to "see" your sdcard. That ones pretty simple you just call fat mount simple on the usb drive change the directories to sd and call it good. . I haven't made my way through all of the code yet but that would port it back to SD.


originally it looked like this:

main.c -> sdhcinit -> fat filesystem mount -> profit!

now:

main.c -> fat filesytemmount -> ehci init -> profit!


Disclaimer: I posted this after only looking at the new code for about 3 minutes so I may have missed some stuff.
 

OverjoY

Well-Known Member
Member
Joined
Apr 1, 2010
Messages
496
Trophies
1
Location
Heerlen
XP
594
Country
Netherlands
True! I'll svn checkout this sometime today and go through it pretty thoroughly. Its very readable though, so thank you for that!


Most is true though


mmm ;)


Code:
 OH0: configured  USB device (hub 0, port 1) vid: 0x0451 pid:  0x2046
OH0: configured  USB device (hub 1, port 1) vid: 0x054c pid:  0x0268
OH0: configured  USB device (hub 1, port 2) vid: 0x0e8f pid:  0x310d
 
* Sent already attached device *
HID:Loaded config file for controller channel: 1 (VID:054C PID:0268)
HID:Loaded config file for controller channel: 2 (VID:0E8F PID:310D)
 
  • Like
Reactions: Onion_Knight

GreyRogue

Well-Known Member
Member
Joined
Jun 21, 2013
Messages
213
Trophies
0
Age
45
XP
572
Country
United States
r39
I've attempted to merge the changes from nintendont-usb into the main repository.
To build the usb version use 'make usb=1' for both the kernel and the loader.
 
  • Like
Reactions: Pepois

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,890
Country
United States
Aah, finally, we got the source.

Still trying to figure out if it's possible to put Bluetooth driver into Nintendont (Bluetooth stack isn't like wifi driver, right? I know the difference between vWii IOS and Wii IOS is the wifi driver... but it's the same for bluetooth???)

... and I don't know how to say the last part of my message (it's about USB connectivity)
 

Adeka

Beta Tester
Member
Joined
Mar 19, 2013
Messages
4,168
Trophies
0
Age
30
XP
1,633
Country
United States
I havn't tested the usb version on the wii but how does the multiplayer support work on it? do you just plug the gamecube controllers in the top or what?

Also when can we expect the dsp changes to be ported over to the SD version?
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
I updated USBLoaderGX to allow USB.

I tested r39.
I got a weird (mixed SD / USB log ;) ) when launching Mario sunshine from USB.
"Autobooting Tales of Symphonia", which is the latest SD game I launched, but it correctly launched Mario on USB.

It might still load the SD:/nincfg.bin before loading the USB one?

Code:
        BootGame: GMSE01
kenobiwii source path = sd:/sneek/kenobiwii.bin
NIN: Copied sd:/sneek/kenobiwii.bin to usb1:/sneek/kenobiwii.bin.
NIN: Copying sd:/codes/GMSE01.gct to usb1:/NINTemp.gct
NIN: Cfg path : usb1:/nincfg.bin
NIN: Loading cheat NINTemp.gct
NIN: config 0x000002b1
NIN: Language 0x00000002
Sram: Language set to 0x02
Sram: flags set to 0x3d
Sram: ntd set to 0x40
ReloadIos: Found TMD access rights check at 0x939f4c5c
Exiting USBLoaderGX...

Nintendont Loader USB
Built   : Mar 29 2014 10:49:31
Version : 0.1
TMDSize:1168
BootIndex:18
Kernel:"/shared1/00000067.app"
KernelSize:168920
Autobooting:"/games/TALES OF SYMPHONIA [GQSEAF]/disc2.iso"
Updated DDR settings in lomem for current map
load segment @ [20000000, 20007354] (29524 bytes)
load segment @ [20008000, 200082ac] (684 bytes)
load segment @ [20009000, 2004f9ec] (289260 bytes)
load segment @ [20100000, 2010cfdc] (53212 bytes)
load segment @ [2010d000, 2010dbcc] (3020 bytes)
load segment @ [2010e000, 201126ac] (18092 bytes)
priority = 88, stackSize = 2048, stackPtr = 2004f1ec
starting thread entry: 0x20000000
priority = 121, stackSize = 16384, stackPtr = 2010e620
starting thread entry: 0x20100000
$IOSVersion: IOSP: 03/03/10 10:43:18 64M $
$IOSVersion:  FFSP: 11/24/08 15:36:10 64M $
Nintendont
Built   : Mar 29 2014 10:49:07
Version : 0.1
USB:Discovering EHCI devices...
USB:Drive size: 238475MB SectorSize:512
$IOSVersion: OH0: 08/13/08 15:43:07 64M $
$IOSVersion: OH1: 07/11/08 14:34:40 64M $
$IOSVersion: NCD: 06/28/07 02:37:17 64M Release/apricot-win/HEAD $
$IOSVersion: STM: 12/15/08 15:28:07 64M Release/builder/HEAD $
ES:ES_LoadModules(55):0
CFGInit()
OH1:configured USB device at port 0, vid: 0x057e pid: 0x0305
Apploader Initialized.  $Revision: 29 $.
This Apploader built Apr 10 2002 02:35:29
DIP:DOLsize:4128900 DOL read:9536
DIP:DOLsize:4128900 DOL read:3604480
DIP:DOLsize:4128900 DOL read:3604576
DIP:DOLsize:4128900 DOL read:3604672
DIP:DOLsize:4128900 DOL read:3605632
DIP:DOLsize:4128900 DOL read:3605664
DIP:DOLsize:4128900 DOL read:3835488
DIP:DOLsize:4128900 DOL read:4089600
DIP:DOLsize:4128900 DOL read:4092992
DIP:DOLsize:4128900 DOL read:4128928
Patch: Offset:0x00003100 EOffset:0x003F3184 Length:003F0084
Patch:  Game ID = 474d5345
[00345AAC] 3C80CD00: lis r4, 0xCD00
[00345AC8] 3C80CD00: lis r4, 0xCD00
[00345E90] 3C60CD00: lis r3, 0xCD00
[003525AC] 3C60CD00: lis r3, 0xCD00
[0035262C] 3C80CD00: lis r4, 0xCD00
[0035266C] 3C60CD00: lis r3, 0xCD00
[0035269C] 3C60CD00: lis r3, 0xCD00
[003526CC] 3FE0CD00: lis r31, 0xCD00
[0035278C] 3C60CD00: lis r3, 0xCD00
[003527E8] 3FE0CD00: lis r31, 0xCD00
[0035289C] 3C60CD00: lis r3, 0xCD00
[003528AC] 3C80CD00: lis r4, 0xCD00
[003528C8] 3C60CD00: lis r3, 0xCD00
[003528D8] 3C80CD00: lis r4, 0xCD00
[003528F4] 3C60CD00: lis r3, 0xCD00
[003529A8] 3CC0CD00: lis r6, 0xCD00
[00352A78] 3FE0CD00: lis r31, 0xCD00
[00352BF4] 3FE0CD00: lis r31, 0xCD00
Patch:Found [SetInterruptMask]: 0x00345BEC
Patch:[__OSDispatchInterrupt] 0x00345DA0
Patch:[Hook:OSSleepThread] at 0x803493C8
Patch:Failed to open/find cheat file:"NINTemp.gct"
Patch:Found [__DVDIntrruptHandler]: 0x0034A7E4 (0x0034A7E4)
Patch:[__DVDInterruptHandler] 0x0034A838
Patch:[DVDLowReadDiskID] 0x0034B03C
Patch:[DVDLowStopMotor] 0x0034B0FC
Patch:[cbForStateBusy] 0x0034D618
Patch:[VIConfgiure] 0x0034FBA0
Patch:[DSPPattern] 0x003E47A0 v0
Patch:[DSPPattern] 0x003E47A0 v1
Patch:[DSPPattern] 0x003E47A0 v5
Patch:[DSPROM] DSPv1
PatchCount:00000FFF
Patch:Found [__fwrite C]: 0x00338F8C
Patch:Found [__OSReadROM]: 0x00347B54
Patch:[__OSReadROM] 0x00347B54
Patch:Found [C_MTXLightPerspective]: 0x0034A17C
Patch:[C_MTXLightPerspective] 0x0034A17C
Patch:Found [C_MTXPerspective]: 0x0034A404
Patch:[C_MTXPerspective] 0x0034A404
Patch:Found [DVDLowRead A]: 0x0034AB48
[0034AB94] 3C80C000: lis r4, 0xC000
[0034ABA0] 38842F00: addi r4, r4, 0x2F00
[0034ABA4] 3C60A700: lis rX, 0xA700
Patch:Found [DVDLowAudioStream A]: 0x0034B288
[0034B2A4] 3CC0C000: lis r6, 0xC000
[0034B2A8] 38C62F00: addi r6, r6, 0x2F00
Patch:Found [DVDLowRequestAudioStatus]: 0x0034B320
[0034B33C] 3C80C000: lis r4, 0xC000
[0034B340] 38842F00: addi r4, r4, 0x2F00
Patch:Found [DVDLowAudioBufferConfig]: 0x0034B3AC
[0034B3DC] 3C60C000: lis r3, 0xC000
[0034B3E4] 38632F00: addi r3, r3, 0x2F00
Patch:Found [DVDInquiryAsync A]: 0x0034DFE4
Patch:Found [DVDGetDriveStatus]: 0x0034E144
Patch:Found [PADRead A]: 0x00351600
Patch:Found [PADControlMotor B]: 0x003519AC
Patch:Found [ARStartDMA]: 0x00352DF4
Patch:Found [__ARChecksize A]: 0x00353090
Patch:[__ARChecksize] 0x00353090
Patch:Found [ARQPostRequest]: 0x00353BDC
Patch:Found [__CARDReadStatus]: 0x00354740
Patch:Found [__CARDClearStatus]: 0x00354830
Patch:Found [__CARDStat A]: 0x00354CBC
Patch:Found [__GXSetVAT]: 0x0035D16C
Patch:Found [GXInitTlutObj A]: 0x003601B4
Patch:[GXInitTlutObj] 0x003601B4
Patch:Found [SIGetType]: 0x003696F8
Patch:Found [EXIImm]: 0x00369BF4
Patch:Found [EXIDMA]: 0x00369EF0
Patch:Found [EXISync]: 0x00369FDC
Patch:Found [__EXIProbe]: 0x0036A2D8
Patch:Found [EXISelect]: 0x0036A748
Patch:Found [EXIDeselect]: 0x0036A874
Patch:Found [EXIntrruptHandler]: 0x0036A984
Patch:Found [TCIntrruptHandler]: 0x0036AA4C
Patch:Found [EXILock]: 0x0036AE40
Patch:Found [EXIUnlock]: 0x0036AF34
Patch: [DVDSeekAbsAsyncPrio] not found
Patch: [GXInitTlutObj B] not found
Patch: [J3DUClipper::clip()] not found
Patch: [J3DUClipper::clip()] not found
Patch: [__CARDStat B] not found

Dolphin OS $Revision: 54 $.
Kernel built : Jun  5 2002 02:09:12
Console Type : Retail 3
Memory 24 MB
Arena : 0x80427800 - 0x817feec0
app booted from bootrom
80000000 80427820 80427820 817feec0 1800000
arenaLo=80427820 arenaHi=817feec0
Mario is launching fine from USB but randomly freeze (like before).


For users who can't find games from USB, You can put loader.dol & loaderusb.dol (or boot.dol & bootusb.dol) on nintendont folder on SD, but be sure to put your games on the FIRST partition on your USB drive.
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Aah, finally, we got the source.

Still trying to figure out if it's possible to put Bluetooth driver into Nintendont (Bluetooth stack isn't like wifi driver, right? I know the difference between vWii IOS and Wii IOS is the wifi driver... but it's the same for bluetooth???)

... and I don't know how to say the last part of my message (it's about USB connectivity)
From what I understand, the bluetooth module IS also new on Wii U.
There's ways of getting around this, though. For example, Nintendont seems to borrow the IOS's built in HID driver in order to communicate with USB HID controllers BUT if the USB game reading code is ported from Dios Mios, it means it's communicating DIRECTLY with USB at the same time. (And this is only based on some posts here and glancing over the SD version of the Nintendont code a while ago, so I could be mistaken).
SO
it all depends on how they end up trying to communicate with the Bluetooth module. Either way they'd have to hunt down a Bluetooth stack to use with the driver but if they were to use the IOS's Bluetooth driver it would work both ways. If they were to go the USB->Bluetooth route directly and use, say, the Wii Linux Bluetooth driver as a base, they'd have trouble on the Wii U side since that Bluetooth driver is for Wii only.
 

hobblinharry

Member
Newcomer
Joined
Mar 27, 2014
Messages
13
Trophies
0
Age
37
XP
107
Country
United States
So I'm having an uphill battle with trying to get Nintendont to work. For the record I'm on a Wii U (vWii) and using the SD version of Nintendont. Getting the app on my SD card was fine, it loads on HBC fine, and I can navigate through the settings menu and my GameCube ISOs just fine. The problem starts when I try to launch a game, it hangs on something like "patching kernal... 4." I posted this problem a few pages ago and I was told I was getting that error because I wasn't using a USB controller. That was true, I was trying to play with Wiimote with Classic Controller attatchment. Apparently that doesn't work though as Nintendont is programmed to ONLY work with USB controllers for some reason.

So, this is where I am here with this thread: I thought to myself, so the Wii U Pro controller has a USB cable. I tried plugging it into my Wii U instead of using it wireless, and tried to launch a game in Nintendont, however this time instead of the console freezing, it reboots itself to the main Wii U menu. Odd... tried it again without plugging it in and freezes on patching kernal like normal. Plugged it back in, console resets itself. So, it does know I have something plugged into USB. So then I think to myself "maybe its because I dont have a controller.ini" set up. I also noticed that when I have my Wii U Pro plugged in with USB cable, instead of it hanging on "patching kernal 4" it says "patching kernal -3" right before it resets.

So then, I downloaded the HIDTest app for HBC and it loaded, but when I tried to press anything on the Pro controller while plugged into USB, nothing registered. Also, my Wiimote wasn't responding to exit the app. This made me think that the app doesnt support the new Wii MotionPlus controllers that came out in Nov. 2011 which if this is the case, then like all Wii homebrew apps that don't support this Wiimote, the app will lockup-so I'm not sure if it didn't detect the Pro controller because it locked up or because what I'm trying to do just straight up wont work.

To verify if the Pro controller was HID compliant, I plugged it into my PC and it showed up in Device Manager as a HID compliant device. However when I tried to view it as a gamepad in "Devices and Printers" it shows up as "USB Charger" (this is probably because there is not a proper driver but w/e, it shows up and shows it is HID compliant). So, there HAS to be some sort of way to get this to work with Nintendont.

So I thought, well maybe if I can figure out the values on my computer for what needs to go in controller.ini, I can just throw that on my SD card, and try Nintendont again. Problem is, after extensive googling, I can't find any program that will allow me to troubleshoot my Pro controller and grab the values I need to setup a .ini file. I did try the wiiupro mayflash .ini someone made but that did not work.

This is why I am posting this and I am asking for help. Any feedback would be awesome! If we can get this working then it would be a great breakthrough for Wii U owners like me who can just use their Pro controller for this. Of course I still wan't to know why Nintendont wont work with regular Wiimote support, but alas, thats a different problem alltogther.
 

Adeka

Beta Tester
Member
Joined
Mar 19, 2013
Messages
4,168
Trophies
0
Age
30
XP
1,633
Country
United States
So I'm having an uphill battle with trying to get Nintendont to work. For the record I'm on a Wii U (vWii) and using the SD version of Nintendont. Getting the app on my SD card was fine, it loads on HBC fine, and I can navigate through the settings menu and my GameCube ISOs just fine. The problem starts when I try to launch a game, it hangs on something like "patching kernal... 4." I posted this problem a few pages ago and I was told I was getting that error because I wasn't using a USB controller. That was true, I was trying to play with Wiimote with Classic Controller attatchment. Apparently that doesn't work though as Nintendont is programmed to ONLY work with USB controllers for some reason.

So, this is where I am here with this thread: I thought to myself, so the Wii U Pro controller has a USB cable. I tried plugging it into my Wii U instead of using it wireless, and tried to launch a game in Nintendont, however this time instead of the console freezing, it reboots itself to the main Wii U menu. Odd... tried it again without plugging it in and freezes on patching kernal like normal. Plugged it back in, console resets itself. So, it does know I have something plugged into USB. So then I think to myself "maybe its because I dont have a controller.ini" set up. I also noticed that when I have my Wii U Pro plugged in with USB cable, instead of it hanging on "patching kernal 4" it says "patching kernal -3" right before it resets.

So then, I downloaded the HIDTest app for HBC and it loaded, but when I tried to press anything on the Pro controller while plugged into USB, nothing registered. Also, my Wiimote wasn't responding to exit the app. This made me think that the app doesnt support the new Wii MotionPlus controllers that came out in Nov. 2011 which if this is the case, then like all Wii homebrew apps that don't support this Wiimote, the app will lockup-so I'm not sure if it didn't detect the Pro controller because it locked up or because what I'm trying to do just straight up wont work.

To verify if the Pro controller was HID compliant, I plugged it into my PC and it showed up in Device Manager as a HID compliant device. However when I tried to view it as a gamepad in "Devices and Printers" it shows up as "USB Charger" (this is probably because there is not a proper driver but w/e, it shows up and shows it is HID compliant). So, there HAS to be some sort of way to get this to work with Nintendont.

So I thought, well maybe if I can figure out the values on my computer for what needs to go in controller.ini, I can just throw that on my SD card, and try Nintendont again. Problem is, after extensive googling, I can't find any program that will allow me to troubleshoot my Pro controller and grab the values I need to setup a .ini file. I did try the wiiupro mayflash .ini someone made but that did not work.

This is why I am posting this and I am asking for help. Any feedback would be awesome! If we can get this working then it would be a great breakthrough for Wii U owners like me who can just use their Pro controller for this. Of course I still wan't to know why Nintendont wont work with regular Wiimote support, but alas, thats a different problem alltogther.
Error 4 and error -3 is the same thing: compatible controller not connected

Regular wiimotes won't work because Nintendont does not have bluetooth support yet

Edit: pro controllers only work if you have the wireless bluetooth adapter for it
 

OverjoY

Well-Known Member
Member
Joined
Apr 1, 2010
Messages
496
Trophies
1
Location
Heerlen
XP
594
Country
Netherlands
The USB code used isn't ported from DIOS MIOS, but I asume that the code in DIOS MIOS is pretty much the same as the code in sneek. I used the code from sneek (neek2o) which is slightly modified
 
  • Like
Reactions: Maxternal

Onion_Knight

Well-Known Member
Member
Joined
Feb 6, 2014
Messages
878
Trophies
0
Age
45
XP
997
Country
The USB code used isn't ported from DIOS MIOS, but I asume that the code in DIOS MIOS is pretty much the same as the code in sneek. I used the code from sneek (neek2o) which is slightly modified

ah, I haven't looked at the sneek source code but ehci and usb look to be pretty much the same as DIOS MIOS source.
 

Jonesy47

Well-Known Member
Member
Joined
May 17, 2009
Messages
101
Trophies
0
XP
321
Country
United States
Can someone either link r39 compiled with usb support or point me in the right direction to learn how to compile the source? I HATE that this project doesn't have an updated first post with the newest version available for download without busy work. Great projet but currently limited to those with the know how and patience to use it which is probably a small percentage of people who would help with compatibility testing, were the process easier.

I finally got nintendontusb rev 4 to work (show my games instead of "NO GAMES FOUND!") without any changes on my end from beta 7 (which DID show "NO GAMES FOUND!", so i assume the usb code changed somehow, for the better. I would post compatility for rev 4 if I thought it was going to be further developed but Im pretty sure the two projects are being merged just PLEASE, start compiling the usb loader.dol when you upate as well??? It would make this whole process a lot easier. In the meantime, back to the original question, can anyone show me how to compile this myself so III at least could help?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/sGvT5FKSiyk?si=TYqsdjjbF-4N8Xc8