Repository navigation
Conversation
Works around vWii autoboot hanging on a black screen when the GamePad is powered off (wiiu-env#67). The BOTH/DRC screen-state probing succeeds even with no GamePad connected, after which the vWii transition waits on the DRC forever. Claude-Session: https://claude.ai/code/session_01PE4DJqPCXQzkGorJSUDrGv (cherry picked from commit f8eacbf of patapovich/AutobootModule; the same change is in his pull request wiiu-env#69)
CMPTAcctSetScreenType alone does not prevent the hang: the Wii U Menu additionally calls CMPTAcctSetDrcCtrlEnabled (nn_cmpt.rpl export, undeclared in wut) before launching vWii titles. Without it the vWii transition waits on a GamePad connection (wiiu-env#67). Claude-Session: https://claude.ai/code/session_01PE4DJqPCXQzkGorJSUDrGv (cherry picked from commit 474b98e of patapovich/AutobootModule; the same change is in his pull request wiiu-env#69)
On autoboot the launch runs much earlier than a manual selection from the boot menu, and launching before the compat subsystem is ready gives a black screen. Wait for CMPTCheckScreenState, launching anyway after 5s. From patapovich's wiiu-env#69 (commit 653bf27), which adds this wait to the two earlier commits above: its author found the screen type and DRC changes alone did not fix the black screen with the GamePad off.
With the GamePad off, CMPTLaunchTitle and CMPTLaunchMenu return -512: avm's AVMSetDCWiiCompat, which switches the TV to Wii mode, also reprograms the GamePad's display pipe from avm's GamePad settings, and with no GamePad those say "off" (what GX2SetDRCBuffer with GX2_DRC_RENDER_MODE_DISABLE stores), which dc rejects. Set the GamePad display to 854x480 first, the call GX2SetDRCBuffer makes for GX2_DRC_RENDER_MODE_SINGLE: AVMSetDRCBufferAttr(2, 1, 896), found with OSDynLoad.
The fixes for issue wiiu-env#67 forced TV-only output and turned GamePad control off for every vWii launch, which would cost GamePad users the vWii on their GamePad. Ask VPADRead whether a GamePad is connected (for up to half a second, as one switched on with the console may still be connecting at autoboot): if one is, launch exactly as before, trying both screens, then the GamePad, then the TV; if none is, take the TV-only path with the compat wait and the GamePad pipe mode.
VPADRead can report a GamePad that isn't there: the DRC Read Result Spoofer plugin makes every read succeed, so a vWii launch with no GamePad took the GamePad path and went black. CCRCDCDevicePing answers 0 only when a GamePad replies (2 to 4 ms either way on a Wii U, with and without the spoofer).
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@coderabbitai review |
Action performed
|
Review copy inside the fork, for CodeRabbit and the build check. It will be closed afterwards; nothing here goes upstream from this PR.
Fixes the black screen when a vWii title is started from the boot menu with no GamePad connected (wiiu-env#67). Builds on patapovich's commits from wiiu-env#69, plus a GamePad check over its radio link and a GamePad pipe mode before the launch.
Summary by CodeRabbit