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 22.6k 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.
    • 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
              • G
                Glaglachel @RetroJoe
                last edited by Glaglachel

                @RetroJoe Indeed, all my games are running too but not as good as on my RPI3. If I can have a good centered fullscreen ratio and keep output = surface, I will be happy

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

                  @Glaglachel makes sense I'm sure it will get improved in time. I'm just happy to play them still on pi4 for now.

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

                    I finally tested with dosbox-sdl2 and graphic result is quite good with default parameters in .conf file. Performance is maybe a little under dosbox but for now it is a good compromise :-) Need to be tested on longer game sessions.

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

                      dosbox-sdl2 gave me poor performance, even with games like arkanoid.

                      1 Reply Last reply Reply Quote 0
                      • P
                        ParadoxGBB
                        last edited by

                        Just wanted to chime in with my findings as well. Since setting up my pi4 I noticed the same thing --- the defaults overwrote dosbox-SVN.conf but overlay no longer seeems to respect placement, resolution, or scaling compared to the 3B.

                        I had success with the following settings for now:

                        fullscreen=false
                        windowresolution=1920x1080
                        frameskip=1
                        

                        I noticed particularly bad performance for fade in/out sequences --- the baseline testing program I was focused on tuning was Zoop. The frameskip in particular helped thread the needle between the resolution/scale and performance for me.

                        Anyone try experimenting with config.txt settings in the boot folder to see if anything in there is causing a problem?

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

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

                          Anyone try experimenting with config.txt settings in the boot folder to see if anything in there is causing a problem?

                          The issue is that the pi 4 uses different display drivers compared to previous pi models. If you scroll up a ways you'll see that mitu provided a basic explanation of the issue. At the moment there isn't anything we can do about it. I've tried every combination of settings to try to get past the scaling issue and unfortunately they all involve using output=overlay, which is just too demanding for 3d dos games. So for now I'm just playing those dos games on my pi 3.

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

                            So I started using raspi-config to set display res to 640x480, rebooting then playing my dosbox games using output=surface. It's the only way I can get it to work fullscreen and give the performance I'm looking for. Then if I want to play other emulators I revert back to 1080p. It's a very clunky way of doing it but for now it's all I can come up with. I wish there was a better way to switch video modes on the fly on the pi 4.

                            F 1 Reply Last reply Reply Quote 1
                            • F
                              fede999 @quicksilver
                              last edited by fede999

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

                              So I started using raspi-config to set display res to 640x480, rebooting then playing my dosbox games using output=surface. It's the only way I can get it to work fullscreen and give the performance I'm looking for. Then if I want to play other emulators I revert back to 1080p. It's a very clunky way of doing it but for now it's all I can come up with. I wish there was a better way to switch video modes on the fly on the pi 4.

                              I've got the same problem on my Pi 4 (my Pi3B+ works perfectly with default config) and it's the only way I've managed to play games with a correct aspect ratio.
                              However, I 've found it's not a "one size fits all" solution, as several games get a forced small window in the center or on the top of the screen, despite having the same config settings as other running full screen. What could it be?

                              Here's my dosbox config, I'm on a 1920x1080 tv:
                              fullscreen = true
                              fulldouble = false
                              fullresolution = original
                              windowresolution = original
                              output = overlay
                              autolock = true
                              sensitivity = 100
                              waitonerror = true
                              priority = higher,normal
                              mapperfile = mapper-SVN.map
                              usescancodes = false
                              frameskip = 0
                              aspect = true
                              scaler = none

                              It's a real bummer, since playing DOS games with improved graphics was one of the reasons for upgrading to the Pi 4.

                              quicksilverQ 1 Reply Last reply Reply Quote 0
                              • shavecatS
                                shavecat
                                last edited by

                                Have the same issue too :\

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

                                  This is my latest workaround for this issue. Youll need to create two scripts and place them in:/opt/retropie/configs/all/

                                  runcommand-onstart.sh:

                                  #! /usr/bin/env bash
                                  echo "Hello logfile - runcommand-onstart checking in here" >&2
                                  #START DOSBOX SECTION - SNIP CONTENTS IF PASTING INTO EXISTING SCRIPT
                                  if [ $2 = "dosbox" ]
                                  then
                                      echo "dosbox detected - changing video mode to 640x480@60hz" >&2
                                      tvservice -e "DMT 4"
                                  fi
                                  #END DOSBOX SECTION
                                  

                                  runcommand-onend.sh:

                                  #! /usr/bin/env bash
                                  echo "Hello logfile - runcommand-onend checking in here" >&2
                                  #START DOSBOX SECTION - SNIP HERE IF PASTING INTO EXISITNG SCRIPT
                                  if [ $2 = "dosbox" ]
                                  then
                                      echo "Reverting display back to preferred mode" >&2
                                      tvservice -p
                                  fi
                                  #END DOSBOX SECTION
                                  

                                  This script/hack will force 640x480 mode for Dosbox, so your TV will need to support that mode, otherwise modify the script to a mode your TV does support (as close to 640x480 as you can).

                                  For best performance in full-screen use these dosbox settings in conjunction with the above scripts:

                                  fullscreen = true
                                  fulldouble       = false
                                  fullresolution = original
                                  windowresolution = original
                                  output = surface
                                  autolock         = true
                                  sensitivity      = 100
                                  waitonerror      = true
                                  priority         = higher,normal
                                  usescancodes = false
                                  frameskip = 0
                                  aspect    = true
                                  scaler = normal2x
                                  

                                  These setting are working great for me and I can now run Tie Fighter Collectors CD-ROM edition in fullscreen with SVGA mode (gorgeous 640x480 resolution during gameplay) with absolutely no slow down. All 30 of the dos games I have on my pi are working good with these settings. I did have to lower the display res of windows 3.1 from 800x600 to 640x480 for my windows 3.1 games to display correctly.

                                  If you run into issues let me know! :)

                                  F G shavecatS 3 Replies Last reply Reply Quote 1
                                  • quicksilverQ
                                    quicksilver @fede999
                                    last edited by

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

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

                                    So I started using raspi-config to set display res to 640x480, rebooting then playing my dosbox games using output=surface. It's the only way I can get it to work fullscreen and give the performance I'm looking for. Then if I want to play other emulators I revert back to 1080p. It's a very clunky way of doing it but for now it's all I can come up with. I wish there was a better way to switch video modes on the fly on the pi 4.

                                    I've got the same problem on my Pi 4 (my Pi3B+ works perfectly with default config) and it's the only way I've managed to play games with a correct aspect ratio.
                                    However, I 've found it's not a "one size fits all" solution, as several games get a forced small window in the center or on the top of the screen, despite having the same config settings as other running full screen. What could it be?

                                    Here's my dosbox config, I'm on a 1920x1080 tv:
                                    fullscreen = true
                                    fulldouble = false
                                    fullresolution = original
                                    windowresolution = original
                                    output = overlay
                                    autolock = true
                                    sensitivity = 100
                                    waitonerror = true
                                    priority = higher,normal
                                    mapperfile = mapper-SVN.map
                                    usescancodes = false
                                    frameskip = 0
                                    aspect = true
                                    scaler = none

                                    It's a real bummer, since playing DOS games with improved graphics was one of the reasons for upgrading to the Pi 4.

                                    I would recommend trying the settings in my above post first as I think it will give you the best performance on the pi 4 (better than the pi 3!)

                                    However if you don't want to use that method for whatever reason then you'll need to change to these settings:

                                    fullscreen = false
                                    fulldouble       = false
                                    fullresolution = original
                                    windowresolution = 1920x1080
                                    output = overlay
                                    

                                    Just be aware that performance will still not be as good as your pi 3. So I'd encourage you to use my above method.

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

                                      I copied your settings exactly also, put scripts in correct place and changed dosbox settings to match yours and ended up with tiny screen in top left. The other settings using output overlay still work ok though.

                                      This is how mine looks maybe i missed something?
                                      I have a 2 files added in opt/retropie/configs/all
                                      called runcommand-onstart.sh
                                      with this code

                                      #! /usr/bin/env bash
                                      echo "Hello logfile - runcommand-onstart checking in here" >&2
                                      #START DOSBOX SECTION - SNIP CONTENTS IF PASTING INTO EXISTING SCRIPT
                                      if [ $2 = "dosbox" ]
                                      then
                                      echo "dosbox detected - changing video mode to 640x480@60hz" >&2
                                      tvservice -e "DMT 4"
                                      fi
                                      #END DOSBOX SECTION

                                      and
                                      runcommand-onend.sh

                                      #! /usr/bin/env bash
                                      echo "Hello logfile - runcommand-onend checking in here" >&2
                                      #START DOSBOX SECTION - SNIP HERE IF PASTING INTO EXISITNG SCRIPT
                                      if [ $2 = "dosbox" ]
                                      then
                                      echo "Reverting display back to preferred mode" >&2
                                      tvservice -p
                                      fi
                                      #END DOSBOX SECTION

                                      and edited dosbox-SVN.conf

                                      fullscreen = true
                                      fulldouble = false
                                      fullresolution = original
                                      windowresolution = original
                                      output = surface
                                      autolock = true
                                      sensitivity = 100
                                      waitonerror = true
                                      priority = higher,normal
                                      mapperfile = mapper-SVN.map
                                      usescancodes = false
                                      frameskip = 0
                                      aspect = true
                                      scaler = normal2x

                                      Thanks Sim

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

                                        @Simrose what specific game is causing you issues? Can you confirm that your TV is switching to 640x480 resolution?

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          Simrose @quicksilver
                                          last edited by

                                          @quicksilver

                                          Arkanoid is the one i tried.

                                          With the other settings it all works fine for me.

                                          Ill test if tv switches correctly. thanks

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

                                            @Simrose I suspect that your TV isn't switching to 640x480 mode. I just downloaded and tested arkanoid for dos using my settings and I get a fullscreen image. The fact that your seeing the game in a small window in the corner of the screen confirms it for me (at 640x480 display resolution, even if the games render resolution was very low it still shouldn't be a small window like that).

                                            Can you confirm what the permissions and ownership of the two scripts you created are? Also what type of display are you using?

                                            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.