Skip to content

Custom boot entries from bootOptions.cfg - #71

Open
grantendo wants to merge 5 commits into
wiiu-env:mainfrom
grantendo:pr-entries
Open

grantendo wants to merge 5 commits into
wiiu-env:mainfrom
grantendo:pr-entries

Conversation

@grantendo

Copy link
Copy Markdown

Adds up to four entries of your own to the boot menu, Wii U titles or vWii titles. This picks up #25 with its review addressed: full title ids, no separate vWii/Wii U field, and fgets/strtoull instead of streams. Opened as a new PR, as @razor85 suggested in #25. Thanks for the original work; you're credited as co-author on the first commit.

Usage

Create bootOptions.cfg next to autoboot.cfg (in the [ENVIRONMENT] folder), one entry per line: a name, a comma, and the full 64-bit title id.

# vWii titles start with 00010001, Wii U titles with 00050000
My vWii Channel,0x0001000152494654
Mii Maker,0x000500101004A200
  • The title id decides the launch path: 0x0001… launches on vWii through CMPTLaunchTitle, 0x0005… through _SYSLaunchTitleWithStdArgsInNoSplash after the usual account selection.
  • Entries whose title is not installed are left out of the menu, so a stale line can never be launched. vWii titles are checked by their title.tmd on slccmpt; Wii U titles with SYSCheckTitleExists.
  • System applets (0x00050030…, like the Internet Browser) are skipped with a log message: they need their own launch calls.
  • The menu doesn't scroll, so it keeps to 7 rows (an 8th row would cover the update status line). Built-in entries always keep their row; custom entries that don't fit are left out with a log message.
  • A custom entry can be the autoboot title like any other. It's saved by title id (title_<id> in autoboot.cfg), so renaming the entry keeps the choice.
  • A saved autoboot entry the menu doesn't show (a custom title that was uninstalled, or a missing Homebrew Launcher or vWii Homebrew Channel) opens the menu with nothing preselected and stays saved, so it comes back once it's available again. Before, a missing built-in entry's id was read as a row number, which could start a different entry. X still clears the saved choice in that case.
  • Malformed lines, duplicates and entries past the fourth are skipped with a log message.
  • Text drawing ignores mbstowcs's (size_t) -1 result instead of writing before the buffer, now that names come from a file.
  • The README documents the file.

Tested

Wii U (US), Aroma, used daily since 17 Oct; the final version checked again on 16 Nov:

  • A vWii channel entry shown, launched from the menu and set as autoboot
  • An entry for a title that isn't installed is hidden
  • A Wii U title entry (Mii Maker) launched; with one account set to sign in by itself, there's no account selection, as from the Wii U Menu
  • Renaming an autoboot entry keeps it as the autoboot entry (saved by title id; it autoboots under its new name)
  • X clears the autoboot entry; Y sets it again

grantendo and others added 5 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.
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.
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.

1 participant