Difference between revisions of "4.77 MHz"

From DOSBoxWiki
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The IBM PC XT ran at 4.77 MHz.  This describes how to run DOSBox at XT-like speeds for programs that do not perform their own timing.  Keep in mind that DOSBox cannot run at exactly 4.77 MHz.  At least, not exactly the way an IBM PC XT did.  You can, however, get pretty darn close by testing with some benchmark tools.
 
The IBM PC XT ran at 4.77 MHz.  This describes how to run DOSBox at XT-like speeds for programs that do not perform their own timing.  Keep in mind that DOSBox cannot run at exactly 4.77 MHz.  At least, not exactly the way an IBM PC XT did.  You can, however, get pretty darn close by testing with some benchmark tools.
  
As you will see in the testing below, various types of computer instructions run at widely various speeds on the different types of computer chips out there.  The most striking example is perhaps math instructions that involve real numbers such as: 1.1 x 2.2 = 2.42.  This is called floating-point math.  Floating-point instructions were extremely slow on the 8086 CPU unless you installed the optional 8087 co-processor. It wasn't until the Pentium age that floating-point hardware was built into all PC CPU's. Anyway, the point is that DOSBox has only one speed control, and it slows down all computer instructions by the same percentage (more or less).  It is therefore not possible to tell DOSBox to slow integer math by X%, floating-point math by Y%, and non-math by Z%, etc.  Near-perfect 4.77 MHz speed will not be possible until someone builds an XT emulator specifically for this purpose.  This is not likely to happen because close enough will always be, quite frankly, good enough.
+
As you will see in the testing below, various types of computer instructions run at widely various speeds on the different types of computer chips out there.  The most striking example is perhaps math instructions that involve real numbers such as: 1.1 x 2.2 = 2.42.  This is called floating-point math.  Floating-point instructions were extremely slow on the 8086 CPU unless you installed the optional 8087 co-processor. It wasn't until the Pentium age that floating-point hardware was built into all PC CPU's. Anyway, the point is that DOSBox has only one speed control, and it slows down all computer instructions by the same percentage (more or less).  It is therefore not possible to tell DOSBox to slow integer math by X%, floating-point math by Y%, and non-math by Z%, etc.  Near-perfect 4.77 MHz speed will not be possible until someone builds an XT emulator specifically for this purpose.  This is not likely to happen because close enough will always be, quite frankly, good enough.
  
 
== Searching for 4.77 MHz (XT) ==
 
== Searching for 4.77 MHz (XT) ==
  
Personally, I found the old DOS tool, MIPS, to be the most accurate and easiest-to-use tool thus far for use in the quest for 4.77 MHz.  Look for MIPS.ZIP at the following FTP site (or [ftp://ftp.simtel.net/pub/simtelnet/msdos/sysinfo/mips.zip click here] [http://www.oldskool.org/guides/oldonnew/resources/mips.zip or here] to get it now):
+
[ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/mips.zip MIPS 1.10] is accurate and easy tool in the quest for 4.77 MHz.
 
 
:ftp://ftp.simtel.net/pub/simtelnet/msdos/sysinfo/ ([http://www.angelfire.com/in/Ronan/mirrors.html list of mirrors])
 
 
 
'''The contents of MIPS.DOC:'''
 
  
 +
From MIPS.DOC:
 
<code>
 
<code>
    PROGRAM:    MIPS.COM    -  Version 1.10  1986
 
    PURPOSE:    CPU Benchmark and Performance Test
 
    USAGE:      MIPS [Enter]
 
   
 
 
     FUNCTIONS:  Measures Million(s) of Instructions Per Second
 
     FUNCTIONS:  Measures Million(s) of Instructions Per Second
 
      
 
      
Line 23: Line 16:
 
         (4)    Register to Register    -  MOV REG to REG
 
         (4)    Register to Register    -  MOV REG to REG
 
         (5)    Register to Memory      -  MOV REG to RAM
 
         (5)    Register to Memory      -  MOV REG to RAM
   
 
 
         (6)    Performance Rating      -  average
 
         (6)    Performance Rating      -  average
   
 
    COPYRIGHT:  (C) 1986 Chips and Technologies, Inc.
 
 
</code>
 
</code>
  
'''Running MIPS produces a screen similar to this:'''
+
Running MIPS produces a screen similar to this:
 
 
 
<code>
 
<code>
 
         +---------------------------------------------------+
 
         +---------------------------------------------------+
Line 54: Line 43:
 
=== Steps to Find 4.77 MHz ===
 
=== Steps to Find 4.77 MHz ===
  
#Download MIPS and place it in an easy-to-find folder. (I created a DOSTOOLS folder inside my DOSBOX folder.)
+
#Download MIPS and place it in an easy-to-find folder. (I created a DOSTOOLS folder inside my DOSBOX folder.)
 
#Make these changes to your [[dosbox.conf]] file:
 
#Make these changes to your [[dosbox.conf]] file:
 
#:[[dosbox.conf#.5Bsdl.5D|[sdl]]]
 
#:[[dosbox.conf#.5Bsdl.5D|[sdl]]]
Line 65: Line 54:
 
#:mount C "C:\Program Files\DOSBox\DOSTools\"
 
#:mount C "C:\Program Files\DOSBox\DOSTools\"
 
#:C:
 
#:C:
#:cd \
+
#[[Basic Setup and Installation of DosBox|Launch]] DOSBox. Then run MIPS from the [[Command Line|command line]].
#[[Basic Setup and Installation of DosBox|Launch]] DOSBox. Then run MIPS from the [[Command Line|command line]].
+
#Your goal is to get the Performance Rating in the IBM/XT column to equal 1.00. To do this, press [[Special Keys|Ctrl-F11]] (slow down) or [[Special Keys|Ctrl-F12]] (speed up) several times while watching the CPU Cycles in DOXBox’s [[:file:Dosbox2.jpg|title bar]] change from 300 to your next test value.
#Your goal is to get the Performance Rating in the IBM/XT column to equal 1.00. To do this, press [[Special Keys|Ctrl-F11]] (slow down) or [[Special Keys|Ctrl-F12]] (speed up) several times while watching the CPU Cycles in DOXBox’s [[:file:Dosbox2.jpg|title bar]] change from 300 to your next test value.
+
#Run MIPS again. Repeat steps 4 and 5 until you get a Performance Rating of 1.00
#Run MIPS again. Repeat steps 4 and 5 until you get a Performance Rating of 1.00 (or as close as you need).
 
 
#Make a note of your final CPU Cycles value and set "cycles=xxx" to this value in your dosbox.conf whenever you need 4.77-MHz-like speed.
 
#Make a note of your final CPU Cycles value and set "cycles=xxx" to this value in your dosbox.conf whenever you need 4.77-MHz-like speed.
  
'''''Hint:''' I use Ronald Blankendaal’s great DBGL (DOSBox Game Launcher) [[DOSBoxFrontends|frontend]] to simplify many of the above tasks.  Just point it to your MIPS.COM file and be sure to UNcheck the "Exit afterwards" box in the General tab to stay at the command line.''
+
You should get something like:
 
 
=== Notes ===
 
  
Some users may prefer a speed at which General Instructions equals 1.00 (instead of Performance Rating).  This depends entirely upon what kinds of instructions you feel affect the program’s speed the most.  2D games should not be using any floating-point math so no worries there.  But predicting whether a program is integer heavy, memory heavy, or whatever heavy, would be pure sorcery.  [Anyone care to modify a debugger to analyze this?  Didn’t think so.]  Really, just choose what feels best to you (actually, I can hardly tell the difference between cycles=245 and cycles=290).
+
''core=normal, cycles=245''
 
 
Some testing was done with other benchmark tools to ''somewhat'' validate the MIPS results:
 
*SLOWDOWN 2.00 tends to agree with the MIPS Performance Rating but varies a bit depending on what speed you are slowing down from.  (usage: slowdown /xt)  (Not dynamic mode compatible.)
 
*COMPTEST 2.60 tends to agree with the MIPS General Instructions rating and also offers some interesting floating-point benchmarks.  Speed is determined by executing a block of FSQRT instructions.  (Not dynamic mode compatible.)
 
*CPUTEST (1989) will lead you towards setting CPU Cycles to about twice as high as these others and I have chosen to disregard these results due to “feel” of the XT programs at this higher speed.
 
 
 
My current DOSBox speed on a 1.3 GHz Athlon is cycles=245.  At such low DOSBox speeds I am finding about a 1% difference between [[dosbox.conf#.5Bcpu.5D|Normal CPU Mode]] and [[dosbox.conf#.5Bcpu.5D|Dynamic CPU Mode]].  Therefore, you shouldn’t need to worry about benchmarking that setting.  Interestingly, with dynamic mode versus normal mode, the Integer Instructions benchmark ~3% slower and Register to Register benchmarks ~10% faster (the other benchmarks are proportionately 1% faster).  [No doubt, however, that dynamic mode plays a larger role at higher speeds.]
 
 
 
'''core=dynamic, cycles=243:'''
 
<code>
 
        +---------------------------------------------------+
 
        |  MIPS v1.10 CPU Benchmark and Performance Test  |
 
    +-----------------------------------------------------------+
 
    |          |  Million Instructions Per Second  | 10:10:00 |
 
    +-----------------------------------------------------------+
 
    |      BENCHMARK:      |  IBM/XT  IBM/AT  COMPAQ  |      |
 
    |                      |  4.7Mhz    8Mhz      386  |  MIPS |
 
    |----------------------|----------------------------|-------|
 
    | General Instructions |    0.85    0.25    0.12  |  0.14 |
 
    | Integer Instructions |    1.42    0.22    0.10  |  0.23 |
 
    | Memory to Memory    |    1.02    0.31    0.17  |  0.24 |
 
    | Register to Register |    1.48    0.19    0.08  |  0.26 |
 
    | Register to Memory  |    0.79    0.24    0.13  |  0.24 |
 
    |                      |                            |      |
 
    | Performance Rating  |    1.00    0.24    0.12  |  0.22 |
 
    +-----------------------------------------------------------+
 
</code>
 
 
 
'''core=normal, cycles=245:'''
 
 
<code>
 
<code>
 
         +---------------------------------------------------+
 
         +---------------------------------------------------+
Line 124: Line 81:
 
</code>
 
</code>
  
== Searching for 8 MHz (AT) ==
+
=== Notes ===
 +
 
 +
Some users may prefer a speed at which General Instructions equals 1.00 (instead of Performance Rating). This depends entirely upon what kinds of instructions you feel affect the program’s speed the most.  2D games should not be using any floating-point math so no worries there.  But predicting whether a program is integer heavy, memory heavy, or whatever heavy, would be pure sorcery.  [Anyone care to modify a debugger to analyze this?  Didn’t think so.]  Really, just choose what feels best to you (actually, I can hardly tell the difference between cycles=245 and cycles=290).
  
Does anyone really need to tell you to follow the above instructions for 4.77 MHz and use the IBM/AT column in MIPS instead of the IBM/XT columnOh yeah, you might also want to start with cycles=500.
+
My current DOSBox speed on a 1.3 GHz Athlon is cycles=245.  At such low DOSBox speeds I am finding about a 1% difference between [[dosbox.conf#.5Bcpu.5D|Normal CPU Mode]] and [[dosbox.conf#.5Bcpu.5D|Dynamic CPU Mode]]Therefore, you shouldn’t need to worry about benchmarking that setting.  Interestingly, with dynamic mode versus normal mode, the Integer Instructions benchmark ~3% slower and Register to Register benchmarks ~10% faster (the other benchmarks are proportionately 1% faster). Dynamic mode plays a larger role at higher speeds.
  
 +
Other benchmarks:
 +
* [http://web.archive.org/web/20060201052402/http://www.agababyan.ru/FILES/UTIL/speedtst.zip Speed Test 1.14] - CPU benchmark with data from XT to Pentium 200 MHz. Results are close to MIPS general instructions.
 +
* [ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/ctest260.zip COMPTEST 2.60] - close to MIPS general instructions rating and offers floating-point benchmarks. Not dynamic mode compatible. Speed is determined by executing a block of FSQRT instructions.
 +
* [ftp://ftp.sunet.se/pub/simtelnet/msdos/sysutl/slodn200.zip SLOWDOWN 2.00] - tends to agree with the MIPS performance rating but varies a bit depending on what speed you are slowing down from. Not dynamic mode compatible. Usage: slowdown /xt
  
 +
== Additional benchmark tools ==
  
== Other Tools You May Find Useful ==
+
*[http://web.archive.org/web/20150911095745/http://ftp.isu.edu.tw/pub/CPatch/sysutil/hwinfo/source/hwinf489.zip HWiNFO 4.8.9]
  
;MIPS 1.10: ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/mips.zip
+
*[ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/pcben60a.zip PC Benchmark 6.0]
;COMPTEST 2.60: ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/ctest260.zip
 
;Speed Test 1.14: http://web.archive.org/web/20060201052402/http://www.agababyan.ru/FILES/UTIL/speedtst.zip
 
;CPUTEST: ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/cputest.zip
 
;SLOWDOWN 2.00: ftp://ftp.sunet.se/pub/simtelnet/msdos/sysutl/slodn200.zip
 
;PC Benchmark 6.0 : ftp://ftp.sunet.se/pub/simtelnet/msdos/sysinfo/pcben60a.zip
 

Latest revision as of 10:39, 11 September 2015

The IBM PC XT ran at 4.77 MHz. This describes how to run DOSBox at XT-like speeds for programs that do not perform their own timing. Keep in mind that DOSBox cannot run at exactly 4.77 MHz. At least, not exactly the way an IBM PC XT did. You can, however, get pretty darn close by testing with some benchmark tools.

As you will see in the testing below, various types of computer instructions run at widely various speeds on the different types of computer chips out there. The most striking example is perhaps math instructions that involve real numbers such as: 1.1 x 2.2 = 2.42. This is called floating-point math. Floating-point instructions were extremely slow on the 8086 CPU unless you installed the optional 8087 co-processor. It wasn't until the Pentium age that floating-point hardware was built into all PC CPU's. Anyway, the point is that DOSBox has only one speed control, and it slows down all computer instructions by the same percentage (more or less). It is therefore not possible to tell DOSBox to slow integer math by X%, floating-point math by Y%, and non-math by Z%, etc. Near-perfect 4.77 MHz speed will not be possible until someone builds an XT emulator specifically for this purpose. This is not likely to happen because close enough will always be, quite frankly, good enough.

Searching for 4.77 MHz (XT)

MIPS 1.10 is accurate and easy tool in the quest for 4.77 MHz.

From MIPS.DOC:

   FUNCTIONS:  Measures Million(s) of Instructions Per Second
   
       (1)     General Instructions    -   random
       (2)     Integer Instructions    -   ADD SUB MUL DIV
       (3)     Memory to Memory        -   MOV RAM to RAM
       (4)     Register to Register    -   MOV REG to REG
       (5)     Register to Memory      -   MOV REG to RAM
       (6)     Performance Rating      -   average

Running MIPS produces a screen similar to this:

       +---------------------------------------------------+
       |   MIPS v1.10 CPU Benchmark and Performance Test   |
   +-----------------------------------------------------------+
   |          |   Million Instructions Per Second   | 10:10:00 |
   +-----------------------------------------------------------+
   |      BENCHMARK:      |  IBM/XT   IBM/AT   COMPAQ  |       |
   |                      |  4.7Mhz    8Mhz      386   |  MIPS |
   |----------------------|----------------------------|-------|
   | General Instructions |   25.83     7.51     3.79  |  4.29 |
   | Integer Instructions |   16.92     2.64     1.16  |  2.85 |
   | Memory to Memory     |    7.79     2.40     1.34  |  1.85 |
   | Register to Register |   18.07     2.35     0.98  |  3.25 |
   | Register to Memory   |   20.72     6.22     3.43  |  6.39 |
   |                      |                            |       |
   | Performance Rating   |   18.24     4.40     2.16  |  3.72 |
   +-----------------------------------------------------------+

Note: If you run MIPS at too high a speed, the numbers will get large enough to screw up the formatting and make the results mostly unreadable.

Steps to Find 4.77 MHz

  1. Download MIPS and place it in an easy-to-find folder. (I created a DOSTOOLS folder inside my DOSBOX folder.)
  2. Make these changes to your dosbox.conf file:
    [sdl]
    fullscreen=false
    [cpu]
    cycles=300
    cycleup=1
    cycledown=1
    [autoexec]
    mount C "C:\Program Files\DOSBox\DOSTools\"
    C:
  3. Launch DOSBox. Then run MIPS from the command line.
  4. Your goal is to get the Performance Rating in the IBM/XT column to equal 1.00. To do this, press Ctrl-F11 (slow down) or Ctrl-F12 (speed up) several times while watching the CPU Cycles in DOXBox’s title bar change from 300 to your next test value.
  5. Run MIPS again. Repeat steps 4 and 5 until you get a Performance Rating of 1.00
  6. Make a note of your final CPU Cycles value and set "cycles=xxx" to this value in your dosbox.conf whenever you need 4.77-MHz-like speed.

You should get something like:

core=normal, cycles=245

       +---------------------------------------------------+
       |   MIPS v1.10 CPU Benchmark and Performance Test   |
   +-----------------------------------------------------------+
   |          |   Million Instructions Per Second   | 10:10:00 |
   +-----------------------------------------------------------+
   |      BENCHMARK:      |  IBM/XT   IBM/AT   COMPAQ  |       |
   |                      |  4.7Mhz    8Mhz      386   |  MIPS |
   |----------------------|----------------------------|-------|
   | General Instructions |    0.85     0.25     0.12  |  0.14 |
   | Integer Instructions |    1.48     0.23     0.10  |  0.24 |
   | Memory to Memory     |    1.02     0.31     0.18  |  0.24 |
   | Register to Register |    1.35     0.18     0.07  |  0.24 |
   | Register to Memory   |    0.79     0.24     0.13  |  0.24 |
   |                      |                            |       |
   | Performance Rating   |    1.00     0.24     0.12  |  0.22 |
   +-----------------------------------------------------------+

Notes

Some users may prefer a speed at which General Instructions equals 1.00 (instead of Performance Rating). This depends entirely upon what kinds of instructions you feel affect the program’s speed the most. 2D games should not be using any floating-point math so no worries there. But predicting whether a program is integer heavy, memory heavy, or whatever heavy, would be pure sorcery. [Anyone care to modify a debugger to analyze this? Didn’t think so.] Really, just choose what feels best to you (actually, I can hardly tell the difference between cycles=245 and cycles=290).

My current DOSBox speed on a 1.3 GHz Athlon is cycles=245. At such low DOSBox speeds I am finding about a 1% difference between Normal CPU Mode and Dynamic CPU Mode. Therefore, you shouldn’t need to worry about benchmarking that setting. Interestingly, with dynamic mode versus normal mode, the Integer Instructions benchmark ~3% slower and Register to Register benchmarks ~10% faster (the other benchmarks are proportionately 1% faster). Dynamic mode plays a larger role at higher speeds.

Other benchmarks:

  • Speed Test 1.14 - CPU benchmark with data from XT to Pentium 200 MHz. Results are close to MIPS general instructions.
  • COMPTEST 2.60 - close to MIPS general instructions rating and offers floating-point benchmarks. Not dynamic mode compatible. Speed is determined by executing a block of FSQRT instructions.
  • SLOWDOWN 2.00 - tends to agree with the MIPS performance rating but varies a bit depending on what speed you are slowing down from. Not dynamic mode compatible. Usage: slowdown /xt

Additional benchmark tools