Repository navigation
Switch: play the game disc's Wii Menu banner while the game starts - #24
Closed
TomasUribe wants to merge 1 commit into
Closed
TomasUribe wants to merge 1 commit into
TomasUribe wants to merge 1 commit into
Conversation
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>
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
boot_banner.cpp,boot_banner.h): readsDATA/files/opening.bnrfrom 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.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.ENG/JPNlayout 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.DVDInitscans the disc and the overlay roots beforeVIInit, 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 callVI_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 beforeVIInit, 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.cppchecks the curves, and the parser against a realopening.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