Difference between revisions of "Configuration:CPU"

From DOSBoxWiki
Jump to navigationJump to search
 
(11 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
The CPU section controls how DOSBox tries to emulate the CPU, how fast the emulation should be, and to adjust it. DOSBox offers 4 different methods of [[/cpu/core/Intro|CPU emulation]].
 
The CPU section controls how DOSBox tries to emulate the CPU, how fast the emulation should be, and to adjust it. DOSBox offers 4 different methods of [[/cpu/core/Intro|CPU emulation]].
  
==== core = [[/cpu/core/simple|simple]] | [[/cpu/core/normal|normal]]| [[/cpu/core/full|full]] | [[/cpu/core/dynamic|dynamic]] | auto ====
+
<div id="core"></div>
[[/cpu/core/Intro|CPU core]] used in emulation. '''auto''' switches to '''dynamic''' if appropriate.
+
==== core = [[/cpu/core/simple|simple]] | [[/cpu/core/normal|normal]]| [[/cpu/core/dynamic|dynamic]] | auto ====
 +
[[/cpu/core/Intro|CPU core]] used in emulation. The choices result in a different efficency of DOSBox and in very rare cases have an effect on stability.
 +
 
 +
:{| class="wikitable"
 +
|-
 +
|<div id="normal"></div> '''normal''' || The program is interpreted instruction by instruction. This approach is a lot more CPU demanding than dynamic core but allows for a more fine-grained time emulation and is needed on platforms for which DOSBox doesn't have a dynamic core.
 +
|-
 +
|<div id="simple"></div> '''simple''' || Basically the same as normal, but optimized for real-mode (older) games. In case a protected-mode game is started, it automatically switches back to normal core.
 +
|-
 +
|<div id="dynamic"></div> '''dynamic''' || The program instructions are, in blocks, translated to host processor instructions that execute directly. See also [http://en.wikipedia.org/wiki/Just-in-time_compilation ]. In the most cases this approach is more efficent than interpretation, except for programs that employ massive self-modifying code. This option is not present on all host platforms.
 +
|-
 +
|<div id="auto"></div> '''auto''' || Real-mode programs are run with the normal core. For protected mode programs it switches to dynamic core, if available.
 +
|-
 +
|<div id="full"></div> '''full''' || Deprecated. 
 +
|}
  
 
Default is '''auto'''.
 
Default is '''auto'''.
  
Setting '''dynamic''' gave a significant performance boost in Wolfenstein 3D.
+
<div id="cputype"></div>
  
 
==== cputype = auto | 386 | 386_slow | 486_slow | pentium_slow | 386_prefetch ====
 
==== cputype = auto | 386 | 386_slow | 486_slow | pentium_slow | 386_prefetch ====
Line 15: Line 29:
 
Default is '''auto'''.
 
Default is '''auto'''.
  
==== cycles = ''nnnn'' | max | auto ====
+
<div id="cycles"></div>
 +
==== cycles = fixed ''nnnn'' | max [''default''%] [limit ''cycle limit''] | auto [''realmode default''] [''protected mode default''%] [limit "cycle limit"] ====
 
Amount of instructions DOSBox tries to emulate each millisecond. Set to '''max''' to automatically run as many cycles as possible.  '''auto''' setting switches to '''max''' if appropriate.
 
Amount of instructions DOSBox tries to emulate each millisecond. Set to '''max''' to automatically run as many cycles as possible.  '''auto''' setting switches to '''max''' if appropriate.
  
'''OBS:''' Setting this higher than your machine can handle is bad!
+
:{| class="wikitable"
 +
|-
 +
|<div id="fixed"></div>'''fixed ''nnnn'' ''' || Sets the emulated CPU speed to a fixed amount of cycles (''nnnn''). A value of 3000 equates 3 MIPS. If this value is too high some games will run too fast or crash. How high you can go depends on the power of your host CPU and on the selected core (above). If the value is too high for your CPU the emulation will slow down and the sound starts to skip.
 +
|-
 +
|<div id="max"></div> '''max''' || Automatically sets the cycles so approximately the (optional) ''default''%-value of your host CPU is used. If the value is not specified it defaults to 100%. The optional ''limit'' parameter limits the maximum speed to the specified value.
 +
|-
 +
|<div id="auto"></div> '''auto''' || For realmode games, this option switches to ''realmode default'' number of cycles or 3000 if not specified. When switching to protected mode, cycles is internally switched to '''max''' using the remaining optional parameters.
 +
|}
  
 
Default is '''auto'''.
 
Default is '''auto'''.
 +
====== Examples: ======
 +
* ''cycles=fixed 5000'', ''cycles=5000'' - All games you start are run with a fixed speed of ~5 MIPS. Useful for speed sensitive games or games that need a continuous CPU speed. You can change the actual value with Ctrl+F11 and Ctrl+F12 ([[SpecialKeys|keycombo]]) while DOSBox runs.
 +
* ''cycles=max'' - All games you start run at the maximum speed your CPU permits. Use Ctrl+F11 and Ctrl+F12 to change the percentage of your CPU to be used.
 +
* ''cycles=max limit 50000'' - All games you start run at up to 50000 cycles, depending on the power of your CPU.
 +
* ''cycles=max 50%'' - About 50% of your CPU power will be used.
 +
* ''cycles=auto'' - Realmode games will run at 3000 cycles. Protected mode games run with ''cycles=max''.
 +
* ''cycles=auto 5000 50% limit 50000'' - Realmode games run with 5000 fixed cycles, protected mode games with ''cycles=max 50% limit 50000''.
 +
 +
<div id="cycleup"></div>
 +
 +
==== cycleup = ''nnn'' ====
 +
Amount of cycles to increase with [[SpecialKeys|keycombo]].
  
JwjRYy  <a href="http://pjmewcibpmgz.com/">pjmewcibpmgz</a>, [url=http://xjqehreakons.com/]xjqehreakons[/url], [link=http://mdkupneiochq.com/]mdkupneiochq[/link], http://trcwplfdbzov.com/
+
Default is '''10'''. Setting it lower than 100 will be a percentage of the current value.
  
 +
<div id="cycledown"></div>
 
==== cycledown = ''nnn'' ====
 
==== cycledown = ''nnn'' ====
 
Amount of cycles to decrease with [[SpecialKeys|keycombo]].
 
Amount of cycles to decrease with [[SpecialKeys|keycombo]].
  
Default is '''20'''. Setting it lower than 100 will be a percentage.
+
Default is '''20'''. Setting it lower than 100 will be a percentage of the current value.

Latest revision as of 01:14, 2 October 2018

The CPU section controls how DOSBox tries to emulate the CPU, how fast the emulation should be, and to adjust it. DOSBox offers 4 different methods of CPU emulation.

core = simple | normal| dynamic | auto

CPU core used in emulation. The choices result in a different efficency of DOSBox and in very rare cases have an effect on stability.

normal
The program is interpreted instruction by instruction. This approach is a lot more CPU demanding than dynamic core but allows for a more fine-grained time emulation and is needed on platforms for which DOSBox doesn't have a dynamic core.
simple
Basically the same as normal, but optimized for real-mode (older) games. In case a protected-mode game is started, it automatically switches back to normal core.
dynamic
The program instructions are, in blocks, translated to host processor instructions that execute directly. See also [1]. In the most cases this approach is more efficent than interpretation, except for programs that employ massive self-modifying code. This option is not present on all host platforms.
auto
Real-mode programs are run with the normal core. For protected mode programs it switches to dynamic core, if available.
full
Deprecated.

Default is auto.

cputype = auto | 386 | 386_slow | 486_slow | pentium_slow | 386_prefetch

CPU Type used in emulation. auto is the fastest choice.

(since 0.73)

Default is auto.

cycles = fixed nnnn | max [default%] [limit cycle limit] | auto [realmode default] [protected mode default%] [limit "cycle limit"]

Amount of instructions DOSBox tries to emulate each millisecond. Set to max to automatically run as many cycles as possible. auto setting switches to max if appropriate.

fixed nnnn
Sets the emulated CPU speed to a fixed amount of cycles (nnnn). A value of 3000 equates 3 MIPS. If this value is too high some games will run too fast or crash. How high you can go depends on the power of your host CPU and on the selected core (above). If the value is too high for your CPU the emulation will slow down and the sound starts to skip.
max
Automatically sets the cycles so approximately the (optional) default%-value of your host CPU is used. If the value is not specified it defaults to 100%. The optional limit parameter limits the maximum speed to the specified value.
auto
For realmode games, this option switches to realmode default number of cycles or 3000 if not specified. When switching to protected mode, cycles is internally switched to max using the remaining optional parameters.

Default is auto.

Examples:
  • cycles=fixed 5000, cycles=5000 - All games you start are run with a fixed speed of ~5 MIPS. Useful for speed sensitive games or games that need a continuous CPU speed. You can change the actual value with Ctrl+F11 and Ctrl+F12 (keycombo) while DOSBox runs.
  • cycles=max - All games you start run at the maximum speed your CPU permits. Use Ctrl+F11 and Ctrl+F12 to change the percentage of your CPU to be used.
  • cycles=max limit 50000 - All games you start run at up to 50000 cycles, depending on the power of your CPU.
  • cycles=max 50% - About 50% of your CPU power will be used.
  • cycles=auto - Realmode games will run at 3000 cycles. Protected mode games run with cycles=max.
  • cycles=auto 5000 50% limit 50000 - Realmode games run with 5000 fixed cycles, protected mode games with cycles=max 50% limit 50000.

cycleup = nnn

Amount of cycles to increase with keycombo.

Default is 10. Setting it lower than 100 will be a percentage of the current value.

cycledown = nnn

Amount of cycles to decrease with keycombo.

Default is 20. Setting it lower than 100 will be a percentage of the current value.