First post, by *orz*
Hello:
I downloaded the dosbox source a few days and have been fiddling around with it. It's a swell project!
Performance is WAY better than it was in the 0.61 release. Games like privateer and doom that were completely unplayable for me in 0.61 are now mostly playable with the CVS version.
I thought I'd do some benchmarking to figure out what needs improvement. Benchmarking was complicated however by the fact that programs inside of DOSBox use a "virtual" (non-real) time, which slows down if DOSBox can't simulate as fast as it wants to. To make benchmarking easier, I modified DOSBox to use real time instead (i.e. in-game time is synchronized to actual time). For benchmarks, I wrote a few simple C programs, and compiled them with VC 7.1 and gcc 3.3.3/DJGPP. I tested the DJGPP version in both a windows dosbox and in DOSBox. All tests were done on my Athlon Thunderbird 1Ghrz.
Test1 - (some simple math):
win32:
raw result - 155 krand / second
percentage of optimum - 98%
estimated cycles - about 800k
windows dosbox:
raw result - 158 krand / ms
percentage of optimium - 100%
estimated cycles - about 800k
DOSBox (normal):
raw result - 1.58 krand / ms
percentage of optimum - 1.0%
estimated cycles - about 8 k
DOSBox (full):
raw result - 1.32 krand / ms
percentage of optimum - 0.84%
estimated cycles - about 7 k
DOSBox (dynamic):
raw result - 14.4 krand / ms
percentage of optimum - 9.1% - WOW!!!
estimated cycles - about 73 k
Test2 - (some memory access, a little math):
win32:
raw result - 95 scrambles / ms
percentage of optimum - 99%
estimated cycles - about 1300k
windows dosbox:
raw result - 96 scrambles / ms
percentage of optimium - 100%
estimated cycles - about 1300k
DOSBox (normal):
raw result - 0.61 scrambles / ms
percentage of optimum - 0.64%
estimated cycles - about 8.5 k
DOSBox (full):
raw result - 0.48 scrambles / ms
percentage of optimum - 0.50%
estimated cycles - about 6.5 k
DOSBox (dynamic):
raw result - 4.54 scrambles / ms
percentage of optimum - 4.7% - pretty damn good!
estimated cycles - about 62 k
There WAS a third test, which tested writting to video memory in mode13h, but both full and dynamic refused to run it, and normal, windows-dos-box and windows gave it results similar to what they gave test2. It used the Allegro library to do the graphics portably.
The dynamic core gives some very impressive results. I can't get privateer to work with it, but doom seems happily playable with it. I can't remember how to get doom to give performance data, so no quantification on that. I seem to remember some command line parameter yielding a set of dots at the bottom of the screen corresponding to the vtraces between frames...
If anyone knows of good benchmarks for measuring performance, let me know. The ideal candidate would give quantifiable performance data, run on modern computers, run in dosbox in all modes, be extremely limber, nubile, and er...
More:
I think the time concept tweak that I did for benchmarking would be a nice addition to the normal DOSBox. It makes tuning for 486 games more convenient - I just set cycles to 199000, and don't worry about it until I want to play a really old game that isn't timed to the clock. This is how I currently have it set up:
1. The cycles is treated as a maximum per ms instead of the hard amount per ms. If it detects that real time has elapsed, it will skip cycles until its caught up.
2. A setting was added to the CPU section of the .conf file, synchedtime=true. This then effects a variable bool CPU_SynchedTime. If that variable is false, time works like it did without this code.
3. Pressing control-equals toggles synched time mode. You can tell which mode you're in by looking at the title bar. In unsynched mode it will say "Cycles = %d". In synched mode it says "Cycles < %d". (it used to say "Cycles: %d")
More More More!
1. in CPUID, "Intel" is mispelled : o)
2. there was some initialization stuff that was intentionally dereferencing NULL pointers for silly reasons. I fixed it in mine and emailed a patch with the fix to Qbix.
3. the DOS_Drive_Cache is crashing for me, reproducably. I can describe in how it crashes (I've watched it in the debugger), but I dunno how to fix it. The code is on crack!
So am I.