Runing Windows 3.0 on Virtual PC...

Discuss MS-DOS, Windows 1, 2 and 3.
WinPC

Runing Windows 3.0 on Virtual PC...

Post by WinPC »

I'm currently in the process of creating a patch to allow Windows 3.0, Windows 3.00a, Windows with Multimedia Extensions 1.0 (version 3.00a), and the early Windows 3.1 builds to run on Virtual PC without any issues.

Currently, I was able to get Windows with Multimedia Extensions 1.0 (version 3.00a) to load by replacing WIN386.EXE, WIN386.PS2, KRNL386.EXE, GDI.EXE, and USER.EXE, with copies from Windows 3.1 Build 61d, which was released to testers at a time when the one was the newest version of Windows that was actually available to most people. Whereas using the final versions of the Windows 3.1 file economically speaking would essentially defeat the purpose since by then, people would have had no use for the earlier base operating system anymore if even the source of the replacement files could be upgraded from it.

So really, using the Windows 3.1 beta files makes this a more authentic patch, since it is not only closer to the date on which it was released, but it also would have had some potential real-world use due to the one version being the latest version of Windows that was available to the public at that time.

Also, apparently, MS-DOS Prompt requires the VGA.GR3 file to be renamed to VGA.3GR, but I haven't tried fixing it yet. Anyway, though, I might have replaced WINOLDAP.MOD, but I'm not sure, nor am I sure that it even needs to be replaced.

The problem here, though, is that Virtual PC for some reason can't handle the version of WIN386.EXE that is present in the Windows 3.0 and early Windows 3.1 builds. The earliest copy of WIN386.EXE that I actually have available at the moment that works on Virtual PC is the version from Windows 3.1 Build 61d, and yet in Windows 3.0, the one file switched the system directly into Protected Mode before KRNL386 loaded, whereas even as early as Windows 3.1 Build 34e, the one file only switched the system into Virtual 8086 (V86 mode), and it was KRNL386.EXE that switched the system into Protected Mode - that is exactly why I got the "Unable to enter protected mode" error message.

So to fix the KRNL386 problem, I had to replace KRNL386.EXE with a copy that switched the system from Virtual 8086 mode (V86 mode) to Protected Mode, and that was the copy from Windows 3.1 Build 61d. Which in turn, meant that I also had to replace GDI.EXE and USER.EXE. But in the end, I was able to get this version of Windows to run quite well on Virtual PC, since applying this patch basically removed all of the incompatible code from the system files themselves.

Not to mention that I also replaced the "[386Enh]" section with the copy from Windows 3.1 Build 61d, although I'm still not sure whether that was actually necessary or not. But anyway, I hope that people find this interesting, and I might provide further updates as to how far I've come in this project.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

They all work fine in VPC, just that 3.00 and 3.00a tend to have problems starting in 386 Enhanced mode due to bad display drivers. They can be started normally in Standard and Real modes.

TheCollector1988
User avatar
Donator
Posts: 3604
Joined: Wed Feb 23, 2011 12:11 am
Location: Italy
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by TheCollector1988 »

I have tested them on PCem and they all work in a fantastic way, even with SVGA (1024x768) display.

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

Windows 3.10.034e runs on Virtual PC with no problems. Windows 3.0 and 3.0a too, in Real and Standard Modes at least, but they hang in 386 Enhanced Mode. Maybe however we do need to try other display drivers, or maybe even the VGA 3.0 driver from Windows 3.1.
Though it could also depend on the DOS you run it on. Maybe 3.0 and 3.0a would run better on DOS 3.3x or 4.00 than on 5.00 and later?
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

There is a simple solution to this: during the installation, select the included "QuadVGA, ATI VIP VGA, and 82C441 VGA" driver from the list. It'll then work fine in 386 Enhanced mode. Thanks to KB63588 for the solution.

This was tested on VPC 2007 SP1, MS-DOS 6.22 and Windows 3.00 (Works with 3.00a and MME 1.0 as well), both of which were obtained from BA FTP. So all your work about making a Frankenstein is completely unnecesary. The kernel is perfectly functional...

Image

WinPC

Re: Runing Windows 3.0 on Virtual PC...

Post by WinPC »

So I guess, then, that it was just that the display driver was incompatible? I'll try that later today, thanks.

Also, no offence, but I was actually referring strictly to 386 Enhanced Mode with this topic, in case anyone missed it (sorry, I should have made it much clearer, so I hope that it didn't create any confusion).

TheCollector1988
User avatar
Donator
Posts: 3604
Joined: Wed Feb 23, 2011 12:11 am
Location: Italy
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by TheCollector1988 »

DeFacto wrote:There is a simple solution to this: during the installation, select the included "QuadVGA, ATI VIP VGA, and 82C441 VGA" driver from the list. It'll then work fine in 386 Enhanced mode. Thanks to KB63588 for the solution.

This was tested on VPC 2007 SP1, MS-DOS 6.22 and Windows 3.00 (Works with 3.00a and MME 1.0 as well), both of which were obtained from BA FTP. So all your work about making a Frankenstein is completely unnecesary. The kernel is perfectly functional...

Image
but DOS command sessions get corrupted with the QuadVGA/ATI VIP VGA 386 enhanced mode driver.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

Yeah, but with this driver you can actually start Windows 3.0 in 386 Enhanced Mode, as opposed to any others...

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

That same article also says this:
Windows running in 386 enhanced mode may not properly detect the presence of the VGA card in memory, and it may try to use the same addresses that the cards are using. Most VGA cards make use of the address ranges A000-C7FF. A few cards may extend up to CA7F. For testing purposes, try using EMMExclude=A000-CBFF in the [386Enh] section of the SYSTEM.INI file.
Now, the Virtual PC VGA BIOS goes all the way up to CBFF. I suggest trying to add that EMMExclude line to SYSTEM.INI.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

Battler wrote:Now, the Virtual PC VGA BIOS goes all the way up to CBFF. I suggest trying to add that EMMExclude line to SYSTEM.INI.
That worked.

Image

So I guess this issue is now resolved?

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

Yeah, it's indeed resolved. And without having to replace any part of Windows at that.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

WinPC

Re: Runing Windows 3.0 on Virtual PC...

Post by WinPC »

Thanks, Battler, you always seem to know the answers to every MS-DOS/Windows 3.x-related question that anyone has ever asked here (before they're even posted!). :)

At least we now know of a way to get the Windows 3.0 builds to work in Virtual PC without actually having to replace any of the system files.

MSUser2013
User avatar
Donator
Posts: 749
Joined: Sat Jan 12, 2013 9:08 am
Location: Washington State

Re: Runing Windows 3.0 on Virtual PC...

Post by MSUser2013 »

So, Here are my results of attempting to run Windows 3.0 in VirtualPC 2007:

Using EGA Driver = Works, But the colors are messed up and the resolution is low
Using VGA Driver = Refuses to work in Standard and Enhanced Mode, Only works in Real Mode
Using QuadVGA/ATI VIP VGA Driver = Works, But has trouble with exiting the Command Prompt
Using VGA Driver (With the SYSTEM.INI Fix) = Works with no issues whatsoever

Before i found this workaround, My workarounds to this were to either use VMware rather than VirtualPC, Or use Windows 3.0 in Real Mode in VirtualPC, I've tested these experiments under VirtualPC (Emulating a PC with 8MB of RAM, 2GB Hard Drive, 440BX Chipset, S3 Trio 32/64, And MS-DOS 6.22) and i've never experienced a single problem with the last workaround

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

So it seems we've determined the issue is with the VGA BIOS going past segment C800, all the way to CBFF, which hangs the VM to hang when Windows 3.0 attempts to allocate CA00-CBFF.

However, there is also another fix: replace "BIOS" resource ID 13501 in Virtual PC.exe with the standard S3 Trio64 (764) VGA BIOS. Granted, this will make anything in the VM think the VM's graphics card only has 2 MB of Video RAM instead of the normal 4 MB that Virtual PC's own VGA BIOS reports, which will make Windows 3.1 not run in resolutions such as 1024x768x32-bit color, but for that, you get improved compatibility with pretty much any memory-sensitive program, including Windows 3.0 (which should then no longer require the SYSTEM.INI fix) plus 16 kB of extra free upper memory.

I think someone should disassemble the Virtual PC VGA bios and modify it so the approximately 8 kB of padded memory before offset 8000h are moved to the end of the BIOS, and then removed completely, thus reducing the size to 32 kB, and getting a VGA BIOS for full graphic capability AND compatibility - I noticed there is enough total padded memory in the Virual PC VGA BIOS that if it were removed, the VGA BIOS could well be reduced down to the 32 kB needed but is sadly split in half with code in between so more difficult to remove.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

You can increase the VRAM up to 8 MB by editing the .VMC file appropriately...

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

Sure, but that doesn't help with the standard S3 Trio64 VGA BIOS (not the default Virtual PC one) thinking the card only has 2 MB video RAM. It's something in the BIOS that makes it think that, since I also experimented with other S3 video BIOS'es I found on Google and found that for example, the Diamond Stealth64 VGA BIOS makes the card report 3 MB video RAM, and an older S3 Trio64 VGA BIOS reports 1 MB.

Edit: I just noticed all virtual machines have 8 MB VRAM set by default. Now I'm starting to think the original S3 Trio64 VGA BIOS just doesn't recognize cards with more than 4 MB VRAM properly because the real S3 Trio64 graphics card can only have a maximum of 4 MB VRAM. Let me set the VRAM setting of the VM to 4 MB VRAM and see what the non-Virtual PC S3 Trio64 VGA BIOS reports.

Edit: Nevermind, it seems both VGA BIOS'es override the real VRAM quanity, the Virtual PC one to 4 MB VRAM, the standard S3 one to 2 MB, as I've found both to always report the same VRAM quantity regardless of what the setting is in the .VMC file.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

Well, I made a mistake, the maximum value you can set is 16 MB (anything above that will still be treated as 16), not 8. But since you said the BIOS overrides it, it doesn't really matter anway...

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

Well I want to patch the standard S3 Trio64 VGA BIOS to override it into 4 MB instead of 2 MB, just like the default Virtual PC VGA BIOS does. That way we can have full graphics capabilities AND full compatibility as the standard S3 Trio64 VGA BIOS is the regular 32 kB as opposed to the 48 kB of the Virtual PC VGA BIOS (with 32 kB actual code + 16 kB of padding of which not all can be removed because some of the code is sandwiched in between).
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

caleb13
Posts: 93
Joined: Tue Mar 19, 2013 3:17 am

Re: Runing Windows 3.0 on Virtual PC...

Post by caleb13 »

At least I tried on Virtual PC 2007 and after the boot screen, It stucked on blank screen :( i don't know why?

MSUser2013
User avatar
Donator
Posts: 749
Joined: Sat Jan 12, 2013 9:08 am
Location: Washington State

Re: Runing Windows 3.0 on Virtual PC...

Post by MSUser2013 »

caleb13 wrote:At least I tried on Virtual PC 2007 and after the boot screen, It stucked on blank screen :( i don't know why?
Have you tried doing this?
Windows running in 386 enhanced mode may not properly detect the presence of the VGA card in memory, and it may try to use the same addresses that the cards are using. Most VGA cards make use of the address ranges A000-C7FF. A few cards may extend up to CA7F. For testing purposes, try using EMMExclude=A000-CBFF in the [386Enh] section of the SYSTEM.INI file.

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: Runing Windows 3.0 on Virtual PC...

Post by Battler »

It's because the Virtual PC VGA BIOS goes beyond segment C7FF, all the way to segment CBFF.
Add the line EMMExclude=A000-CBFF in the [386Enh] section of the SYSTEM.INI file. Then it will no longer hang.
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

caleb13
Posts: 93
Joined: Tue Mar 19, 2013 3:17 am

Re: Runing Windows 3.0 on Virtual PC...

Post by caleb13 »

OK I must try

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

caleb13 wrote:At least I tried on Virtual PC 2007 and after the boot screen, It stucked on blank screen :( i don't know why?
Reading the topic would give you an instant answer...

caleb13
Posts: 93
Joined: Tue Mar 19, 2013 3:17 am

Re: Runing Windows 3.0 on Virtual PC...

Post by caleb13 »

I think Windows 3.0 VHD is hard to find

DeFacto

Re: Runing Windows 3.0 on Virtual PC...

Post by DeFacto »

Why would you need a VHD when we already provided you the fix for the problem. If you can wait until I get home (a couple of hours) I may be able to provide you one...
Last edited by DeFacto on Tue Jul 23, 2013 10:33 am, edited 1 time in total.

Post Reply