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.3k 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.
    • 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
                    • N
                      nemo93
                      last edited by nemo93

                      hey @quicksilver perhaps you could give dosbox-staging a try? SDL2 as well as MP3/OGG are supported features. Devs are nice and eager to add more features like autotype or bundling DOS/32A directly - like Dosbox-X iirc. As of typing there's no support for MT-32 or Fluidsynth but it's being discussed.

                      I've created a (too long) thread to discuss this. Dosbox-staging is the version I'm now using as default along with dos32a extender, it provides nice compatibility, decent performance, no/less tearing (eg. Rayman, Raptor especially) and joypad support out-of-the-box on my Pi3B+.

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

                        I wanted to give another update about dosbox performance on the pi 4. I must have been mistaken about dosbox-sdl2, I cannot get decent performance using it. It's usable for undemanding titles but for late release dos titles it's not really up to the task. Currently I'm using dosbox-svn for all my games. The problem I have been having is that using output=overlay provides proper scaling but gives pretty poor performance. Output=surface is much more performant but doesn't support scaling, which means you end up with a nice fast dosbox but in a tiny little window. However I discovered that if I enable dispmanx, set output=surface and use windowed mode set to the resolution of my display I get a fullscreen image (albeit stretched) and much improved performance. Unfortunately dispmanx does hinder performance a little bit but it's still better than using output=overlay.

                        @nemo93 I had trouble building dosbox-staging. During the compilation process I kept getting an error saying it couldn't find "opusfile".

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

                          @quicksilver What games are you using as a benchmark ?

                          For the dosbox-staging compilation, you probably need libopus-dev and libopusfile-dev installed.

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

                            @mitu I'm mainly using tie fighter collectors CD-rom version. That game has an option to run 640x480 res during missions and it's very demanding. It's especially noticable when large ships and space stations are on screen. With output=overlay and tie fighter set to 640x480, the game can become a slide show if many ships/large ships are on screen. With output=surface performance is massively improved. I have also tested using Amazon Trail windows 3.1 version. There is a dissolve effect when the main menu comes up that seems to be really taxing. When output=overlay the dissolve effect takes a long time to finish. Output=surface and it's nearly instantaneous. Dispmanx does slow it down a little but it seems to be the only way to get output=surface fullscreen.

                            1 Reply Last reply Reply Quote 0
                            • G
                              Glaglachel @quicksilver
                              last edited by Glaglachel

                              @quicksilver I have exactly the same issue with the last 4.6 version on my RPI4 : with dispmanx enabled, the aspect parameter from the conf files is completely ignored.

                              I can also achieve a correct scale centered display when specifying the windowresolution but it means I have to configure output = overlay instead of output = surface and the final aspect is not really good, texts on games are readable but not as smooth as it is with my RPI3B+ with Retropie 4.4 (without any particular configuration compared to the default conf file).

                              I'm doing my test with my CD version of Heroes of Might & Magic.

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

                                @Glaglachel yes unfortunately dosbox doesn't behave the same way on the pi 4. Performance is actually better on my pi 3. Hopefully that can be fixed at some point because for now I cant find a perfect solution via the settings.

                                G 1 Reply Last reply Reply Quote 0
                                • G
                                  Glaglachel @quicksilver
                                  last edited by

                                  @quicksilver Let's hope so :) I've just rebuilt one RPI3B+ with the last retropie 4.6 and everything is working as expected with no need to use dispmanx and parameters in my conf file are the same than previous versions :

                                  fullscreen=false
                                  fulldouble=false
                                  fullresolution=original
                                  windowresolution=original
                                  output=surface

                                  aspect=false
                                  scaler=none

                                  R 1 Reply Last reply Reply Quote 0
                                  • R
                                    RetroJoe @Glaglachel
                                    last edited by

                                    @Glaglachel

                                    I'm using original Dosbox on my pi4
                                    Same as I used on pi3
                                    And all games I've tested so far approx 25 I had on pi3 are working great
                                    I do have the screen of center but no issues
                                    I tried the sdl2 version that was sluggish

                                    quicksilverQ G 2 Replies Last reply Reply Quote 0
                                    • quicksilverQ
                                      quicksilver @RetroJoe
                                      last edited by quicksilver

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

                                      And all games I've tested so far approx 25 I had on pi3 are working great

                                      I do have the screen of center but no issues

                                      You can change to fullscreen=false in the dosbox.conf file and it will center the display. Most undemanding games do work just fine on the pi 4, it's just the more demanding games that the difference is noticable.

                                      R 1 Reply Last reply Reply Quote 0
                                      • R
                                        RetroJoe @quicksilver
                                        last edited by RetroJoe

                                        @quicksilver
                                        That makes
                                        the screen tiny when loading and playing a dos game.

                                        I put back to true.

                                        Any other suggestions?
                                        Thanks

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

                                          @RetroJoe if you set it to fullscreen=false make sure that the window resolution setting is set to the resolution of your display.

                                          R 1 Reply Last reply Reply Quote 0
                                          • R
                                            RetroJoe @quicksilver
                                            last edited by

                                            @quicksilver thanks that fixed it 👍😁

                                            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.