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

    [Solved] Retroarch no longer respecting shader overrides

    Scheduled Pinned Locked Moved Help and Support
    retroarchshadersvertical
    15 Posts 7 Posters 3.0k 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.
    • A
      AndrewH
      last edited by AndrewH

      I've been happily using the per-system shaders detailed here for some time, and all was working well for quite some time. Just today, though, I fired up one of the vertical games and noticed straight away that things weren't right - the game display extended under the overlay in a way that hadn't happened previously.

      When I entered the retroarch menu, it seems like the override that should have been applied for the game in question was not applied - the default crt-pi shader was being used, rather than the crt-pi-vertical, and the viewport size was incorrect.

      All that's happened between my last observation of it working as expected have been a couple of updates through the retropie-setup menu.

      Any suggestions on where to start looking to fix this? @dankcushions

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

        Post your system specs - version of RP, RetroArch.
        By default, a RetroPie installation does not have any shaders enabled automatically, so there's no 'default' shader. To diagnose, a copy of your /dev/shm/runcommand.log from a game run with verbose logging can show what overrides are tried and what shaders are applied.
        If you re-do the override from the RGUI, is it saved and re-applied when restarting the game again ?

        1 Reply Last reply Reply Quote 1
        • A
          AndrewH
          last edited by AndrewH

          Retropie Version: 4.4.3 last commit 25 hours ago (9549a01a)
          RetroArch Version: 1.7.5 - mame 2003 0.78 355ca5d

          Here's the first few lines from /dev/shm/runcommand.log from a verbose run of 1943:

          Parameters: 
          Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/arcade/retroarch.cfg "/home/pi/RetroPie/roms/arcade/1943.zip" --verbose --appendconfig /dev/shm/retroarch.cfg'|'"/home/pi/RetroPie/roms/arcade/1943.zip.cfg"
          [INFO] RetroArch 1.7.5 (Git c9c6c5a)
          [INFO] Redirecting save file to "/home/pi/RetroPie/roms/arcade/1943.srm".
          [INFO] Redirecting savestate to "/home/pi/RetroPie/roms/arcade/1943.state".
          [INFO] === Build =======================================
          Capabilities: NEON VFPv3 VFPv4 
          Built: Oct  9 2018
          [INFO] Version: 1.7.5
          [INFO] Git: c9c6c5a
          [INFO] =================================================
          [INFO] Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so"
          [INFO] [overrides] no core-specific overrides found at /home/pi/.config/retroarch/config/mame2003/mame2003.cfg.
          [INFO] [overrides] no content-dir-specific overrides found at /home/pi/.config/retroarch/config/mame2003/arcade.cfg.
          [INFO] [overrides] no game-specific overrides found at /home/pi/.config/retroarch/config/mame2003/1943.cfg.
          [INFO] Shaders: preset directory: /home/pi/.config/retroarch/shaders/presets
          [INFO] Shaders: no game-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/1943.cgp.
          [INFO] Shaders: no game-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/1943.glslp.
          [INFO] Shaders: no content-dir-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/arcade.cgp.
          [INFO] Shaders: no content-dir-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/arcade.glslp.
          [INFO] Shaders: no core-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/mame2003.cgp.
          [INFO] Shaders: no core-specific preset found at /home/pi/.config/retroarch/shaders/presets/mame2003/mame2003.glslp.
          

          It looks like it is looking for the game-specific override in /home/pi/.config/retroarch/config/mame2003/1943.cfg , rather than /home/pi/.config/retroarch/config/MAME 2003/1943.cfg , which was the location that had been used previously.

          I've renamed the override folder from MAME 2003 to mame2003, and it's now picking up the shader, but doesn't seem to be setting the viewport width correctly. Troubleshooting continues, I guess...

          1 Reply Last reply Reply Quote 0
          • RedFarmerR
            RedFarmer
            last edited by

            Does the game override config files still contain the viewport-information?

            For example, mine are in:
            /opt/retropie/configs/all/retroarch/config/FB Alpha/1943.cfg

            Or you might also need to rename:
            /home/pi/.config/retroarch/config/MAME 2003/

            to

            /home/pi/.config/retroarch/config/mame2003/

            1 Reply Last reply Reply Quote 1
            • A
              AndrewH
              last edited by

              Here's the full /dev/shm/runcommand.log following that directory name change;

              Parameters: 
              Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/arcade/retroarch.cfg "/home/pi/RetroPie/roms/arcade/1943.zip" --verbose --appendconfig /dev/shm/retroarch.cfg'|'"/home/pi/RetroPie/roms/arcade/1943.zip.cfg"
              [INFO] RetroArch 1.7.5 (Git c9c6c5a)
              [INFO] Redirecting save file to "/home/pi/RetroPie/roms/arcade/1943.srm".
              [INFO] Redirecting savestate to "/home/pi/RetroPie/roms/arcade/1943.state".
              [INFO] === Build =======================================
              Capabilities: NEON VFPv3 VFPv4 
              Built: Oct  9 2018
              [INFO] Version: 1.7.5
              [INFO] Git: c9c6c5a
              [INFO] =================================================
              [INFO] Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so"
              [INFO] [overrides] no core-specific overrides found at /home/pi/.config/retroarch/config/mame2003/mame2003.cfg.
              [INFO] [overrides] no content-dir-specific overrides found at /home/pi/.config/retroarch/config/mame2003/arcade.cfg.
              [INFO] [overrides] game-specific overrides found at /home/pi/.config/retroarch/config/mame2003/1943.cfg.
              [INFO] Config: appending config "/home/pi/.config/retroarch/config/mame2003/1943.cfg"
              

              Here's the contents of /home/pi/.config/retroarch/config/mame2003/1943.cfg :

              # Auto-generated zfast_crt_standard_vertical.glslp .cfg
              # Game Title : 1943 , Width : 224, Height : 298, Aspect : 3:4
              # Screen Width : 1280, Screen Height : 1024
              # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
              video_shader_enable = "true"
              video_shader = "/opt/retropie/configs/all/retroarch/shaders/zfast_crt_standard_vertical.glslp"
              # To avoid horizontal rainbow artefacts, use integer scaling for the width
              aspect_ratio_index = "22"
              custom_viewport_width = "672"
              custom_viewport_height = "1024"
              custom_viewport_x = "304"
              custom_viewport_y = "0"
              

              The shader is being applied correctly now, but a screenshot verifies that the custom viewport width is not being used - the screenshot is 768 x 1024 instead of 672 x 1024

              1 Reply Last reply Reply Quote 0
              • A
                AndrewH
                last edited by

                Taking a look at the commit history of lr-mame 2003 on github, it looks like the commit after the version I'm using fixes an issue introduced when the APPNAME macro was added (back in April)

                Might be related, so I'm trying an "Update from Source" rather than "Update from Binary" to see what happens...

                1 Reply Last reply Reply Quote 0
                • A
                  AndrewH
                  last edited by

                  So... following the update from source, it's now necessary for that folder to be named MAME 2003 (0.78)
                  It still appears not to be respecting the custom viewport sizes.

                  1 Reply Last reply Reply Quote 0
                  • P
                    pariziv
                    last edited by

                    The aspect_ratio_index is changed. Custom is now "23" instead of 22.

                    A 1 Reply Last reply Reply Quote 1
                    • A
                      AndrewH @pariziv
                      last edited by

                      @pariziv said in Retroarch no longer respecting shader overrides:

                      The aspect_ratio_index is changed. Custom is now "23" instead of 22.

                      Ah, okay. I’ll give that a try tomorrow and report back.

                      1 Reply Last reply Reply Quote 0
                      • A
                        AndrewH
                        last edited by

                        Okay, I've got it all fixed now. For anyone who finds themselves with the same problem, here's roughly what I did to fix it (just the relevant bits);

                        1 - Upgrade lr-mame2003 from source - this takes a while.

                        2 - locate /opt/retropie/configs/all/retroarch/config/crt_pi_configs.py and edit it. You can do this either by quitting Emulationstation to the console, SSHing in, or via the configs SMB share. Assuming you have the current version of the aforementioned script, these are the two changes that need to be made;
                        Line 21 needs to be changed from coreName = "MAME 2003" to coreName = "MAME 2003 (0.78)"
                        and line 164 needs to be changed from newCfgFile.write("aspect_ratio_index = \"22\"\n") to newCfgFile.write("aspect_ratio_index = \"23\"\n")

                        3 - With those edits made, run the script as follows; python3 crt_pi_configs.py mame2003 <screen width> <screen height> - this will generate new configs in a folder called MAME 2003 (0.78) within a subfolder named after the screen width x screen height, and you'll need to move this MAME 2003 (0.78) to the folder from which you ran the script.

                        That's pretty much it.

                        Thanks @mitu, @RedFarmer, and @pariziv for your inputs!

                        robertvb83R 1 Reply Last reply Reply Quote 1
                        • robertvb83R
                          robertvb83 @AndrewH
                          last edited by robertvb83

                          @AndrewH puh thank you very much Andrew. I am happy i found this thread. I understand what to do now. But i think many other People especially new to retropie will die trying to fix this.

                          But this is really a bad mess. Not only for this particular issue but many many references, docs, wikis etc. are telling people to use aspect_ratio_index ="22". How can they just change that like they dont care about anything…

                          I understand that additional aspect ratios are added from time to time, but this should be done in a non harmful way for example if they just use plain text instead of an index like custom_aspect_ratio_index="custom" would be suffficient… makes me want to scream :-(

                          My full size arcade cabinet Robotron vs. Octolyzer

                          1 Reply Last reply Reply Quote 1
                          • RiverstormR
                            Riverstorm
                            last edited by

                            @robertvb83 - I think that's what @dankcushions was asking for in this open issue from last November before updating the script so isn't broken every time they make an amendment to the index list.

                            As it stands now I'm not sure how people are handling it. This thread or there's a good number of easy to use programs to search and replace the index and folder in existing configs.

                            robertvb83R 1 Reply Last reply Reply Quote 1
                            • robertvb83R
                              robertvb83 @Riverstorm
                              last edited by

                              @Riverstorm

                              As it stands now I'm not sure how people are handling it. This thread or there's a good number of easy to use programs to search and replace the index and folder in existing configs.

                              Thanks for the info about the open issue.

                              Thats exactly what i did. Search and replace everything at once with notepad++ took a couple of minutes

                              My full size arcade cabinet Robotron vs. Octolyzer

                              1 Reply Last reply Reply Quote 0
                              • dankcushionsD
                                dankcushions Global Moderator
                                last edited by

                                i encourage people to comment on the issue https://github.com/libretro/RetroArch/issues/7536 if they want to show their support :) if it's just me complaining then it's not much incentive for them to change how they operate.

                                1 Reply Last reply Reply Quote 0
                                • RiverstormR
                                  Riverstorm
                                  last edited by

                                  @dankcushions - It looks like were unable to add comments to the issue. It shows a padlock and the message "You can't perform this action at this time."

                                  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.