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.
    • 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
                                  • S
                                    starquake @edmaul69
                                    last edited by starquake

                                    @edmaul69 Well as long as you're not going full retard. ;-)
                                    0_1479508208382_upload-2941b8d4-0a6c-444c-be89-be737003a03f

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

                                      @starquake great movie... 😄

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

                                        @simillarian @starquake @dankcushions @Floob i added this in my /opt/retropie/configs/nes/retroararch.cfg

                                        video_fullscreen_x = 320
                                        video_fullscreen_y = 240
                                        

                                        and i got it in fullscreen 320x240. wouldnt this fix @simillarian 's problem? i also removed the video setting from run command menu right before a game starts

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

                                          If you want scanlines on your CRT and keep 60fps you need 240p which the Raspberry Pi doesn't support. Look it any of my links posted for more explanation. It's a subject that is hard to understand but if you read the second part of this carefully you will understand what's going wrong:
                                          http://scanlines.hazard-city.de/

                                          Keep in mind the Raspberry Pi only outputs 480i (or 576i for PAL)

                                          Took me quite a while to understand all this. But if you read carefully you will understand why this all doesn't work.

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

                                            I'll past the important part here for your convenience:

                                            "For 60+ years now, since television has been around, classic standard definition is transmitted as an interlaced signal. In the USA and Japan that's called 480i (running at 60Hz), while it's 576i in Europe, parts of Asia and parts of South America (running at 50Hz). When the first video game systems emerged in the 70s, both as arcade cabinets and as home systems, manufacturers opted for an alternative video standard instead. Instead of alternating the lines between fields, they chose a non-interlaced signal, delivering 60 progressive frames per second instead. To keep the format compatible with the millions of TV sets out there, each frame consists of (roughly) 240 lines - same as the fields in the interlaced signals. The progressive signal eliminated flicker, made text more readable and ultimately created what is known today as "8-bit and 16-bit pixel art".

                                            Because the tubes were initially created for interlaced signals, the spacing and resolution of the tube's mask is optimized for 480i signals. If a progressiv 240p signal is fed, every second line is left blank, creating those visible dark lines, which we call "scanlines". Those lines soften the pixels and create a very distinctive look, which many people prefer to the "emulated" look of raw low-res signals on digital panels.

                                            All the classic home systems out there, starting from early 80s Atari systems, mid 80s Nintendo and Sega systems, early 90s 16-bit systems like SuperNES, PC Engine, Mega Drive or Neo Geo, up to the early days of the 32-bit generation with Playstation One and Sega Saturn, output 240p signals (or 288p in their PAL versions) and are perfectly fitted for any classic CRT display. While the actual active lines differ on this systems (Neo Geo for example has 224 lines), 240p refers to the progressive nature and the 15khz timing of those signals."

                                            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.