Posts: 28
Joined: Sat Oct 14, 2017 1:44 am

4:3 screen ratio in DosBox

Fri Apr 13, 2018 1:49 am

I cannot find any info on how to fix the screen ratio on DosBox games on the Raspberry Pi. From what I can tell, everyone on the net running Dosbox on the Raspberry Pi is content with playing DosBox games stretched to widescreen and looking at fat stocky characters in their games because they're stretched too wide (every Raspberry Pi DosBox tutorial never mentions aspect ratio, and shows a final screenshot with the stretched widescreen image). I feel like I'm crazy here; no one wants to play the games at their correct aspect ratio?

I have a 800x480 5 inch display for my Raspberry Pi 3 project, and DosBox stretches to fill the width by default.
Currently I'm using Batocera as the "game browser OS" but happy to switch to the more traditional RetroPi if it helps. (It's just that Batocera starts up faster)
In Batocera, the dosbox config file is located in \share\system\configs\dosbox\dosbox.conf, and I can change it to a fixed resolution there, where it draws from the top left corner if I go smaller than the native resoultion, but changing "aspect" to "true" doesn't have any effect.

What's curious is the only "output" options in this version of Dosbox is (as listed in the conf file)
# Possible values: surface, texture, texturenb.
and I've never seen these options before so it must be specific to the Raspberry Pi version of Dosbox. Maybe they don't support aspect ratio correction.

I saw that there are some low level settings in the Raspberry pi config.txt where you can force a border / scaling on the HDMI output, but I couldn't get them to have an effect. With the default image of Batocera there is a config.txt at the top level folder, but I read it should be under boot\config.txt, so I copied it there - no luck either. I couldn't get any change. The settings I was using to get 4:3 on my 800x600 display;

Code: Select all


Posts: 28
Joined: Sat Oct 14, 2017 1:44 am

Re: 4:3 screen ratio in DosBox

Sat Apr 14, 2018 6:22 am

Does anyone know? I'm still searching for the answer and my own posts are coming up in my search results.

I have a 800x480 display and that's perfect if it could just render 640x480 it would be a pixel perfect image with the old 320x240 games scaled up by 2.

Posts: 16
Joined: Tue Jun 21, 2016 5:33 am

Re: 4:3 screen ratio in DosBox

Mon Apr 16, 2018 11:41 am

I just use a 4:3 12 inch monitor

Posts: 28
Joined: Sat Oct 14, 2017 1:44 am

Re: 4:3 screen ratio in DosBox

Fri Apr 27, 2018 4:36 am

Hah, not exactly a portable solution for my project. Sometimes it seems like no one is using these things for small scale projects, but I thought this was the biggest appeal?

The solution was to include the following text in the config.txt - then Dosbox is magically able to correct the aspect ratio. Dosbox is the only emulator that required this text - all the other emulators (that I tried) seemed to be able to do the correct aspect ratio without this;

Code: Select all

# uncomment if hdmi display is not detected and composite is being output
# uncomment to force a specific HDMI mode (here we are forcing 800x480!)
hdmi_cvt=800 480 60 6 0 0 0
Solution found here ... I-%28EN%29

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 6 guests