CPU Cycles and Speed
Outcome: you know what a "cycle" is, why a DOS machine that is too fast is a real problem, and how to set, check, and adjust the emulated speed.
A DOS program does not ask what time it is; it runs as fast as the machine lets it, and a great deal of period software was written assuming the machine was slow. Run it on unlimited hardware and games become unplayable blurs, timing loops finish before they start, and some programs divide by a duration they measured as zero and fall over. An emulator for DOS software therefore has to imitate not just a machine, but a moment in the machine's history.
DOSBox's unit is the cycle: roughly,
one beat of the emulated processor. The
[cpu] section's cycles setting is
the speed limit, in cycles per
millisecond — cycles=3000 is a stately
early machine, cycles=12000 a brisk
486-class pace, and the default,
cycles=auto, lets DOSBox guess per
program. Its partner setting, core,
chooses how instructions are translated;
auto is right for almost everyone, and
this guide leaves it alone.
The proof that the setting is real is
transcript t06: the lab's config pinned
cycles=12000, and the running machine
read it back through its own tool —
Z:\>config -get "cpu cycles"
12000
CONFIG -SET "cpu cycles" 8000 changes
the speed while DOSBox runs, which is
the practical way to tune a program:
start it, and adjust until it feels
period-correct. The same adjustment
lives on the keyboard for interactive
use, and the welcome banner itself says
where: Ctrl-F11 slows the machine
down, Ctrl-F12 speeds it up, in steps,
with the current rate shown in the
window's title bar. A rough field guide
to the numbers, from the DOSBox
project's documentation: a few thousand
cycles for XT and early AT software,
around ten to twenty thousand for
486-era programs, and max — everything
your real processor can give — for late
DOS software that was built to scale.
What the lab did not do is benchmark by feel: nobody played anything on its invisible screen, so this chapter's claims are the setting, its read-back, and the documented keys — measurements, not impressions. The discipline from chapter 7 applies with extra force here, because speed is the setting you will touch most: change it, check what the machine reports, and only then judge what the program does.