DISCOVER
X

Some Configs to Increase DosBox Performance on Raspberry Pi

June 27, 2013 9:15 pm Leave your thoughts
FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

On the last post I talked about installing Ultima 7 from GOG.com, however the game was quite slow and I’ve been trying to find the optimum configurations. Here are some of the things that I did so far to increase the playability of some DOS games under DosBox. This is by no means the end of the tunnel of course, there are numerous other ways that I wanted to try including installing FastDosBox.

Install a Lighter Window Manager

window maker

The easiest way to run dosbox is of course under X and I also like the idea having to be able to run the DosBox  on a separate popup window so I can see the frame skip and cycle information as I tweaked the game. However, the included window manager in Raspbian, LXDE “feels” more resource consumptive. I suppose because LXDE is a more complete window manager very close to a desktop environment, in some ways it does rival Gnome and KDE.

Anyway, back to speeding up DosBox, I decided to install a minimalist window manager, the Window Maker.

Installation process was straight forward and window maker works straight away for me. It even has the handy terminal launcher on the desktop already.

So to install run:

After that, add an xsession file so that startx will start the Window Maker.

You can of course use VI or other text editors to create the file. Within the file simply type in the command below and save.

After that quit the text editor and run startx as usual, you’ll be greeted with the new window manager. If you ever want to revert back to lxde simply rename the .xsession file into .xsession_wmaker or something like that so you can use it some other time.

You can then run your DosBox games from within the Window Maker.

Edit the DosBox Configuration

DosBox by default emulates a full DOS machine including sound cards and other devices. There are of course some things that we don’t really need, so we should disable them to conserve our  limited resource. Below are the configurations based on each of the sections where optimisations are made. Of course below is not the full dosbox configurations, just the parts that made some differences in performance.

Notice that with the config above I have disabled all the non-essential hardware devices such as gus, joystick, speakers, etc. Those actually add up, providing extra hardware resources to use. I even disabled the scaler as I don’t need it, I can always lower the resolution of the Raspberry Pi to match the game resolution.

In addition to the above we will also increase the CPU cycle and add some frameskip to reduce the amount of graphics to render. Be sure to play with your cycle configuration similar to the way shown on our previous DosBox article.

Lastly, increase the priority of the DosBox process, using the priority key within the sdl section.

Shutdown Every Non-Essential Processes

I have MySql and Apache running in the background and although they are idle most of the time, they still consumes CPU cycle. Therefore I always shut them down before playing any DOS games. Be on the lookout for any process that may consume CPU cycle in the background, use the top command in the console to find out these processes.

Overclock

There are only so much that you can do to speed up DosBox using the configurations. In the end, it’s down to your physical CPU cycles to increase the emulation performance. So at last I braced myself and set the overclock to “turbo” using the raspi-config application. This results in the Raspberry Pi running at 1ghz. Playing the Ultima 7 after this change felt better. It’s not “native” fluid of course, but somewhat more playable as the “Avatar” now moves a bit faster.

Of course, we’ll have to be careful with any over-clocking especially when pressing the limit like this. Perhaps in the near future I will look at investing to some heatsink pack.

As usual, any comments and tips to share on optimising the DosBox performance on Raspberry Pi will be welcomed with open arms :)

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail
Tags: , ,

Categorised in: ,