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

    Scanlines in Libretro AdvMAME and FBA

    Scheduled Pinned Locked Moved Help and Support
    79 Posts 7 Posters 43.9k 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 @jretropie
      last edited by

      @jretropie said in Scanlines in Libretro AdvMAME and FBA:

      Hi all,

      I tried add the crt shader by using Floob's script. It shader then works on SNES, Sega, NeoGeo but not on any Mame emulator. Is there any trick to enable it on MAME?

      you have to be using a libretro mame emulator. use https://github.com/RetroPie/RetroPie-Setup/wiki/Runcommand to find out what you're using.

      J 1 Reply Last reply Reply Quote 0
      • J
        jretropie @dankcushions
        last edited by

        @dankcushions Hi, I have tried Ir-fba-next, Ir-fba, Ir-mame2003. But none of them shows the shader.

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

          @jretropie said in Scanlines in Libretro AdvMAME and FBA:

          @dankcushions Hi, I have tried Ir-fba-next, Ir-fba, Ir-mame2003. But none of them shows the shader.

          are they in the arcade folder? might be that the script hasn't been updated to use the new(ish) arcade or mame-libretro file paths. not sure. you could instead use the https://github.com/retropie/retropie-setup/wiki/Configuration-Editor

          anyway, the shaders have been updated to the latest versions. here's some pretty screenshots:

          crt-pi
          alt text

          crt-pi-curvature
          alt text

          crt-pi-vertical
          alt text

          crt-pi-curvature-vertical
          alt text

          reinstall retroarch via retropie-setup to get the new ones

          J RiverstormR 2 Replies Last reply Reply Quote 1
          • J
            jretropie @dankcushions
            last edited by

            @dankcushions You are right. Placing ROMs in arcade folder. Shader does not work.

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

              @jretropie said in Scanlines in Libretro AdvMAME and FBA:

              @dankcushions You are right. Placing ROMs in arcade folder. Shader does not work.

              hmm, one for @Floob i think!

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

                @jretropie If you are using shaders (as opposed to overlays) when you install them via my tool you would need to add

                video_shader = /opt/retropie/emulators/retroarch/shader/crt-pi.glslp
                video_shader_enable = true
                

                to the top of the file /opt/retropie/configs/arcade/retroarch.cfg

                That would apply the shader to all games in the arcade folder.

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

                1 Reply Last reply Reply Quote 1
                • J
                  jretropie
                  last edited by

                  Does anyone knows why the shader has vertical color line when I connect to 32" 720p TV?

                  The shader works fine with smaller 22" 1080p computer LCD.

                  alt text

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

                    @jretropie said in Scanlines in Libretro AdvMAME and FBA:

                    Does anyone knows why the shader has vertical color line when I connect to 32" 720p TV?

                    The shader works fine with smaller 22" 1080p computer LCD.

                    It looks like the shadow mask simulation in the shader is interfering with the dot pitch of your TV - TVs do image processing on input signals which might be making this worse as well. Try turning this off by changing the value of MASK_TYPE in the version of the crt-pi.glsl file you are using to be 0. You can try 2 as well but that is likely to give you red/green/blue colour bands instead of green/magenta ones.

                    It's worth me pointing out that the shader really needs about 4 vertical pixels to do even scan lines so you might get moire patterns on your 720p screen.

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jretropie @davej
                      last edited by jretropie

                      I am looking at the file and can't find any variable call mask_type

                      shaders = "1"
                      shader0 = "shaders/crt-pi.glsl"
                      filter_linear0 = "true"
                      wrap_mode0 = "clamp_to_border"
                      mipmap_input0 = "false"
                      alias0 = ""
                      float_framebuffer0 = "false"
                      srgb_framebuffer0 = "false"

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

                        @jretropie Try

                        sudo nano /opt/retropie/emulators/retroarch/shader/shaders/crt-pi.glsl
                        

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

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

                          What Floob said, although as you're using a curved version of the shader you'll need to edit the corresponding glsl file. You can find which one by looking for the line that says something similar to:

                          shader0 = "shaders/crt-pi.glsl"

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

                            @dankcushions said in Scanlines in Libretro AdvMAME and FBA:

                            anyway, the shaders have been updated to the latest versions. here's some pretty screenshots:

                            Those look amazing! I think the scanlines really add another level of genuineness.

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

                              @caver01 said in Scanlines in Libretro AdvMAME and FBA:

                              @Riverstorm said in Scanlines in Libretro AdvMAME and FBA:

                              One more question for you if that's ok. You're a fountain of knowledge my good sir! ;) How do you get full resolution for these vector games?

                              You need to look for these lines in your .rc file for the version of advancemame you are using. Edit both if you might use each, but let's say you are using 1.4. So edit advmame-1.4.rc and look for the lines that look like:

                              display_width 1280
                              display_height 1024
                              display_flicker 15
                              display_intensity 1.5
                              display_antialias yes
                              display_translucency yes
                              display_beam 1.2
                              

                              These settings only affect vector games. I like them this way on my screen. The flicker is a nice effect and it's set light here. The beam seems to enlarge in one dimension only, so if you want thick beams, you can't really get them, but I like a little larger than 1 pixel. Intensity can go up to 3 which I like, but if you back it down a bit, the flicker is more visible as is the translucency.

                              If you haven't already done it, also set sound_latency 0.05. The default is ridiculously high and you can see/hear the delay, so set this to the minimum of 0.05.

                              Finally, make sure when you launch using the runcommand that you are using the full resolution of your display.

                              Thanks Caver, I did a copy and paste as I do with several of your posts. I will be adding this in tonight to see how it looks!

                              caver01C RiverstormR 2 Replies Last reply Reply Quote 0
                              • J
                                jretropie @Floob
                                last edited by

                                @Floob When I try 0 or 2 for the mask_type. the scanlines disappeared.

                                FloobF davejD 2 Replies Last reply Reply Quote 0
                                • caver01C
                                  caver01 @Riverstorm
                                  last edited by

                                  @Riverstorm said in Scanlines in Libretro AdvMAME and FBA:

                                  Thanks Caver, I did a copy and paste as I do with several of your posts. I will be adding this in tonight to see how it looks!

                                  Just be mindful that when you are messing with the AdvanceMAME .rc files, it doesn't like duplicate config entries. So, if you copy and past mine, you need to remove the ones that are there, or add a rom name in from of them like oldsetting/display_flicker 0. This example tells advancemame to use this config line with the game called "oldsetting" which of course there isn't one, so you can create commented lines in this manner. AdvanceMAME is very picky about its config file.

                                  My 4-player cocktail style cabinet built as a custom "roadcase"

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

                                    @jretropie I'll have to try it out myself. I'm afraid I dont have the setup you do so cant test like for like.

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

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

                                      @jretropie said in Scanlines in Libretro AdvMAME and FBA:

                                      @Floob When I try 0 or 2 for the mask_type. the scanlines disappeared.

                                      That sounds like what you get when there's a mistake in the shader and it defaults to what you get when you specify no shader.

                                      Reinstall the files so you've got a correct version and change line 18 so it reads:

                                      #define MASK_TYPE 0
                                      
                                      J 1 Reply Last reply Reply Quote 0
                                      • RiverstormR
                                        Riverstorm @caver01
                                        last edited by

                                        @caver01 said in Scanlines in Libretro AdvMAME and FBA:

                                        Just be mindful that when you are messing with the AdvanceMAME .rc files, it doesn't like duplicate config entries. So, if you copy and past mine, you need to remove the ones that are there, or add a rom name in from of them like oldsetting/display_flicker 0. This example tells advancemame to use this config line with the game called "oldsetting" which of course there isn't one, so you can create commented lines in this manner. AdvanceMAME is very picky about its config file.

                                        Ok, that brings up another question. Are these global settings that only vector based games will utilize or should the games be added individually like:

                                        solarq/display_width 1280
                                        solarq/display_height 1024
                                        solarq/display_flicker 15
                                        solarq/display_intensity 1.5
                                        solarq/display_antialias yes
                                        solarq/display_translucency yes
                                        solarq/display_beam 1.2
                                        starcas/display_width 1280
                                        starcas/display_height 1024
                                        starcas/display_flicker 15
                                        starcas/display_intensity 1.5
                                        starcas/display_antialias yes
                                        starcas/display_translucency yes
                                        starcas/display_beam 1.2
                                        
                                        caver01C 1 Reply Last reply Reply Quote 0
                                        • caver01C
                                          caver01 @Riverstorm
                                          last edited by

                                          @Riverstorm They are only used by vector titles. You don't need to precede them with anything if you want all vector games to behave the same way. AdvMAME includes references like this so you can affect entire classes of games or just single ROMs. I don't know them all by heart, but I know classes of resolutions can be specified and so can vertical games. For example: vector/display_flicker 15 would only affect vector games. Also, something like, vertical/display_ror yes was one I used for a lot of vertical games so they were rotated, although I had to UNDO this by setting it to no for specific titles: 1941/display_ror no. Back when I was using advancemame for everything, these kinds of settings offered a lot of flexibility.

                                          My 4-player cocktail style cabinet built as a custom "roadcase"

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

                                            @caver01 said in Scanlines in Libretro AdvMAME and FBA:

                                            @Riverstorm They are only used by vector titles. You don't need to precede them with anything if you want all vector games to behave the same way. AdvMAME includes references like this so you can affect entire classes of games or just single ROMs. I don't know them all by heart, but I know classes of resolutions can be specified and so can vertical games. For example: vector/display_flicker 15 would only affect vector games. Also, something like, vertical/display_ror yes was one I used for a lot of vertical games so they were rotated, although I had to UNDO this by setting it to no for specific titles: 1941/display_ror no. Back when I was using advancemame for everything, these kinds of settings offered a lot of flexibility.

                                            Thanks Caver, yeah it sounds like AdvMAME was adding all kinds of flexibility to MAME with added parameters. I really like that display_ror no to reverse it is really quite flexible. I appreciate the information. I am looking forward to see how it looks with these new settings! ;)

                                            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.