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 265.2k 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 @pirossi
      last edited by

      @pirossi what game is this cfg for? i just rang the script locally:

      crt-pi-configs>python crt_pi_configs.py fbalpha 1920 1200

      and it seemed to generate file with the custom_viewport_height as 1200. eg, sf2.cfg:

      # Auto-generated crt-pi.glslp .cfg
      # Place in /opt/retropie/configs/all/retroarch/config/FB Alpha/
      video_shader_enable = "true"
      video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
      # To avoid horizontal rainbow artefacts, use integer scaling for the width
      aspect_ratio_index = "22"
      custom_viewport_width = "1920"
      custom_viewport_height = "1200"
      custom_viewport_x = "0"
      custom_viewport_y = "0"
      

      if you're running the script please give full details of your os, the command you ran, and the game your .cfg is for.

      P 1 Reply Last reply Reply Quote 0
      • P
        pirossi @dankcushions
        last edited by pirossi

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

        @pirossi what game is this cfg for? i just rang the script locally:

        crt-pi-configs>python crt_pi_configs.py fbalpha 1920 1200

        and it seemed to generate file with the custom_viewport_height as 1200. eg, sf2.cfg:

        # Auto-generated crt-pi.glslp .cfg
        # Place in /opt/retropie/configs/all/retroarch/config/FB Alpha/
        video_shader_enable = "true"
        video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
        # To avoid horizontal rainbow artefacts, use integer scaling for the width
        aspect_ratio_index = "22"
        custom_viewport_width = "1920"
        custom_viewport_height = "1200"
        custom_viewport_x = "0"
        custom_viewport_y = "0"
        

        if you're running the script please give full details of your os, the command you ran, and the game your .cfg is for.
        i am using windos7pro
        Button windows start -> I type cmd and the ms-dos window opens
        You go to the directory I created

        thanks for your reply!
        I'm using windows 7pro

        Button windows start -> I type cmd and the ms-dos window opens
        You go to the directory I created

        Cd \ retropie

        And then I run the script for mame and then for fba:

        Python crt_pi_configs.py mame2003 1920 1200
        Python crt_pi_configs.py fbalpha 1920 1200

        Will create two files each with 4000.. cfg files
        I put the .cfg files in: / opt / retropie / configs / all / retroarch / config / FB Alpha
        and in:
        /opt/retropie/configs/all/retroarch/config/MAME 2003

        But the games are off the screen, they are expanded, I guess it's because the cfg generator.

        Example when opening cfg generated with your script game:3countb

        video_shader_enable = "true"
        video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
        # To avoid horizontal rainbow artefacts, use integer scaling for the height
        aspect_ratio_index = "22"
        custom_viewport_width = "1920"
        custom_viewport_height = "1792"
        custom_viewport_x = "0"
        custom_viewport_y = "-296"
        
        dankcushionsD 1 Reply Last reply Reply Quote 0
        • dankcushionsD
          dankcushions Global Moderator @pirossi
          last edited by dankcushions

          @pirossi is that a fbalpha or mame2003 cfg for 3countb? you only pasted a bit of the cfg.

          for fbalpha, mine is generated via windows 7 as

          # Auto-generated crt-pi.glslp .cfg
          # Place in /opt/retropie/configs/all/retroarch/config/FB Alpha/
          video_shader_enable = "true"
          video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
          # To avoid horizontal rainbow artefacts, use integer scaling for the width
          aspect_ratio_index = "22"
          custom_viewport_width = "1600"
          custom_viewport_height = "1200"
          custom_viewport_x = "160"
          custom_viewport_y = "0"
          

          for mame2003 i get:

          # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
          video_shader_enable = "true"
          video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
          # To avoid horizontal rainbow artefacts, use integer scaling for the width
          aspect_ratio_index = "22"
          custom_viewport_width = "1600"
          custom_viewport_height = "1200"
          custom_viewport_x = "160"
          custom_viewport_y = "0"
          

          (the same, as expected)

          i don't know what else to suggest. you definitely have the latest version of the script from git? you need the whole repo in a directory: https://github.com/dankcushions/crt-pi-configs

          P 1 Reply Last reply Reply Quote 0
          • P
            pirossi @dankcushions
            last edited by pirossi

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

            @pirossi is that a fbalpha or mame2003 cfg for 3countb? you only pasted a bit of the cfg.

            for fbalpha, mine is generated via windows 7 as

            # Auto-generated crt-pi.glslp .cfg
            # Place in /opt/retropie/configs/all/retroarch/config/FB Alpha/
            video_shader_enable = "true"
            video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
            # To avoid horizontal rainbow artefacts, use integer scaling for the width
            aspect_ratio_index = "22"
            custom_viewport_width = "1600"
            custom_viewport_height = "1200"
            custom_viewport_x = "160"
            custom_viewport_y = "0"
            

            for mame2003 i get:

            # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
            video_shader_enable = "true"
            video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
            # To avoid horizontal rainbow artefacts, use integer scaling for the width
            aspect_ratio_index = "22"
            custom_viewport_width = "1600"
            custom_viewport_height = "1200"
            custom_viewport_x = "160"
            custom_viewport_y = "0"
            

            (the same, as expected)

            i don't know what else to suggest. you definitely have the latest version of the script from git? you need the whole repo in a directory: https://github.com/dankcushions/crt-pi-configs

            yes i have lastest version, i dont know why generates Other results than yours. It's very weird

            You u can upload for could generate them and put them on the front page? 1290x1200 16:10
            I am desperate and it seems to me an excellent job.

            By the way my operating system is windows 7 pro 32 bits, maybe it's ready for 64bit?0_1490115194379_fallo.png
            But same erratic values for mame cfgs.. in all cfgs

            EDITED

            Another 2 colleague of spanish forum made me the favor of generating cfg's in windows10 64bits, with my resolution and the same result as mine, erratic values.
            And another with windows 7 ultimate and it also comes out like me with cfg failure

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

              @pirossi - I just downloaded it from scratch using Python 3.6.1rc1 and it is working fine.

              EDITED

              Another 2 colleague of spanish forum made me the favor of generating cfg's in windows10 64bits, with my resolution and the same result as mine, erratic values.
              And another with windows 7 ultimate and it also comes out like me with cfg failure

              I just downloaded it from scratch. Using Windows 10 64-bit & Python 3.6.1rc1 x86-64 embeddable zip @ 1900x1200 and it looks good as far as I can see. That's the config for 3countb.

              # Auto-generated crt-pi.glslp .cfg
              # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
              video_shader_enable = "true"
              video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
              # To avoid horizontal rainbow artefacts, use integer scaling for the width
              aspect_ratio_index = "22"
              custom_viewport_width = "1600"
              custom_viewport_height = "1080"
              custom_viewport_x = "160"
              custom_viewport_y = "0"
              
              P 1 Reply Last reply Reply Quote 1
              • P
                pirossi @Riverstorm
                last edited by pirossi

                @Riverstorm
                thank you very much!!
                I installed python 3.6 and now everything works correctly !!!!

                now super! 1920x1200
                Thank you very much partner !!
                The problem was given by python 2.7 without a doubt!

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

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

                  @Riverstorm
                  thank you very much!!
                  I installed python 3.6 and now everything works correctly !!!!

                  now super! 1920x1200
                  Thank you very much partner !!
                  The problem was given by python 2.7 without a doubt!

                  That's great. At a minimum we know 3.6 does work as some syntax or command is processing differently than intended but we know it's somewhere between 2.7 and 3.6.

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

                    neat, thanks for figuring it out, both! i've added the python version requirement in the readme. i think someone else had a similar issue earlier on in the thread when they were running the script locally and it did weird stuff. here i'm on 3.5.2.

                    i'd never written a line of python before this script so it's possible i've used a bunch a of 3.x python stuff when i didn't need to. python seems to have a lot of different ways of doing the same things! i'm not sure i really like it, but it seemed like the popular way to do this sort of thing.

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

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

                      i'd never written a line of python before this script so it's possible i've used a bunch a of 3.x python stuff when i didn't need to. python seems to have a lot of different ways of doing the same things! i'm not sure i really like it, but it seemed like the popular way to do this sort of thing.

                      No complaints here! It's a great script and works perfectly. I'm grateful you did write it regardless as our gaming experience is much improved for it. :)

                      I never think of it as an exact science but more of an art as there's so many ways to do the same thing in any language, some guys get crazy creative but it seems each programmer almost develops a specific style that becomes recognizable. You can always tweak the script here and there as you see an improvement in code or feature. It's really a nice script for never writing in Python before.

                      1 Reply Last reply Reply Quote 0
                      • E
                        EvilDindon
                        last edited by

                        Best post.

                        Everyone NEED to download these config files. The result on mame is so more accurate (especially for vertical games).

                        Thanks a lot man !

                        I have a question regarding consoles : why do you need to create cfg files ? For example, NES is displayig always the same resolution for every game isn't it ? (256x240), so, a global cfg file shouldn't just do it ?

                        Cheers from France,

                        Mike.

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

                          @evildindon thanks! and yes, for nes it's just a single cfg file, rather than per-game. have a look inside the .zip :)

                          1 Reply Last reply Reply Quote 0
                          • E
                            EvilDindon
                            last edited by EvilDindon

                            Oh I see.

                            And what is the improvement in your cfg file over the global "crt-pi" shader that can be applied in the configaration editor ?

                            I thought integer scaling was just needed for vertical oriented games ?

                            Never mind just read your post : integer scaling benefits on horizontal games too ;)

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

                              What if I want to use these .cfgs at the same time I am doing custom bezels which also use .cfgs? Top requested arcade games for overlays

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

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

                                What if I want to use these .cfgs at the same time I am doing custom bezels which also use .cfgs? Top requested arcade games for overlays

                                the overlays would have to adapted to the new resolutions so any current overlays wouldn't be valid.

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

                                  @dankcushions I actually enabled crt.pi when using a 1920x1080 sidebar bezel. I noticed slowdown! I'm thinking all this is taxing the pi3.

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

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

                                    @dankcushions I actually enabled crt.pi when using a 1920x1080 sidebar bezel. I noticed slowdown! I'm thinking all this is taxing the pi3.

                                    yep, it definitely can - for example, with lr-gen-plus-gx (genesis), lr-fceumm (nestopia). i didn't notice any slowdown in lr-mame2003 or lr-fbalpha, but it is certainly possible if a game hammers the system bus enough.

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

                                      I was playing Street Fighter 2: CE (FBA) and Mortal Kombat 2 (Mame2003) with a side bezel and crt.pi. It seemed to run jittery.

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

                                        I've run into a bit of a problem with this... running the script for 1600 x 1200, I get output like the following for horizontal games :

                                        # Auto-generated crt-pi.glslp .cfg
                                        # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
                                        video_shader_enable = "true"
                                        video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi.glslp"
                                        # To avoid horizontal rainbow artefacts, use integer scaling for the height
                                        aspect_ratio_index = "22"
                                        custom_viewport_width = "1600"
                                        custom_viewport_height = "1568"
                                        custom_viewport_x = "0"
                                        custom_viewport_y = "-184"
                                        

                                        The command line I used was
                                        python crt_pi_configs.py mame2003 1600 1200

                                        Vertical games seem to have the height correctly set at 1200. I just fetched the script and resolution_db from github last night, so it should be the latest.

                                        Any suggestions?

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

                                          Actually, some of the vertical games seem a bit off too;

                                          # Auto-generated crt-pi-vertical.glslp .cfg
                                          # Place in /opt/retropie/configs/all/retroarch/config/MAME 2003/
                                          video_shader_enable = "true"
                                          video_shader = "/opt/retropie/configs/all/retroarch/shaders/crt-pi-vertical.glslp"
                                          # To avoid horizontal rainbow artefacts, use integer scaling for the width
                                          aspect_ratio_index = "22"
                                          custom_viewport_width = "1120"
                                          custom_viewport_height = "1200"
                                          custom_viewport_x = "240"
                                          custom_viewport_y = "0"
                                          

                                          The game looks way wider than it should.

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

                                            @andrewh you need to tell me the specific games these example .cfgs are for or they don't mean much, i'm afraid.

                                            A 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.