Skip to content

Review copy: launch vWii titles with no GamePad connected - #3

Open
grantendo wants to merge 7 commits into
mainfrom
pr-gamepad-off
Open

grantendo wants to merge 7 commits into
mainfrom
pr-gamepad-off

Conversation

@grantendo

@grantendo grantendo commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

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

  • Improvements
    • Wii title launches now adapt to whether a GamePad is connected. Without one, the display uses TV-only output; with one, the existing display fallback options remain available.
    • Display setup now waits for the compatibility screen state before launching when no GamePad is detected.

patapovich and others added 7 commits October 20, 2026 10:20
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).
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The vWii launch flow now checks for a connected GamePad. It retains the existing screen fallback when connected and configures TV-only output when no GamePad is detected.

Changes: GamePad-aware vWii launch

Layer / File(s) Summary
Connectivity check and screen selection
source/BootUtils.cpp
The launch flow checks GamePad connectivity and keeps the existing screen fallback when connected. Without a GamePad, it disables DRC control, selects TV output, waits for a compatible screen state, and configures the DRC buffer mode using AVMSetDRCBufferAttr from avm.rpl.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant launchvWiiTitle
  participant isGamePadConnected
  participant DRC
  participant CMPT
  participant setDrcModeForWiiMode
  participant avm.rpl
  launchvWiiTitle->>isGamePadConnected: check GamePad connectivity
  isGamePadConnected->>DRC: ping up to 10 times
  DRC-->>isGamePadConnected: ping result
  isGamePadConnected-->>launchvWiiTitle: connected or absent
  launchvWiiTitle->>CMPT: disable DRC control and select TV output if absent
  launchvWiiTitle->>CMPT: wait for screen state if absent
  launchvWiiTitle->>setDrcModeForWiiMode: configure DRC buffer mode if absent
  setDrcModeForWiiMode->>avm.rpl: resolve AVMSetDRCBufferAttr
Loading

Suggested reviewers: maschell

Merge Risk: Minimal · up to 15513

This change adds a GamePad connectivity check and TV-only output for vWii launches when no GamePad is connected. The existing launch path is unchanged when a GamePad is present. No concrete merge-blocking defect was established, though the fix has not been confirmed on hardware.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: launching vWii titles when no GamePad is connected. The raw summary confirms the BootUtils.cpp changes cover this path, including the GamePad check, TV-only output, th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: launching vWii titles when no GamePad is connected. The raw summary confirms the BootUtils.cpp changes cover this path, including the GamePad check, TV-only output, the compatibility screen wait, and the DRC buffer mode. The title is specific and matches the PR objective of fixing the black screen. The title uses the word "Review copy", which is a minor prefix and does not affect the match.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eaee83f0-c0d4-4632-aa19-2bff8867fd6a
Commits

Reviewing files that changed from the base of the PR and between db1a0dd and 15513a1.

Files selected for processing: 1

  • source/BootUtils.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@grantendo

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@grantendo grantendo closed this Nov 16, 2026
@grantendo grantendo reopened this Nov 16, 2026
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.

2 participants