Improve default Dosbox graphics
By default, Dosbox doesn't provide the best graphics settings for nowadays monitors.
To get best results, need .conf file with something like this:
[sdl]
fullscreen=true
output=overlay
fullresolution=desktop
This would allow native monitor resolution in fullscreen, with high-quality pixel-precision scaler (scaler=normal2x
by default).
output=overlay
looks optimal since default output=surface doesn't support scaling, and output=opengl applies anti-aliasing on output which makes picture even worse since it looks blurry.
This could be implemented by following:
- at build time, copy the default
dosbox.conf
file with above content to package's$PATH_GAME
directory, if there is no one. This .conf will be applied automatically on game start. - at run time, implicitly add "dosbox.conf" to CONFIG_FILES variable. It would allow the default .conf to be edited by user if needed.
- the games can overwrite the default by putting their own
dosbox.conf
file to$PATH_GAME
directory from their play-*.sh installation scripts
Overwriting default DOSBox config
Sample default DOSBox config overwriting in game's play-*.sh installation script:
- variant 1
. "$PLAYIT_LIB2"
extract_data_from "$SOURCE_ARCHIVE"
for PKG in $PACKAGES_LIST; do
organize_data "GAME_${PKG#PKG_}" "$PATH_GAME"
done
+cat > "$PKG_DATA_PATH/$PATH_GAME/dosbox.conf" <<- EOF
+# This is a perfect fine-tuned DOSBox config for the Game!
+EOF
- variant 2
ARCHIVE_GAME_DATA_PATH='app'
-ARCHIVE_GAME_DATA_FILES='./*.hqr ./*.ile ./*.obl ./drivers ./lba2.cfg ./lba2.dat ./lba2.dos ./lba2.gog ./lba2.ogg ./save ./setsound.bat ./vox'
+ARCHIVE_GAME_DATA_FILES='./*.hqr ./*.ile ./*.obl ./drivers ./lba2.cfg ./lba2.dat ./lba2.dos ./lba2.gog ./lba2.ogg ./save ./setsound.bat ./vox dosbox.conf'
. "$PLAYIT_LIB2"
extract_data_from "$SOURCE_ARCHIVE"
+cat > "$PLAYIT_WORKDIR/gamedata/$ARCHIVE_GAME_DATA_PATH/dosbox.conf" <<- EOF
+# This is a perfect fine-tuned DOSBox config for the Game!
+EOF
Both variants will work.
Actually, dosbox.conf could be placed to any package instead of PKG_DATA.