Dosbox on pi 4, game window is fullscreen but not centered on screen
-
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.
-
dosbox-sdl2 gave me poor performance, even with games like arkanoid.
-
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?
-
@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.
-
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.
-
@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 = noneIt's a real bummer, since playing DOS games with improved graphics was one of the reasons for upgrading to the Pi 4.
-
Have the same issue too :\
-
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! :)
-
@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 = noneIt'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.
-
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#! /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 SECTIONand 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 = normal2xThanks Sim
-
@Simrose what specific game is causing you issues? Can you confirm that your TV is switching to 640x480 resolution?
-
Arkanoid is the one i tried.
With the other settings it all works fine for me.
Ill test if tv switches correctly. thanks
-
@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?
-
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 ESpermissions 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 -
@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)
-
@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 thatjoysticktype = 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.
-
@Simrose somehow I missed your response. Did you ever figure it out.
-
@quicksilver I never figured it out and started experimenting with other things. But I would love to get it working as you have.
-
@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.
-
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?
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.