Hi!
Is there any way to make Dosbox run some games a little faster? I have Dosbox SVN version, that was specifically built for RPi. It came with Retropie installation.
It runs some games really well, like Stunts. But games like Daggerfall or Network Q Rac Rally Championship run very sluggish and dont seem to ever reach even 10 fps.
Is there some tricks for the config file? I've tried to tweak it but I'm not sure anything there helps.
I have been thinking would OpenGL render help with it, but since my Pi gets all weird when enabling the experimental drivers, I can't test it out.
Re: Speeding up Dosbox
YMMV, but I don't consider anything truly playable unless the framerate is at least 20FPS. That would require the "a little faster" to be at least twice the speed. Overclocking will help a little if you've not gone down that route already, but don't expect miracles.Akselmo wrote:Is there any way to make Dosbox run some games a little faster? ...games like Daggerfall or Network Q Rac Rally Championship run very sluggish and dont seem to ever reach even 10 fps.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.
Re: Speeding up Dosbox
I have overclocked my Pi to 1ghz with the Raspiconfig GUI thingy that can be found from the menu.GTR2Fan wrote:YMMV, but I don't consider anything truly playable unless the framerate is at least 20FPS. That would require the "a little faster" to be at least twice the speed. Overclocking will help a little if you've not gone down that route already, but don't expect miracles.Akselmo wrote:Is there any way to make Dosbox run some games a little faster? ...games like Daggerfall or Network Q Rac Rally Championship run very sluggish and dont seem to ever reach even 10 fps.
Now I am considering for getting Raspberry Pi 3 to see if it runs Dosbox any better, since I have Pi 2 at the moment.
Could anyone cool and friendly who gets Pi 3 try this out for me? Just seeing if Daggerfall is playable at all would be nice.
Re: Speeding up Dosbox
If you enable the dynamic recompiler for ARM, it's quite a bit faster.
Anyway, if you are using software scaling, that's whats eating up your CPU.
Use an SDL2 version (SDL 2.0.4 has perfect Pi support) or wait for keyboard in RetroArch to be fixed so you guys can use the libretro dosbox core with ARM dynarec: that would be the best way to run it, withot X of course.
Anyway, if you are using software scaling, that's whats eating up your CPU.
Use an SDL2 version (SDL 2.0.4 has perfect Pi support) or wait for keyboard in RetroArch to be fixed so you guys can use the libretro dosbox core with ARM dynarec: that would be the best way to run it, withot X of course.
Re: Speeding up Dosbox
I think the Retropie version is the one with dynamic recompiler? I'm not sure.Vanfanel wrote:If you enable the dynamic recompiler for ARM, it's quite a bit faster.
Use an SDL2 version (SDL 2.0.4 has perfect Pi support)
And where could I get this SDL2 version of Dosbox? Google tells me nothing, or I don't know how to search for it.
Re: Speeding up Dosbox
I have played around with this a lot.
Doom1 timedemo3 runs about 18fps in dosbox on an overclocked pi2 compiled to take advantage of everything and dynarec on.
I have a pi3 on the way and dosbox will be very high up on the list of things ill try out.
Doom1 timedemo3 runs about 18fps in dosbox on an overclocked pi2 compiled to take advantage of everything and dynarec on.
I have a pi3 on the way and dosbox will be very high up on the list of things ill try out.
Re: Speeding up Dosbox
Could you share the binary of your Dosbox? I mean, if it's that simple.. I'm a bit of a noob with linux.Zebu wrote:I have played around with this a lot.
Doom1 timedemo3 runs about 18fps in dosbox on an overclocked pi2 compiled to take advantage of everything and dynarec on.
I have a pi3 on the way and dosbox will be very high up on the list of things ill try out.
And please tell me when you have tried Dosbox on Pi3! I really want to hear how it performs compared to Pi 2.

Re: Speeding up Dosbox
The patch you need is here:Akselmo wrote:I think the Retropie version is the one with dynamic recompiler? I'm not sure.Vanfanel wrote:If you enable the dynamic recompiler for ARM, it's quite a bit faster.
Use an SDL2 version (SDL 2.0.4 has perfect Pi support)
And where could I get this SDL2 version of Dosbox? Google tells me nothing, or I don't know how to search for it.
http://www.vogons.org/viewtopic.php?t=34770
Go to the last pages for most recent version.
You caan apply it like this on the dosbox sources dir:
patch -p0 < ../dosbox_sdl2_20150713.diff
That will give you SDL2 support. NOTE you must have previously built and installed SDL 2.0.4 since it's not yet available on Raspbian repositories!
Then you can enable dynarec support by setting these like this in config.h:
#define C_DYNREC 1
#define C_TARGETCPU ARMV4LE
#define C_UNALIGNED_MEMORY 1
Then, set cpu type to dynamic in your .conf file, and you can easily aim for a 2000 cycles system without worrying about sound dropouts.

Re: Speeding up Dosbox
This all sounds very complicated to me but if/when I got time I'll give it a try! Thanks!Vanfanel wrote:The patch you need is here:Akselmo wrote:I think the Retropie version is the one with dynamic recompiler? I'm not sure.Vanfanel wrote:If you enable the dynamic recompiler for ARM, it's quite a bit faster.
Use an SDL2 version (SDL 2.0.4 has perfect Pi support)
And where could I get this SDL2 version of Dosbox? Google tells me nothing, or I don't know how to search for it.
http://www.vogons.org/viewtopic.php?t=34770
Go to the last pages for most recent version.
You caan apply it like this on the dosbox sources dir:
patch -p0 < ../dosbox_sdl2_20150713.diff
That will give you SDL2 support. NOTE you must have previously built and installed SDL 2.0.4 since it's not yet available on Raspbian repositories!
Then you can enable dynarec support by setting these like this in config.h:
#define C_DYNREC 1
#define C_TARGETCPU ARMV4LE
#define C_UNALIGNED_MEMORY 1
Then, set cpu type to dynamic in your .conf file, and you can easily aim for a 2000 cycles system without worrying about sound dropouts.
Re: Speeding up Dosbox
I finally got a chance to compile a copy of dosbox last night for the pi3, without even doing anything fancy or even putting in SDL2.
a Doom timedemo3 benchmark that would run about 18fps on a heavily overclocked pi2 runs about 30fps on a pi3 without any overclocking, stretched to full screen and with aspect ratio correction turned on.
a great result so early on, cant wait to build an SDL2 version and perhaps try openGL stretching with the new driver and some overclocking.
a Doom timedemo3 benchmark that would run about 18fps on a heavily overclocked pi2 runs about 30fps on a pi3 without any overclocking, stretched to full screen and with aspect ratio correction turned on.
a great result so early on, cant wait to build an SDL2 version and perhaps try openGL stretching with the new driver and some overclocking.
Re: Speeding up Dosbox
Oh nice! Thank you for informing me, I think Pi 3 will be much better for my DOS game emulator project then than Pi 2.Zebu wrote:I finally got a chance to compile a copy of dosbox last night for the pi3, without even doing anything fancy or even putting in SDL2.
a Doom timedemo3 benchmark that would run about 18fps on a heavily overclocked pi2 runs about 30fps on a pi3 without any overclocking, stretched to full screen and with aspect ratio correction turned on.
a great result so early on, cant wait to build an SDL2 version and perhaps try openGL stretching with the new driver and some overclocking.
Re: Speeding up Dosbox
Hey there!
I'm curious, are you able to play Doom in fullspeed?
I'm asking, because I've tried DosBox on the Pi3 and it runs like sh**.
Way toooooooo slow.
Cheers
I'm curious, are you able to play Doom in fullspeed?
I'm asking, because I've tried DosBox on the Pi3 and it runs like sh**.
Way toooooooo slow.
Cheers
Re: Speeding up Dosbox
Hi everyone !
I'm extremely looking forward to getting dosbox to work as well on my Pi 3. I saw there was a fork with pixel shaders and munt support :
https://github.com/duganchen/dosbox/blo ... CEMENTS.md
If would be absolutely awesome if someone could provide a step-by-step or a binary
I used to afford to take much time tweaking my distros, but I currently run out of time !
By the way, I also own an external MIDI synth (Sound Canvas). I guess it would enable to get a faster speed as well as a better sound...
Pixel shaders will help a lot too. It provides a HUGE gfx upgrade at no cost. Check out the "Happi Game Center" distribution and compare
BTW, is the X server compulsory ?
I'm extremely looking forward to getting dosbox to work as well on my Pi 3. I saw there was a fork with pixel shaders and munt support :
https://github.com/duganchen/dosbox/blo ... CEMENTS.md
If would be absolutely awesome if someone could provide a step-by-step or a binary

By the way, I also own an external MIDI synth (Sound Canvas). I guess it would enable to get a faster speed as well as a better sound...
Pixel shaders will help a lot too. It provides a HUGE gfx upgrade at no cost. Check out the "Happi Game Center" distribution and compare

BTW, is the X server compulsory ?
Re: Speeding up Dosbox
I just made this test :
I got this snapshot from the dosbox fork : https://github.com/duganchen/dosbox/releases
On my Happi Game Center distro, I unarchived it, did
./autogen.sh && ./configure && make
(after raising the /tmp size in /etc/fstab)
it built properly. I could start it from the shell. It seemed to work except keyboard keys were incorrect (when hiting a letter another one would be displayed). Also after hitting "ESC" my display would hang completely.Actually I noticed the keys were still in the right order but the first letters of the kbd start in the middle of it.
If someone could give it a try ! This fork seems very interesting
Edit : I have the very same problem when building dosbox SVN + the sdl2 patch provided above. I didn't build SDL as I already have the right version installed.
Edit : those issues do not occur when starting dosbox from the X server ! However display is very slow when using fullscreen / opengl. Maybe it would be faster without X so it would be great to find a workaround for the keyboard issue mentioned above
I guess it's slow b/c this disbox fork requires glew above of opengl3 while glew on raspi uses opengl es 2. If someone with a clue could enlighten me !
I got this snapshot from the dosbox fork : https://github.com/duganchen/dosbox/releases
On my Happi Game Center distro, I unarchived it, did
./autogen.sh && ./configure && make
(after raising the /tmp size in /etc/fstab)
it built properly. I could start it from the shell. It seemed to work except keyboard keys were incorrect (when hiting a letter another one would be displayed). Also after hitting "ESC" my display would hang completely.Actually I noticed the keys were still in the right order but the first letters of the kbd start in the middle of it.
If someone could give it a try ! This fork seems very interesting

Edit : I have the very same problem when building dosbox SVN + the sdl2 patch provided above. I didn't build SDL as I already have the right version installed.
Edit : those issues do not occur when starting dosbox from the X server ! However display is very slow when using fullscreen / opengl. Maybe it would be faster without X so it would be great to find a workaround for the keyboard issue mentioned above

I guess it's slow b/c this disbox fork requires glew above of opengl3 while glew on raspi uses opengl es 2. If someone with a clue could enlighten me !
Last edited by bidinou on Sat Apr 16, 2016 8:13 am, edited 1 time in total.
Re: Speeding up Dosbox
Hmm, I have another question ! I modified config.h as specified above but the dynamic core is not available. Any idea why, maybe another dependency ? Hmm, I'm pretty sure this is due to the architecture setting which doesn't fit the Pi 3 one. Probably I should put armv8-a instead.
Edit : just stumbled upon this, seems very interesting : viewtopic.php?f=78&t=110957
I wonder if the opengles patch with a scanline pixel shader effect can be applied. It would be awesome
Edit : vanfanel replied. This patch requires sdl1 so it's obsolete now sadly.
Edit : just stumbled upon this, seems very interesting : viewtopic.php?f=78&t=110957
I wonder if the opengles patch with a scanline pixel shader effect can be applied. It would be awesome

Edit : vanfanel replied. This patch requires sdl1 so it's obsolete now sadly.
Re: Speeding up Dosbox
Okay, I finally found a satisfying solution : using the dosbox build from the RetroPie project. Dynamic mode is enabled, no opengl output (only surface) but scalers work and display is fullscreen. The result is pretty good with the "tv2x" scaler (nice scanlines). There is tearing though (and enabling fullscreen + fulldouble makes it slow).
Re: Speeding up Dosbox
After a long search and a lot of tutorials i found the solution in setting the 'cycles' to 'max' in the default dosbox config file, which is my case is to be found in directory /home/pi/.dosbox/ . As long as i start dosbox as user pi the config in this directory will be loaded and then runs without any problem.
Another thing to think about is 'machine'. In the early nineties screens could do 'ega' at best, so setting it higher than that is not really useful. Besides that I have put the 'cputype' to '386' instead of 'auto'.
With these changes everything runs really smooth.
As last the audio was bugging/lagging and I solved that with a configuration line before starting dosbox:
$ sudo modprobe snd-bcm2835
$ sudo amixer cset numid=3 1
$ dosbox
Hope this helps.
Another thing to think about is 'machine'. In the early nineties screens could do 'ega' at best, so setting it higher than that is not really useful. Besides that I have put the 'cputype' to '386' instead of 'auto'.
With these changes everything runs really smooth.
As last the audio was bugging/lagging and I solved that with a configuration line before starting dosbox:
$ sudo modprobe snd-bcm2835
$ sudo amixer cset numid=3 1
$ dosbox
Hope this helps.
Re: Speeding up Dosbox
I had a computer with VGA in 1992. EGA was used more in the later half of the 80's.
-
- Posts: 46
- Joined: Sun Apr 26, 2015 10:18 am
- Location: Melbourne, Australia
Re: Speeding up Dosbox
I have cycles=max, cga (tried Eva) and surface output and Doom freezes just before the title screen.tim-raspi wrote:After a long search and a lot of tutorials i found the solution in setting the 'cycles' to 'max' in the default dosbox config file, which is my case is to be found in directory /home/pi/.dosbox/ . As long as i start dosbox as user pi the config in this directory will be loaded and then runs without any problem.
Another thing to think about is 'machine'. In the early nineties screens could do 'ega' at best, so setting it higher than that is not really useful. Besides that I have put the 'cputype' to '386' instead of 'auto'.
With these changes everything runs really smooth.
As last the audio was bugging/lagging and I solved that with a configuration line before starting dosbox:
$ sudo modprobe snd-bcm2835
$ sudo amixer cset numid=3 1
$ dosbox
Hope this helps.
Re: Speeding up Dosbox
I have never had an issue with the audio, just make sure the version you use is compiled for the pi3 with neon and etc support.
X slows it down a lot, and i always use surface output
some good speed gains can be had by some video tweaks though.
if your game is 320x200 and if you have a 1080p widescreen monitor then you can do the following.
make a custom HDMI mode for 720x400 and boot the pi at that
set dosbox to normal2x scaling and no aspect ratio correction.
let the monitor stretch it out to full screen, the black bars from the lack of aspect ratio correction will even it out pretty well.
its not as sharp an image as you could possibly get but it offloads a LOT of scaling burden from the CPU.
it does not work out that well for 640x480 resolution games but they are for the most part a bit too taxing for the pi anyway
X slows it down a lot, and i always use surface output
some good speed gains can be had by some video tweaks though.
if your game is 320x200 and if you have a 1080p widescreen monitor then you can do the following.
make a custom HDMI mode for 720x400 and boot the pi at that
set dosbox to normal2x scaling and no aspect ratio correction.
let the monitor stretch it out to full screen, the black bars from the lack of aspect ratio correction will even it out pretty well.
its not as sharp an image as you could possibly get but it offloads a LOT of scaling burden from the CPU.
it does not work out that well for 640x480 resolution games but they are for the most part a bit too taxing for the pi anyway
Re: Speeding up Dosbox
Cycles can bet set to Max 105%. It's going to be a bit faster, but not much.
I tried a few version and now i can see it clear. Under the PI3, Dosbox can emulate at best a low end 386. Which is funny because it emulates, my first time playing with Doom.... If you set it at low and a smal screen then it's get somewhat playable.
In the end to play games like Doom, Wolf3d, Quake, the best is to compile a sourceport.
I tried a few version and now i can see it clear. Under the PI3, Dosbox can emulate at best a low end 386. Which is funny because it emulates, my first time playing with Doom.... If you set it at low and a smal screen then it's get somewhat playable.
In the end to play games like Doom, Wolf3d, Quake, the best is to compile a sourceport.
Re: Speeding up Dosbox
Pi 3 with an overclock to 1400mhz and the right tweaks can play doom at 35fps which is the engine's max internal frame rate unless you are running a timedemo. Descent, Warcraft 2, wing commander 3 are all very playable. I even had dungeon keeper going the other day.
It's more fast 486 speed
It's more fast 486 speed