DOSBox Display Fix: Blur, Stretching, Choppy Motion
In this article
To fix blur, stretching, and choppy motion in DOSBox, set the output mode to opengl or ddraw in the configuration file, adjust the scaler to normal or none to avoid blur, set aspect=true to correct stretching, and increase the CPU cycles with cycles=auto or a fixed value to smooth motion. These changes address the most common display issues users encounter when running classic DOS games.
Understanding DOSBox Display Output
DOSBox renders games originally designed for low resolutions like 320x200. On modern monitors, this low-resolution output must be scaled up, and the method used determines whether the image appears sharp or blurry. The output setting in the [sdl] section of dosbox.conf controls the rendering backend. Common options include surface, ddraw, opengl, and openglnb (no bilinear filtering). Each has trade-offs in performance and image quality. The scaler setting then applies a scaling algorithm to the image before it reaches the screen. Scalers like normal, hq2x, advmame2x, and none produce different visual results, from pixel-perfect to smoothed.
Fixing Blurry Graphics
Blur usually comes from bilinear filtering or aggressive scalers. To eliminate blur, use output=openglnb (the "nb" stands for no bilinear) or output=ddraw with scaler=none. The openglnb backend disables the smoothing that OpenGL normally applies, giving crisp pixels. If you prefer a slightly softened look, output=opengl with scaler=normal can work, but for maximum sharpness, avoid any scaler that interpolates pixels. Also ensure fullscreen=true and aspect=true are set if you want the game to fill the screen without distortion. Note that some games use 320x200 resolution, which has a non-square pixel aspect ratio; setting aspect=true corrects this by stretching the image vertically to the correct 4:3 ratio, which can make the image appear less blurry because pixels are mapped more accurately.
Correcting Stretching and Aspect Ratio
Stretching occurs when the game's original aspect ratio is not preserved. DOS games typically used a 4:3 display ratio, but the internal resolution might be 320x200, which is 16:10. If you force the game to fill a widescreen monitor without aspect correction, it will look stretched horizontally. The aspect=true setting in DOSBox forces the output to maintain the correct 4:3 aspect ratio, adding black bars on the sides of widescreen displays. Alternatively, you can set aspect=false and manually adjust the window size, but aspect=true is the simplest fix. Also check the windowresolution setting; if you run in a window, set it to a multiple of the game's resolution (e.g., windowresolution=1024x768 for a 4:3 window) to avoid scaling artifacts.
Reducing Choppy Motion
Choppy motion in DOSBox is often caused by insufficient CPU cycles, meaning the emulated CPU is too slow to run the game smoothly. The cycles setting in the [cpu] section controls how many instructions DOSBox attempts to execute per millisecond. Setting cycles=auto lets DOSBox adjust automatically, but for demanding games you may need to set a fixed value like cycles=10000 or higher. You can also use cycles=max to run as fast as possible, though this can cause games to run too quickly. To find the right value, start with auto and if motion is still choppy, increase gradually. Another cause of choppiness is the frameskip setting; setting frameskip=0 ensures every frame is rendered, but if performance is poor, a small frameskip (e.g., 1 or 2) can help. Also, ensure output=ddraw or opengl for hardware acceleration; surface is software-based and can be slower.
Configuring DOSBox Settings
To apply these changes, edit the DOSBox configuration file. The file is typically named dosbox.conf and located in the DOSBox installation directory or in the user's profile folder. You can also use the DOSBox command line to set options temporarily. Here are the key settings to adjust:
- output: Set to
opengl,openglnb, orddrawfor hardware acceleration and better performance. - fullscreen: Set to
trueto run in full screen, which often reduces scaling artifacts. - aspect: Set to
trueto maintain correct 4:3 aspect ratio and prevent stretching. - scaler: Set to
noneornormalto avoid blur; advanced scalers likehq2xcan smooth but may blur. - cycles: Set to
autoor a fixed value (e.g.,10000) to improve performance and reduce choppiness. - frameskip: Set to
0for smooth rendering, or higher if needed.
After editing, save the file and restart DOSBox. You can also use the config command within DOSBox to write the current settings to a file.
Common Problems and Solutions
Even with correct settings, issues can arise. Here are some common problems and fixes:
- Game runs too fast or too slow: Adjust
cycles. Usecycles=autofirst, then try fixed values. Some games need specific cycle counts; consult the game's documentation. - Screen flickers or tears: Try a different
outputmode.opengloften reduces tearing compared tosurface. - Black bars on sides: This is normal with
aspect=trueon widescreen monitors. If you prefer stretching, setaspect=false, but the image will be distorted. - Mouse not working correctly: Ensure
mouseis enabled and consider usingautolock=trueto capture the mouse. - Sound stutters: Choppy motion can be related to sound buffer settings. Adjust
blocksizeandprebufferin the[mixer]section.
Comparing Output Modes and Scalers
Choosing the right output and scaler depends on your priorities. surface is the simplest but slowest and lacks hardware acceleration. ddraw uses DirectDraw and works well on Windows, offering good performance. opengl provides hardware acceleration and works across platforms, but applies bilinear filtering by default, which can blur. openglnb disables that filtering for sharp pixels. For scalers, none gives a pixel-perfect but small image; normal stretches without smoothing; hq2x and advmame2x smooth edges but can blur text and fine details. For most users, output=openglnb with scaler=none and aspect=true provides the best balance of sharpness and correct proportions.
Frequently Asked Questions
Why is my DOSBox game blurry?
Blur is typically caused by bilinear filtering in the OpenGL output or by using a smoothing scaler. Set output=openglnb and scaler=none to get sharp pixels.
How do I stop DOSBox from stretching the screen?
Set aspect=true in the configuration file. This maintains the original 4:3 aspect ratio, adding black bars on widescreen monitors instead of stretching the image.
Why is my DOSBox game choppy?
Choppy motion is usually due to insufficient CPU cycles. Increase the cycles setting (e.g., cycles=auto or a higher fixed value) and ensure frameskip=0 for smooth rendering.
What is the best output setting for DOSBox?
For most modern systems, output=openglnb offers sharp graphics and good performance. ddraw is a good alternative on Windows. Avoid surface unless you have compatibility issues.
Can I change DOSBox settings without editing the config file?
Yes, you can use the config command within DOSBox to change settings temporarily, or use command-line parameters like -output openglnb when launching DOSBox.
Why does my game run too fast after fixing choppiness?
If you set cycles=max or a very high value, the game may run faster than intended. Use cycles=auto or a fixed value that matches the game's requirements, and adjust downward if needed.