DOSBox performance

IRIX and IRIX software discussion including open source and commerical offerings.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

DOSBox performance

Unread postby necron2600 » Mon Nov 21, 2016 2:26 pm

Its so slow.. is it just me or is everyone on an SGI box having slow performance with DOSBox? (or no one tries to run DOS on an SGI anymore?). Granted, 80s games work well for the most part.

I researched tweaks.. output of opengl or surface, priority=higher,normal, frameskip=8, cpu core=simple, cycles=540 (600mhz Octane2), sound rate to 11025, etc..

I am using DOSBox-0.71_MIPS-4_IRIX65.tar.gz from ElChupanibre at:
viewtopic.php?t=10361&start=30

I have tried to compile DOSBox myself but never able to mount anything .. as that link above details some of that mount class issue.

Is there another dosbox build floating around that is not easy to search for in nekochan/google that may run better?

In comparison.. AMIGA emulation via E-UAE is blazing fast.
As a test. The Dune 2 Game.. very sluggish in Dosbox. but just right in E-UAE. Other than the routine floppy swapping of, its not bad.. except a lot of games and apps are avail in DOS.

User avatar
ClassicHasClass
Donor
Donor
Posts: 2091
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: DOSBox performance

Unread postby ClassicHasClass » Tue Nov 22, 2016 7:25 am

DOSBox isn't super flash on Power Macs either. I'd thought about rewriting the core in PPC assembly.
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

User avatar
jirka
Donor
Donor
Posts: 210
Joined: Tue May 04, 2004 7:55 am
Location: Czech Republic
Contact:

Re: DOSBox performance

Unread postby jirka » Tue Nov 22, 2016 10:32 am

Isn't the DOSbox slow by design? Even on the PC-compatible computers? If I remember correctly it was very slow on my 1+ GHz AMD Athlon, too. And yes, it is not fast on my O2 (R10k/250). ;-)
:O2: :O2: :1600SW: :1600SW: :Indy: :Indy: :Indigo: :Indigo:

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Wed Nov 23, 2016 4:09 am

Well, DOSBox is designed to emulate a slowish PC (speed of the emulated PC can be adjusted). The issue with it is that it seems to require a pretty inordinate amount of power to emulate such a slow PC.
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Sun Nov 27, 2016 5:35 pm

Does anyone have a logical explanation for why newer SGI hardware runs dosbox extremely slower (at least for me) than vintage SUN hardware using the same dosbox config?

I can play DOSBOX better on a vintage SUN Ultra2 with 400mhz UltraSPARC than an SGI Octane2 with 600mhz (both with gobs of RAM and same SCA hard disk model too)
Same exact dosbox.conf and games (Dune2 as the example), just using dosbox 0.73 from Sun Freeware.. runs nearly flawlessly.

Granted, it was slow when the cpu cycles were set to 400 on the SUN.. but when I set to ~2000 it worked very well. Maybe IRIX' dosbox has the same problem with cpu cycles?.. but in all my attempts to adjust cpu cycles up and down still leads to extremely poor usability.

It does seems the person (elchupanibre) who compiled DOSBox for IRIX earlier and posted on nekochan forums with the binary did not detail what was done to get the drive mounting (C:) feature working for IRIX (dosbox 0.71 and 0.74 can compile on IRIX but no luck with getting anything mounted), so I am not sure if the Dosbox version could be a factor (Good performing SUN using 0.73, poor performing IRIX using 0.71).

Thanks ;)

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Sun Nov 27, 2016 8:07 pm

Ok. DOSBOX and MIPSPro seems to not work well out of the box with its mount feature. Googling around shows even SUN's compiler and DOSBOX has the same problem by a few people.

So I took to compiling DOSBOX 0.73 with GCC (since its same version I tested on a Solaris system). After some mods, it worked! Speed is much better compared to other binaries of dosbox found on nekoware and in the wild.. still see some sluggishness and cannot change the cycles any higher than 540~ (600mhz CPU) where the SUN Solaris version got up to 2000.

I recompiled using O3 optimizations.. now the resulting DOSBOX binary works almost same speed as the SPARC version I tested. And.. I can get the cycles up to 2000 now (just as the SPARC version did).. which is where it needs to be on my particular system for something like 'Dune 2' to run naturally.

NOTE: CDROM support is disabled.

Double NOTE: I still configure dosbox.conf (you can find examples online) for best performance.. lowering sound rate,etc..

I am throwing together a tarball attached here.. this is unofficial, no quality/testing done... just documenting my work for someone else to benefit.
The tarball has the following files:

dosbox-73-gcc-O3-optimizations # the binary itself.. you can rename it to just dosbox
dosbox-0.73.tar # original source code
dosbox-0.73-irix-gcc-patch.patch # patch to the source code for it to compile on IRIX with gcc4.7
ldd-links.txt # text file with ldd output on the binary.. note nekoware's libSDL_sound-1.0.so.2, libSDL-1.2.so.1, etc.. in particular..
I see I had it linked with libFLAC.so.5 which I have a copy at /opt/lib32/libFLAC.so.5 on my system.
Since others may not have libFLAC.so.5 around, I included the library in this tarball... place it where the binary can find it.
libFLAC.so.5 # libFLAC.so.5 .. this is old/outdated compared to what nekoware has. It may only be linked due to my environment.. so sorry. Ill see about linking it to nekoware's libFLAC.so.9 in the future.
ENVIRONMENT .. text file with the environment I used to compile with gcc

At last.. a bit faster dosbox for IRIX.
Thanks.
Attachments
dosbox-0.73-gcc-working-fast.tar
(11.15 MiB) Downloaded 39 times

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Mon Nov 28, 2016 2:46 am

Outstanding, thank you! I'm very much looking forward to trying this when I get a bit of free time (snowed under with work and family commitments at the moment, so haven't had time to fire up my SGIs for a couple of weeks).
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Sun Dec 18, 2016 6:26 am

OK, finally had time to give it a try. Well, it launches fine (once I'd copied your libFLAK.so.5 file across).

Main issue though is that the keyboard layout seems utterly screwed up in it, not sure why. Tried setting a US layout in my dosbox.conf file, but this doesn't help. Keyboard seems fine in the older 0.71 DOSBox.

Basically, "a" is giving me "Enter", "s" gives "]", "d" gives "h", etc. Not really possible to use. Any ideas at all?
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Tue Dec 27, 2016 10:00 am

Well, it's not an O3 issue. I've tried compiling it myself with O2 optimisations and still get the ropey keyboard for some reason, despite popping the latest SDL on from beta. Google isn't being much help. I might have a try at porting 0.74 at some point and see if I can get that to compile and work properly.
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Tue Dec 27, 2016 5:15 pm

If I run the dosbox binary with no existing config file, I also see the messed up keys.
If I have this dosbox.conf file in the current dir (or replace the default config file location) then my keys are not messed up.

dosbox.conf.txt
rename to just dosbox.conf
(7.07 KiB) Downloaded 22 times


Unless its something else I have done to my system to resolve this, this config may fix your problem.
apologies if the dosbox.conf is messy.. lets see if it works first before I clean it up and even make a nekoware package out of it all. It is currently setup to work well on an Octane2 with 600mhz.. reducing sound quality, etc..

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Tue Dec 27, 2016 5:22 pm

Well, comparing the default dosbox config file generated to mine.. here is the line that is causing the problem:
usescancodes=true

Change it to false, and works fine for me.
What does usescancodes do? "Avoid usage of symkeys, might not work on all operating systems."

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Wed Dec 28, 2016 3:40 am

Awesome, thanks! I'll give that a try.

One quick question, did you compile it with --enable-core-inline?
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Wed Dec 28, 2016 8:57 pm

I did not enable-core-inline. I believe that would set CFLAGS to -g -O2?
I did note (very very unscientifically) that if I compiled with -O2 .. I was not able to get dosbox cpu cycles to 2000.. was far less. But when I compiled with -O3 I saw a great improvement in speed.. and able to go to 2000 cpu cycles. I just keep xosview running while dosbox is running so I can set the cpu cycles to where it just hits 100% CPU load and doesnt peg the system. It does seem every game requires slightly different cpu cycle settings for the most part.

While games like warcraft 2 (1995 release.. ) run far better now for me in my 10 mins of testing (600mhz Octane2 and a few tweaks as noted in the dosbox.conf such as reducing sound quality), it is not super fast as what I would see on a more modern system with dosbox, but it is playable (other IRIX dosbox binaries did not seem to handle it in my experience). Most likely, games before 1995 may be best suited for SGI with dosbox unless you have a 1ghz Tezro lying around.

User avatar
necron2600
Posts: 275
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: DOSBox performance

Unread postby necron2600 » Mon Nov 13, 2017 1:14 pm

Even though SDL works already, I noticed (and ignored all this time) the following startup error/warning:

SDL:OPENGL:No support for texturesize of 1024, falling back to surface

You can only scale the resolution if using 'overlay' or 'opengl'.. not surface. After I got tired of playing in tiny windows on a 1920x1200 desktop.. I realized that opengl may be a good thing to get working.

I modded the sdlmain.cpp file to disable the sdl.opengl.max_texsize check that appears to always come back with 0, so it doesnt work anyway and defaults to surface no matter what (details here: https://github.com/joncampbell123/dosbox-x/issues/212). Then compiled using GCC and -O3 optimization (seems faster than -O2 to me)

However, I have yet to test performance now that opengl is available (and scaling). most likely things will slow down a bit. Go back to no scaling if that is the case.

Attached is a tarball with the newer dosbox binary, dosbox.conf example config used on an IRIX system (its a working copy; messy with comments), and the required libFLAC.so.5 library that you can place somewhere in your LD_LIBRARYN32_PATH.

dosbox-73-gcc-O3-optimizations-working-opengl.tar
dosbox 7.3 mips4/IRIX GCC with O3 optimization and working OpenGL support
(5.35 MiB) Downloaded 7 times

User avatar
Trippynet
Donor
Donor
Posts: 803
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: DOSBox performance

Unread postby Trippynet » Mon Nov 13, 2017 2:24 pm

Many thanks! I'll have to give this a try.
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30


Return to “IRIX and Software”

Who is online

Users browsing this forum: Yandex [Bot] and 1 guest