[comp.unix.msdos] How to run Windows under VP/IX

del@fnx.UUCP (Dag Erik Lindberg) (11/14/90)

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?

johna@grumpy.boston.ma.us (John Adams) (11/15/90)

In article <764@fnx.UUCP> del@fnx.UUCP (Dag Erik Lindberg) writes:
>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 real solution to this problem is:
	contact Interactive Systems (213-453-UNIX) for the VP/ix update.
	This change will allow Windows3.0 to run in real mode under VP/ix.


-- 
John Adams	johna@grumpy.boston.ma.us	(617) 646-6491

dean@truevision.com (Dean Riddlebarger) (11/25/90)

In article <1990Nov15.025221.1039@grumpy.boston.ma.us> johna@grumpy.boston.ma.us (John Adams) writes:
>
>The real solution to this problem is:
>	contact Interactive Systems (213-453-UNIX) for the VP/ix update.
>	This change will allow Windows3.0 to run in real mode under VP/ix.

Yes, Windows will run in real mode with this fix disk.  But.....

The expanded memory driver [on the one machine we're trying this on] does not
like to behave at all.  There's mention of this in the manual, and the
warning is indeed correct.  For example, if you try to give the driver
access to 2Mb [the max], system response time slows to a crawl.  While there
is a certain amount of bizarre curiousity that is aroused by waiting up to
two minutes for mouse reponse, it really can't be used for serious work.
ISC Tech Support is still looking into this for me; Windows 3.0 that comes
up in real mode and only believes in 640K looks pretty, but doesn't do
much...


-- 
<:>   Dean Riddlebarger                               "The bus came by   <:>
<:>   Truevision, Inc.                                  and I got on,    <:>
<:>   [317] 841-0332                                   That's when it    <:>
<:>   dean@truevision.com      uunet!epicb!dean         all began."      <:>