Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    CRT-TV 16:9 - Stretched/Deformed Image

    Recalbox General
    crt-tv 169
    3
    10
    4235
    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.
    • Juakin
      Juakin last edited by

      Raspberry Pi model: Raspberry Pi 3B
      Recalbox version (build): 18.03.16
      Hardware (Micro SD, Power Supply, etc.): MicroSD(32GB), 5V3A, USB-FlashDrive(128GB)
      Controller(s): DualShock3

      I have an old CRT-TV and the aspect ratio is 16:9, the settings on the config.txt are:
      sdtv_mode=2 (PAL)
      sdtv_aspect=3 (16:9)

      On the file recalbox.conf:
      global.videomode=default

      The thing is, most systems where designed with a 4:3 aspect ratio in mind... so, every system I run (snes, psx, n64, megadrive...) looks deformed or stretched.

      What I want to do is to add black bars left and right of the screen (if possible only ingame), this is the default behavior on the 1080p tv/monitor screens to preserve original aspect ratio, but somehow is ignored when using a CRT-TV.

      If I set the aspect ratio to 4/3 in the visual menu of Recalbox everything is ignored and stays as it is.
      If I set the aspect ratio to 16/9 in the visual menu of Recalbox then I get Up an Down black bars which is not desired at all.

      I found a way to tweak the aspect ratio inside Retroarch... but It seems to "eat" some of the pixels on the image and the result it's not very good...

      So... Is there a way to preserve original aspect ratio in a decent way?

      Substring 1 Reply Last reply Reply Quote 0
      • Substring
        Substring @Juakin last edited by

        @juakin have you tried cjanging the viewports of retroarch ?

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        1 Reply Last reply Reply Quote 0
        • Juakin
          Juakin last edited by

          I've no idea of what a "Viewport" in RetroArch is...
          I've found an option called "aspect ratio" but when I use it, it seems to distort the image "droping" some pixels, you can see clearly on the fonts that is not resizing the image correctly.
          Also if the screen is set to 16:9 to correct aspect ratio in retroarch I should use 4:3, but thats not the case, I've got to use another aspect ratio like 8:7 or something like that to correct the ratio, and that's when the distortion takes place.

          Substring 1 Reply Last reply Reply Quote 0
          • Substring
            Substring @Juakin last edited by

            @juakin hooefully my crt tvs are 4:3 😁

            Force your tv not to scale the picture

            Former dev - Please reply with @substring so that i am notified when you answer me
            Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

            1 Reply Last reply Reply Quote 0
            • Juakin
              Juakin last edited by

              @Substring Yeah, I thought of that too, but I don't know if I have the TV remote, actually I'm gonna look for it...

              1 Reply Last reply Reply Quote 0
              • Pol
                Pol last edited by

                Hi! All that follows is assuming you are using composite output. You should try to set sdtv_aspect to whatever number be 4:3 (you are stating you are using it on 16:9). Also I recommend you very much you change to non-interlaced (progressive) mode (sdtv_mode=18 for PAL or 16 for NTSC) as interlaced hurts your eyes 🙂 and for fidelity purposes, most games on most consoles did progressive back in the day

                Then, if you are in a retroarch core, enter retroarch menu (hotkey+B) go to "Settings", "Video" and set "Aspect ratio" to "Custom", then adjust these:

                Custom viewport height: 448
                Custom viewport width: 640

                That should get you the equivalent to 320x224 consoles like Sega Genesis output (you set 640x448 because RPi composite resolutions are fixed at double res PAL/NTSC).
                Others like NES or SNES used 256 (512) horizontally but were stretched by the TV so setting width to 640 should do fine with Raspberry composite output.
                It is well known that PAL has 256 (288 in overscan mode) pixels tall but most if not all Genesis, SNES or NES games only use 224, therefore the size of the viewport you must set is 448. On NTSC screen will be filled completely; on PAL you will have black borders on top and bottom but this is correct: any try of increasing this number will result in pixel doubling and graphics deformation. When you search for pixel perfect image vertical resolution is more important than horizontal.
                Of course, there are consoles that use the full 240p like Nintendo64 or PlayStation (in most games, there are exceptions) so for those consoles you should set Custom viewport height to 480.
                And then there's Atari 2600 at 210p (custom vp 420) if I remember right 🙂

                Lets go on... Now your playscreen (viewport) will be not centered so adjust these, I give you an example on my TV, yours may vary:

                Custom viewport X pos. 38
                Custom viewport Y pos. 16 for Ntsc /64 for PAL

                Check these also: integer scale off (if you want custom viewports to take effect), multithread off (less lag on controls and no random skipping of frames - you dont need it since lower resolutions used in CRT uses less CPU power) bilinear filtering off and no shaders of course as you dont need them. Shaders consume CPU power so if enabled multithread would be a must... Anyway this is not your case.
                Vsync ON of course...
                Crop overscan on.

                Last but not least go back to retroarch main menu and select "configurations" and "save NEW config" that creates a config with the name of the core of the gaming system in /recalbox/share/system/.config/retroarch/config folder which is in your microSD and you can only access with WinSCP or similar under Windows, for example: "snes9x_next_libretro.cfg".
                Now go to /recalbox/share/system and edit "recalbox.conf" at the bottom line add "snes.configfile=/recalbox/share/system/.config/retroarch/config/snes9x_next_libretro.cfg"

                You have made a custom config for your SNES system!, now do the same for each system you want to edit viewports or other options under "Settings" such as inputs... Remember systems use different resolutions so there's no one-way solución for all if you want pixel perfect

                Hope you do fine with this info!

                1 Reply Last reply Reply Quote 0
                • Juakin
                  Juakin last edited by Juakin

                  @Pol Thanks! Yeah I'm using composite output.
                  I'll try this as soon as I can, but I remember using the other "sdtv_aspect" (4:3) and the problem was pretty much the same, ES menus seem to be affected, but the in-game config seems to be unaltered no matter which "sdtv_aspect" I used.
                  Anyway I'll try to mess with those custom settings and see If I can make it work.

                  EDIT: Can I make psx and n64 emulators work fullspeed using only one thread?

                  PD: I can't find the TV remote... so no luck adjusting the aspect ratio forcing it from TV...

                  Pol 1 Reply Last reply Reply Quote 0
                  • Pol
                    Pol @Juakin last edited by Pol

                    @juakin I tested a lot of PSX games and every one of them work full speed no problem.
                    Every game I tested on N64 I didn't notice a single frame or sound stutter different regardless multithread on or off, issues are more a problem of the emulator than the pi's lack of power. My settings are RpI 3B using NTSC res 720x480 through composite, overclocked to "turbo" from Recalbox ES menu, I use different cores for different N64 games. The difference between "turbo" and "ultra" is not significant enough to turn games that lag perfect. I remember I tweak mupen64 configfile to display 640x480 and it fixed a screen centering problem... If you use libretro core, in "options" from retroarch menu you can set internal N64 res to 320x240, thus gaining speed (and graphic accuracy 🙂

                    Edit: I put 720x480 in the mupen64 config file to fix the screen centering problem

                    1 Reply Last reply Reply Quote 0
                    • Pol
                      Pol last edited by

                      I think you should enter any system's retroarch menu and change "Aspect ratio" under "Settings"/"Video" (there's are a lot of combinations) and see if it affects screen; if screen changes its shape its a matter of using custom resolution I told you earlier.

                      1 Reply Last reply Reply Quote 0
                      • Juakin
                        Juakin last edited by Juakin

                        I think I know what the issue is... aparently Retroarch detects the TV as 4/3 even if I set the "sdtv_aspect" to 16/9.
                        Like showed in this picture:
                        TV fullsize
                        If I try to use a custom resolution I get this Issue, It appears I loose screen size and got some big black margins, like in this picture:
                        TV margins
                        I've been messing with configurations and I think I'm gonna leave it with a 8/7 aspect ratio and activate the bilinear filter, which make pixels softer and seems that corrects some of the pixel deformation I was suffering...
                        It's not perfect, but I think I'm getting an aceptable result.
                        And aparently it seems that the native resolution of the screen is 720x576. If I modify it I get those Issues.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Want to support us ?

                        72
                        Online

                        98.7k
                        Users

                        28.1k
                        Topics

                        187.0k
                        Posts

                        Copyright © 2021 recalbox.com