Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not override WiiUGamepadSlot to 0 when NIN_CFG_AUTO_BOOT and HID_PAD_NONE #1054

Merged
merged 1 commit into from Jan 20, 2023

Conversation

ghostserverd
Copy link
Contributor

Right now in autoboot mode, if HID_PAD_NONE, the configured WiiUGamepadSlot gets overwritten as 0.

This change keeps the same logic for HIDPad != HID_PAD_NONE but keeps the configured WiiUGamepadSlot otherwise.

This should hopefully be the first step to allow supporting WiiUGamepadSlot for injectors like UWUVCI and TeconMoon's.

@carnage702
Copy link
Collaborator

So what is your goal here? the reason this line exists

          if (((NIN_CFG*)0x93004000)->Config & NIN_CFG_AUTO_BOOT)
           {
            if(HIDPad == HID_PAD_NONE)
            WiiUGamepadSlot = 0;
            else
            WiiUGamepadSlot = 1;
            }

is because for some reason when you autoboot nintendont cant read the wiiugamepad slot number so the gamepad wouldnt get assigned to any slot therefore it doesnt work.

All you did was make gamepad player 2 if there is an hid controller connected, did you even tryed without any hid controller connected to see if the wiiugamepad worked? because im guessing it wont since you never assigned it to player 1(0), nintendont doesnt read wiiugamepad slot if autoboots so im asking again did you tryed to use wiiugamepad with autoboot without having an hid controller plugged in?

@ghostserverd
Copy link
Contributor Author

So what is your goal here? the reason this line exists

          if (((NIN_CFG*)0x93004000)->Config & NIN_CFG_AUTO_BOOT)
           {
            if(HIDPad == HID_PAD_NONE)
            WiiUGamepadSlot = 0;
            else
            WiiUGamepadSlot = 1;
            }

is because for some reason when you autoboot nintendont cant read the wiiugamepad slot number so the gamepad wouldnt get assigned to any slot therefore it doesnt work.

All you did was make gamepad player 2 if there is an hid controller connected, did you even tryed without any hid controller connected to see if the wiiugamepad worked? because im guessing it wont since you never assigned it to player 1(0), nintendont doesnt read wiiugamepad slot if autoboots so im asking again did you tryed to use wiiugamepad with autoboot without having an hid controller plugged in?

I thought I was testing with a clean version of the autoboot forwarder, but I must have been testing with a patched version that passes the full NIN_CFG in memory instead of truncating it. Sorry for missing that.

Latest revision patches the issue with loading corrupted / random bytes into WiiUGamepadSlot.

See FIX94/nintendont-autoboot-forwarder#7 for a more detailed explanation of why this is happening.

@carnage702 carnage702 merged commit a4c8e0e into FIX94:master Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants