Software brake
A software brake is a computer program that is used to slow down the execution speed of other programs. The executing computer system must therefore be able to execute several programs on one CPU core . Software brakes can usually be adjusted in terms of the degree of their system braking.
need
Mainly with older DOS games, mechanisms were often used that were directly dependent on the system clock. This led to the fact that a program which z. B. was written for a 286 processor with 8 MHz, ran correspondingly faster with a CPU of the same series with a higher clock rate. At 16 MHz the speed would have been twice as high, which is desirable for pure data processing. However, if the same acceleration is necessary for user interaction, this means that the programs can no longer be used as intended.
In the beginning, the turbo key was sufficient to reduce the computing power required to ensure downward compatibility. Due to the variety of processors and the rapid increase in performance, software solutions increasingly had to be used. This software artificially loads the system resources and thus leads to a decrease in performance.
Modern computer programs synchronize their speed of execution, if necessary, almost without exception using timers that are independent of the system clock or synchronization mechanisms of the operating system.
Since programs that cannot be used on modern computer systems without a software brake would usually not be able to run anyway due to the lack of compatibility with current operating systems, such programs are increasingly being executed in virtual machines . The scope of their configuration often makes software brakes superfluous.
technology
There are the following approaches for software brakes:
- Braking through faster refresh
- At the time of the 8088, 8086 and 80286 you could reduce a computer by increasing the refresh rate by up to 30 percent (DMA channel 0). This was often sufficient for programs that ran a little too quickly.
- Braking by a parallel running program
- A small program is called periodically, which consumes CPU time. From the 80286 onwards, the timer of the CMOS clock was mostly used, which could be set to a sufficiently high interrupt rate (128 Hz to 32768 Hz) to enable smooth braking. The standard timer with 18.2 Hz was too slow for this, reprogramming usually resulted in complications (system clock ran faster, games mostly used it themselves).
The interrupt routine itself looks like this, the value must be adjusted depending on the desired braking factor and the speed of the CPU.
push ax mov al, 20h out 020h, al out 0a0h, al sti mov ax, Wert .lbl: dec ax jnz .lbl pop ax iret
Delay loops can be also used to slow down, but must be installed, unlike software brakes as an integral part in the program to be braked.
See also
Web links
Individual evidence
- ↑ http://www.sierrahelp.com/Utilities/SlowdownUtilities.html Various examples (Eng.)