Skip to content

Add support for custom boot entries (either vWii or Wiiu) - #25

Closed
razor85 wants to merge 1 commit into
wiiu-env:mainfrom
razor85:custom
Closed

razor85 wants to merge 1 commit into
wiiu-env:mainfrom
razor85:custom

Conversation

@razor85

@razor85 razor85 commented Mar 11, 2023

Copy link
Copy Markdown

Allows adding custom boot entries by creating a file called bootOptions.cfg in the :sd/wiiu/environments/tiramisu/ folder.
An example of such file is:

Nintendont,0x57574e44,vWii
WiiUChat,0xA,wiiu

The above configuration will display two new entries in the boot menu:

  • "Nintendont" (titleId 0x57574e44, vWii Channel)
  • "WiiUChat" (titleId 0xA, WiiU Channel)

I didn't do anything to support scrolling entries but I think that might be too much.

@Maschell

Copy link
Copy Markdown
Contributor

Thanks for your Pull Request! I'll take a deeper look at this later, but here a few things I noticed:

  • bootWiiuTitle (getVWiiTitleId... and friends) should not take a string, but the uint64_t as a parameter. The parsing should only be tied to the config loading.
  • Using streams will bloat the binary without gaining that much readablity. Please use strtol instead!
  • Do all vWii titles always start with 0x00010001. I actually have no idea. I would just always provide the full title id. With the full title id you can also get rid of the "vWii" vs "wiiu" part, looking at the titleId is enough

@razor85

razor85 commented Mar 11, 2023

Copy link
Copy Markdown
Author

Thanks for your comments. The full title id is indeed a good idea and cleans up a bunch of code.
About the streams, I didn't know they would really make a big difference but seeing the binary size now, it almost doubled.
I will also clang-format clean it.

@razor85

razor85 commented Mar 14, 2023

Copy link
Copy Markdown
Author

Gave another thought about it (sorry busy days) and was wondering if I indeed could get rid of the wiiu/vwii setting. It appears to me vWii titles are loaded through mocha and then CMPTLaunchTitle whilst wiiu titles are loaded via _SYSLaunchTitleWithStdArgsInNoSplash. Is this correct?

@grantendo

Copy link
Copy Markdown

@razor85, @Maschell: I picked this up again and have a version that follows the review here, in case it's useful. It keeps the bootOptions.cfg idea from this PR, with Romulo credited as co-author on the commit:

  • Full 64-bit title ids, no vWii/Wii U field: Name,0x0001000152494654. The id decides the launch, which answers the question above: 0x0001... titles go through mocha and CMPTLaunchTitle, 0x0005... titles through _SYSLaunchTitleWithStdArgsInNoSplash after the account selection.
  • No streams: fgets and strtoull, with the parsing only in the config loading; the launch functions take the uint64_t. With snprintf instead of fprintf it builds about 4.4 KB larger than main.
  • Only installed titles are shown (vWii titles by their title.tmd, Wii U titles with SYSCheckTitleExists), up to 4 entries, since the menu doesn't scroll. A custom entry can be the autoboot title; it's saved by title id, so renaming it keeps it, and a title that was removed comes back selected when it's reinstalled.
  • clang-format clean.

Branch: grantendo/AutobootModule, pr-entries (12017b3, b33e9db).

On top of that, a separate optional change: @ lines in the same file set the menu order using autoboot.cfg's names (@wiiu_menu, @vwii_homebrew_channel, ...). Entries it doesn't list still appear after the listed ones, so none can go missing, and without @ lines the menu looks as it does now. With @ lines and no autoboot entry, the cursor starts on the first entry, so the one you put first is also the one A starts. It also fixes the autoboot highlight when the Wii U Menu is the autoboot entry. Branch pr-menu-order (1316f97, 9c8a036).

Tested on a US Wii U with Aroma, used daily since 17 Oct: a vWii channel as a custom entry, launched from the menu and as the autoboot title; @ lines putting it first and reordering the built-in entries; the cursor starting on it.

@razor85, would you like to update this PR from it, or shall I open a new one (with you as co-author) and this one can be closed? Happy either way.

@razor85

razor85 commented Nov 3, 2026

Copy link
Copy Markdown
Author

You can go ahead and push a new one, we can reference it from this. Whatever is easier I'm OK with 👍

@grantendo

Copy link
Copy Markdown

Opened as #71, as you suggested. Feel free to close this one.

@razor85 razor85 closed this Nov 17, 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.

3 participants