QEMU + Windows for Workgroups 3.11 = Works!

Update: Check /2011/11/738 for getting WFW 3.11 working w/ 1024x768x16.8M!

QEMU is an open source processor emulator by Fabrice Bellard released under GPL/LGPL. I’m using this to create a portable virtualization environment for Windows for Workgroups 3.11, partly because I need to run some REALLY old softwares on it and can’t/don’t want to install VPC or VirtualBox.

This guide will show you how to set up Windows for Workgroups 3.11 on QEMU, with 16.7M color(640x480 though, sorry), sound and Ethernet support.

The latest version of QEMU so far is 0.14.0, and Windows port binary could be obtained here: http://dietpc.org/windows/qemu

Update: 0.9.1 could offer 1024x768x16.8M support. See /2011/11/738

=====================

Preparation

=====================

First thing first, you’ll need installation discs for WfW 3.11 and DOs 6.22. They could be found on eBay for a few bucks.

After you got them, convert into ISOes and put it to your workspace.

Also, a boot disk of DOS 6.22 is necessary. Just google it and you’ll get a ton of it. Note that it must contain several utilities, such as FDISK, FORMAT and CDROM support.

=====================

Step 1: Create images needed

=====================

Open command prompt and go to your workspace, enter the following commands:

qemu-img create WFW311.IMG 150M

This will create a hard drive of 150M. For my case this is more than enough, but you can enlarge it if needed.

Also, DOS 6.22 installation needs a floppy as uninstall disk, so an empty floppy is necessary:

qemu-img create crap.img 1.44M

=====================

Step 2. Install WFW 3.11 and DOS 6.22

=====================

Use the following command to start QEMU:

qemu -vga cirrus -m 64 -cpu pentium3 -drive file=DOS622.IMG,if=floppy,cache=writeback -drive file=WFW311.IMG,if=ide,media=disk,cache=writeback -boot a -net nic,vlan=0 -net user,vlan=0 -soundhw sb16

Press Ctrl-Alt-2 to switch to QEMU console, enter the following command to load cd:

change ide1-cd0 wfw311.iso

Use DOS 6.22 disk to boot, FDISK and FORMAT, Then install WfW 3.11. It’s pretty straight forward, note that no driver installation is needed at the step. We can do it later.

Then install DOS 6.22, switch the CD again:

change floppy0 junk.img
change ide1-cd0 dos622.iso

You have to reboot after the installation is finished.

=====================

Step 3. Drivers installation

=====================

The most difficult part is the Video driver. I’ve tested a bunch but seems most of the Cirrus drivers on Internet would fail on this. Luckily there’s a driver from HP (http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=emea_middle_east&prodTypeId=12454&prodSeriesId=96433&prodNameId=100619&swEnvOID=26&swLang=8&mode=2&taskId=135&swItem=1093) which supports the video card under 640x480x16.7M. I’ve tried using 800x600x63K but ended up in  video corruption (cursor is missing, icons are not shown, but texts are ok).

You’ll need 2 floppies to install this driver.

After downloaded that driver, copy it to C drive and run it, it will require to install 2 floppies to extract the driver. Finish extraction and run install.exe in Windows. After finished, click Cancel in the Winmode window, exit to DOS, run c:Windowssetup.exe and select CL-5430 v1.25f, 640x480x16.8M as the display driver.

QEMU emulates an NE2000-compatible ethernet card and the driver could be obtained from here: http://www.claunia.com/qemu/drivers/wfw_8029.zip

Install it from Windows Setup. Also you’ll need Microsoft TCP/IP stack to access the Internet.

It’s a pain to switch WfW 3.11 disc back and forth while installing the network :-(

For network settings, choose DHCP, and in DNS settings set a hostname for WFW 3.11. It’s quite weird that I can’t ping any host under WFW 3.11, but browsing the network works just fine.

For sound card driver (http://www.claunia.com/qemu/drivers/dos_sb16.zip), just run install.exe under DOS and follow the instructions.

I’ve packed those drivers, along with patches and other softwares into an ISO, could be downloaded here: http://www.mediafire.com/?aafzzcjdx8j07fd

=====================

Step 4. Tweaking & Optimization

=====================

This part is mainly from Rufus’ guide: http://qemu-forum.ipi.fi/viewtopic.php?f=5&t=5507

Also Stephan Großklaß’s page: http://stephan.win31.de/w31mm_en.htm#stab_sysini

Edit system.ini, add following lines to [386enh] section:

Device=*int13
Device=vfat.386
Device=ios.386
Device=vxdldr.386
PermSwapDosDrive=C
PermSwapSizeK=262144
WinExclusive=1
EmmSize=0
SysVmXMSLimit=-1
KeyBoostTime=.005
MaxBPS=768
DmaBufferSize=64
HardDiskDmaBuffer=64
XLatBufferSize=128
PageOverCommit=3
WindowUpdateTime=5
ForceLazyOff=C
MinTimeslice=1

Change the size of file cache in [vcache] section:

MinFileCache=20480
MaxFileCache=20480
ChunkSize=512

Add the following line in [windows] section of win.ini:

DefaultQueueSize=16

Also, find the syshook.drv and wqghlt.386 from my support CD, copy them to windowssystem, and add the following line to [386enh]:

device=wqghlt.386

Also change the line in [boot] section from:

system.drv=system.drv

to

system.drv=syshook.drv

Use Memmaker to optimize memory usage, however do not select “Scan the upper memory area aggressively” since it would add HIGHSCAN to EMM386 and that would crash the system.

=====================

Step 5. Addons

=====================

Copy the files in patchesaddonwindows to windows folder, upgrading net.exe, winfile.exe and calc.exe.

Also the files under patchesaddonwindowssystem are mostly updates to network components.

Win32s 1.25 works fine, however 1.30c does not. I have attempted using 1.25/1.30 hybrid trick but it failed miserably :-(

For IE 5.01 installation, you’ll need to change the install type to standard rather than full installation otherwise it would overwrite the TCP/IP stack. The 128-bit encryption patch is available in the same folder.

And…you’ll get a fully functional WfW 3.11! Enjoy!

References:

http://virtuallyfun.blogspot.com/2011/03/windoom-wing-win32s-on-windows-31-on.html

http://qemu-forum.ipi.fi/viewtopic.php?f=5&t=5507

http://stephan.win31.de/w31mm_en.htm#stab_sysini

http://www.weiqigao.com/blog/2006/02/20/qemu_the_open_source_processor_emulator.html