Dosbox on pi 4, game window is fullscreen but not centered on screen
-
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. -
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
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.