Skip to content

Switch: play the game disc's Wii Menu banner while the game starts - #24

Closed
TomasUribe wants to merge 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-banner-loading-screen
Closed

TomasUribe wants to merge 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-banner-loading-screen

Conversation

@TomasUribe

Copy link
Copy Markdown
Contributor

On Switch, pressing Play shows a still white "DriftDroid" splash until the game has started, and starting Retro Rewind shows a black screen the whole time, close to a minute on my console. This plays the game disc's own Disc Channel banner instead (the Wii ring, the Mario Kart Wii logo and the scrolling items), the way the Wii Menu showed it, from Play until the warning screen has gone.

  • Banner player (boot_banner.cpp, boot_banner.h): reads DATA/files/opening.bnr from the game data the launcher already imports (U8, IMD5, LZ77, BRLYT, BRLAN, TPL) and evaluates the layout the way NW4R does: pane matrices, influenced alpha, Hermite and step curves, and the default one-texture material (lerp from the black to the white colour, tinted by the vertex colours). Textures are decoded once and combined with their material colours, and repeating or mirrored textures are tiled out, so drawing is plain ImGui quads. Nothing from the disc is bundled.
  • Drawing (boot_banner_draw.cpp): the launcher's Play splash and the in-game startup cover both draw it on one clock, so the animation carries on across the hand-over. Retro Rewind's straight-in start now goes through the same splash instead of an empty frame. Without game data or a readable banner the old splash stays.
  • Language and framing: the banner's ENG/JPN layout groups follow the app's language, as the Wii Menu did with the console's. The view is framed to the part of the banner the Wii Menu left uncovered by its buttons; shown whole, the bare strip under the artwork looked cut off.
  • Keeping it moving during the disc scan: DVDInit scans the disc and the overlay roots before VIInit, so no frame was presented while it ran: 54.6 s with Retro Rewind (2037 disc files and 5454 overlay registrations, while the shader prewarm reads its cache from the same SD card). The scan loops now call VI_HLE_PresentBootFrame, which presents a startup-cover frame through the same unpaced path as the retrace-context black frames: at most once per display period, only before VIInit, and only while the frame the launcher handed over is still empty. The disc index log line now says how long the scan took.

Only what banners use is supported (picture panes, default materials, pane, vertex-colour and visibility animations); anything else is listed in the log and drawn as close as that allows. The banner's sound isn't played. The uploaded textures (about 1.3 MB) stay with aurora afterwards, since it has no way to free an ImGui texture.

runtime/tests/boot_banner_tests.cpp checks the curves, and the parser against a real opening.bnr (not included), on a PC, and can software-render frames to look at. It also passes under ASan/UBSan.

Tested on my Switch (Atmosphère) with the PAL disc: Mario Kart Wii and Retro Rewind both show the banner from Play to the warning screen, animating through the disc scan. The console build was android-port at 257be90 plus #22 with these changes applied; this branch is rebased onto the current android-port, which applied without conflicts.

🤖 Generated with Claude Code

Pressing Play (or starting Retro Rewind) showed a still "DriftDroid" splash, and Retro Rewind
nothing at all, for as long as the game took to start - close to a minute with Retro Rewind. It
now plays the disc's own Disc Channel banner (DATA/files/opening.bnr): the intro once, then the
loop, from Play until the game's warning screen has gone.

boot_banner.cpp unpacks the banner and evaluates its layout the way NW4R does (pane matrices,
alpha inheritance, Hermite curves, the default one-texture material); textures are decoded and
combined with their material colours once, so drawing is plain ImGui quads. The language group
follows the app's language, and the view is framed to the part the Wii Menu left uncovered by its
buttons. Without game data or a readable banner the old splash stays.

The game's DVD disc scan runs before VIInit, so nothing used to present during it; it now presents
a frame of the startup cover between entries (VI_HLE_PresentBootFrame).

runtime/tests/boot_banner_tests.cpp checks the parser on a PC against a real opening.bnr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dorPXP

dorPXP commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Merged manually as d912de3 (your commit, author kept). It conflicted in one place with the Joy-Con change (both added a line to the include list in switch_launcher.cpp), so I applied it on top of the current android-port and kept both lines. Tested on my Switch: the banner plays while the game starts and the game still starts normally. It doesn't show in Retro Rewind yet, which is expected (no banner file there), I'll sort that out separately. Thank you, great work!

@dorPXP dorPXP closed this Nov 5, 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