Dosbox on pi 4, game window is fullscreen but not centered on screen
-
Running dosbox on my pi 4 there seems to be an issue in that the game window, while scaled correctly is aligned with the left side of my display. Same as reported here:
https://www.reddit.com/r/RetroPie/comments/flk5v5/when_i_try_to_run_dosbox_the_game_is_unscaled_is/Changing the aspect and window resolutions doesnt help to recenter the image.
Tested on my pi 4 running retropie 4.5.17. This doesnt occur on my pi 3.
-
Can you try an enable the
dispmanx
driver fordosbox
? It should easily configuratable fromConfiguration/Tools
. -
@mitu Sorry, I forgot to mention that I tried that. With dispmanx enabled it stretches the game area to fill the screen, so the aspect ratio is incorrect. Changing the aspect option in the dosbox configuration file doesnt help here either.
-
@quicksilver
You can try output surface with aspect on, but it looks like butt. I'll let you know if I find a better way.Actually there are other configurations that look worse.
-
Try changing
aspect = true
in thedosbox-SVN.conf
, it should scale the output better. -
@mitu you mean with dispmanx enabled too? I believe I already tried this but I will try again.
-
@quicksilver It doesn't matter if
dispmanx
is enabled. -
@mitu with dispmanx enabled or disabled the aspect option doesn't help to center the game window. The aspect ratio and scaling are correct it's just that the game window is aligned to the left of the screen. On the pi 3 it's centered properly.
-
What's your screen resolution ?
-
@mitu 1920x1080
-
Will need to test with this resolution, mine is 4:3. You can try fiddling with the
fullresolution
option in the cofiguration file and set it to 1920x1080. -
To get it to display properly scaled and centered I had to use these settings in my dosbox config:
fullscreen = false windowresolution = 1920x1080 aspect = true
-
Nice. I just moved my Pi4 to my 1080p screen and experienced the issue - though I haven't got time to fiddle with all the options yes.
-
@mitu Ive been noticing that dosbox performance on my pi 4 is actually worse than my pi 3 in some cases. On my pi 4 setting output=overlay is the only way to get the games scaled to fullscreen. Output=surface is more performant but will not scale on a pi 4 (the dosbox-svn.conf even states that scaling is not possible with output=surface). Yet output=surface is the default setting on my pi 3 and it's scaled perfectly. How did scaling work on previous pi models?
-
It has to do with the framebuffer video driver included in the
sdl1
library used bydosbox
. The PI4 has a different kind of driver (it's basically emulated on top of the DRM/KMS primary video plane) which doesn't support resolution changing, as in the previous PI models.
For the Pi3, the scaling might have worked with 2 methods - either thefbcon
SDL1 driver did the scaling to a resolution supported by the framebuffer, or the scaling was done by using the SDL1dispmanx
driver (PI specific). The former is not supported anymore on the Pi4, the latter works, but it's not 100% behaving the same as on a Pi3. -
Thanks for the explanation, I'll keep fiddling with the display settings to see if it makes any difference. For now though dosbox performance on the pi 4 is very poor compared to the pi 3, some of my games aren't even playable anymore. Dosbox-sdl2 is worse and lr-dosbox is worse still. I think I'll try with dispmanx turned on even though the aspect ratio is wrong I'm curious if it improves performance at all.
-
Update:
Did some testing, dispmanx doesn't improve performance. It actually makes it worse.
It's output=overlay that's slowing everything down. Output=surface and everything is way faster and responsive, unfortunately it doesn't allow scaling so we're stuck with a small game window.
Is there anyway to use runcommand to force a lower resolution video mode? I tried it and doesn't seem to work, so I would assume that's part of what's not functioning on the pi 4?
-
@quicksilver said in Dosbox on pi 4, game window is fullscreen but not centered on screen:
Is there anyway to use runcommand to force a lower resolution video mode? I tried it and doesn't seem to work, so I would assume that's part of what's not functioning on the pi 4?
It works for SDL2 based emulators, RetroArch or Xorg based programs. Given
dosbox
is SDL1 app, it might not work. -
@mitu that make sense why it isn't working then. I'll have to stick with using my pi3 for dos games for now in that case. Thanks again for the help.
-
Just an update for anyone following this thread.
I was able to get decent performance using dosbox-sdl2 by turning vsync off and using a lower resolution video mode in the runcommand menu. So it is a viable alternative for some games,(see post below)however it doesnt seem to support .mp3/.ogg audio format which quite a number of GOG games utilize. This results in a CD-ROM not inserted error.
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.