How to run Windows under VP/IX
Dag Erik Lindberg
del at fnx.UUCP
Wed Nov 14 09:29:06 AEST 1990
I've seen several questions from people asking how to run Windows 3.0
under VP/IX, and the general answer is, "You can't". Yes and No.
Here is my analysis of what is going on, which should enable someone
that really cares to hack Windows 3.0 to run under VP/IX.
The thing to remember here is that virtual machine emulation of the
386 CPU *only* emulates 808[68] instructions. That is why you get the
error "Cannot emulate instruction" when you try to run Windows. Given
that Windows does run on a lowly XT (I know: it's the only way I could
get my SO to use the computer), the trick is to get Windows to only
use the 8086 subset of instructions.
It seems obvious to me that the startup code for Windows does a test
to determine what type of CPU it is running on and sets a flag which
allows it to use certain routines if it is running on a 'better'
machine. The command line switches to select memory options obviously
don't force the machine type.
>From what I know of the difference between CPU modes, there are two
possible ways to determine what CPU a program is running on that could
indicate we are running on a 286 or 386 while only the 8088 instructions
are actually available.
1) Stack operation. There is a subtle difference in stack manipulation
between the 8086 and the 80286. In one the stack points to the last
item pushed, in the other it points to one less than the last item
pushed. In the latter case, the microcode will increment the internal
stack pointer before fetching stack-relative items, and decrement it
afterwards. While the 80386 emulates the 8086 instructions quite
well, it uses *native* stack mode.
2) Condition code register. There are subtle differences in the ability
to modify certain bits in the CC register. While no program would
be affected if it were not *directly* accessing the CC, there are
bits (meaningless on the 8086) which can be modified in the CC for
80[23]86.
Now, all that is required is for some enterprising individual with
either lots of free time, or clearly defined value, to sit down with
a debugger and step through the Windows startup code until some funny
code manipulating the stack or CC is found, and then change the flag
that should be set immediately after this code.
PS: For those of you wondering why you can't get your VGA bios to
work by commenting out the VGA option in vpix.cnf, you are most
likely running into the same problem. If you have a 16 bit VGA,
there may be no solution for you, as the BIOS may just assume
any machine it is running on has the 'extended' instructions.
Whether you have an 8 bit or 16 bit VGA, you can copy your BIOS
to a file and use the above clue to step through the initialization
code of the VGA to see if you can disable the use of 'extended' ops.
--
del AKA Erik Lindberg uunet!pilchuck!fnx!del
Who is John Galt?
More information about the Comp.unix.msdos
mailing list