This section written in a hurry by Alberto Vignani <email@example.com> , Oct 20, 1997
The CPU emulator has been derived from <the Twin Willows libraries>. Only the relevant parts of the library, namely the /intp32 subdirectory and the needed include files, have been extracted from the Twin sources into the src/twin directory. The Twin reference version is 3.1.1. In the Twin code, changes needed for the dosemu interface have been marked with
Here is a summary of the changes I made in the Twin libraries:
The second part of the cpuemu patch is the interface to dosemu, which is controlled by the X86_EMULATOR macro. This macro was probably part of a very old attempt to interface dosemu with Bochs, I deleted the old code and replaced it with the Twin interface.
The X86_EMULATOR macro enables the compilation of the two files (cpu-emu.c and emu-utils.c) in the src/emu-i386/intp32 directory, which contain the vm86 emulator call (taken from the kernel sources) and some utility/debug functions. These files are kept separate from the Twin directory but need it to compile.
For controlling the emulator behaviour, the file include/cpu-emu.h provides three macros:
To enable the CPU emulator add
to compiletime-settings, or pass
To use the emulator, put
into /etc/dosemu.conf. Or start dosemu with -I 'cpu emulated'.
The 'e' flag was added to the debug control string, it has currently a value range from 1 to 4 and controls the level of detail the emulator writes into the dosemu debug log. WARNING - logs greater than 100Mbytes are the rule with cpu-emu!!!. As a safety measure, 'e' is not automatically added to the debug flags when you use 'a'; the 'e' parameter must be explicitly added. In addition, there is a new configuration parameter for /etc/dosemu.conf:
This will limit the file size of the logfile. Once the limit is reached, it truncates the file to zero and continues writing to it.
Next Previous Contents
|The DOSEMU team|