There are a variety of reasons you may want to run Windows 3.1 on modern systems. This might just be nostalgia; I know that I had a kick to the heart when playing the original Solitaire using the castle card backs. But it is also important for game preservation. Since Windows 3.1 runs on DOS it is inherently 16 bit. On the other hand, modern windows will flat out refuse to run 16 bit programs. This isn't a problem for actual DOS programs, since DOSBox works pretty damn well. But some things require an actual version of Windows to run, such as Civilization 2, the Journeyman Project Turbo, SimTower and many other classics. Most of these will run on Windows 95 if you have that setup (which could be easier or harder depending on how you do it) but there will often be compatability issues. (For example I can verify first hand that if you run the Journeyman Project Turbo on Windows 3.1, all the technical issues seen in this video dissappear.)
There are some programs that aim to let you run Windows 3.1 programs in Windows 7 or 10, but there's nothing quite like running them back in Windows 3.1. Now the good news is that Windows 3.1 wasn't a true operating system, but a shell that ran in DOS. Therefore it is essentially a DOS program and can be run through DOSBox. But there are some quirks to getting everything working.
I recommend using DOXBox staging for this, rather than the original. It has some features, like the ability to switch disk images, which are very useful. I think that DOSBox X has similar features, but I can't verify this personally.
I'll assume that you know how to use DOS itself, but DOSBox itself has some new commands to worry about. The biggest thing to be aware of is the need to mount virtual drives. You will generally want a C drive for your "virtual Windows 3.1 computer harddrive." I have a folder named WIN on my harddrive that does this. The command for your hardrive is mount @ location where @ is the letter of the drive you want it to be listed as within DOSBox itself and location is the location on your harddrive. So for example I can start by using the command "mount c c:\win".
Generally you will always mount the same harddrive, unless you have different "virtual computers." In fact you can even have DOSBox automatically set that step up (I'll get to this later.) But you will also need to sometimes mount CD-ROM drives or floppy drives. Here are the commands for doing that:
Okay, that's enough to install Windows, assuming that you have the install discs. You'll want images so that they can be swapped easier, so if you have the physical disks copy them over. I won't post links to the images since they are still under copyright by Microsoft, but I imagine that enterprising individuals who would stumble across a page like this can probably find them. There should be six. Mount them in sequence. I had them named disk1.img, etc. so I used the command "imgmount a disk1.img disk2.img disk3.img disk4.img disk5.img disk6.img -t floppy." Swap to your virtual a: drive and run the setup program. You can setup everything with the defaults. When you are asked to swap a disk use ctrl+f4 and then continue. The first three disks will install in DOS, at which point it will boot Windows and use the remaining three disks to complete the installation.
(If you want to boot up windows after the installation, go to the windows directory and type "win". Once you've done the initial installation, all you need to do in DOSBox is mount the appropriate folder as your hard drive; you won't need to repeat the install process.)
At this point you will have the basics of Windows 3.1, including the programs that shipped with it such as Solitaire, Minesweeper, Write, Calc, Paint, etc. If you're just in it for nostalgia's sake there's a lot to do with just this, but if you want to run classic games and other programs you'll probably want to mess around some more.
The biggest issue is sound: in the default installation there isn't any. DOSBox has Soundblaster support, but you need the drivers. These are available here. Unzip the files in a folder on your "virtual harddrive" and do the installation inside DOSBox. Everything is pretty straightforward, with one exception. When selecting the interrupt setting, put it to 7, not the default of 5. This is necessary to match the interrupt setting of DOSBox. I suppose you could mess with DOSBox instead, but that's more inconvenient and may cause issues if you use it for something other than working with Windows 3.1. If you don't set the interrupts correctly then sounds will repeat endlessly (including the Windows startup noise.)
That site also has S3 drivers. These are display drivers for if you want a higher color mode or a higher resolution. Unzip to your "virtual harddrive." To change the display you will need to:
This will give you a huge number of options to play around with. Once you've chosen a S3 mode all the different options should appear in the display list. To switch you simply need to select another option and then "reboot" windows (i.e. exit windows and start it up again.) You should get comfortable switching display modes because you will need different ones for different programs. When just messing around with windows you might prefer to have a high resolution and high color mode. However many games will bitch at you for having higher than 256 color mode. Sometimes they will still run without problems (this happened to me with Journeyman Project Turbo) but sometimes they won't run at all (this happened to me with Woodruff and the Schnibble.) Conversely you will need higher color mode for some programs (though this is rarer). You should also be aware that most programs for Windows 3.1 have their graphics based on pixels, not screen size. So if you have a high resolution the game won't "scale up." If they even do allow a full screen mode it often won't do what you want. For example at high resolutions Chip's Challenge will have its full screen mode be filled mainly with the background, not the game environment. As such you'll often want to run things in a lower resolution than you otherwise might use.
While you are at it, you might as well install the drivers for playing CDs. Even if you have a CD drive recognized, Windows won't be able to play music from it initially, just read data. This causes problems for games with redbook audio (Civilization 2 being one of the more prominent examples for a game that runs natively in Windows 3.1.) For those not in the know, redbook audio was a system where some games stored their music (or more rarely miscellaneous audio tracks) as CD tracks (to the point where you could play them in a normal CD player, though the first track would be garbage since that's where the data was stored.) So without the drivers you can't get any music.
Luckily the fix is simple. All you need to do is:
Shoutout to this guy who gave valuable advice on this issue (and this year, no less!)
I've had issues with the CD audio working correctly when I have an actual CD in the drive. This may be an issue with DOSBox. You will want to use an image.
While we are on the subject, I use Imgburn to get images of my CDs. Sometimes I run them from the drive, but it's more convenient to have them on your harddrive. This also fixes some issues such as the aforementioned problem with redbook audio and it also allows you to switch disks by mounting multiple images. (Again, for some reason when I remove a disk from a drive DOSBox will recognize the disk is gone but will not recognize a new disk put into the drive until I remount it, which can only be done from DOS and thus isn't feasible for programs that require you to switch disks in Windows.) Most of the time you will get an iso file, but in the case of a redbook audio CD you will get a bin file and a cue file. You still mount these with the "type" of iso. For example "imgmount d civ2.bin -t iso". However you should actually mount the cue file, i.e. "imgmount d civ2.cue -t iso". If you mount the bin file then DOSBox will not recognize the CD audio tracks.
I highly recommend installing all software from the disk, either from the drive or from an image that you've made, rather than copying fully installed programs. This can fix some hard to track down problems. It also gets you more "in the mood" of the Windows 3.1 era, since you'll see the old time installers and often get shown demos or catalogues detailing other programs. (A good way to get ideas to find more software to look for, since it's not like any of this stuff is well known any more!)
The last issue I had was with Quicktime. Quicktime was a very common way to run videos back in the day, and many games and multimedia programs require it. If you are installing things from the disk this shouldn't be a problem since anything that uses quicktime should let you install it. However for whatever reason I always had quicktime fail to install correctly; this happened from multiple different disks. I don't know if this was a proglem with DOSBox, but it was consistent. Therefore you will want to install it separately. You can find it here. Note that some programs don't let you install without installing quicktime, even if you already have it installed. If this happens and the program messes up the installation, simply reinstall quicktime from your own files.
I think that's all the essentials. I may have forgotten some driver which came with a game or which I was able to add in Windows from the install disks, but that should be enough to let you run most things. I'll probably write further articles about why I bother doing this or the fun in customizing little things, but for now this should suffice.
July 19, 2022