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 21.7k 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 @fede999
      last edited by

      @fede999 Yes I am using a wireless xbox360 controller exclusively. Are you launching your game via a custom .conf file? If not, you should be :) If so, then make sure that under the [joystick] section that

      joysticktype  = 2axis
      timed         = false
      

      I also used the dosbox key mapper (cntrl+f1) to map all the important controls to my xbox360 controller. That way I dont need to use the mouse and keyboard at all.

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

        @Simrose somehow I missed your response. Did you ever figure it out.

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

          @quicksilver I never figured it out and started experimenting with other things. But I would love to get it working as you have.

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

            @Simrose does your TV remote have a button labeled "display" or something similar? My Vizio TV has this, and when pressed it shows the current input selected and the current resolution. Then you can launch a dos game and check to see what resolution it's running in.

            A few other things to check. Can you launch a dos game then exit the game. Then go to /dev/shm/runcommand.log and post the contents of that file here?

            Also you might try looking up your exact Samsung TV model and see if you can get a list of supported resolutions. Perhaps we are requesting a resolution that your TV doesn't support.

            CrushC 1 Reply Last reply Reply Quote 0
            • CrushC
              Crush @quicksilver
              last edited by

              Great thread, this answers pretty much all the questions i had on this subject really.
              But is this an issue that is being worked on to resolve or is it just incompatible with the PI4 drivers and that's the end of story?

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

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

                But is this an issue that is being worked on to resolve or is it just incompatible with the PI4 drivers and that's the end of story?

                Not much can be done I'm afraid. It doesn't sound like much development is happening on the fkms drivers. But it's possible this isn't an issue on the full kms drivers. Kms seems to be what the rpi devs are focused on right now.

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

                  @quicksilver Very nice workaround, it takes just some time for my projector to adapt the display resolution but as it is automatic, fine for me :-) Thanks !

                  I even had to slow some games... :-D

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

                    @quicksilver
                    The resoltion on tv info says 1920x1080p
                    so that must be the issue that its not switching and the scripts not activated.
                    i have them in correct location, do i need to do anything with them before running games.
                    Sorry took along time to respond
                    Thanks
                    Sim

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

                      @Simrose try this: drop to the command line (press f4 if youre in emulation station) and type

                      tvservice -m DMT
                      

                      Post the output here.

                      Also do

                      tvservice -m CEA
                      

                      And post the output here

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

                        @quicksilver !
                        screenshot

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

                          @Simrose Ok, so now we know that your TV should support DMT mode 4. Can you verify that your runcommand-onend.sh and runcommand-onstart.sh are named correctly? Can you verify that they are located at /opt/retropie/configs/all/? Can you post the content of each file?

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

                            @quicksilver

                            location
                            runcommand-onend.sh contains
                            #! /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
                            runcommand-onstart.sh file contanins
                            #! /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

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

                              @Simrose in the start script try changing

                              tvservice -e "DMT 4"
                              

                              to

                              tvservice -e "CEA 1"
                              

                              also, can you run a dosbox game, quit the game. Then post the contents of
                              /dev/shm/runcommand.log?

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

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

                                CEA 1

                                /opt/retropie/configs/all/runcommand-onstart.sh: line 10: syntax error: unexpected end of file
                                Parameters:
                                Executing: bash /home/pi/RetroPie/roms/pc/+Start\ DOSBox.sh "/home/pi/RetroPie/roms/pc/arkanoid.conf"
                                /etc/timidity/fluidr3_gm.cfg: No such file or directory
                                timidity: Error reading configuration file.
                                Please check /etc/timidity/timidity.cfg
                                DOSBox version SVN
                                Copyright 2002-2019 DOSBox Team, published under GNU GPL.

                                CONFIG: Loading primary settings from config file /home/pi/.dosbox/dosbox-SVN.conf
                                CONFIG: Loading additional settings from config file /home/pi/RetroPie/roms/pc/arkanoid.conf
                                ALSA:Client initialised [128:0]
                                MIDI: Opened device:alsa
                                Two or more joysticks reported, initializing with 2axis
                                Using joystick Wireless Controller with 6 axes, 13 buttons and 1 hat(s)
                                Using joystick Wireless Controller with 6 axes, 13 buttons and 1 hat(s)
                                timidity: no process found
                                /opt/retropie/configs/all/runcommand-onend.sh: line 10: syntax error: unexpected end of file

                                I tried both modes DMT 4, CEA 1
                                still the same.
                                Thanks
                                Sim

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

                                  Something is wrong with the formatting of your scripts. I suspect you have windows style line endings instead of Unix style. Delete your scripts and download and just use mine exactly as they are.

                                  https://mega.nz/folder/ddJTWKaZ#JQV_WCprVMAP77qRnlGmEg

                                  In the future when you write a script that is intended to be used on a Linux machine, make sure you use a program like notepad++ with formating set to Unix.

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

                                    @quicksilver

                                    Thanks I'm just waiting to get a chance to try and will let you know. I was using notepad ++ but didn't change format thanks for the tip. I never experimented with them before.
                                    Sim

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

                                      @quicksilver I am using your scripts and still no good. I can see the script message now and the game does play but the video is small in top left and rest of the screen is a graphical mess. I have no idea why. I really want to get it working.
                                      Thanks Sim

                                      Hello logfile - runcommand-onstart checking in here
                                      dosbox detected - changing video mode to 640x480@60hz
                                      Parameters:
                                      Executing: bash /home/pi/RetroPie/roms/pc/+Start\ DOSBox.sh "/home/pi/RetroPie/roms/pc/arkanoid.conf"
                                      /etc/timidity/fluidr3_gm.cfg: No such file or directory
                                      timidity: Error reading configuration file.
                                      Please check /etc/timidity/timidity.cfg
                                      DOSBox version SVN
                                      Copyright 2002-2019 DOSBox Team, published under GNU GPL.

                                      CONFIG: Loading primary settings from config file /home/pi/.dosbox/dosbox-SVN.conf
                                      CONFIG: Loading additional settings from config file /home/pi/RetroPie/roms/pc/arkanoid.conf
                                      ALSA:Client initialised [128:0]
                                      MIDI: Opened device:alsa
                                      One joystick reported, initializing with 4axis
                                      Using joystick Wireless Controller with 6 axes, 13 buttons and 1 hat(s)
                                      timidity: no process found
                                      Hello logfile - runcommand-onend checking in here
                                      Reverting display back to preferred mode

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

                                        @Simrose are you using these settings in your arkanoid.conf?

                                        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
                                        

                                        Also when you post code or configs here on the forums put them in a code block by placing three back ticks (```) above your code and three below it. The back ticks should be on their own lines.

                                        Also when was the last time you updated dosbox?

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

                                          @quicksilver

                                          No I just thought that we just had to change the Dosbox svn like you have it above.

                                          I just updated from source I'll try again then after that I'll try changing the Conf settings for the actual game.

                                          Is that what I should of done before?

                                          Should i keep in dosbox-SVN.conf
                                          fullscreen = true
                                          fulldouble = false
                                          fullresolution = desktop
                                          windowresolution = original
                                          output = overlay
                                          autolock = true
                                          sensitivity = 100
                                          waitonerror = true
                                          priority = higher,normal
                                          mapperfile = mapper-SVN.map
                                          usescancodes = false
                                          frameskip = 0
                                          aspect = true
                                          scaler = normal2x
                                          Or should i restore that file to default and just change in arkanoid.conf

                                          Sorry
                                          Sim

                                          Edit
                                          I added those above values to the arkanoid.conf and now the screen is much to large and doesnt fit into my resolution.

                                          The game runs but i would esitmate the top left corner of the game fills the whole screen.
                                          thanks
                                          Sim

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

                                            @Simrose try to restore the default dosbox-svn.conf to default and just change those settings in the arkanoid.conf.

                                            I can post the default settings if needed. Or delete the dosbox-svn.conf right before updating dosbox and it should get replaced.

                                            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.