Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/joncampbell123/dosbox-x/llms.txt

Use this file to discover all available pages before exploring further.

Getting the CPU and memory settings right in DOSBox-X is essential for both accuracy and performance. The [cpu] section controls which execution core is used, what processor is emulated, and how many instructions per millisecond DOSBox-X attempts to run. The [dosbox] section’s memsize and a20 options determine how much RAM the virtual machine has and how the 1 MB A20 address line is handled. Together, these settings let you target anything from an original 4.77 MHz 8088 to a 500 MHz Pentium III.

[cpu] — Execution core and CPU type

Execution core

core
string
default:"auto"
The internal CPU execution engine DOSBox-X uses to run x86 code.
ValueDescription
autoAutomatically switches between normal and dynamic as needed (recommended)
normalInterpreter — slower but most accurate; required for some protected-mode programs
simpleSimplified interpreter for real-mode code only, slightly faster than normal
dynamicDynamic recompiler — much faster; uses dynamic_x86 when available
dynamic_x86x86-to-x86 recompiler (preferred dynamic core)
dynamic_nodhfpux86 dynamic recompiler without double-precision host FPU (special use)
dynamic_recPortable dynamic recompiler; does not support preemptive multitasking OSes
fullFull instruction interpreter (legacy, rarely needed)
[cpu]
core = auto
Windows 95, Windows 98, and other preemptive multitasking operating systems require core = auto or core = dynamic_x86. The dynamic_rec core does not work correctly with them.

CPU type

cputype
string
default:"auto"
The processor model to emulate. This affects which instructions are available, how the CPUID instruction reports, and certain timing characteristics that programs may detect.
ValueEmulated processorNotes
auto486 tolerating Pentium instructionsBest compatibility for most DOS software
8086Intel 8086 / 8088Original IBM PC; real mode only
8086_prefetch8086 with prefetch queueMore accurate 8088 timing
80186 / 80186_prefetchIntel 80186Added a handful of instructions; _prefetch variant emulates the prefetch queue
286 / 286_prefetchIntel 80286Protected mode, 16-bit
386 / 386_prefetchIntel 8038632-bit protected mode, paging
486old / 486old_prefetchEarly Intel 486Without some 486 enhancements
486 / 486_prefetchIntel 486 DXFull 486 with FPU
pentiumIntel Pentium (P5)32-bit, no MMX
pentium_mmxIntel Pentium MMXP5 with MMX instructions
ppro_slowIntel Pentium ProP6 microarchitecture, accurate
pentium_iiIntel Pentium IIP6 + MMX
pentium_iiiIntel Pentium IIIP6 + MMX + SSE
experimentalExperimentalEnables newer instructions like FISTTP
cputype = pentium_mmx

Cycle count

The cycles setting is the single most impactful performance tuning knob in DOSBox-X. It controls how many x86 instructions DOSBox-X attempts to emulate per millisecond of real time.
cycles
string
default:"auto"
Number of CPU instructions to emulate per millisecond, or a special mode keyword.Modes:
ModeDescription
autoDOSBox-X guesses an appropriate cycle count based on the running program; falls back to 3000 when unsure
maxUse as many cycles as the host CPU can handle; may use 100% of one core
max N%Limit max mode to N% of host CPU (e.g. max 90%)
fixed NFix the cycle count at exactly N per millisecond (e.g. fixed 25000)
# Let DOSBox-X decide (good default)
cycles = auto

# As fast as possible — for Windows 9x and modern DOS apps
cycles = max

# Cap host CPU usage at 80%
cycles = max 80%

# Fixed at 25,000 for a specific game
cycles = fixed 25000
cycleup
integer
default:"10"
Step size (in cycles) when pressing the increase cycles key combination (Ctrl+F12 by default). Values below 100 are treated as a percentage. For example, cycleup = 20 increases cycles by 20 per millisecond, while cycleup = 10% increases by 10% of the current count.
cycledown
integer
default:"20"
Step size (in cycles) when pressing the decrease cycles key combination (Ctrl+F11 by default). Same percentage behaviour as cycleup.

Other CPU options

fpu
string
default:"true"
Enable floating-point unit emulation.
ValueFPU type reported
true / 1Auto-select based on cputype
false / 0No FPU
80878087 co-processor
28780287 co-processor
38780387 co-processor
autoMatch FPU to cputype automatically
turbo
bool
default:"false"
Enables Turbo (fast-forward) mode at startup, running DOSBox-X as fast as possible regardless of the cycles setting. Useful for skipping long load times. You can also toggle Turbo mode from the CPU menu at runtime.

Memory options in [dosbox]

Conventional and extended memory

memsize
integer
default:"16"
Amount of RAM in megabytes made available to the emulated DOS machine.
  • Most DOS games work correctly with the default of 16 MB.
  • Programs using 286 protected mode (such as Windows 3.0 Standard Mode or early DPMI extenders) may crash with more than 15 MB.
  • Windows 9x and 32-bit DPMI programs generally benefit from 64 MB or more.
  • The maximum value depends on memalias and cputype. A Pentium II or later with PSE-40 is required for values above a few hundred MB; 1048576 (1 TB) is the theoretical maximum.
  • For memory sizes of 4 GB or more, a memory file must be specified.
[dosbox]
memsize = 64
Setting memsize above 15 MB can break some protected-mode DOS applications and early Windows versions. If a program crashes on startup, try reducing memsize to 15 or even 8.
memory file
string
default:""
Path to a file to use as the guest’s physical memory instead of allocating RAM from the host. Required for emulating 4 GB or more. DOSBox-X creates the file if it does not exist; no special formatting is needed.
memory file = ~/dosbox-memory.bin

A20 gate

a20
string
default:"mask"
Controls how the A20 address line gate is emulated. The A20 gate is the hardware mechanism that enables or disables access to memory above the 1 MB boundary.
ValueBehaviour
fastRemap the first 64 KB at the 1 MB boundary (DOSBox classic behaviour; fastest)
maskMask the A20 bit on memory I/O addresses (accurate, default)
onLock A20 permanently enabled; software cannot disable it
offLock A20 permanently disabled; software cannot enable it
on_fakeA20 locked on, but the gate bit toggles (for testing)
off_fakeA20 locked off, but the gate bit toggles (for testing)
The mask mode is the most accurate and works with the broadest range of software including HIMEM.SYS. Use fast if you need maximum performance and are running software that does not rely on accurate A20 behaviour.

Performance tuning guide

Choosing the right cycle count depends on the era of software you are running. Below are practical starting points.

Early DOS games (1981–1990)

Target the speed of an 8 MHz 8088 or 10 MHz 286. Too many cycles cause timing bugs in games that rely on the CPU for delays.
[cpu]
cputype = 286
cycles  = fixed 1000

Mid-era DOS games (1990–1994)

386/486-era titles. Many use auto-detection; auto usually works. Fixed values around 15 000–40 000 cover most titles.
[cpu]
cputype = 486
cycles  = auto

Late DOS / Pentium games (1994–1998)

Most use CPU-independent timing (VSync, timer interrupts). max mode is appropriate.
[cpu]
cputype = pentium_mmx
cycles  = max

Windows 9x inside DOSBox-X

Needs maximum cycles, dynamic core, and ISA PnP BIOS.
[cpu]
core       = auto
cputype    = pentium_ii
cycles     = max
isapnpbios = true

Demoscene and accuracy

For demoscene productions that depend on cycle-accurate VGA timing and CPU prefetch behaviour, use the normal interpreter core with a specific CPU type:
[cpu]
core     = normal
cputype  = 386_prefetch
cycles   = fixed 12000
The _prefetch variants emulate the instruction prefetch queue, which affects the exact timing of tight loops used by some demos to produce raster effects.

Runtime cycle adjustment

You can change the cycle count at any time without restarting DOSBox-X:
ActionKey combination (default)
Increase cycles by cycleupCtrl + F12
Decrease cycles by cycledownCtrl + F11
Enable Turbo (fast-forward)Host + T or CPU menu → Turbo
Toggle Turbo offSame key or menu
If a game runs too fast (music plays at double speed, gameplay is frantic), press Ctrl+F11 to reduce cycles. If it is sluggish or music stutters, press Ctrl+F12 to increase them. Watch the title bar — enable showdetails = true to see the current cycle count and frame rate.

Common scenarios at a glance

# Scenario 1: General-purpose DOS gaming
[cpu]
core    = auto
cputype = auto
cycles  = auto

[dosbox]
memsize = 16

# Scenario 2: Accurate 8088 PC emulation
[cpu]
core    = normal
cputype = 8086_prefetch
cycles  = fixed 700

[dosbox]
memsize = 1

# Scenario 3: Windows 95 / 98 installation
[cpu]
core       = auto
cputype    = pentium_ii
cycles     = max
isapnpbios = true

[dosbox]
machine  = svga_s3
memsize  = 64
a20      = mask

Build docs developers (and LLMs) love