VOGONS


Windows 3.1x source code

Topic actions

Reply 20 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, yes, I think i's rather thin client friendly because of that.
It also has at least two different types of swap files (temporary, fixed and none) and multiple ways to access HDD (DOS, BIOS, Windows HDD driver).
A fourth way is via SmartDrive, if that counts as its own access method, too.
Then it can run via WIN /2 in Standard-Mode, which often still works on troublesome hard- and software onfigurations.
Then there's also a limited compatibility with Win32 applications through Win32s add-on.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 22 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++

^ I really like it how the symbolic picture shows an Amiga version of the Infocom interpreter! 😁
The white on blue and the text font used on Amiga does contribute something to the atmosphere, I think.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 23 of 38, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
Lualb wrote on 2025-11-28, 23:49:

Hello! I've been reading your comments, and I really appreciate each one. I'd like to add something: As you'll notice, Windows 3.1 is a very flexible operating environment compared to Windows 9x. If you install DOS 7.10 on a USB drive and type "WIN", it will automatically boot into Windows 3.1 without much trouble. So, Windows 3.1 is pre-optimized to boot on modern hardware with BIOS support and a fairly fast CPU—things that, for example, Windows 95 or 98 wouldn't do, and if they did, they would quickly break.

I don't recall having any success on booting Win3.1 installed on USB stick in 386 Enhanced Mode. Even with DOS 7.1 I still need it installed on hard disk. With SATA in AHCI mode the AHCIFIX.386 driver (maybe AHCIFIXD.SYS also) would be needed.

The main issue with Win3.1 is memory management, namely how Program Manager renders program group icons. The 256MB memory limit (or 1GB with PageOverCommit=1) is not the most important issue as it can be easily worked around.

And there are operations during graphical setup phase that would need a lot of conventional memory, and would throw errors if you're running low on it. I think having around ~580KB would be safe. For those operations, the amount of XMS/EMS you have doesn't matter. An example would be: on Win3.1 English with Japanese Support (3.10.165), with about 540KB of conventional memory (using Win3.x HIMEM which limited XMS to 64MB), setup threw "not enough memory" errors when combining Japanese fonts (MS Gothic and Mincho), so program group names in Program Manager were rendered in small fonts that's kind of unreadable. Reinstalled the system with about 588KB of conventional memory available, thanks to LIMITMEM, HIMEM (DOS 7.1) and EMM386 (NOEMS), that part completed without issues, and everything looks correct.

PS: It should be noted that Winfile had serious issues if using a DOS extender other than MS's own (DOSX). It's actually possible to run Win3.1 in Standard Mode on top of HX DOS Extender, but Winfile will crash the whole system with some register outputs as soon as it's opened. Winfile had been open-sourced, however.

Reply 24 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++

^ That's a very interesting detail, indeed. I didn't know that before.
Because when I've used Windows 3.10, there merely were two popular Windows drivers that played a role:
- Standard VGA in 640x480 pixels 16c
- Super VGA in 800x600 pixels 16c (good for office works)

Sure, there were users who ran Windows in 1600x1200 pixels resolution. With up to 15 or 16-Bit colour depth or so.
But in practice, who required that, considering the performance impact on ISA bus?

I can think of..
- CAD (but that merely needs 16 to 256c, unless rendering is involved)
- photo editing (highest colour depth recommended, screen resolution depends on monitor size)
- displaying Kodak PhotoCDs (hghest colour depth+resolution recommended)
- desktop publishing (sharp, steady text and clip arts)
- multimedia/video editing (above PAL/NTSC res and 65535 or more colours)
- playback of VideoCDs/CD-is (640x480 res and 256c and higher colour depth)
- video chat/communications (via ISDN etc, early webcams were monochrome though)

Then, Windows for Workgroups 3.11 came along and included an 256c SuperVGA driver for 640x480, 800x600 and 1024x768 pix resolution.

Sure, then-new PCI graphics cards featured lots of video RAM and simultanous high resolutions/high colour depths.
Like those Matrox cards that come to mind right now..

So 16-Bit or 24-Bit graphics actually existed on Windows 3.x.
However, how common was that? And at which point Windows 9x or NT took the lead? 🤷‍♂️
I seriously don't remember right now. To me, as far as I remember, Windows 3.1x and Windows 3.x software often aimed for 256c colour depth (supported palette and colour cycling).
While some poor souls were still stuck with basic VGA on Windows 3.1x at the time.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 25 of 38, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2025-11-28, 20:05:
Yes, in very simplified terms. In about same amount that Windows 95 is a shell. ;) […]
Show full quote
Peter Swinkels wrote on 2025-11-28, 18:49:

Windows 3.1 isn't an operating system, it's a shell.

Yes, in very simplified terms. In about same amount that Windows 95 is a shell. 😉

(Long story: Win3 has a scheduler, message-based multitasking, its own memory managment, a printer spooler, a V86 monitor in 386 Enhanced-Mode, its own executable format etc pp.)

(PS: Oh, and WABI runs the Windows 3.1 386 kernal directly on *nix, without DOS.
DOS applications require DOSemu or something else to be run from WABI.)

You got a point there, but unlike Windows 3.1 9x comes preinstalled on top of DOS and needs to be manually removed which kind of a hack and unsupported. The former is something optional on top of DOS. Also going to DOS-mode isn't quite the in 9x same as exiting Windows 3.1. (Long files no longer supported for one.) I'll admit there are arguments to be made for Windows 3.1 being an OS but I maintain it's a shell. Windows 9x is closer to being an actual OS instead of something on top of a pre-existing OS. Also, I fail to see what purpose a modified Windows 3.1 could possibly serve. To get it to do anyhting useful in a modern sense you will need to modify it to the extreme.

My GitHub:
https://github.com/peterswinkels

Reply 26 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++

The former is something optional on top of DOS.

Hi, yes. For the first time, Windows 95 was a bundle of DOS and Windows that felt like a full operating system.
But I think that with Windows for Workgoups 3.11, at very least, MS-DOS 6.22 was often included in the package.
Both products were sold shrink-wrapped together into a bundle - and the MS-DOS 6.2x disk set did include Windows 3.1x utilities such as smartmon.exe.
So both MS-DOS and Windows were products made for each other, I think.
In principle, I think, this started with MS-DOS 5 already. MS-DOS 5 had WINA20.386 on Disk #1, which was needed for Windows 3.0 (for 386 Enhanced-Mode).

Edit: Picture added. That's what I meant. These bundles were often sold as bulk/OEM ware.
On the backside of the manual there used to be the certificate and a paper bag/mail bag
with the end user license printed on it and the disk set inside.
Though there also were Windows 3.1 and MS-DOS 6.x bundles, it seems. Not sure about earlier bundles, though.
In Windows 2.0 and 3.0 days, the Microsoft products were simply included as separate products in the same box of a new PC?

Edit:

I'll admit there are arguments to be made for Windows 3.1 being an OS but I maintain it's a shell.

I do understand that. I tend to refer to Windows 3.x and older as "graphical environment" nowadays.
Also because it used to be written on the box of Windows 3.0 and in the splash screen of Windows 3.0 MME! :D

As far as Windows 9x goes.. Not sure. For 30 years people do debate now whether it's an OS or not. And the OS/2 fans used to make fun of it, too. ;)
To me, it falls into same category of DESQView/X, maybe.
It's a V86 hypervisor with a GUI and the ability to run Win16/Win32 and DOS applications.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 27 of 38, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Fair point, true MS-DOS 5.0 and 6.22 came packaged with Windows. Just for the record, a decent XT class machine could run MS-DOS 6.22 on its own okay.

I read about people claiming Windows 3.1 would make a neat basis for some minimalist system. I bet that when you're done modifying it you essentially have something you'd get if you stripped down a modern Windows. A quick search told me there is something like Tiny11 based on Windows 11.

My GitHub:
https://github.com/peterswinkels

Reply 28 of 38, by unluckybob

User metadata
Rank Newbie
Rank
Newbie
keenmaster486 wrote on 2025-11-28, 15:23:

They will never release something someone could use to make a better OS than Windows 11.

That's a rather low bar don't you think? a potato is a better OS then 11 🤣

Reply 29 of 38, by rasteri

User metadata
Rank Oldbie
Rank
Oldbie

I love how this "is windows an OS" debate started 45 years ago and there's still no resolution 🤣

Reply 30 of 38, by myne

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2025-11-29, 15:10:
Hi, yes. For the first time, Windows 95 was a bundle of DOS and Windows that felt like a full operating system. But I think that […]
Show full quote

The former is something optional on top of DOS.

Hi, yes. For the first time, Windows 95 was a bundle of DOS and Windows that felt like a full operating system.
But I think that with Windows for Workgoups 3.11, at very least, MS-DOS 6.22 was often included in the package.
Both products were sold shrink-wrapped together into a bundle - and the MS-DOS 6.2x disk set did include Windows 3.1x utilities such as smartmon.exe.
So both MS-DOS and Windows were products made for each other, I think.
In principle, I think, this started with MS-DOS 5 already. MS-DOS 5 had WINA20.386 on Disk #1, which was needed for Windows 3.0 (for 386 Enhanced-Mode).

Edit: Picture added. That's what I meant. These bundles were often sold as bulk/OEM ware.
On the backside of the manual there used to be the certificate and a paper bag/mail bag
with the end user license printed on it and the disk set inside.
Though there also were Windows 3.1 and MS-DOS 6.x bundles, it seems. Not sure about earlier bundles, though.
In Windows 2.0 and 3.0 days, the Microsoft products were simply included as separate products in the same box of a new PC?

Edit:

I'll admit there are arguments to be made for Windows 3.1 being an OS but I maintain it's a shell.

I do understand that. I tend to refer to Windows 3.x and older as "graphical environment" nowadays.
Also because it used to be written on the box of Windows 3.0 and in the splash screen of Windows 3.0 MME! 😁

As far as Windows 9x goes.. Not sure. For 30 years people do debate now whether it's an OS or not. And the OS/2 fans used to make fun of it, too. 😉
To me, it falls into same category of DESQView/X, maybe.
It's a V86 hypervisor with a GUI and the ability to run Win16/Win32 and DOS applications.

9x was an os in its own right.
Dos was there in 2 forms.

One as the boot loader like grub or ntldr
One as a virtual machine not unlike dosbox.

The kernel didn't depend on dos, but it could use dos interfaces, and seemed to be more dependent on it than it was which muddied the water.

I built:
Convert old ASUS ASC boardviews to KICAD PCB!
Re: A comprehensive guide to install and play MechWarrior 2 on new versions on Windows.
Dos+Windows 3.11+tcp+vbe_svga auto-install iso template
Script to backup Win9x\ME drivers from a working install
Re: The thing no one asked for: KICAD 440bx reference schematic

Reply 31 of 38, by doshea

User metadata
Rank Oldbie
Rank
Oldbie
Lualb wrote on 2025-11-28, 23:49:

Hello! I've been reading your comments, and I really appreciate each one. I'd like to add something: As you'll notice, Windows 3.1 is a very flexible operating environment compared to Windows 9x. If you install DOS 7.10 on a USB drive and type "WIN", it will automatically boot into Windows 3.1 without much trouble. So, Windows 3.1 is pre-optimized to boot on modern hardware with BIOS support and a fairly fast CPU—things that, for example, Windows 95 or 98 wouldn't do, and if they did, they would quickly break.

I understand what you mean, but "optimised" seems like the wrong word there, since using the BIOS to access hardware is the opposite of optimised - it's the least efficient way to do it!

If I understand correctly, BIOS support is going away, so perhaps the modern option is to make an operating system that relies on UEFI for hardware access instead of having drivers? I don't know enough about UEFI to know how feasible that is.

I would imagine that if you want something modern, a better place to start is some other modern operating system like Linux or FreeBSD, rather than a really old operating system that can't run any modern software.

Reply 32 of 38, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
doshea wrote on Yesterday, 03:31:

I understand what you mean, but "optimised" seems like the wrong word there, since using the BIOS to access hardware is the opposite of optimised - it's the least efficient way to do it!

If I understand correctly, BIOS support is going away, so perhaps the modern option is to make an operating system that relies on UEFI for hardware access instead of having drivers? I don't know enough about UEFI to know how feasible that is.

I would imagine that if you want something modern, a better place to start is some other modern operating system like Linux or FreeBSD, rather than a really old operating system that can't run any modern software.

Depending on BIOS implementation this may not necessarily hold true. On my X99 board, with SATA in AHCI mode, BIOS access is blazing fast. My SATA SSDs can easily reach rated speed (~550MB/s) in DOS without any assistance (e.g. SMARTDRV).

For UEFI-only systems there's CSMWRAP project. However, a correct UEFI implementation is still going to be needed for best experience.

Reply 33 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++
myne wrote on 2025-11-29, 23:34:
9x was an os in its own right. Dos was there in 2 forms. […]
Show full quote
Jo22 wrote on 2025-11-29, 15:10:
Hi, yes. For the first time, Windows 95 was a bundle of DOS and Windows that felt like a full operating system. But I think that […]
Show full quote

The former is something optional on top of DOS.

Hi, yes. For the first time, Windows 95 was a bundle of DOS and Windows that felt like a full operating system.
But I think that with Windows for Workgoups 3.11, at very least, MS-DOS 6.22 was often included in the package.
Both products were sold shrink-wrapped together into a bundle - and the MS-DOS 6.2x disk set did include Windows 3.1x utilities such as smartmon.exe.
So both MS-DOS and Windows were products made for each other, I think.
In principle, I think, this started with MS-DOS 5 already. MS-DOS 5 had WINA20.386 on Disk #1, which was needed for Windows 3.0 (for 386 Enhanced-Mode).

Edit: Picture added. That's what I meant. These bundles were often sold as bulk/OEM ware.
On the backside of the manual there used to be the certificate and a paper bag/mail bag
with the end user license printed on it and the disk set inside.
Though there also were Windows 3.1 and MS-DOS 6.x bundles, it seems. Not sure about earlier bundles, though.
In Windows 2.0 and 3.0 days, the Microsoft products were simply included as separate products in the same box of a new PC?

Edit:

I'll admit there are arguments to be made for Windows 3.1 being an OS but I maintain it's a shell.

I do understand that. I tend to refer to Windows 3.x and older as "graphical environment" nowadays.
Also because it used to be written on the box of Windows 3.0 and in the splash screen of Windows 3.0 MME! 😁

As far as Windows 9x goes.. Not sure. For 30 years people do debate now whether it's an OS or not. And the OS/2 fans used to make fun of it, too. 😉
To me, it falls into same category of DESQView/X, maybe.
It's a V86 hypervisor with a GUI and the ability to run Win16/Win32 and DOS applications.

9x was an os in its own right.
Dos was there in 2 forms.

One as the boot loader like grub or ntldr
One as a virtual machine not unlike dosbox.

The kernel didn't depend on dos, but it could use dos interfaces, and seemed to be more dependent on it than it was which muddied the water.

Hi, I can't speak for Windows 95 exactly, but in Windows 98 (98FE) things looked like this:

The attachment win98-struktur-scr-.gif is no longer available

MS-DOS 7.x is used as boot loader, then -as far as I do understand it- it's being moved into one of the V86 VMs.
Here, it remains active to serve as an interface to existing DOS drivers that had been loaded before Windows started up.
Such as DOS-based network drivers or DOS-based CD-ROM drivers (even MSCDEX, which still can be used instead of native CDFS).

The heart of Windows 98 is the VMM (virtual machine manager).
Other services/drivers such as DPMI and the scheduler run in kernel space (ring 0), too.
Windows 3.1x applications run as a single "blob" in co-operative multitasking, while Win32 applications run in preemptive multitasking.

That's about the only notable difference to WfW 3.11+Win32s I can think of.
The latter one runs Win32(s) applications in co-operative multitasking, because it runs atop of Windows 3.1x API.
However, both WfW 3.11 and Windows 95 do run MS-DOS applications preemptive.

The foundation of both is same. WfW 3.11 and Windows 95 were in development about same time, even.
At core, Windows 95 uses former Windows 3.1 system files, even. KERNEL, GDI, SYSTEM.
The GDI is still half 16-Bit and a method called "thunking" converts between 16-Bit/32-Bit variables and pointers in memory. Or also Win16/Win32 API in general, not exactly sure.

Some stuff of Chicago was backported to Snowball.
The 32-Bit File Access and TCP-IP/32 stack are one of those things, I *think* (have to check).
And if 32-Bit File Access (HDD cache in 386 Protected-Mode) and 32-Bit Disk Access (HDD driver in 386 Protected-Mode, aka FastDisk) are enabled in WfW 3.11, then it nolonger needs DOS in a similar way to Windows 95.
That's why I personally don't exactly know how to classify WfW/Win9x.
Windows 95 surely is a magnetude more complex than Windows 3.x, but it uses same technology as a basis.

Windows for Workgroups can at least about qualify as an network operating system given how integtrated the network functionality is.
But even here some people might compare it to almighty Novell Netware and think otherwise (it competed with Netware Lite/Personal Netware in the peer-to-peer days of networking). 🙂

Edited.

PS: Also funny/fascinating are Windows 98SE and Windows Me, by the way!
Windows 98SE has improved upon new WDM driver technology, while also still containing large number of VXDs.
Windows Me further moved torwards WDM and replaced existing VXDs
(but remained capable of loading them. Even *.DRV drivers from 16-Bit Windows still work).

The interesting thing is that WDM also unified both Windows NT and 9x.
Windows NT 4 didn't support WDM or VXDs (the latter formerly known as *.386 drivers) but used traditional, native NT drivers (*.SYS).
Windows 98SE and Windows 2000 both agreed on WDM then (Win2k still can load NT4 drivers).
Windows 98SE includes NTKERN.VXD which helps to simulate NT technology.
That file itself is being assembled into VMM32.VXD, AFAIK.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 34 of 38, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie
unluckybob wrote on 2025-11-29, 19:46:
keenmaster486 wrote on 2025-11-28, 15:23:

They will never release something someone could use to make a better OS than Windows 11.

That's a rather low bar don't you think? a potato is a better OS then 11 🤣

Exactly. A 64-bit port of Windows 3.1 would destroy Windows 11.

GBAJAM 2024 submission on itch: https://90soft90.itch.io/wreckage

Reply 35 of 38, by GemCookie

User metadata
Rank Member
Rank
Member
unluckybob wrote on 2025-11-29, 19:46:

That's a rather low bar don't you think? a potato is a better OS then 11 lol

But can a potato run Crysis? :)

Gigabyte GA-8I915P Duo Pro | P4 530J | GF 6600 | 2GiB | 120G HDD | 2k/Vista/10/FBSD
MSI MS-5169 | K6-2/350 | TNT2 M64 | 384MiB | 120G HDD | DR-/MS-DOS/NT/2k/XP/OBSD
Dell Precision M6400 | C2D T9600 | FX 2700M | 16GiB | 128G SSD | 2k/XP/NBSD

Reply 36 of 38, by Lualb

User metadata
Rank Newbie
Rank
Newbie
bakemono wrote on Yesterday, 15:04:
unluckybob wrote on 2025-11-29, 19:46:
keenmaster486 wrote on 2025-11-28, 15:23:

They will never release something someone could use to make a better OS than Windows 11.

That's a rather low bar don't you think? a potato is a better OS then 11 🤣

Exactly. A 64-bit port of Windows 3.1 would destroy Windows 11.

Wow, I hadn't thought of that... And as you said, more and more people are preferring minimalist versions of Windows (MiniOS) because of the speed and lightness of the OS.

Reply 37 of 38, by Jo22

User metadata
Rank l33t++
Rank
l33t++

In principle, a Win64s compatibility layer might be possible.
Not sure if it would have to be run in Windows 386 Enhanced-Mode or Standard-Mode, however.
Because 64-Bit Long-Mode doesn't do V86, but it allows 16-Bit Protected-Mode code as being used by the 286 kernal of Windows 3.x.
That being said, hardware-assisted virtualization might provide a workaround here.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 38 of 38, by davidrg

User metadata
Rank Member
Rank
Member
digger wrote on 2025-11-27, 15:41:
I was thinking about that too, the other day. Why not release the source code to Windows 3.x at this point? What could possibly […]
Show full quote

I was thinking about that too, the other day. Why not release the source code to Windows 3.x at this point? What could possibly be in there that would still give Microsoft a competitive edge to keep secret?

Any patents on it have expired and it's way too old to help competitors in developing competing products in any meaningful way.

One argument could be that they might not own the rights to all of the sources, but wasn't that more of a problem with Windows NT, when they worked closely with IBM in the initial stages of OS/2 development?

And even if IBM owns any of the rights to Windows 3.x sources, I don't see why they would object to those sources being released.

At this point, it's becoming more valuable for Microsoft to actually release the sources, for the purposes of historic preservation.

The same could be said for MS-DOS versions of which Microsoft still hasn't released the sources at the time I'm writing this (MS-DOS 3.3, 5.0 and 6.x).

I understand the main open-sourcing roadblocks to be:

  • Lawyers need to check over everything to make sure its OK. They might have to get permission from other companies where Microsoft doesn't own all the rights (drivers, bundled applications, other licensed bits, etc). All of this takes time and costs money.
  • If the lawyers find stuff they can't get permission to release, someone may need to spend time removing those things.
  • It isn't anyones job within Microsoft to champion this sort of thing and push it through the various layers of beauracy to make it happen.
  • There isn't any money to be made from this, only good PR.

The fact that old stuff gets open sourced occasionally demonstrates that when someone high up enough in Microsoft is motivated enough they can make it happen, but from what I've heard its not an easy or quick process and its all being done on top of all the usual stuff these people have to do as part of their day job - its a bunch of extra work.

MS-DOS 6.x is a good example of needing permission from 3rd-parties: memmaker, defrag, msav, drivespace to name a few were all licensed from elsewhere and so would need to be removed if Broadcom/symantec/mcaffee/whoever can't be convinced that they own this stuff and that they should be OK with it being released (and there is no profit in these companies saying yes). I'm sure there are a bunch of things in Windows 3.x and Windows 9x that would run into similar difficulties.

I don't think Microsoft would seriously consider any of this stuff to be a competitive risk. There is nothing in Windows 3.x that would be remotely useful in building a competitor to modern Windows and the same is probably true for Windows 95/98/ME which even in the 90s only ever implemented a subset of the Win32 API - Microsoft abandoned that operating system for a good reason. You'd get much further much faster improving WINE than trying to build the old Windows codebase into a viable competitor.