• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Help with custom resolution and overscan settings

Scheduled Pinned Locked Moved Help and Support
screen resolutioverscangameboy zero
9 Posts 3 Posters 2.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.
  • C
    cheve
    last edited by 30 Jun 2019, 04:06

    Hi,

    I'm new here, so excuse if I'm not posting in the right place.

    The thing is that I already have a woking installation of Retropie in a Raspberry Zero W. But I want to setup the screen resolution in a very specific way for the Gameboy Zero I'm trying to build.
    I'm mostly interested on emulating GB and GBC games using lr-gambatte. Now, my screen is 720x720. And my current config allows to see the image full screen and with the right ratio. But I want to make it smaller to accomodate the glass screen of the Gameboy Pocket case I'll be using.
    So, I'm trying to get a 640x576 image plus the black borders needed to fill the 720x720. There is a bit more info in this post.

    So far, I'm editing /boot/config.txt directly and I've been able to achieve the right width, but not with the expected parameters and some problems left. Below is my baseline for a working 720x720 full screen:

    # For more options and information see
    # http://rpf.io/configtxt
    # Some settings may impact device functionality. See link above for details
    
    # uncomment if you get no picture on HDMI for a default "safe" mode
    #hdmi_safe=1
    
    # uncomment this if your display has a black border of unused pixels visible
    # and your display can output without overscan
    #disable_overscan=1
    
    # uncomment the following to adjust overscan. Use positive numbers if console
    # goes off screen, and negative if there is too much border
    overscan_left=0
    overscan_right=0
    overscan_top=0
    overscan_bottom=19
    
    # uncomment to force a console size. By default it will be display's size minus
    # overscan.
    framebuffer_width=720
    framebuffer_height=720
    
    # uncomment if hdmi display is not detected and composite is being output
    hdmi_force_hotplug=1
    
    # uncomment to force a specific HDMI mode (this will force VGA)
    hdmi_group=2
    hdmi_mode=87
    hdmi_cvt=720 720 60
    
    # uncomment to force a HDMI mode rather than DVI. This can make audio work in
    # DMT (computer monitor) modes
    hdmi_drive=2
    
    # uncomment to increase signal to HDMI, if you have interference, blanking, or
    # no display
    #config_hdmi_boost=4
    
    # uncomment for composite PAL
    #sdtv_mode=2
    
    #uncomment to overclock the arm. 700 MHz is the default.
    #arm_freq=800
    
    # Uncomment some or all of these to enable the optional hardware interfaces
    #dtparam=i2c_arm=on
    #dtparam=i2s=on
    #dtparam=spi=on
    
    # Uncomment this to enable the lirc-rpi module
    #dtoverlay=lirc-rpi
    
    # Additional overlays and parameters are documented /boot/overlays/README
    
    # Enable audio (loads snd_bcm2835)
    dtparam=audio=on
    gpu_mem_256=128
    gpu_mem_512=256
    gpu_mem_1024=256
    overscan_scale=1
    

    My understanding is that I would just need to change hdmi_cvt=720 720 60 to 640 576 60; maybe set the framebuffer width and height to 640 and 576 respectively; and use the overscan offsets to center it properly.
    But I don't know if the problem is with Retropie, or with my display. But whenever I do that, I get either an image offseted and repeated vertically with some garbage, I get garbage on the left side of the screen and pixel rows flicker horizontally; nothing at all, or just vertical colored lines.

    Any ideas or pointers to solve this? I think I need to solve this at a Retropie (Raspbian?) level and not at a gambatte level, right? So the menus, consoles and everything else also fit within the GB Pocket frame.

    I can take pictures or videos if needed.

    M 1 Reply Last reply 30 Jun 2019, 04:49 Reply Quote 0
    • M
      mitu Global Moderator @cheve
      last edited by 30 Jun 2019, 04:49

      @cheve You can try to do it at the emulator (lr-gambatte) level - see https://retropie.org.uk/docs/Smaller-RetroArch-Screen/.

      1 Reply Last reply Reply Quote 1
      • C
        cheve
        last edited by 1 Jul 2019, 01:13

        Thank you! That worked! I was even able to set right offsets for the screen once in place
        IMG_20190630_175941_s.jpg

        Now into making the same with EmulationStation, I guess. But if there was any global config that could work at OS level, let me know. I'm not sure setting this independently is going to potentially prevent any of the many config menus to be cut by the frame.

        IMG_20190630_180037_s.jpg

        1 Reply Last reply Reply Quote 0
        • M
          mitu Global Moderator
          last edited by 1 Jul 2019, 02:45

          Glad you got it to work. Emulationstation has some command line parameters you can use to set the window size (width/height) that might help, but I cannot find the syntax right now. I'll get back to this later.

          C 1 Reply Last reply 1 Jul 2019, 02:50 Reply Quote 1
          • C
            cheve @mitu
            last edited by 1 Jul 2019, 02:50

            @mitu Thanks. I think I found a very similar thread

            M 1 Reply Last reply 1 Jul 2019, 06:08 Reply Quote 0
            • M
              mitu Global Moderator @cheve
              last edited by 1 Jul 2019, 06:08

              @cheve Yes, that should cover the new options.

              1 Reply Last reply Reply Quote 0
              • C
                cheve
                last edited by 1 Jul 2019, 23:10

                I managed to run ES at 640x576 but now the image is off center
                IMG_20190701_154909.jpg
                I was peeking into config files, but didn't find a reference to resolution apart from the command line parameters. If I was able to add vertical and horizontal offsets I would be pretty much set.

                1 Reply Last reply Reply Quote 0
                • S
                  Sakitoshi
                  last edited by 2 Jul 2019, 02:14

                  I believe the specific parameters are not documented (I got them looking at the source code), but I'm using them with my crt configs.

                  emulationstation --screensize x_res y_res --screenoffset x_offset y_offset
                  

                  replace x_res and y_res with your desired resolution and then adjust x_offset and y_offset.

                  C 1 Reply Last reply 2 Jul 2019, 04:21 Reply Quote 2
                  • C
                    cheve @Sakitoshi
                    last edited by 2 Jul 2019, 04:21

                    @Sakitoshi Awesome! I modified

                    /opt/retropie/configs/all/autostart.sh
                    

                    so it calls

                    emulationstation --screensize 640 576 --screenoffset 37 79
                    

                    when booting and when reseting ES from the menu, and it's working flawlessly!
                    IMG_20190701_210343.jpg

                    (I may tweak the offsets based on the final installation of the display, but it looks awesome already)

                    Thank you so much both of you!

                    1 Reply Last reply Reply Quote 1
                    9 out of 9
                    • First post
                      9/9
                      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.

                      This community forum collects and processes your personal information.
                      consent.not_received