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

    I need help using a scanline overlay on a CRT

    Scheduled Pinned Locked Moved Help and Support
    26 Posts 7 Posters 17.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.
    • S
      simillarian
      last edited by simillarian

      When I hooked my raspberry pi to my CRT I couldn't help but notice there weren't any scanlines. All of the scanline config settings I have found are for 1080p and aren't working on my TV. Can someone help me get a scanline overlay working with 640x480 resolution?

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

        I'm confused - if its a CRT wouldnt it have scanlines anyway?
        https://en.wikipedia.org/wiki/Scan_line

        What TV do you have?

        This may also help:
        https://www.google.co.uk/search?q=scanline&espv=2&biw=1920&bih=955&tbm=isch&source=lnt&tbs=isz:ex,iszw:640,iszh:480

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

        S 1 Reply Last reply Reply Quote 0
        • S
          simillarian @Floob
          last edited by simillarian

          @Floob Thanks, I will try that 640x480 scanline image. I think my issue was that the default overlays in RetroPie were much larger resolution. I have a trinitron. I am wanting the scanlines that are generated at low console resolutions. At 480p it does have scanlines, it's just not the same as scanlines generated from a 256x240 input. I thought that the scanlines would be further apart when I set it to 240p but they are not.

          Here are some examples:

          NES through composite

          480p RetroPie through composite

          It looks the same just less sharp when I set RetroPie to 240p. Although emulation is quite different than original hardware, I am trying to mimic the experience as closely as possible.

          EDIT: The resolution of the default overlay was giving me the trouble. The smaller resolution works, although not to the extent I was hoping. There is far too much of a rolling effect happening. The same thing was happening with shaders so I wanted to try an overlay. Ah well, thanks for the help!

          edmaul69E 3 Replies Last reply Reply Quote 0
          • S
            starquake
            last edited by

            The Retropie does not support 240p (yet). You are probably using 480i.

            See here: http://scanlines.hazard-city.de/
            and here https://github.com/raspberrypi/firmware/issues/683

            1 Reply Last reply Reply Quote 0
            • edmaul69E
              edmaul69 @simillarian
              last edited by edmaul69

              @simillarian please read my post down below with my overlay and instructions

              1 Reply Last reply Reply Quote 0
              • edmaul69E
                edmaul69
                last edited by

                Also i forgot. You need to make overlay.cfg files to go with them. Just use one of the existing ones in the overlay folder but have them named and edited correctly. I dont have a way to post them here

                1 Reply Last reply Reply Quote 0
                • D
                  Dochartaigh
                  last edited by

                  I've been wondering about this - do the scanlines of the CRT-Pi shader for example, scale with the native source? Like will consoles with 240i native resolution have 240 scanlines using the CRT-Pi shader? And will 480i consoles have 480 scanlines with the same CRT-Pi shader? (I seriously haven't sat down and counted how many scanlines each emulator puts up on the screen ;)

                  dankcushionsD 1 Reply Last reply Reply Quote 0
                  • edmaul69E
                    edmaul69 @simillarian
                    last edited by

                    @simillarian ok so i went with using the single line overlay posted above either single line image works. tested on an lcd but should work the same on a crt. so heres what i di. i used this image:

                    alt text

                    i renamed it "scanline1_640x480.png"

                    i placed it in:

                    /opt/retropie/emulators/retroarch/overlays/1080p_4-3/
                    

                    then i made a .cfg file and pasted in the same folder. i named it "scanline1_640x480.cfg" inside that .cfg file i added this:

                    overlays = 1
                    overlay0_overlay = scanline1_640x480.png
                    overlay0_full_screen = true
                    overlay0_descs = 0
                    

                    then i opened up /opt/retropie/configs/nes/retroarch.cfg and put a hashtag in front of all the lines for a shader to disable the shader . then i added this:

                    input_overlay = /opt/retropie/emulators/retroarch/overlays/edmaul69/scanline2_640x480.cfg
                    input_overlay_enable = "true"
                    input_overlay_opacity = 1.000000
                    

                    then i saved the file and started the game

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

                      @Dochartaigh said in I need help using a scanline overlay on a CRT:

                      I've been wondering about this - do the scanlines of the CRT-Pi shader for example, scale with the native source? Like will consoles with 240i native resolution have 240 scanlines using the CRT-Pi shader? And will 480i consoles have 480 scanlines with the same CRT-Pi shader? (I seriously haven't sat down and counted how many scanlines each emulator puts up on the screen ;)

                      yes it will.

                      to OP - my understanding is that scanlines don't appear on CRT tvs unless you're running at the correct resolution, which will typically be 240P. still, this might help: https://www.reddit.com/r/retrogaming/comments/3nqijo/bigger_scanlines_on_a_trinitron_tutorial/

                      edmaul69E 1 Reply Last reply Reply Quote 0
                      • edmaul69E
                        edmaul69 @dankcushions
                        last edited by edmaul69

                        @dankcushions check out my last post i just uploaded. this should make the scanlines he needs with this overlay i created. here is how it looks on 640X480 on an lcd but should be the same on a crt.

                        alt text

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

                          @edmaul69 yeah that should work but IMO if you have a CRT you should have no need to fake it :)

                          1 Reply Last reply Reply Quote 0
                          • S
                            starquake
                            last edited by

                            If I understand it all correctly your scanline overlay is cutting your FPS in half. The advantage of the 240p is that the result is 60 full frames per second. When you use the interlaced mode (480i) 30 times per second the even lines are drawn and 30 times per second the odd lines are drawn. When the odd lines are covered by a black line this means you will only see 30 frames per second. Some NES game use blinking really fast to give the impression of something being half translucent. For example when your hit by an enemy in Mega Man. When you have your scanline overlay over it, this means you either see a fully opaque sprite, or it's entirely gone for awhile.

                            That's the exact reason why I created the issue on github.

                            (BTW. if you're using PAL instead of NTSC 480i becomes 576i and 50hz (=50/2 = 25FPS)

                            edmaul69E 1 Reply Last reply Reply Quote 1
                            • edmaul69E
                              edmaul69 @starquake
                              last edited by edmaul69

                              @starquake so how would it work based on the fact that none of my odd lines are black? Is it needing to alternate back and forth between odds and evens for flashing/translucent?

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                starquake @edmaul69
                                last edited by starquake

                                @edmaul69 I'm not sure I understand your question. Are you saying it works perfectly fine right now? Or are you asking how you should make it work?

                                edmaul69E 2 Replies Last reply Reply Quote 0
                                • edmaul69E
                                  edmaul69 @starquake
                                  last edited by edmaul69

                                  @starquake if i am understanding right it alternates odds and even to create translucent. Or its flashing back and forth to give 60fps. If Which means a good overlay cant work on it correct? Taking the 1080p scanline overlay that is on the pi and making it 640x480 it still looks as crappy as it did before.

                                  S 1 Reply Last reply Reply Quote 0
                                  • edmaul69E
                                    edmaul69 @starquake
                                    last edited by

                                    @starquake how would it look using the crt-pi shader?

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      starquake @edmaul69
                                      last edited by

                                      No that's not what I meant. I'm sorry, I'm not sure how to explain it better than I already did. Maybe this helps:

                                      edmaul69E 1 Reply Last reply Reply Quote 0
                                      • S
                                        simillarian @edmaul69
                                        last edited by

                                        This post is deleted!
                                        1 Reply Last reply Reply Quote 0
                                        • edmaul69E
                                          edmaul69 @starquake
                                          last edited by

                                          @starquake im half retarded today. 240p and 480i.. forgot the whole 480 interlacing bit and 240 being progressive. I never use a crt so i kinda spaced out about it. Thanks for the video to remind me

                                          S 1 Reply Last reply Reply Quote 0
                                          • edmaul69E
                                            edmaul69 @simillarian
                                            last edited by edmaul69

                                            @simillarian noticed you deleted your post. What was the issue you are having?

                                            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.