RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Conditional Splash Screen

    Scheduled Pinned Locked Moved Help and Support
    emulationstatioresolutionsplash screensplashscreenoverscan
    5 Posts 2 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Larkas
      last edited by Larkas

      Hello there, guys!

      So, I regularly use my Raspberry Pi loaded with Retropie with either my living room's TV (which has a native resolution of 1920x1080) and my PC's monitor (with a native resolution of 1920x1200). It is optimized to run on the TV, but I'd like to make my experience with the monitor a bit better.

      You see, when I hook the Pi to the monitor, the splashscreen is rendered at 16:9 (1920x1080), but the EmulationStation is rendered at 16:10 (1920x1200). Seeing as I use the Pixel theme and the matching splashscreen, that is a bit jarring. The theme is stretched to fill the screen's height while the splashscreen is not (it adds black bars to top and bottom too, of course).

      So, I tried a few things:

      1. Mess with config.txt to add padding through overscan. It works, of course, but it forces a loss of drawing space on RetroArch too, which is bad, and the overscan wrecks the TV's resolution, which is terrible.

      2. Append the emulationstation call with --resolution 1920 1080. This would be perfect, but the damn thing draws EmulationStation at the bottom of the screen instead of at the center (i.e.: there is a 120 pixels padding at the top instead of 60 pixels paddings at both the top and the bottom), so no cigar.

      3. Edit the splashscreen to stretch it to 16:10 to match the EmulationStation distortion. It works, but when I hook the pi to the TV, I now have a problem with splashscreen THERE (of course).

      4. Force a 1920x1080 resolution on the monitor, but that wrecks the colorspace (for some reason) and is just an overall inferior version of (1) (with the single upside of not wrecking the TV's resolution -- but the colors there are messed up too).

      So, I'm aiming at the simplest possible solution now before simply giving up. Is there any way to make the system call one splashscreen if it detects a 16:9 resolution and another if 16:10 is detected? Alternatively, could I run some command before the splashscreen is drawn, where the system detects the resolution, copy image (a) to path x if it detects 16:9 else copy image (b) to path x if it detects 16:10?

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Larkas
        last edited by

        @Larkas You can use tvservice to detect which resolution you are running:

        pi@retropie:~ $ tvservice -s
        state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz
        

        You can then modify the /etc/splashscreen.list file and add the right aspect ration file there, before starting the splashscreen, all of this in the splashscreen service script in /opt/retropie/supplementary/splashscreen/asplashscreen.sh.

        L 1 Reply Last reply Reply Quote 1
        • L
          Larkas @mitu
          last edited by

          @mitu said in Conditional Splash Screen:

          @Larkas You can use tvservice to detect which resolution you are running:

          pi@retropie:~ $ tvservice -s
          state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz
          

          You can then modify the /etc/splashscreen.list file and add the right aspect ration file there, before starting the splashscreen, all of this in the splashscreen service script in /opt/retropie/supplementary/splashscreen/asplashscreen.sh.

          Interesting, sounds good! Any ideas on how to actually pull that off?

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by mitu

            The script code for detection can look like this

            if (/usr/bin/tvservice -s | /bin/egrep '4:3') ; then
                sudo cp -f /etc/splashscreen.list.monitor  /etc/splashscreen.list
            else
                sudo cp -f /etc/splashscreen.list.tv /etc/splashscreen.list
            fi
            

            which you can use at the beginning of the splashscreen script. Have 2 files with different video paths

            • /etc/splashscreen.list.monitor - containing the full path to the video you'd like to show on your 4:3 monitor
            • /etc/splashscreen.list.tv - containing the full path to the video that will be shown otherwise (on TV).

            Note that the splashscreen script will be overwritten on upgrades, so make a backup of your script after you get it working.

            1 Reply Last reply Reply Quote 0
            • L
              Larkas
              last edited by Larkas

              Huh. Now that's weird.

              I tried what you described (thank you very much for that!), and while the script works like a charm, for some reason fbi fails to load the 1920x1200 splashscreen. It literally returns a black screen with

              /home/pi/RetroPie/splashscreens/retropie-extra/rookervik-pixel-16x10.png: loading FAILED
              

              written at the bottom. The weirdest thing is that if I run

              sudo fbi -T 2 -once -t 20 -noverbose -a -l /etc/splashscreen.list >/dev/null 2>&1
              

              after start up, mimicking the syntax in /opt/retropie/supplementary/splashscreen/asplashscreen.sh, the image is shown normally!

              So close, yet so far! Any ideas?

              EDIT: UN-FREAKING-BELIEVABLE! That was happening because I’m using USB auto-mount for loading roms into the system. For some reason, that option also overwrites the splash screens directory, but the pendrive is only mounted AFTER the splash screen is actually shown on startup. Hence, when I moved the stretched image into the directory, I was actually moving into the pendrive, which is ignored by the Pi on startup! All I had to do was unmount the pendrive, copy the file into the SD card and it worked! 😁 Thank you very much once again for all the help!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.