Skip to content

Review copy: fork release build (don't merge) - #5

Draft
grantendo wants to merge 23 commits into
mainfrom
fork-release
Draft

grantendo wants to merge 23 commits into
mainfrom
fork-release

Conversation

@grantendo

Copy link
Copy Markdown
Owner

CI check of the fork release branch before the release. Not to be merged: the release is made from this branch, and main stays at upstream v0.3.2.

grantendo and others added 22 commits October 20, 2026 10:09
Reads up to 4 entries ("Name,0x<64-bit title id>") from bootOptions.cfg
next to autoboot.cfg and adds the installed ones to the boot menu. The
title id decides the launch path: 0x0001... titles launch on vWii via
mocha and CMPTLaunchTitle, 0x0005... titles via
_SYSLaunchTitleWithStdArgsInNoSplash after account selection.

A custom autoboot choice is saved by title id, so renaming an entry keeps
it. If the saved title is no longer installed, the menu opens without
overwriting the choice.

Builds on wiiu-env#25 by Romulo Leitão (razor85), which
introduced bootOptions.cfg and the custom entries, and follows the
review there: full title ids, no vWii/Wii U string field, and
fgets/strtoull instead of streams. The installed-title check
now looks for title.tmd, which every installed title has.

Co-authored-by: Romulo Leitão <abra185@gmail.com>
fprintf pulled in about 4.8 KB of formatting code that snprintf, already
linked, covers. The branch now builds 4.4 KB larger than main.

Formatted with clang-format 13.0.1, which leaves main unchanged.
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).
The menu gets -1 for such an entry, so pressing X left the choice
unchanged and nothing was written: the old title came back as the
autoboot title once it was reinstalled. X and Y now always save.

Also skip mbstowcs's result when it reports a byte it can't convert
((size_t) -1), now that entry names come from a file.
The menu doesn't scroll: with all four built-in entries and four
custom ones, the eighth row covered the update status line. Custom
entries that don't fit are left out with a log message.

System applets (title ids 00050030..., like the Internet Browser)
need their own launch calls, so bootOptions.cfg skips them.
A saved Homebrew Launcher or vWii Homebrew Channel that is missing was
passed to the menu unchanged, which then read its id as a row number:
with a custom entry in that row, A started the custom title and saved
it as the autoboot entry. Every saved entry the menu doesn't show now
opens the menu with nothing preselected and stays saved, as a custom
entry whose title is gone already did.
An "@" line in bootOptions.cfg names a built-in entry by its autoboot.cfg
name (@wiiu_menu, @homebrew_launcher, @vwii_system_menu,
@vwii_homebrew_channel). When the file has any, entries appear in the
order of its lines; built-in entries it doesn't list follow in the usual
order, so none can disappear, and unavailable ones stay hidden. Without
"@" lines the menu looks as before. Names match in any case, an unknown
one is skipped with a log message, and a byte order mark that some
editors write at the start of the file is ignored.

The menu is now an ordered list instead of a map keyed by option id,
which also fixes the autoboot highlight and the starting cursor: they
were found by matching ids to positions, which skipped the Wii U Menu
(id 0) as the autoboot option. With no autoboot option the cursor starts
on the Wii U Menu, as before.
With "@" lines in bootOptions.cfg and no autoboot entry, the menu's cursor
starts on the first entry instead of the Wii U Menu, so the entry put first is
also the one A starts. Without "@" lines nothing changes.
A custom entry's name may start with @ ("@games,0x..."), which the
parser took for a built-in entry and skipped. Only lines without a
comma name built-in entries now.
A "countdown=N" line in bootOptions.cfg (1-30 seconds) shows the menu at every
boot even with an autoboot entry set, counts down to that entry and starts it
when the countdown ends. Any button press stops the countdown and leaves the
menu as usual. Without the line nothing changes.
The press that stopped the countdown also went on to the menu, so A
started the highlighted entry and X cleared autoboot. Now it only
stops the countdown, as the README says. A line with a comma is also
always a custom entry, even if its name starts with "countdown=".
# Conflicts:
#	source/BootUtils.cpp
The menu shows "v0.3.2 (grantendo fork)". The README says it's not
an official Aroma build, what it adds and who wrote it, how to install
it, and to press B when the Aroma Updater asks about 99_autoboot.rpx.
Holding START (+) at boot asks for the menu, but with countdown=N the
countdown still ran: the press came before the menu opened, so it
didn't stop it, and the autoboot entry could start anyway.
START held while the update warning was open didn't stop the
countdown: the buttons were only read before the warning. Reading them
again keeps the boot-time press working too.
The second button read kept only what was held, so a button pressed
right then was lost, and the countdown ran on although a button had
been pressed.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

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