• 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

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.2k 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.
  • S
    Simrose
    last edited by Simrose 25 May 2020, 14:57

    @quicksilver

    I am just waiting to test again as others are using the tv i need.

    Its a 4k uhd samsung display but i am using in my boot config file
    hdmi_group=1
    hdmi_mode=16
    as recommended on here to use 1080p
    my info on control shows 1080p
    within ES

    permissions for the script i transferred over with winscp as pi user and its on pi and they show owner pi

    I follow a rule im not sure if right or wrong when i transfer any changes check first what the owner is for files mostly in that folder and stick to the same.

    e.g. in my configs\all they are all owner pi user

    dosbox-SVN.conf is pi user which was default

    the only one from memory i transfer over with root user is es_systems.cfg changes or emulators.

    thanks
    sim

    Q 1 Reply Last reply 2 Jun 2020, 00:14 Reply Quote 0
    • F
      fede999 @quicksilver
      last edited by fede999 6 Jan 2020, 20:27 1 Jun 2020, 19:27

      @quicksilver seeing that we are running the same game (TIE Fighter Collector's Edition), did you manage to play it wth a joypad?

      I have a Xbox 360 knockoff and it seems to calibrate just fine, but for some reason it will only move left and up once ingame. Is there any kind of driver I have to install?

      I have the same problem with other games from the same period (Fifa 96, NBA Live 95, for example)

      Q 1 Reply Last reply 1 Jun 2020, 19:41 Reply Quote 0
      • Q
        quicksilver @fede999
        last edited by 1 Jun 2020, 19:41

        @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
        • Q
          quicksilver @Simrose
          last edited by 2 Jun 2020, 00:14

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

          1 Reply Last reply Reply Quote 0
          • S
            Simrose
            last edited by 2 Jun 2020, 14:19

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

            Q 1 Reply Last reply 2 Jun 2020, 14:36 Reply Quote 0
            • Q
              quicksilver @Simrose
              last edited by quicksilver 6 Feb 2020, 15:40 2 Jun 2020, 14:36

              @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.

              C 1 Reply Last reply 3 Jun 2020, 18:10 Reply Quote 0
              • C
                Crush @quicksilver
                last edited by 3 Jun 2020, 18:10

                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?

                Q 1 Reply Last reply 3 Jun 2020, 18:27 Reply Quote 0
                • Q
                  quicksilver @Crush
                  last edited by 3 Jun 2020, 18:27

                  @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 5 Jun 2020, 17:16

                    @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 6 Jun 2020, 14:47 6 Jun 2020, 13:46

                      @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

                      Q 1 Reply Last reply 6 Jun 2020, 14:10 Reply Quote 0
                      • Q
                        quicksilver @Simrose
                        last edited by quicksilver 6 Jun 2020, 15:14 6 Jun 2020, 14:10

                        @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 6 Jun 2020, 14:47 Reply Quote 0
                        • S
                          Simrose @quicksilver
                          last edited by Simrose 6 Jun 2020, 15:47 6 Jun 2020, 14:47

                          @quicksilver !
                          screenshot

                          Q 1 Reply Last reply 6 Jun 2020, 14:54 Reply Quote 0
                          • Q
                            quicksilver @Simrose
                            last edited by quicksilver 6 Jun 2020, 16:00 6 Jun 2020, 14:54

                            @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 6 Jun 2020, 15:08 Reply Quote 0
                            • S
                              Simrose @quicksilver
                              last edited by Simrose 6 Jun 2020, 16:12 6 Jun 2020, 15:08

                              @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

                              Q 1 Reply Last reply 6 Jun 2020, 15:42 Reply Quote 0
                              • Q
                                quicksilver @Simrose
                                last edited by 6 Jun 2020, 15:42

                                @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 6 Jun 2020, 17:35 6 Jun 2020, 16:13

                                  @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
                                  • Q
                                    quicksilver
                                    last edited by quicksilver 6 Jun 2020, 17:53 6 Jun 2020, 16:36

                                    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 6 Jun 2020, 18:30 Reply Quote 0
                                    • S
                                      Simrose @quicksilver
                                      last edited by 6 Jun 2020, 18:30

                                      @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 6 Jun 2020, 22:53 6 Jun 2020, 21:50

                                        @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

                                        Q 1 Reply Last reply 6 Jun 2020, 22:38 Reply Quote 0
                                        • Q
                                          quicksilver @Simrose
                                          last edited by quicksilver 6 Jun 2020, 23:52 6 Jun 2020, 22:38

                                          @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 7 Jun 2020, 10:41 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.

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