Fun with Windows ePDK NT 3.1 build 196 & Some Xenix fun!

I’m not sure if I covered the Windows NT 3.1 build 196 before. First the most obvious is that as of this moment it’s the earliest version of Windows NT available.

So let’s do some obligatory scratch of the surface. Like all the other 1991 pre-releases there really is just a text mode setup install script. Choosing the lesser amount of pain, I went with a MS-DOS hosted install. However, using MS-DOS 6.22 resulted in a broken dual boot system. But we live in the era of virtual machines, so it really doesn’t matter. I’m using Qemu 0.14-rc2, something that is ‘era correct’ for when the first avalanche broke on early Windows NT pre-releases. I’ve had issues with more modern versions of Qemu, and I felt that if we’re using vintage software may as well go in all the way.

The boot loader identifies itself as being 1990 vintage. Pretty sure it doesn’t mean anything, but we haven’t been blessed with the “blue screen” of ARC yet.

The login screen and desktop have a very strong Windows 3.1 beta feel to them. And that would land this where it was, Windows was such a big seller that Maritz had been trying to convince Gates & Balmer to ‘switch to the Windows horse’ in the spring/summer of 1990, culminating in Gate’s July decision to walk away from NT/OS2 and rebrand the new OS as Windows NT. Oddly enough it was Balmer who was in favour of OS/2 & IBM. (Showstopper 89-90)

At first glance the opening window isn’t all that interesting. It’s just very. Windows.

Rest assured Reversi, of course made the this Win32 cut. And it’s full of weird easter eggs, oddly enough in the OS/2 surviving bits.

type OS2LDR.DOS
OS2LDR 01.00.01
by KeithMo 01/08/91

On the Discord there had been a big discussion about early NT executable formats, and the whole COFF vs ECOFF vs PE/PEI. I had tried to hunt down the specific version of GCC I used ages to to build a so called Dec Alpha GCC cross compiler, but the short version is that it didn’t work as we don’t have any assembler/linker for anything GNU targets. There had been a cygwin port and an OpenNT on Alpha, but all that is lost to the winds, minus what few scraps I had saved. I did try building some cross tools to elf hoping to just objcopy out the data and get linkable objects, but that didn’t work either.

So I though this was a perfect opportunity to take a look at this early pre-release version of NT, and although I do know that you have to convert your objects into something the ‘COFF’ linker will accept:

And I never really paid that much attention to the object files. I do know that you can link them with Link386 for OS/2, but the NT object files themselves report:

wsl file SIMPLE.OBJ
SIMPLE.OBJ: Intel 80386 COFF object file, not stripped, 4 sections, symbol offset=0x102, 20 symbols, created Thu Jun  1 14:13:50 2023, 1st section name ".text"

Well, now that is interesting. And of course the COFF thing reminded me of Xenix! And sure enough ages ago I had found the source to a modified version of GNU GAS that outputs COFF. Once more again this is an indication that all 386 roads in Microsoft really did originate with Xenix. It’s too bad there never was a Windows/386 on Xenix/386. What an incredible OS that would have been! There must be some incredible stories from the tool teams that worked on Microsoft C/386 along with other projects. Oddly enough they never get anywhere near as much exposure as Office or OS.

Now this is fun, but nothing takes in these ancient COFF objects, do they? I tried to run LINK 1.0 from Win32s SDK and surprisingly it didn’t complain about the object, rather, it auto converted it in memory:

Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.

SIMPLE.OBJ : warning LNK4016: unresolved external symbol "__chkstk"
LINK : warning LNK4016: unresolved external symbol "_mainCRTStartup"
SIMPLE.OBJ : warning LNK4016: unresolved external symbol "_printf"
SIMPLE.exe : error LNK1120: 3 unresolved externals

Does this mean that if I give it some libraries it will actually link?

LINK.EXE SIMPLE.OBJ /SUBSYSTEM:CONSOLE /MACHINE:i386 -entry:mainCRTStartup -out:simple.exe libc.lib kernel32.lib
Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.


C:\temp\nt196\x\dec\x>simple
Win32, it's happenin'!

This was. VERY unexpected.

So I had this crazy idea, what if the Xenix assembler could in fact build objects that are also compaible in this manner? I used the a.out GCC / Linux porting tools I had built so I could compile Linux on Windows NT using the vintage tools as a starting point. I guess I should also add that when people always say ‘use newer version of THING’ this is how you miss out on old stuff like this. If I had been obsessed with using modern tools and modern operating systems, I’d have missed out on this Xenix filled window.

I took the gcc driver & the cc1 compiler from 1.40 and the c pre-processor from 2.5.8 as it can understand C++ comments. First I manually compiled the ‘simple’ example to assembly:

gcc -v -nostdinc -I/xenixnt/h -S SIMPLE.c -O simple.S
gcc version 1.40
 cpp -nostdinc -v -I/xenixnt/h -undef -D__GNUC__ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ SIMPLE.c C:/Users/jsteve/AppData/Local/Temp/cca2_048.cpp
GNU CPP version 2.5.8 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /xenixnt/h
End of search list.
 cc1 C:/Users/jsteve/AppData/Local/Temp/cca2_048.cpp -quiet -dumpbase SIMPLE.c -O -version -o SIMPLE.s
GNU C version 1.40 (80386, BSD syntax) compiled by GNU C version 5.1.0.
default target switches: -m80387
 cpp -nostdinc -v -I/xenixnt/h -undef -D__GNUC__ -$ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ simple.S C:/Users/jsteve/AppData/Local/Temp/cca2_048.s
GNU CPP version 2.5.8 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /xenixnt/h
End of search list.

Which gave me the following assembly:

        .file   "SIMPLE.c"
gcc_compiled.:
.text
LC0:
        .ascii "Win32, it's happenin'!\0"
        .align 2
.globl _main
_main:
        pushl %ebp
        movl %esp,%ebp
        pushl $LC0
        call _printf
        leave
        ret

Now to assemble with the GAS Xenix assembler

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE>ax386 SIMPLE.s -o SIMPLE.obj

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE>wsl file SIMPLE.obj
SIMPLE.obj: 8086 relocatable (Microsoft), "SIMPLE.c", 1st record data length 10, 2nd record type 0x88, 2nd record data length 11

Not quite the same. But it does closer resemble the output from the OS/2 bound versions of the Pre-Rease compilers:

file EMPTY.OBJ
EMPTY.OBJ: 8086 relocatable (Microsoft), "empty.c", 1st record data length 9, 2nd record type 0x88, 2nd record data length 7

So will it link?!

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE>LINK.EXE SIMPLE.OBJ /SUBSYSTEM:CONSOLE /MACHINE:i386 -entry:mainCRTStartup -out:simple.exe libc.lib kernel32.lib
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

SIMPLE.OBJ : warning LNK4033: converting object format from OMF to COFF

C:\temp\nt196\files\MSTOOLS\SAMPLES\SIMPLE>simple
Win32, it's happenin'!

Well now this is interesting! LONG before MinGW, or the GCC port to Windows NT, it turns out that in fact GCC could target Windows NT the entire time!

So the next thing to do is something not as trivial, like phoon.

I setup some quick script to pre-process, compile, assemble and then try to link, but as this one uses floating point, disaster struck:

phoon.obj : error LNK2001: unresolved external symbol "___fixdfsi"
astro.obj : error LNK2001: unresolved external symbol "___fixdfsi"
phoon.exe : error LNK1120: 1 unresolved externals

Now ages ago while messgin with old GCC & DooM I also had weird math calls not working. In the end I ended up extracting them from libgcc builds, so I thought I’d try the libgcc built during the GCC 2.6.3 on NT adventure.

link /NODEFAULTLIB:libc.lib /NODEFAULTLIB:OLDNAMES.LIB -out:phoon.exe astro.obj date_p.obj phoon.obj -entry:mainCRTStartup libgcc1.lib LIBC.LIB KERNEL32.LIB
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

And of course:

To try to make the steps make a little more sense, and to allow for some higher level of automation I made a Makefile:

CC=gcc
CC1=cc1
AS=ax386
CPP=cpp


CFLAGS= -O
CPPFLAGS= -lang-c-c++-comments -nostdinc -I/xenixnt/h

OBJ =   astro.obj \
date_p.obj \
phoon.obj

LIBS = libgcc1.lib LIBC.LIB KERNEL32.LIB

phoon.exe: $(OBJ)
        link -out:phoon.exe $(OBJ) -entry:mainCRTStartup $(LIBS)

%.obj: %.c
        $(CPP) $(CPPFLAGS) $< $*.i
        $(CC1) $*.i -quiet $(CFLAGS) -version -o $*.S
        $(AS) $*.S -o $*.obj


clean:
        del $(OBJ) *.i *.S phoon.exe

I’m sure there is better ways to do this, but it breaks the compile up to it’s individual parts:

Run the pre-processor to allow // in the comments, C++ hadn’t been the default thing back when GCC 1.40 was a thing. Also path it to the headers, in this case I’m using the ones from NT 196. Trying to link with the 196 libraries gave me this:

C:\xenixnt\demos\phoon>link /NODEFAULTLIB:LIBC.LIB /NODEFAULTLIB:OLDNAMES.LIB -out:phoon.exe astro.obj date_p.obj phoon.obj -entry:mainCRTStartup base.lib wincrt.lib ntdll.lib \xenixnt\lib\libgcc1.lib
Microsoft (R) 32-Bit Incremental Linker Version 2.50
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

wincrt.lib(maincrt0.obj) : warning LNK4078: multiple ".data" sections found with different attributes (40000040)
astro.obj : error LNK2001: unresolved external symbol "_asin"
astro.obj : error LNK2001: unresolved external symbol "_atan"
astro.obj : error LNK2001: unresolved external symbol "_atan2"
phoon.obj : error LNK2001: unresolved external symbol "_cos"
astro.obj : error LNK2001: unresolved external symbol "_cos"
astro.obj : error LNK2001: unresolved external symbol "_floor"
astro.obj : error LNK2001: unresolved external symbol "_sin"
phoon.obj : error LNK2001: unresolved external symbol "_sqrt"
astro.obj : error LNK2001: unresolved external symbol "_sqrt"
astro.obj : error LNK2001: unresolved external symbol "_tan"
phoon.exe : error LNK1120: 8 unresolved externals

Which is not surprising as there is no FPU/Floating point math support in 196. I tried the December 1991 Pre-Release, but it failed for other reasons:

I did copy over BASE.DLL BASERTL.DLL CSR.DLL DBGDLL.DLL as it wanted, but despite the symbol being in the DLL it didn’t load.

So that’s why I’m using the libraries from the Win32s SDK.

Okay, so far now we have GCC 1.40 compiling to an old Xenix GAS assembler, and linking with Microsoft link from Visual C++ 1.0/2.0 era. The next step is to see if we can just link the objects under 196, and get a running EXE!

I have this tiny fibonacci example program, so with it compiled & assembled by GCC & GAS, I did the final link under 196, and YES it runs!

I then built the ’87 InfoTaskForce, Infocom interpreter, and it was just a simple link, and it’s running!

Possible things to do? GCC should be able to build itself, so it should be possible to build GCC and link that on 196 or December 1991, and get a native version of GCC on NT. The other possibility is to get newer versions of GCC (cc1 drop in replacements) to build for Xenix and / or OS/2. Obviously this Xenix linker is the gateway to older 386 Microsoft based products!

For those interested in such things, I’ve uploaded all of this to archive.org here: windows-nt-196-linking-and-running-gcc

Anglofying & running Japanese Lemmings for Windows

On one of my later trips I picked up this fun title, Lemmings!

And looking at the back of the box, what fun it contains!

Support PC-98, Epsons, IBM’s, IBM PC/AT.. Probably FM Towns as well

One interesting thing about 1995, is that with the rise of Windows 95, this marked the end of the specialized PC market in Japan. Just as WING/Direct X basically killed off the DIY driver/extender environment on MS-DOS, by being able to abstract the hardware it removed any meaningful difference between an EPSON PC vs a PC-98, FM Towns, or even the lowly IBM AT/386.

This being a Win32 includes both WING & Win32s. A perfect snapshot of an early Win32 commercial game circa 1995, as you needed to cater to that massive Windows 3.1 install base, although so many were rushing to Windows 95. Naturally this also means that the setup program is a Win16 app, once more again to preserve that bridge of the Windows 3.1 & Windows 95 world.

Well the obvious thing to do is just install it on a legacy 32bit OS, and what better than Windows XP?

Lemmings happily running under Windows XP via VMWare.

Now to run it on something like Windows 10, it’s just a matter of copying the WINLEMM.INI into %sysroot%, along with placing a copy of WING32.DLL into the %sysroot%\SysWOW64 directory and you are good to go!

Japanese Lemmings on English Windows 10

Sadly the character encoding in Windows is still really lacking and doesn’t render all that great. However that had me thinking as almost a decade ago I did find a demo of Lemmings for Windows. Could it be possible to just overlay the executables & DLL’s to produce an English commercial version?

Surprisingly the answer is yes. I wasn’t sure what to expect, but it’s as simple as that!

The game is mostly playable, some parts are just coded to run as fast as possible, as no doubt nobody was imagining 1+ Ghz machines. So the intro, warp & suicide are almost instant.

It’s something to keep the kids entertained for a day in recent events. It’s been a LONG CNY.

Early MSDN CD’s on archive.org

I ran across this, and thought it was cool. These CD’s are getting harder and harder to find, and unless you want the old physical disks, getting ISO images is, of course the next best thing.

Granted these disks replaced the much older Microsoft Programmer’s Library. The new CD’s use a Windows based search & interface program removing the clunky old MS-DOS program that made it feel like trying to view the world through a straw. (Although the up side of the MS-DOS version is that you could easily dump the video RAM and save the contents to plain text).

And in this brave new post Windows 3.0 centric world of Microsoft just about everything regarding OS/2 was dumped, and the seeding of Win32 via Windows NT had started.

Naturally after winning this war, Microsoft withdrew many low end products and just couldn’t compete with the tidalwave that was GNU/Linux.

At any rate for the curious kids down the road that want to see what all the fuss was with Win16, and how Windows 3.0 had changed the landscape removing the force of IBM it’s worth a look.

Adding DOSBox’s MPU401 to Qemu 0.90

I thought this may be something cool, if not kind of pointless. Anyways the MPU401 UART can be run like a traditional serial port with an IRQ, in intelligent mode, or just as a ‘dumb’ device you can just bit bang to talk to MIDI devices. So while playing with DOSBox I thought it’d be fun to take it’s emulation and plug it into Qemu.

And this is the end result.

It’s far from perfect, when it works it does tend to work well, although it fails to work with things like Return to Zork, but it does work with DMX’s sound code in DooM and the MPU401 driver for Windows 3.1

While doing this I was originally struggling with mapping the IO ports. Qemu has some functions to map in the memory model to assign a function that will trap read/write space. In this case base is 0x330 the base of the MPU401 device.

register_ioport_write(base, 8, 1, mpu401_ioport_write, s); register_ioport_read(base, 8, 1, mpu401_ioport_read, s);

I was thinking that the port 0x331 needed to be mapped in the same way, but it turns out after looking through more of the source, it’s actually a word aligned access. So in that case you can use a switch to see which port is actually being accessed.

static uint32_t mpu401_ioport_read(void *opaque, uint32_t addr) { switch(addr&0xf) { case 0: return(MPU401_ReadData(addr,0)); break; case 1: return(MPU401_ReadStatus(addr,0)); break; default: return(0xff); break; } return(0xff); }

Pretty simple, right?

And from there it’s a matter of mapping the DOSBox MPU code, along with the Windows interface code. Since I’m not using intelligent or IRQ mode, I just amputated the code where applicable.

If anyone wants to look at what I did to merge into anything else (and probably do a better job!) it’s on sourceforge as mpu401.c.

Otherwise the binary is available on sourceforge:

Download Qemu090b

Windows 3.1 turns 20.

Windows 3.1 turns 20!

I still remember when Windows 3.1 was announced, and there was all the excitement in our programming class as Windows 3.1 was going to change everything.  One kid had already gotten it on launch and was all excited as it supported more resources, had better fonts for printing, and included multimedia support!  The teacher was all excited about it too, as at the time everyone loved Windows 3.0 but only if it could do more in terms of being able to run more reliably, and support more things at once.

Later, I found out later that this lucky kid had a 386 with 8MB of ram, a full MIDI setup and VGA graphics, which of course blew away my glorious 80286-16 with 1MB of ram, a 20MB hard disk (with stacker!), and CGA.  Needless to say wing commander was actually playable on his computer.

There was no denying it, Windows 3.0 had started the shift from an exclusively MS-DOS world, in which everyone was hoping and searching for a graphical way out of, to the world of Windows we know today.  Windows 3.0 established the beached, and Windows 3.1 basically won the war.

Visually Windows 3.0 and 3.1 look very similar, but Windows 3.1 builds on Windows 3.0’s success and adds in some very important technologies, not limited to:

  • OLE
  • True Type Fonts
  • Better DPMI support
  • Better MS-DOS multitasking (386 Enhanced mode only)
  • better support for SVGA adapters
  • Multimedia support
  • no more UAE box
  • common dialog boxes!
  • primitive drag & drop support
  • 32-bit disk access
  • Improved WinHelp

The only ‘down’ side that I was aware of is that Windows 3.1 dropped support for IBM PC/XT’s.  You needed an 80286 processor as Windows 3.1 ran in protected mode, which at the time it only shut out one person that I knew of.  However he was just a new motherboard away from being able to run Windows 3.1 .  Which is another point against OS/2 as Windows 3.1 used the PC BIOS for almost all hardware access, even a 286 with mostly XT guts would work, but sadly even XT’s with Intel inboard 386’s were not supported, however AT’s with inboard 386’s were.  Even Microsoft MACH 20 card owners were restricted to Windows 3.0 standard mode (after some extensive updates). Also was there ever a special version of OS/2, like how the box claims?

While many of these things seem obvious now, back then this was a big thing to include so many technologies into Windows, and the more compelling the technology people were starting to replace their MS-DOS applications with windows ones, and the ‘dream’ of spending more and more time in Windows was starting to happen.  Although for many of us this ‘dream’ was a freaking nightmare as more applications would install and overwrite system libraries, and end up with massive system instabilities. Not to mention the DLL hell that many of us still face, as even side-by-side and .net only save us from some things, even though nothing is ever perfect.

Windows 3.1 also saw the PC world transition from 16bit to 32bit with the shift of users from 80286 based computers to 80386 and 80486 based machines.  With the split from IBM with OS/2 2.0, Microsoft was pressed to keep Windows 3.1 relevant to the 32bit crowd, and there was plenty of addons for Windows 3.1 to keep things going.  Namely:

  • Winmem32
  • Win32s
  • ODBC
  • WING
  • Video for Windows
  • Winsock

I don’t think Winmem32 ever took off, as it really was just a way to allocate larger memory segments, I’m almost positive that Watcom’s Windows Extender was more popular.  Naturally these predate the ever popular Win32s, which I’ve covered before.  WING was the fast video for games that I’ve covered once more again, with WinDoom. But I’ll just state it again, that Win32s was very important for bringing the whole ‘internet’ experience to mere users as almost everything that was TCP/IP based was 32bit for the ‘rest of the world’ and Win32s brought a taste of real 32bit computing to the masses, esp for people using Mosiac and Netscape.

Winvideo was Microsoft’s answer to the ever popular Quicktime.  Not to mention this add on was to solidify Windows 3.1 as a multimedia powerhouse. Microsoft still to this day has the test avi’s available for download here, And thanks to the University of British Columbia, you can download the Video for Windows Runtime here.

Needless to say the open standard of how the Winsock DLL should work helped standardize internet applications early, esp while there were multiple competing stacks for both MS-DOS and Windows.  Ultimatley when Microsoft wrote their own it pretty much took over everything, but seeing a chance to sell another version of Windows “Windows 3.11 for workgroups” was later released, which could be extended with MS’s TCP/IP.  At the end there even was a version of IE 5 for Windows 3.1, that I remember being as somewhat poor, and even NT 3.51 users were pushed into that direction.  Not to mention it had a tendency to not want to install on machines with more than 16MB of ram. I suppose the good thing is that IE 5 (probably 3 & 4 as well) came with PPP dialers, which was good enough for the majority of users.   Microsoft even made its improved Media player 5 (beta 2), and Net Show players available for 3.1, although I’ve never used them. “Good” IE releases didn’t come until 95/NT 4.0 anyways, the retrofitted ones were just unstable and lacking.

ODBC was a major selling feature in the world of databases, as now you could write uniform code to access data from all kinds of data sources.  Imagine if you had old dbase files, and a SQL database, it would be a major pain to tie them together. However programs like Access which used ODBC could quickly and easily talk to multiple data sources, and create data reporting and entry systems.  This is how the business world got hooked on Access & Visual Basic. ODBC typically came with either database programs, or with database driver disks, like the one for SQL Server.

While Windows was becoming more and more useful, users were going insane, clamoring for a full 32bit version, which led us down the ‘short’ road to Chicago, which was originally expected some time in 1993, but instead didn’t ship until August of 1995.  Windows NT 3.1 was another contender, but again it didn’t ship until March of 1993, and it was far too resource hungry for anything serious.  This left a gap for OS/2 to fill, and around the shipping time of Windows 3.1 was OS/2 2.0 which only included a runtime version of Windows 3.0 .  Lots of people feel that the additional features to 3.0 could have been delivered via a patch, but the 3.1 release was to purposely make OS/2 2.0 obsolete right after it had been released. Even OS/2 2.1 didn’t ship until May of 1993, although it was always locked into a race with Microsoft as various add-ons would either break OS/2 for Windows requiring updates to OS/2 or even sometimes entire new releases (Warp 3.0 for Win32s for example..)

What also made Windows 3.1 popular was the so called “Microsoft Tax” where Microsoft would sell to OEM’s copies of MS-DOS and Windows 3.1 at an incredibly low price with the condition that they resell them with *EVERY* PC that they sold.  This of course was annoying to UNIX users, even NT users as they all had copies of MS-DOS & Windows 3.1 that they never needed, nor wanted.  But this strategy was pretty successful at locking out not only OS/2 from being preloaded & configured on systems, but pretty much any hope of competition.  Many people attempted to sue, and only Digital Research managed to get anything out of it, as there excellent DR-DOS product was effectively barred from the market (very few end users ever change operating systems, they typically buy new PC’s its always been that way, upgrade sales lag way behind new sales), but by the time the courts had done what they were going to do the damage had been done.

1-2-3 for $495 or Office for $459 …

Another typical bundle was Microsoft Office.  Microsoft took advantage of Lotus’s failure in the market place to deliver a graphical application (The OS/2 switch doesn’t matter, Lotus still released a text mode app in the OS/2 heyday), combined with 1-2-3’s heft price tag, Microsoft made Word, Excel, PowerPoint and their Mail product available for less than the price of 1-2-3 with a new PC.

Microsoft C/C++ 7.0 + Windows 3.1 SDK $139.00

In the end it all comes down to developers.  Something that some companies still struggle with, esp those that positioned themselves in an OS/2 type fix.  If your native tools are too expensive, too restricted, nobody will write for you, esp if you can run other peoples applications better than the native platform.  And this was not only the cause of the ‘why bother’ with OS/2 native applications, but even today you can see it with RIM and their QNX based products that run Android applications.  Combine this with other low cost compilers from Borland and it really is no wonder why everyone was programming for Windows, esp the cost of Windows was typically cheaper than licensing a single seat for any DOS Extender that required royalties.  How much of this was due to Microsoft brilliance, or the competition being bent on short term greed, it is hard to say, but IBM wasn’t taking out full page ads trying to court developers with cheap access, but rather you had to phone them up, go through some IVR’s and be ready to charge a few thousand dollars for the honor of developing for OS/2.  I still remember Watcom C/C++ 10.0 being the cheapest way to build for everything, its a shame in a way that their SQL product was so good, as Sybase snapped up Watcom, and pretty much killed the languages, but thankfully not before open sourcing them.

The quest for the holy grail

With high resolution, and color depth displays, audio cards, multimedia games like “Monty Python’s quest for the holy grail” started to appear for Windows, as programmers could now concentrate on content, as Windows provided the layer for audio/video abstraction.  While some games worked great others did not as there was a performance gap from raw MS-DOS to Windows, but tech like WinG was closing the gap.  Not to mention the device driver patch hell was being shifted from the game devs to the hardware vendors, although that race still goes on, as even today Steam still combats older drivers and tries to hand hold users into updating them.

Even the horrible shell saw some competition for improvement, there was the Workplace shell for Windows 3.1, and of course BOB.  And boy were people so happy with BOB.  Not to mention thinking that this was just some great tech, it made its way into Office, to be forever remembered as Clippy in Office 97, who was tuned down in 2000 and killed in Office 2003.  Its funny how future looking movies always go on about these animated seemingly helpful digital assistants, and yet in the real world they usually are the first thing turned off.  I even remember the whole “Chrysler New Yorker’ debacle back in the day.  Even in the show room it just went endlessly on about the door being a jar.  Maybe its just HAL-9000 backlash.

So what can be said of Windows 3.1?  It still lingers in 32bit versions of Windows 7 (Wow! or Windows on windows), and it basically tipped the world into the Win-centric place we are today, along with the office everywhere mentality.  I can’t even imagine giving someone a 1-2-3 wks file, let alone a Word Perfect document, as I’m pretty sure there are no translators anymore. Oddly enough Win64 based OS’s can’t directly run Win16 based programs, there is always emulation.

Upgrading through OS/2; Version 3.0 aka Warp pt II

Continuing from my previous post, I scored a lot of OS/2 Warp 3.0 media on ebay, and a kind person sent me some disk images of Warp 3.0 blue spine!

Now the downside is that while Virtual PC 2007 supports XDF to some extent, it doesn’t like the XDF driver that comes with Warp 3.0… Which I guess isn’t a surprise, anyone would after all be loading the latest version, I mean who would load up and upgrade every version of OS/2 for the heck of it?

So as it is pointed out here, simply replace the ibm1flpy.add & xdfloppy.flt from OS/2 4.0 and it’ll work!

Now we get the usual, do we want to format my disk… As always the answer is NO… But it’s so delightfully colorful now!

Then it’s a simple matter of feeding it disks, and waiting for it to chew through the 6 disks…  I remember on a physical machine, these XDF’s weren’t exactly speedy.

And then with that out of the way, it’ll be time to reboot, into the GUI, and to see how much hardware (if any) has been preserved.

I had to change the Video to regular VGA, for some reason it this this is a Chips video…? And it had no idea about the CD-ROM.  It did pick up the sound blaster, and it kept my printer!

Wow fully loaded out, and 29.33MB.  I can’t remember the last time getting so much out of so little.  Anyways, time to swap more disks…

And as part of the update, it’ll let you compare your config.sys with a before and after… And honestly… WTF?  Since the lines are so long, why did someone thing this was actually legible?

I know it’s part of the legacy of config.sys, but really.. WTF!

Well we’ll just trust it’s upgrade process, and let it ride!

So we reboot, another splash logo and….

We not only get the desktop, the tutoral, Introducing OS/2.  Which is really nice looking.  It’s like they hired someone that’s not old school IBM to do this.  It’s at least a big enough of a change since the days of OS/2 1.2’s tutorial.

Closing that, I get the desktop.  I’m no fan of the launchpad, so I just shred that thing from the get go.  I know I know.. it’s like windows 95’ish but from 1994.

And how did my legacy applications hold up?

Bricks from OS/2 1.1 is still there, and still works great.  Word & Excel also working, just as they did when I installed them in OS/2 1.2.

Even SimCityLite is working, along with DOOM.  I’d have to give Warp an A+ on it’s migration from OS/2 2.1.  It did look a little scary with the config.sys thing from hell, but really you can tell a *LOT* of work went into this release of OS/2.

Speaking of games, Warp gave us.. Mahjongg Solitaire.  I don’t know why it’s not spelled Mahjong, maybe it’s some British English vs US English thing?  Anyways I’ve always associated the game with old ladies, and gambling rings.  Honestly IBM would have been better off paying out some developer for a ‘top selling game’ and doing an OS/2 version.  Even in OS/2 2.0 it is possible to write 32bit programs that’ll run in VGA 320x200x256 mode, which was still popular with plenty of the MS-DOS games of the time.  But I guess even a full screen port of DOOM wouldn’t be all that IBM GREY/PC/DULL enough.  Oh well even Tetris would have been a popular game.

One thing that bugged the hell out of me was the sounds.  It still was annoying to use OS/2 in an office with it constantly making noise… But in all fairness it was kind of the rage of the time, even Windows to this day has all the hooks in for it’s themes of custom mouse pointers, and GUI actions. Thankfully we’ve all moved beyond that.

This was going to be the the effort to really wow people before Windows 95 shipped.  In some regards it really was too little too late.  The world was shifting away from the idea of an isolate powerful ‘workstation’ to the connected computer.  As it does say on the box, this was the ‘on ramp to the information super highway.  In my opinion this is where OS/2 weakspots really started to show through.  First TCP/IP was an addon, not part of the OS.  I don’t know how they thought slapping other diskettes in the box is ‘ok’ but it’s not part of the default install, and easily missed by novice users.  The next, and forever lamented part is that it only included support for dialup.

That’s right, although dialup was pretty much the norm for 1994, the world was rapidly changing, and the first cable modems were starting to be slowly rolled out.  It also meant in the corporate world as LANS had taken over everything, and companies were just starting to think about TCP/IP and internet strategies, OS/2 was setup to be left out.  Instead, someone at IBM decided that LAN based network should be a premium and people should pay twice the price for OS/2 Warp connect.  This proved disastrous.

Right about this time, Microsoft had released Windows for Workgroups, which was all about LAN / NetBEUI access, but they even did throw out a free TCP/IP protocol upgrade.  Windows NT 3.1 had finally shipped, and it too included LAN TCP/IP support.  Then it was cemented in the more responsive Windows NT 3.5 which had a smaller memory footprint, and of course included support for PPP/SLIP along with LAN networking, and support for IP forwarding!  That’s right you could use Windows NT 3.5 as a router!.. (Yes, even the workstation version).

However IBM did at least have the foresight to include popular internet programs in their internet pack (which sadly I don’t have.  I’ll have to review it later), I recall it had a gopher client, NNTP client (Probably News/2 from the TCP/IP for OS/2 2.0 days) and a cut down version of LAMAIL…

The other massive shift online was the coming rise of the web browser.  Specifically Mosaic.  And Mosaic ran on all kinds of UNIX platforms.  It even ran on Windows NT.  They even made it ‘safe’ enough to run on Win32s.  But there was no port to OS/2.  Thankfully someone recognized the importance of Win32s, and provided a driver to interface Windows 3.1’s 386 enhanced mode, to a workalike driver for Win32s.

I chose the ‘runtime’ version of Win32s 1.1 .. I just wanted to see if it’d work.

And the good news is that not only did it work, but it runs in seamless mode, with OS/2 1.1’s color scheme.  Pretty snazzy.

There was a short windows, but it was there, while people were on dialup, and before Windows 95 had shipped and had some extended driver support under it’s belt, OS/2 was the best way to run Win32s stuff outside of Windows NT.  But even people who had devices like this thing I had at the time:

The web ramp was really cool, it had 3 serial ports, which let you connect 3 modems.  It would then round robin your outbound requests so that people could share all 3 lines (if you had them) and it did NAT in hardware.  This mean in the age of dialup this little guy would let you build a small LAN (it had a 4 port ethernet hub in the back) and suddenly all the computers at home with ethernet were online.  It’s stuff like this that really left people asking why did OS/2 warp have such a substandard networking stack.

The year was 1994, the internet was starting to gain momentum.  Windows 95 was a year and a half away.  The answer to Windows 95 would no doubt be OS/2 4.0.  Would IBM do anything about these shortcomings?

We’ll find out as we upgrade to ‘project Merlin’ AKA OS/2 4.0.

Win32s version tour…

Well I’ve managed to track down quite a few versions of Win32s from my various compiler CD’s So I figured it’d be somewhat interesting to run down a ‘tour’ of some of the significant versions starting with the first.

Now Microsoft Knowledge base article, KB121091 tells you which version of the win32s subsystem is installed by checking the win32s.ini or the version stamp of the WIN32S16.DLL file. Which for the most part is pretty simple. However the first version of Win32s that I could find doesn’t include either.

Win32s from October 1992.

I got this from the Windows NT October 1992 Win32 SDK. Keeping in mind that Windows 3.1 shipped in April of 1992 it’s kind of note worthy that already in October there is already a working win32s upgrade for Windows. I’d describe this release a a ‘core’ only version as all the win32s programs I have failed to run on this version. Mostly because this version lacks WINMM.DLL (the Multimedia library from NT), although the October 1992 Windows NT beta does include this dll, along with soundblaster/AdLib support!

Windows 3.1 - win32s 1992 running nt october 1992 appletts

Windows 3.1 – win32s 1992 running NT October 1992 applets

I was able to get a few of theapplets from Windows NT October 1992 running on this version of Win32s by simply expanding and copying them over.. The font selection for the digital clock was messed up, but the analog version worked fine. As you can see I got clock, freecell, notepad, solitaire and winver running. Needless to say the build 34326 is totally incorrect.

For anyone that wants to play with it, the 1992 version of Win32s is available here.

The next, and final beta from March of 1993. This one does identify itself as being build 61, which is not on the list.

Windows-3.1-win32s-March-1993-running-nt-october-1992-appletts

Windows 3.1 win32s from March 1993 running NT October 1992 applets

It’s compatibility is about par with the 1992 version, but the winver reports Windows NT version 63.10 … I’ve made it available here.

I was unable to find any 1.0 versions of Win32s. Googling around, it would appear that MathCad 4.0 shipped with the 1.0 runtime. If anyone has Mathcad 4.0 I’d love a copy of it’s Win32s 1.0!

From the same InfoWorld article, 1.1 shipped the same time as Windows NT 3.1, and 1.0 was another ‘pre-release’. But I do have to say that 1.1 includes quite a number of great utilities, and tools, unlike the other development versions.

Win32s 1.1

Win32s 1.1

Win32s 1.1 dev features

Win32s 1.1 dev features.

That’s right, this developer version includes the CLI Visual C++ compiler (Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 8.00), along with a profiler, and codeview debugger! Also included is a demo version of the Pharlap TNT Dos Extender, which is restricted to no user DLL’s and 2MB of RAM. Although if anyone really wants a kick ass Dos Extender, use the excellent, and FREE HX Dos Extender

Once WinG is installed, Lemmings will run on 1.1, while WinDoom fails because the procedure CreateDIBSection does not exist in this version of Win32s. Which really isn’t that surprising as version 1.1 is at parity with Windows NT 3.1, and that call didn’t get implemented until Windows NT 3.5 . Another fun thing is that because of the segmentation in Windows 3.1 it seems that a lot of stack ‘issues’ and other memory collisions are found much easier under Win32s then under Windows NT (and it’s siblings). At any rate, you can find this version of Win32s here.

Next is version 1.20 which includes support for OLE 2.0 . This brings Win32s up to the level of Windows NT 3.5 . And it allows more NT applications to run on Windows 3.1, including Word 6.0 for Windows NT. The development copy of Win32s 1.20 can be found here, along with the retail version here.

The developers version of 1.25 is on the Visual C++ 2.2 disc, but it lacks dev tools and debuggers from 1.10!  The retail copy of 1.25 with OLE2 support. There apparently was some major bugs with 1.25, and there is also the all important 1.25a update, which I’ve been able to track down both the retail and the retail + OLE2 versions. I don’t have any development versions of 1.25/1.25a so no debug symbols.

And finally I was able to track down Win32s 1.30a both retail OLE 2 & the development version, along with the final version of Win32s 1.30c, development and retail OLE 2.0.

Win32s 1.30 included a Windows 95 compatible help engine. I would imagine it included some level of compatibility for Windows 95 applications too.

Of all the versions, I’ve found that 1.25a is the most well behaved, but at the same time, I’m lacking the debug build of it… I should also point out gabby.de has a great info page on various applications that’ll run on Win32s.

** As a note from the future it turns out that 1.30c build 172 can play nicely under Qemu, it turns out to need a fix, from Roy as mentioned down below.  “I can patch all 1.30.xxx versions by replacing “66 83 EF 04 E3 3B” with “66 83 EF 04 EB 3B” in win32s16.dll“.  Super thanks for that!  I mirrored the fix here.

Office 4.2 for Windows NT

At some time during the whole Windows NT vs OS/2 thing in the workplace, one of the funny things is that we all had to use Win16 versions of office, which I think we all agreed kind of sucked. Even at the time I thought it was rather sad that here is Microsoft pushing this new and exciting operating system, and the only applications that are available is a program to talk to mainframes (SNA Server), and a database (SQL Server). Oh sure there was MSMail, but there was no Word & Excel that the world was rapidly moving to, away from WordPerfect & 123.

So was I ever surprised to find out that there was a version of Microsoft Office for NT, and it at least ran on both i386 & Dec Alpha. The box claims that the PowerPC and MIPS versions will be along, but I don’t know if they ever shipped. But at the same time, it’d be hard to be touting these ‘advanced’ RISC CPU’s and all their glory, but when it comes to day to day work, they are running Word/Excel in emulation. I have the box with the coupon to redeem but I suspect MS would just laugh if I called them up asking for Word/Excel for the MIPS so I can run it on Qemu…. But I digress.

Naturally because of the day & age, the requirements are kind of laughable, but it was targeted towards Windows NT 3.5, with:

  • Microsoft Windows NT(tm) operating system 3.5 or later
  • 486 or higher
  • 16MB of memory
  • 59MB of disk space (minimum) 84MB maximum

So playing around with Win32s, I figured if i were to install say word into a VM, then xcopy it out, and try to run it, would it work? Win32s 1.10 wouldn’t run as this version didn’t include the new OLE 2.0 stuff… Which is why I suspect it won’t run on NT 3.1. Win32s 1.30c crashed and burnt in the worst way possible. Even Lemmings died on this version. damn.

But Win32s 1.25 actually ran it, along with Lemmings & Doom!

Word for NT on Windows 3.1

I can’t say it’s terribly useful, but considering how flakey Word 6.0 was on Windows 3.1, hell back in the day it’d been really nice to have a Win32 version.

Now I guess I ought to dig thru my stuff and see how many versions of both retail & debug Win32s I can find.

Lemmings demo for Win32s

Lemmings on Windows Vista

Lemmings on Windows Vista

While digging around I came across this demo of Lemmings for WinG/Win32s. And what’s great is that it runs on Windows 7 x86_64! Pretty snazzy!

The game play is still there, but the ‘speed up’ stuff is instant in the world of Ghz CPUs.

Oh well, it’s worth having some fun with. Here is the download.

I just remember this game when it was an Amiga thing…

WinDoom, WinG, Win32s on Windows 3.1 (on Qemu)

So since I was looking at the Doom stuff, I thought I’d try to track down the WinG version of Doom, and luckily someone pack ratted away two versions! Needless to say the older one didn’t work for me, but the last one, the April 13th, 1995 build, worked just great!

WinDoom on Windows 7 x64

Even on Windows 7 x86_64, sp1!

So how much of a chore was this to run back in 1995, before Windows 95?

Well to start WinDoom requires a display capable of at least 256 colors. I thought I’d use Qemu for this, but this proved to be… exceptionally difficult to locate a satisfactory display driver. I know lots of people point to the SVGA.EXE update from Microsoft, that uses VESA extensions to drive the video. Oh sure it sounds great but this is what I got:

And.. corruption.

Ok, so you say, there is this great patch to enable better VESA support right?

Wrong.

Yeah. I also hunted down various cirrus drivers for the specifically emulated chip (I checked the source) and they were all consistently defective. So I tried using a lower chip driver from HP and amazingly the 640x480x16MM colors works! (well, works ‘enough’).

Installing the right driver.

It’s the GD5430 v1.25f, 640x480x16.8M

The next thing is that Doom in both MS-DOS and Windows are full 32bit executables. On the MS-DOS side, it relies on the DOS4G/W extender. For Windows, it relies on the then new Win32 standard, and Windoom was written to conform to the Win32s standard, meaning with an addon it can run on Windows 3.1, Windows 95, And Windows NT. I just fished around the internet and scored a copy of Win32s 1.25. I just remember this being a somewhat stable version.

Installing Win32s

Win32s installs pretty smooth, (as long as you remember the share.exe). Now we just need the WinG runtime to be installed. WinG was Microsoft’s first real attempt at high speed gaming video under Windows. From what I understand it kind of went down because it was ‘too difficult’, and buying DirectX seemed to be a better fit.

Setting the midi mapper.

Another thing I’ve found is that if you change the midi mapper from the default “Ad Lib” to “Ad Lib general”, you can at least get the midi working in Doom.

Once WinG is installed, then it’ll want to do some blit tests…

WinG calibrating.

And after that, we can even bump it up to glorious 640×400, something the initial MS-DOS version couldn’t do easily as VESA wasn’t a big standard with INSTALLED cards at the time, and it’d require lots of work from the iD team, where the move to Windows pushed all the peripheral development to the Vendors to work around Microsoft. Even to this day, it’s still a big deal with video and audio.

One thing that is cool about Qemu is that at compile time, you can put in adlib & soundblaster cards to give the ‘full’ Windows 3.1 multimedia experience. There is also GUS (Gravis Ultra Sound) support
in Qemu, but I’ve never played with it..

With all of that out of the way, WinDoom will launch.

WING dispdib.dll missing error that turned out to be Video for Windows.

Then it’ll throw an error, because Windows 3.1 doesn’t have the same video backend as Windows NT 3.5 (and higher), hit ok and then …

And it works! WinGDoom running on Windows 3.1 on Qemu!

Sadly on Windows 3.1 the sound effects do not seem to work, but overall it’s a GREAT little port, mostly because as it comes up on 16 years old, it still works, and with sound. I wish other OS’s could give this kind of support for legacy applications, even ones that had such a brief window of support.

Anyone crazy enough to even think of playing along can download the blob of software I used to get this going here (Updated on archive.org here: Windows-3.1-WING-doom)

I should also add if you want sound effects to work on WinDOOM you really should install the Video for Windows Runtime, and it’ll work… poorly on Qemu/SoundBlaster 16, but it does work!