RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    crt-pi shader users - reduce scaling artifacts with these configs in lr-mame2003, lr-fbalpha, lr-nestopia (and more to come)

    Scheduled Pinned Locked Moved Ideas and Development
    crt-pi shadercrt-picrt-pi-verticalshaderslr-mame2003
    385 Posts 42 Posters 259.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.
    • dankcushionsD
      dankcushions Global Moderator
      last edited by dankcushions

      one issue with the excellent crt-pi shader is that it's shadow mask is always vertical, which causes a rainbow effect in vertical games. here's an example:

      undefined

      fortunately, @davej created a 'vertical' variant which has a horizontal shadow mask, which fixes the issue:

      undefined

      the difference is more obvious at full-screen, but here's it zoomed in:

      crt-pi.glslp:
      0_1473890253505_upload-939ddb58-9c63-4aff-bd31-b5e016b15128

      crt-pi-vertical.glslp:
      0_1473890115436_upload-802cae63-d4a8-4acb-86f6-3fbaa946b219

      this still isn't perfect. the scanlines aren't consistent. this can be fixed by usingvideo_scale_integer = true, which forces the game to be in multiples of the original resolution, but on most screens this leaves an additional black border on the top and bottom, where it doesn't divide in exactly.

      by using integer scaling on only the x axis, we can make a big improvement but still not add new borders. eg:

      alt text

      previous with crt-pi-vertical.glslp:
      alt text

      now:
      0_1480380617366_upload-3c98dd01-0754-4f08-8548-629ca637c1d0

      What about horizontal games?

      this same logic has been extended to regular horizontal games/consoles also, but not so obvious.

      How to:

      to implement this across all games for a system, you would normally have to manually create a new cfg override file for EACH game, and point it to the correct vertical/standard shader, and manually calculate the right resolution. i have saved you the effort :) just extract the following files into the following directories:

      1080p screen users

      • extract crt-pi_mame2003_configs_1920x1080.zip into /opt/retropie/configs/all/retroarch/config/MAME 2003/
      • extract crt-pi_fbalpha_configs_1920x1080.zip into /opt/retropie/configs/all/retroarch/config/FB Alpha/
      • extract crt-pi_consoles_configs_1920x1080.zip and place each file into the directory specified within the .cfg itself.

      720p screen users

      • extract crt-pi_mame2003_configs_1280x720.zip into /opt/retropie/configs/all/retroarch/config/MAME 2003/
      • extract crt-pi_fbalpha_configs_1280x720.zip into /opt/retropie/configs/all/retroarch/config/FB Alpha/
      • extract crt-pi_consoles_configs_1280x720.zip and place each file into the directory specified within the .cfg itself.

      1280x1024 screen users

      • extract crt-pi_mame2003_configs_1280x1024.zip into /opt/retropie/configs/all/retroarch/config/MAME 2003/
      • extract crt-pi_fbalpha_configs_1280x1024.zip into /opt/retropie/configs/all/retroarch/config/FB Alpha/
      • extract crt-pi_consoles_configs_1280x1024.zip and place each file into the directory specified within the .cfg itself.

      1366x768 screen users

      • extract crt-pi_mame2003_configs_1366x7684.zip into /opt/retropie/configs/all/retroarch/config/MAME 2003/
      • extract crt-pi_fbalpha_configs_1366x768.zip into /opt/retropie/configs/all/retroarch/config/FB Alpha/
      • extract crt-pi_consoles_configs_1366x768.zip and place each file into the directory specified within the .cfg itself.

      Curvature version:
      If you want the curved CRT 'barrel' version instead, use the following. Note, this shader does not align with the pixels in the same way so the cfgs simply specify the vertical version or not:

      • extract crt-pi-curvature_mame2003_configs.zip into /opt/retropie/configs/all/retroarch/config/MAME 2003/
      • extract crt-pi-curvature_fbalpha_configs.zip into /opt/retropie/configs/all/retroarch/config/FB Alpha/

      if you have a different screen resolution, please either ask me to create you a new zip, or run the script yourself: https://github.com/dankcushions/crt-pi-configs (instructions in the script itself)

      you can check it worked by loading a vertical game (eg, donpachi), accessing the RGUI via select+X or F1, quick menu > shaders > it should be using crt-pi-vertical.glslp, not crt-pi.glslp.

      Requirements
      This requires Retropie 4.x. Users running a recent image should have no problems. Users with older images: If you update the setup script, and Retropie-Setup > Manage Packages > Core > Retroarch > Update binary. If it still doesn't work after this, edit /opt/retropie/configs/all/retroarch.cfg/ and search for auto_overrides_enable and ensure it is set to auto_overrides_enable="true".

      For the lr-nestopia configs, you must set the lr-nestopia emulator as your default NES emulator. lr-fceumm (the default) causes lag with the shader, even for an overclocked pi3.

      Want to adjust the shader further?
      see this post by @davej

      Special thanks:
      @davej who created the crt-pi shader.
      @UDb23 who created the resolution_db that my script uses to figure out the right scaling.

      RionR edmaul69E FurlugeF robertvb83R thelostsoulT 8 Replies Last reply Reply Quote 10
      • BuZzB
        BuZz administrators
        last edited by

        nice one!

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

          Nice Dank! I was hoping one day to work up the courage to go through all the games I play to set the vertical shader. This will be a great addition to my standard build instructions. Very nice indeed! :)

          1 Reply Last reply Reply Quote 1
          • GreenHawk84G
            GreenHawk84
            last edited by

            Since I have a small number of vertical games, is there I way I can use RGUI to set the vertical shader per ROM? I been going a bit crazy getting it to work this way. I try to set vertical shader for Donkey Kong, then go to Mortal Kombat to find it also uses vertical (messing up the colors), so I switch that back to regular CRT.pi and it carries to everything else again. I set "per-game" options in RGUI but its not working.

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

              @GreenHawk84 said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:

              Since I have a small number of vertical games, is there I way I can use RGUI to set the vertical shader per ROM? I been going a bit crazy getting it to work this way. I try to set vertical shader for Donkey Kong, then go to Mortal Kombat to find it also uses vertical (messing up the colors), so I switch that back to regular CRT.pi and it carries to everything else again. I set "per-game" options in RGUI but its not working.

              you need to use the 'save game override' option. alternatively just use the files i made :)

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

                I am super anxious if someone can create similar files for FBA!!

                Good job!

                FloobF 1 Reply Last reply Reply Quote 0
                • FloobF
                  Floob @Pyjamarama
                  last edited by Floob

                  @Pyjamarama These files arent specific to mame-2003. As long as its a libretro core (marked with lr in the name) they will work if you drop them in the right folder. 2 examples are given above so that the relevant core processes them.

                  Or you could even add .zip to the filename, i.e 1942.zip.cfg and drop them directly into your roms directory.

                  Please read the Docs before asking a new question.
                  RetroPie Help Guides: https://goo.gl/3gcNsT

                  1 Reply Last reply Reply Quote 1
                  • P
                    Pyjamarama
                    last edited by

                    Thank you. I just do not know if the MAME rom namings are the same with FBA rom namings

                    1 Reply Last reply Reply Quote 0
                    • GreenHawk84G
                      GreenHawk84
                      last edited by

                      @dankcushions, thanks. So as a side note I went into "settings" - "configuration" - and changed "save on exit" to "on" and "use per game core options" to "on" but now they are permanently changed. I try to "save new config" but nothing holds. "Save current config" doesn't appear to do anything when I press.

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

                        @GreenHawk84 said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:

                        @dankcushions, thanks. So as a side note I went into "settings" - "configuration" - and changed "save on exit" to "on" and "use per game core options" to "on" but now they are permanently changed. I try to "save new config" but nothing holds. "Save current config" doesn't appear to do anything when I press.

                        none of that is what i told you to do :)

                        GreenHawk84G 2 Replies Last reply Reply Quote 1
                        • T
                          twd Banned
                          last edited by

                          I been toying with the idea of building a vertical cab today ......have all the wood etc monitor in front of me right this second ... As I only have a pi zero atm i not sure I can justify all that effort for a few games....could you give me an idea of how many games your list came up with?

                          As I could be finished by tomorrow if I get cracking now :) many thanks

                          dankcushionsD davejD 2 Replies Last reply Reply Quote 0
                          • dankcushionsD
                            dankcushions Global Moderator @twd
                            last edited by

                            @twd said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:

                            I been toying with the idea of building a vertical cab today ......have all the wood etc monitor in front of me right this second ... As I only have a pi zero atm i not sure I can justify all that effort for a few games....could you give me an idea of how many games your list came up with?

                            As I could be finished by tomorrow if I get cracking now :) many thanks

                            all that effort? you literally have to copy and paste the cfgs i uploaded. would take 2 seconds. that's the point :)

                            if you open the zip you can see the total number of files/games. ~1500

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              twd Banned @dankcushions
                              last edited by twd

                              @dankcushions that's not what I said I was doing :) lol .... If I send them cfgs to my power tools and wood will it build my cab for me ? Just wondered what the game count was when you run your vertical games list . So is that 1500 vertical games or all the games supported regardless of screen rotation? Thanks

                              1 Reply Last reply Reply Quote 0
                              • GreenHawk84G
                                GreenHawk84 @dankcushions
                                last edited by

                                @dankcushions lol I know

                                1 Reply Last reply Reply Quote 0
                                • davejD
                                  davej @twd
                                  last edited by

                                  @twd
                                  I can't answer your "how many vertical games" question but it's worth pointing out that if you have vertical screen you need to use the opposite versions of the shaders. So the normal shader with vertical games and the vertical shader with horizontal games.

                                  @dankcusions
                                  Could you produce a set of files using the opposite shaders for those with vertical screens?

                                  T 1 Reply Last reply Reply Quote 0
                                  • GreenHawk84G
                                    GreenHawk84 @dankcushions
                                    last edited by

                                    @dankcushions but can you help me on this side note, how do I get these options back to normal in RGUI?

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      twd Banned @davej
                                      last edited by

                                      @davej ahh ok thanks bro just going to make it ...if there is 50 games I will be happy

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

                                        i'm going mad :) here's what i said earlier:

                                        if you open the zip you can see the total number of files/games. ~1500

                                        that's ~1500 vertical games in mame2003. if you open up that zip file you'll see ~1500 files. one file for each vertical game.

                                        @GreenHawk84 you're on your own here. i've no idea what you've done to your system. i just wanted to make some cfg override files for vertical games :/

                                        T GreenHawk84G 2 Replies Last reply Reply Quote 0
                                        • T
                                          twd Banned @dankcushions
                                          last edited by

                                          @dankcushions thanks buddy ... 1500 is a lot i don't have a pc to hand on a iPad so I cannot download the zip to check so thanks for the info...

                                          1 Reply Last reply Reply Quote 0
                                          • GreenHawk84G
                                            GreenHawk84 @dankcushions
                                            last edited by GreenHawk84

                                            @dankcushions thats okay, I at least got "per game core" to save as "off" however "save on exit" will not hold if I try to set it off.

                                            Back to your instructions on vertical shader; I went in with WinSCP and to the folders you suggested. However, I did not see a Mame2003 folder as said at the end of your folder path: /opt/retropie/configs/mame-libretro/MAME 2003/

                                            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.