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

    Dosbox on pi 4, game window is fullscreen but not centered on screen

    Scheduled Pinned Locked Moved Help and Support
    dosbox
    97 Posts 16 Posters 18.1k 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.
    • quicksilverQ
      quicksilver
      last edited by

      Running dosbox on my pi 4 there seems to be an issue in that the game window, while scaled correctly is aligned with the left side of my display. Same as reported here:
      https://www.reddit.com/r/RetroPie/comments/flk5v5/when_i_try_to_run_dosbox_the_game_is_unscaled_is/

      Changing the aspect and window resolutions doesnt help to recenter the image.

      Tested on my pi 4 running retropie 4.5.17. This doesnt occur on my pi 3.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Can you try an enable the dispmanx driver for dosbox ? It should easily configuratable from Configuration/Tools.

        quicksilverQ 1 Reply Last reply Reply Quote 0
        • quicksilverQ
          quicksilver @mitu
          last edited by quicksilver

          @mitu Sorry, I forgot to mention that I tried that. With dispmanx enabled it stretches the game area to fill the screen, so the aspect ratio is incorrect. Changing the aspect option in the dosbox configuration file doesnt help here either.

          EfriimE G 2 Replies Last reply Reply Quote 0
          • EfriimE
            Efriim @quicksilver
            last edited by Efriim

            @quicksilver
            You can try output surface with aspect on, but it looks like butt. I'll let you know if I find a better way.

            Actually there are other configurations that look worse.

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              Try changing aspect = true in the dosbox-SVN.conf, it should scale the output better.

              quicksilverQ 1 Reply Last reply Reply Quote 0
              • quicksilverQ
                quicksilver @mitu
                last edited by

                @mitu you mean with dispmanx enabled too? I believe I already tried this but I will try again.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @quicksilver
                  last edited by

                  @quicksilver It doesn't matter if dispmanx is enabled.

                  quicksilverQ 1 Reply Last reply Reply Quote 0
                  • quicksilverQ
                    quicksilver @mitu
                    last edited by

                    @mitu with dispmanx enabled or disabled the aspect option doesn't help to center the game window. The aspect ratio and scaling are correct it's just that the game window is aligned to the left of the screen. On the pi 3 it's centered properly.

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @quicksilver
                      last edited by

                      What's your screen resolution ?

                      quicksilverQ 1 Reply Last reply Reply Quote 0
                      • quicksilverQ
                        quicksilver @mitu
                        last edited by

                        @mitu 1920x1080

                        1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator
                          last edited by

                          Will need to test with this resolution, mine is 4:3. You can try fiddling with the fullresolution option in the cofiguration file and set it to 1920x1080.

                          1 Reply Last reply Reply Quote 0
                          • quicksilverQ
                            quicksilver
                            last edited by

                            To get it to display properly scaled and centered I had to use these settings in my dosbox config:

                            fullscreen = false
                            windowresolution = 1920x1080
                            aspect = true
                            
                            1 Reply Last reply Reply Quote 2
                            • mituM
                              mitu Global Moderator
                              last edited by

                              Nice. I just moved my Pi4 to my 1080p screen and experienced the issue - though I haven't got time to fiddle with all the options yes.

                              quicksilverQ 1 Reply Last reply Reply Quote 0
                              • quicksilverQ
                                quicksilver @mitu
                                last edited by

                                @mitu Ive been noticing that dosbox performance on my pi 4 is actually worse than my pi 3 in some cases. On my pi 4 setting output=overlay is the only way to get the games scaled to fullscreen. Output=surface is more performant but will not scale on a pi 4 (the dosbox-svn.conf even states that scaling is not possible with output=surface). Yet output=surface is the default setting on my pi 3 and it's scaled perfectly. How did scaling work on previous pi models?

                                1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator
                                  last edited by

                                  It has to do with the framebuffer video driver included in the sdl1 library used by dosbox. The PI4 has a different kind of driver (it's basically emulated on top of the DRM/KMS primary video plane) which doesn't support resolution changing, as in the previous PI models.
                                  For the Pi3, the scaling might have worked with 2 methods - either the fbcon SDL1 driver did the scaling to a resolution supported by the framebuffer, or the scaling was done by using the SDL1 dispmanx driver (PI specific). The former is not supported anymore on the Pi4, the latter works, but it's not 100% behaving the same as on a Pi3.

                                  1 Reply Last reply Reply Quote 1
                                  • quicksilverQ
                                    quicksilver
                                    last edited by

                                    Thanks for the explanation, I'll keep fiddling with the display settings to see if it makes any difference. For now though dosbox performance on the pi 4 is very poor compared to the pi 3, some of my games aren't even playable anymore. Dosbox-sdl2 is worse and lr-dosbox is worse still. I think I'll try with dispmanx turned on even though the aspect ratio is wrong I'm curious if it improves performance at all.

                                    1 Reply Last reply Reply Quote 0
                                    • quicksilverQ
                                      quicksilver
                                      last edited by quicksilver

                                      Update:

                                      Did some testing, dispmanx doesn't improve performance. It actually makes it worse.

                                      It's output=overlay that's slowing everything down. Output=surface and everything is way faster and responsive, unfortunately it doesn't allow scaling so we're stuck with a small game window.

                                      Is there anyway to use runcommand to force a lower resolution video mode? I tried it and doesn't seem to work, so I would assume that's part of what's not functioning on the pi 4?

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @quicksilver
                                        last edited by

                                        @quicksilver said in Dosbox on pi 4, game window is fullscreen but not centered on screen:

                                        Is there anyway to use runcommand to force a lower resolution video mode? I tried it and doesn't seem to work, so I would assume that's part of what's not functioning on the pi 4?

                                        It works for SDL2 based emulators, RetroArch or Xorg based programs. Given dosbox is SDL1 app, it might not work.

                                        quicksilverQ 1 Reply Last reply Reply Quote 0
                                        • quicksilverQ
                                          quicksilver @mitu
                                          last edited by

                                          @mitu that make sense why it isn't working then. I'll have to stick with using my pi3 for dos games for now in that case. Thanks again for the help.

                                          1 Reply Last reply Reply Quote 0
                                          • quicksilverQ
                                            quicksilver
                                            last edited by quicksilver

                                            Just an update for anyone following this thread. I was able to get decent performance using dosbox-sdl2 by turning vsync off and using a lower resolution video mode in the runcommand menu. So it is a viable alternative for some games, (see post below)however it doesnt seem to support .mp3/.ogg audio format which quite a number of GOG games utilize. This results in a CD-ROM not inserted error.

                                            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.