[DOSbox] official thread
few days ago I've discovered Dosbox on Retropie as I wanted to play some oldies from the good old DOS era. And... it's glorious! As everything with Retropie installation and setup were easy (thanks to the doc). I started to add more and more games as it worked so efficiently! Dosbox even comes with Gravis UltraSound emulation \o/
Of course I ran into somes issues (just a few) that I want to discuss below. Also I'd like to make this thread a central place of discussion to exchange tips and best practices on using Dosbox on Retropie/Raspberry Pi. I haven't seen such a thread but please correct me if I'm wrong.
First of all some docs and good places to start:
- doc from Retropie Wiki section. Contains everything you need.
- Vogons' forum which contains many guides and useful info.
- guide #1 or guide #2 to install Gravis UltraSound
- list of various Dosbox SVN builds from the official wiki which contains also the official docs and some tips.
- guide to install Win95. I haven't installed it myself but I'll give it a try just for my personal information.
- a site dedicated to the installation of other Windows releases.
- discussion about favorite DOS games from this forum in case you don't know what to play first!
- compatibility list from the docs (thanks to the people bringing us that list).
- compatibility list from Dosbox where you could usually get some good advices on how best to configure each game.
- on a PI3B+ I got like an equivalent of a good 486DX2 which is very decent enough and allows for many games to be playable. I guess this will be even better on PI4 but I won't speculate further without solid facts.
News and places to get specific Dosbox versions:
- official Dosbox SVN trunk.
- Dosbox "Dugan Chen" Github on which Dosbox-SDL2 is based on.
- Dosbox "Staging" Github.
- Dosbox "X" Github + details from this post below.
- DosBox ECE.
- Libretro "SVN" Github.
- Libretro "Core" Github and a discussion on this forum.
- news about Dosbox various forks and releases.
Known issues with specific games (using PI3B+/Retropie 4.5.14/standard Stretch/Dosbox versions compiled from source):
- thread to fix Human Machines Interface/HMI setup failed detection of GUS soundcard in some games (like Terminator Future Shock, Daggerfall, Whitchaven, etc).
- Carmageddon vertical stripes/lines. This is a known problem with the 64-bit version of DosBox (quote: "on non-x86 we emulate the fpu using doubles which are 64 bit."). DosBox's devs say that the solution is to use a 32-bit DosBox build. I am to replicate the issue on every versions: SDL1, SDL2 and "staging".
- Tomb Raider is crashing on the current SDL1 version straight from the start. Retropie Dosbox-SDL2 is doing slightly better as it's possible to get into the main menu but it will crash before loading the demo mode (do nothing for a short while on main menu and demo will load automatically) also it will crash/impossible to launch a game. No problem on Dosbox Staging yet it's important to set a value for the
cyclescount (eg. don't leave on
- Need for Speed SE video glitch, read here for a very interesting explanation. Also this wiki for a detailed fix.
- Theme Park (CD version) was a bit a pain to get working with sound. The best way was to start from a clean install and I've found out the default "sb16" driver/soundcard must be picked on the setup/install screen to have music+sfx (be sure it's enabled in your Dosbox config file).
- MDK might not launch properly as it detects a "too slow" device processor (I recall the game required quite a good machine to be playable back in the days). Adding more
- HDD size. In case a game does require a larger disk size please check the official doc or wiki. Note: Retropie's default (1024MB/1GB) should be more than enough for any games you might think of.
Issues I've faced with Retropie's Dosbox:
- there are many Dosbox versions available in Retropie. The "original" version (also known as "SVN") is based on SDL1 while other forks are relying on SDL2. I started with SVN from the "optional branch" and it gave good results. Yet I got heavy tearing (Rayman is a good example) and Tomb Raider crashed straight after the very first Eidos logo.
- after some research one option to fix tearing was to turn on dispmanx in Retropie setup. It does indeed fix tearing yet it decreased performance in few games (eg. Alone in the Dark, Wolf3D, Crusader, etc). So it was not good enough solution.
- I then stumbled upon Dosbox-SDL2 part of the experimental branch. It's based on Dugan Chen's Dosbox fork. This time no more tearing and even Tomb Raider is launching! Yet I need to do further testing as this SDL2 version might be slower than SDL1. It's also
perhapsless stable - confirmed - as I got more crashes with this current SDL2 implementation (eg. Crusader no regret does launch but crash before the main menu, Crusader no remorse runs way slower, Theme Hospital is crashing after the main menu, so does KKND, etc).
UPDATE: this might be related to the infamous DOS/4GW extender. Have a look here for a compatibility list and there for details about DOS/32A which is an alternative extender. Also to set a maximum amount of CPU cycles is a must to prevent any overload and crash.
- Eventually I ended up with Dosbox Staging which gave really good results. To the point it is now my default for anything DOS related. UPDATE: as of August 2021, Staging added quite a lot of performance improvements. On a stock pi4 (32bit OS) all games I've been testing with run now fullspeed (eg. Quake, Destruction Derby 2, Crusader No R). Higher resolutions (ie. SVGA) are a valid options now for games supporting those.*
Dosbox on Pi thanks to Retropie is absolutely brilliant and another fantastic surprise. To be able to play many good old gems on such a tiny machine is really great. Plus Dosbox is relatively easy to use and setup. If you haven't done so already please give it a try and post here in case of issue(s)! Feel free to share any tips to improve the experience :-)
I do confirm the SDL2 implementation is less stable and slower in some games. I'll revert back to SDL1 for now and cherry-pick the games which suffers from tearing to be assigned to SDL2. I'm also very interested in the other Dosbox implementations and I'll try to compile some to see how it goes. I'll report back here with any findings.
IceChes1 last edited by
Just wondering: can I run Qbasic from Retropie DOSBox?
@IceChes1 Qbasic should be able to run on ANYTHING with DOS compatibility. I've ran it on an Amiga 1200 with PC-Task, one of the slowest and featureless DOS emulators ever.
I had time yesterday to play a bit further with Dosbox-staging. It's a fine version running very well and smooth with same compatibility as the current Dosbox "SDL1" (I need to push testing though to confirm that statement in full). I could go further with Tomb Raider! Now game main menu and demo work ok even if I still can't start a game (crash right after the level1 video). This "staging" version supports SDL2 hence no tearing and overall good performance - similar to "SDL1". I consider moving to this version instead of "SDL2".
@psyke83 apologize to reach out like this hope you'd don't mind as I found your name in this PR. I'd like to have second opinion about "staging" and other Dosbox versions if possible. My objective is to have the best possible version (stable/best compatibility/ease of use) for RPI and to share as much knowledge about it. Thanks!
@nemo93 do you have a working build script for dosbox-staging? I was able to compile it on my pi4 but performance was absolutely terrible, which makes me think that I did something wrong.
- the recommended way:
$ git clone https://github.com/dosbox-staging/dosbox-staging.git $ cd dosbox-staging $ ./scripts/build.sh -c gcc -t release -m lto
- the "good old way":
$ git clone https://github.com/dosbox-staging/dosbox-staging.git $ cd dosbox-staging $ ./autogen.sh $ ./configure (./configure --help for a list of available options) $ make -j2
You can enable/disable some features if needed by passing a list of arguments at the
./configurestep. Also I consider you have dependencies already installed. To be sure you have all necessary packages:
sudo apt install libsdl2-2.0-0 libsdl2-net-2.0-0 libopusfile0
sudo apt install -y $(./scripts/list-build-dependencies.sh -m apt -c clang)
On a PI3B+ (stock) I really have decent performance in most games. Even Tomb Raider (when it works) runs at 15-20fps at medium settings. Rayman is fullspeed with no tearing. Same thing with many other "2D" games.
Which steps have you been through to compile yours? Also what game(s) are you testing with?
Hope this helps!
@nemo93 thanks for the reply, im trying this on my pi 4 to see if performance is better than dosbox-svn that is included with retropie. Because of the way the display drivers work on the pi 4, performance for dosbox has actually decreased compared to the pi 3. Haven't had any performance issues with dosbox-svn on my pi 3 (minus the tearing issues).
hey @quicksilver! I was willing to give you a nudge provided there were some improvements lately on the pi4 front with "dosbox-staging". I've updated wiki to share some hints especially for pi4 etc. I'd appreciate if you could give another try please? In short, you need to compile against the latest master and ensure you fine-tune each game mostly by setting a fixed amount of cycles. Failing to do so will have the game(s) run in "slideshow" mode. Still not perfect but I do have at least the same perf level as on pi3.
@nemo93 Im not sure I have as great a need for this as I once did. I have dosbox-svn running with great performance on my pi 4 now (much better than my pi 3). If there is a automated build script for this I would be happy to try it out but for now im pretty content with dosbox-svn.
@quicksilver Box86 is giving great performance for x86 Linux, and I finally got Bochs going (not easy) as well. Bochs is still a bit slow with Win98 and XP, but you CAN install things into the virtual machines and then grab any assets you need from those installs.
shaun57 last edited by
Hoping one of you DOSBox experts might be able to help..
I'm struggling to get any of my flight sims (F-117A, F19 etc) to recognise my Thrustmaster USB joystick when it's configured as JS1.
The problem is that I really need my arcade cabinet controller PCB to be JS0 for other systems, and when I plug in the Thrustmaster after the PI is booted it is assigned as JS1.
I've tried the joysticktype "axis4_2" option in the .conf file which is documented as "supports one joystick, second joystick used" and, according to runcommand.log, that does indeed pass the Thrustmaster (JS1) to DOSBox, but when the game is launched the joystick is still inaccessable.
I can get round this by using auto or axis4 and plugging in the Thrustmaster USB BEFORE I boot the PI, in which case it's assigned as JS0 and then works perfectly in the games.
Am I missing something ?
If I'm not then the ideal solution for me would be if I could temporarily swap the controller PCB and Thrustmaster JS values (JS0->JS1 and JS1->JS0) in the .sh or .conf file and then revert back when the game exits. I'm no Linux expert though so no idea if that's possible ?
@shaun57 maybe this would help? https://github.com/meleu/RetroPie-joystick-selection
shaun57 last edited by
@quicksilver thanks I'll have a look at that
Though on closer look that may be only for retroarch emulators...
@VictimRLSH performance is very poor last I tried it out, even on the pi 4.
@VictimRLSH performance is very poor last I tried it out, even on the pi 4.
I've noticed that DOSbox on the Pi 4 is a let down in general and in many cases worse than a 3B+. Once I get more skilled in compiling and learn a few more tricks and I can try recompiling it to see if I get better performance than what has been packaged. I've noticed with Bochs it works a bit better if you compile it yourself instead of just install the package from the repository. Bochs is too slow to run games at all really, BUT is a great way to get a Windows game installed so you can mine the assets for ports.
quicksilver last edited by quicksilver
@VictimRLSH I have another thread around here somewhere with a method to improve dosbox performance on the pi 4. Once you make the proper changes, performance is better than on a pi 3. I'll try to find the thread and post the link when I have a sec.
Quick update given dosbox-staging keeps on adding features amidst other improvements. The upcoming 0.76.0 release will bring major GUS (Gravis UltraSound) improvements as well as other audio refinements.
0.75.1 is only a small release squashing few bugs (see release note) as well as other small changes:
- Add support for binding more controller axes
- 64-bit Windows builds
- Log base memory address (for Cheat Engine)
Also on the pi3/pi4 front especially, there's a dedicated branch with a scheduler-like addition allowing to unleash the number of allowed cycles on a stock pi4 for instance. Games like Fade to Black runs at full speed at higher resolution. Many other games run at fullspeed (or close to that) now.