Dosbox on pi 4, game window is fullscreen but not centered on screen
-
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+.
-
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".
-
@quicksilver What games are you using as a benchmark ?
For the dosbox-staging compilation, you probably need
libopus-dev
andlibopusfile-dev
installed. -
@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.
-
@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.
-
@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.
-
@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=surfaceaspect=false
scaler=none -
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 -
@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.
-
@quicksilver
That makes
the screen tiny when loading and playing a dos game.I put back to true.
Any other suggestions?
Thanks -
@RetroJoe if you set it to fullscreen=false make sure that the window resolution setting is set to the resolution of your display.
-
@quicksilver thanks that fixed it 👍😁
-
@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
-
@Glaglachel makes sense I'm sure it will get improved in time. I'm just happy to play them still on pi4 for now.
-
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.
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.