Idling under MS-DOS 4.01 & Windows 3.0

Well I was playing some more with my MS-DOS setup, and the annoying thing is that it doesn’t idle worth anything.

And of course running old DOS doesn’t help that most everything needs MS-DOS 5.0 or higher.

But then I found WQGHLT, which is a VXD to support idling under Windows 3.1.  And happily it works on Windows 3.0 …

The only pain is that running MS-DOS applications kills the CPU (again).  Which means that the DOS programs themselves need to idle.  And yes I did check the ‘detect idle’ but it seems that it doesn’t do what I’d hope.

Maybe it’s just the software, I should try some more and see what I get.

Pushing Windows/386 out the door…

While one may think that Windows 2.x started with the ‘regular’ version, it does indeed turn out that rather the 386 specific version was rushed out the door to appease Compaq, and their new Desqpro 386 computer, namely the 20Mhz 386 model that was going to debut in late 1987.  Indeed, Compaq not only set the standard with the 386 CPU, but they were going to set the future standard of bundling not only MS-DOS but Microsoft Windows.  At this moment in 1987 you could really say that the ‘modern pc market’ was born.

Windows/386 2.01 from OS/2 Museum.

And it does make perfect sense, with 386 specific software being very rare/hard to come by, keeping in mind that Phar lap 386 was only announced in December of 1986!  But it was expensive, and 386 specific applications cost a fortune, and didn’t have wide market penetration (we were still years away from DOS4G/W or GCC).

Another thing to keep in mind is that OS/2 had not shipped either at this point, and apparently this version of Windows/386 would not even support the IBM PS/2 model 80, as there was some noise about IBM not wanting to bundle Windows on their computers.  Now when you think about it, it is kind of funny that Windows an inferior product came out with a GUI and multitasking MS-DOS via the 386’s v86 mode, while OS/2 was still in a beta stage.  Not to mention IBM’s reluctance to bundle Windows/386 shows just how the Windows rift was an issue even back in 1987!

Looking at this December 1987 InfoWorld issue we can see it in action:

From, InfoWorld Dec 1987, Windows/386 in action

And it’s no wonder why this was going to be a hit.  And the UI looks just like how Presentation Manager for OS/2 1.1 was going to look, almost a full year before OS/2 1.1 was delivered (Halloween 1988!)

Now trying to peg down exactly When these releases of Windows 2.x were, esp with Windows/386 2.01 being the first, in September of 1987.

From what I can work out, Windows 2.01 ‘regular’ was shipped around November of 1987, with the 2.1 update in July of 1988, and 2.11 in March of 1989.

While on the topic of Windows 2, there was one slightly interesting feature, of the ‘regular’ or ‘286’ version of this product.  It could multitask MS-DOS.  No really, but it was all out of the same conventional memory space.  So unless you were into COM programs it wasn’t terribly useful.

The later 286 versions included early himem.sys drivers that permitted some trickery with the A-20 gate allowing an additional 64kb of ram to be accessed from real mode.  It may be a good thing that nobody found out about unreal mode at the time..!

I don’t know if it is even possible to tell them apart, besides the 386 and 286 (regular) versions but here is a small gallery of Windows 2.0 running command.com

Windows 2.03

Windows/386 2.03

Windows/286 2.1

Windows/386 2.1

Windows/286 2.11

Windows/386 2.11

Included is something special for the 2 or 3 people that’ll figure it out. 🙂

Windows 3.0 …

Bill Gates with Windows 3.0 / credit:Carol Halebian

There is no denying it, when it comes to revolutionary products you simply cannot ignore the powerhouse that was, Windows 3.0 .  Simply put this is what made the Microsoft empire, broke the alliance with IBM, and changed the future of OS/2 3.0.

Not only that, but Windows 3.0 changed the way businesses operate world wide, and finally delivered on the ‘dream’ of what could be done with the 286/386 microprocessor where OS/2 had failed.

To really appreciate Windows 3.0 you have to see the world as it was before it was under development.  Back in 1989 the pc market was in turmoil.  While OS/2 had the promise of breaking all the old barriers of the real-mode only OS MS-DOS, it simply cost too much, and hardware compatibility was just too poor.  The other striking thing was that the only 386 specific feature that OS/2 1.2 (current version in 1989) could exploit was that the 386 could quickly move in & out of 286 protected mode.  The LAN server product also had a 386 specific HPFS driver, but that was it.  OS/2 1.2 was still limited to a SINGLE MS-DOS box.

OS/2 1.2’s DOS session

And there wasn’t a heck of a lot you could do memory wise.  Not to mention there was no ability for the DOS session to use EMS/XMS memory.  It’s no wonder it became to be known as the ‘penalty box’.

Meanwhile, Windows/386 circa 1987 could run multiple MS-DOS VDM’s on the 386 processor.  You were only limited by how much extended memory was in your system.  Windows/386 exploited the v86 mode of the 386 processor which allowed for hardware virtualization.  However Windows itself was a ‘real mode’ program, meaning that it had to fit in 640kb of ram, just as the VDM’s it spawned had to.

Windows/386 2.11

So unless your goal was to run a bunch of MS-DOS sessions all your extra memory was for nothing.  That also included Windows programs since they all ran in real mode.  For people with enough disk space you *could* actually install one copy of Windows/386 in say VGA, then another with a lower video resolution (CGA or EGA), then actually run Windows in Windows… in a Window.  But it really wasn’t that useful, it ran better full screen.  And all this had the effect of doing was partitioning your windows programs from each other, if you dedicated a VM per application.  Needless to say with OS/2 2.0’s seamless windows this was far more easier to setup, and frankly far more practical.

In 1989 building large applications meant that you either forced people to use Unix (SCO Xenix!) or OS/2.  For those that could afford it, Xenix would have been the way to go, as they not only ran in 386 protected mode, offered a far larger address space, but it was also multiuser!  But Xenix was expensive, needed specialized knowledge.  And as mentioned the cost of OS/2 development was HIGH, and it required your end users to have OS/2 (naturally).  And the users would have to fight that a lot of PC/AT compatible PC’s on the market were not compatible enough to run OS/2.  Despite this a lot of banks latched onto OS/2, and some still use it today (look at why parallax came into existence!).  Then out of nowhere, PharLap had developed a piece of software that changed everything, the DOS Extender.

Originally for 386 computers, the first DOS extenders required people to use special 386 compilers, runtimes, and of course linkers & extenders.  The tools were expensive, the right to redistribute wasn’t free, but end users could run your multi-megabyte (lol) applications on regular MS-DOS.  Which is what 99% of PC’s were running, and it didn’t require users to change their OS, abandon their applications, it would simply just work.

Links 386 pro

One of the earliest and most popular DOS Extended game/application was Access Software’s Links 386 pro.  That’s right this game ran in protected mode! .. And it would *NOT* run under, or near Windows/386.

It was out of this wildly great but incompatible world that the first DOS Extender vendors, tried to standardize their products with the original and short lived VCPI specification, from Phar Lap.  However in 1989 Microsoft was busy working on Windows 3.0 as the next great thing.  Using a protected mode debugger, they were converting Windows/386 from a real mode ‘hypervisor’ into a protected mode application.  And if Windows couldn’t run these new extended applications, then people would naturally have to exit Windows to run them.  And that was the major problem with Windows is that people may have an application for windows but they spent most of their time in DOS. So Microsoft’s Ralph Lipe came up with the DPMI specification, managed to get all of the major vendors to support and take over it, in exchange for leaving Windows as a 0.9 level client/server.  After all why would you need their products if Windows were to incorporate the entire 1.0 spec?  At the time it was a big deal, but the success of Windows would eventually kill the extender market save for video games until Windows 95.  There is a great article about the rise of DPMI here.

So with a firm dos extended foundation Windows 3.0 could do something the 2.x products could never do, which was to actually utilize all the memory in peoples computers.  And because it hinged on a dos extender (ever wonder what dosx.exe was?) it meant that there was no special disk, mouse, network driver/software needed as it could jump out of protected mode, and call real mode software like the BIOS, or even mouse drivers if need be.  However older protected mode programs would only error like this:

No Lotus 1-2-3 r3 for you!

Another popular application for MS-DOS just happened to be Lotus 1-2-3, and it was *NOT* DPMI compliant.  Oh sure they had DOS & OS/2 support, but would you believe that the OS/2 version wouldn’t run in a Window?  Oh sure the install program may have, but some how someone didn’t think there would be any value in being able to SEE more then one application at a time.  Not to mention the dark horse, Excel was starting to sell in 1987 like crazy, in 1988 Excel actually started to out sell 1-2-3, and by 1989 it was already over.

Lotus 1-2-3 r3 for OS/2

Microsoft Excel 2.2 for OS/2

There is no doubt about it, GUI applications were taking over.  The old ‘DOS’ interface was dead.  And Lotus had basically killed their product line by providing an identical interface and experience to their customers by providing an OS/2 application that looked and felt just like the MS-DOS application.  While you may hear that Lotus got distracted with OS/2 and missed releasing a Windows version of 1-2-3 to counter the rise of Excel, the truth is that they straight up missed windowing UI’s. Their hubris is that the users simply didn’t like the 1-2-3 interface, they wanted a windowed application.

What they did want was graphical Windows, and of course more memory!  And there is nothing more annoying than having say 16MB of VERY expensive memory in a computer like a 286, but being restricted to 640kb or less is just … insane.

So let’s see Excel in action.  Excel 2.1c shipped with a ‘runtime’ version of Windows 2.1.  Mostly because nobody was buying Windows in 1987 Microsoft had to do something to get people running the thing.  So the best way was to allow you to run an application with it.  By late 1989 and early 1990 application vendors were making updates to their products so that they could run under Windows 3.0.  And here is the first version of Excel to do so.

Excel 2.1c and the Windows 2.1 runtime

So here we have Excel running under Windows 2.1 ala the runtime environment.  All you have here is excel.  Also worth noting is that the setup program is 100% DOS text based.

Moving forward we can now upgrade to Windows 3.0.

Excel 2.1c running on Windows 3.0’s real mode

So as you can see Windows 3.0 takes up 30kb more memory then Windows 2.1!  For someone with an XT this could mean bad news!  Now it’s time to see what all the babling was about, running the same application in protected mode to access more memory!

Excel 2.1c running in Windows 3.0’s standard mode (286 and above)

Now we are running in 286 ‘standard’ mode.  Notice that Excel thinks it’s conventional memory, but we now have 14MB of the computers installed 16MB accessible to the application!  Now this is pretty amazing stuff! Now it’s no secret that the 286’s memory management left a lot to be desired, and Microsoft really didn’t want to write for it, as the 386 was where they wanted to be.  So unlike OS/2 the 286 cannot swap.  You are only limited to what extended memory you have in your computer.  But this is different for the 386..

Excel 2.1c running under 386 enhanced mode

And here we are, 386 enhanced mode! So finally  our Windows applications are clearly running in protected mode, with demand paging!  With 36MB of available memory in a computer with 16MB of ram.  The colors are distorted on Virtual PC under 386 enhanced mode… But as you can see the environment runs!  And even graphical programs that for example used CGA could happily run on an EGA system in a window.  Even better you could copy the screen, and paste it into any Windows application you want.  Yes you could buy games and use them for clipart!

Another feature of Windows 3.0 that people didn’t realize is that it could pre-preemptively multitask DOS based VDM’s

As you can see, there it is, the timeslice, and scheduling options..  Great ways to confuse users for decades… 🙂

Who could resist?

As always, there is a great InfoWorld article here.

So why was Windows 3.0 successful? A lot of it is timing, as there was no other environment that could offer people access to their whole machine without upgrading their operating system.  And of course there was the whole thing with bundling Windows, Word & Excel with new computers.  I mean who would resist something like a graphical application like Excel when compared to the klunky and significantly more expensive 1-2-3?  Sure the bundling practices were found to be illegal, but looking back, Lotus & Word perfect basically GAVE Microsoft the market.  And of course, talk about aggressive upgrades!  I’m not sure they even do such things anymore.  Although I’ve heard of big companies, and governments pushing for discounts for running things like Linux.

And there is the other things that Windows 3.0 supported that OS/2 simply did not.  For starters backgrounds (wallpapers), and of course the desk accessories.  Sure they sucked but in a panic at lest you *could* do something… where OS/2 basically left you in the lurch.  Not to mention how much more expensive OS/2 was when compared to Windows.

So with all that out of the way, what fun is a write up without a demo?

 

And thankfully I’ve found all the bits in prior posts, and I can put them together right here.

Windows 3.0 working demo, click to launch!

 

386BSD 0.1 running on a 386sx

Looking around, I found this blog, which kind of reads under google translate where someone went ahead and booted up 386BSD 0.1 on his 386sx laptop. Sadly he doesn’t have a 80387sx so things like PS explode as it has a %f in the code…

Oh well it’s kind of fun to see things go round and round.

—-update…

I should mention I was thinking of 0.0 that didn’t include the floating point support.. Also “the fuck it crashes” is as good as any other google xlate disaster… 🙂

Desqview/X

Desqview/X

I never used Desqview back in the day, as I didn’t have a good enough computer. A 286 with 1mb of ram just wasn’t enough to push the thing. And by the time I did get a 386, OS/2 2.1 was all the rage. But in that time between OS/2 2.x and the release of the 80386 CPU there was all kinds of programs to take advantage of the 386’s v86 mode.

Desqview X really is different in that it not only incorporates the desqview multitasking, but it also supports the X11 protocol found in the UNIX world. Sounds cool right? A friend wanted to run it, so he actually dug out a web page, chsoft.com with all the bits.

The first stumbling block is that Desqview requires that you use the memory manager QUEMM, which the majority of emulators we tried couldn’t work with it. Qemu 0.14.0 however proved itself up to the task, as long as you didn’t let it do the aggressive optimization, just let it install, and reboot.

Installing DesqviewX was pretty straightforward, the only catch was the video. VGA doesn’t work but the SVGA modes work fine. I just used the 800x600x256 mode.

With that out of the road, the next thing needed was a good mouse driver. For some reason the majority of the mouse drivers I tried just wouldn’t work with desqview, until I tried ctmouse.

Naturally for the whole X11 experence you need networking. The tcpip package on the desqview webpage uses some old netware thing with a ne2000 driver that is hard coded to 0x300 irq 4. Which won’t work in any machine I know since everyone has at least one com port. So I had to take the lsl & ne2000 parts from my Netware 3.12 client. But doing so revealed that the lsl wouldn’t run because of a lsl buffer pool error. And of course to work with slirp you need to be running ethernet_II instead of 802.3 …

So you’ll need a net.cfg like this:

link support
buffers 4 1504
mempool 8096
max stacks 4
link driver ne2000
port 300
irq 3
frame ethernet_ii

Naturally you’ll need to change the source to Qemu if you have your own build to use IRQ 3 instead of 9 (it’s in hw/pc.c), or use one of my binaries. It’ll configure via bootp and at the end you should be able to ping 10.0.2.2

Putting it all together, running it like this:

./qemu -L pc-bios -hda packet2.qcow -net nic,model=ne2k_isa -net user -redir tcp:6001::6000

On OS X has qemu listen on 6001 for X11 sessions, then redirect them into the VM on it’s X11 port. So I could then easily run xeyes like this:

xeyes -display 127.0.0.1:1

And the output appears inside of Desqview X. Likewise, removing the session security, and allowing remote connections in OS X’s X11 widget, then allowed me to send xeyes from Desqview to my mac like this:

xeyes.exe -display 10.0.2.2:0

And exeyes pops up on OS X as running from the Desqview VM.

I don’t know if it’s terribly useful, but I thought someone may get a kick that Desqview X can run on Qemu 0.14.0 In this day & age though you can get easier versions of X11….

PCEm

So looking around for other IBM PC emulators, I came across this one, PCEm. Now what’s really cool about this one is the old models it can emulate, including the IBM XT, the IBM AT, and it can even run the AMI BIOS for a 286, 386 and 486!

PCem 486

PCem 486

So not only can it run the BIOS but some ‘fun’ stuff like Windows 3.0 & 3.1 in standard mode, (386 enhanced is busted.. )

Setting up Windows 3.1 on EGA

Setting up Windows 3.1 on EGA

I find the 486SX mode works the best… And naturally fastest as it’s cycle accurate emulation. An interesting mode is the IBM 386, which appears to be the IBM AT’s BIOS patched to run on a 386 CPU.

PCem MSD report

PCem MSD report

What is cool though, is the 386 protected mode is complete enough for DOS4G/W executables to run…

Loading DooM!

Loading DooM!

And yes if your CPU is set to low enough Mhz it will take a minute or two to load as it did back in the day…

PCem running DooM

PCem running DooM

And away we go! I should add this is Doom 1.1 shareware, which I did manage to get the sound working on OS/2 2.1, and it’s great to hear that PCEm’s soundblaster emulation works great!

For DOS games, this emulator really has a wide range of machines, and with the actual BIOS it sure gives the original ‘experience’.

*NOTE you’ll need disk images, and lots of them… or some scheme to mount the raw disk image. Also the UI is touchy I’ve already lost one disk to it….

Running Xenix on qemu

Neither Bochs nor Qemu can boot the Xenix floppy diskettes all the way. Virtual PC & VMWare seemed to have no luck when the kernel transitions to protected mode. While on the way to work I had an idea. What if you had an old hard disk and a machine capapble of installing? Simply imaging the hard disk may be enough, since after that point you don’t need any floppy disks!

So this is what I have to show for the work today:

Freaking awesome, if I do say so myself.

OK, now how to do it? First you need an existing system running Xenix. If you have any plans on migrating an existing installation take note! This will preserve your install, just don’t format! On the Xenix boot screen take note of the geometry of the disk. We will need the geometry for later. Although I did a test boot without it, its a good thing to preserve it.

For virgin users, you will need a small disk to install on. I had a 2.5 GB disk that was too big, and 132MB disk that worked fine. I used a dell pc with 2 ide controllers for this. The longest task honestly was installing Xenix. I think that ran about 20 minutes. Once I was done, shutdown xenix, and put the disk in a machine running Windows (Linux fans can put it in their box, and just dd the Xenix disk into an image). Us poor Windows users don’t have dd. Anyways take not of what disk # it is, as Windows of course will not assign it a drive letter since it does not understand Xenix’s filesystem.

As you can see it’s disk #2 in this computer. Ok now we need to read the disk and write it into a disk image. I couldn’t find a util offhand to do it, so I wrote one real quick. Here is the source code, you’ll need a C compiler on your PC to compile it. I guess I could ‘neaten it up’ some, but for now here you go:

Source code

Executable

Yes I know its horrible, and blogger does a wonderfull job of formatting my program. Anyways compile it & run it. Now you’ll have a disk image of your hard disk!

Now for the fun part, running Xenix! We simply specifiy the hard disk geometry that we got earlier, and pass it the disk image that we created! I’m using an Quantum Pro drive ELS with the following geometry:

919 Cylinders
16 heads
17 bytes/sector

That translates into the following command:

qemu -M isapc -m 16 -hda xenix386-2.3.4.disk -hdachs 919,16,17 -L .

 

Let the good times roll!

–Update from 2011!

It is *NOW* possible to install Xenix in Qemu 0.14.0. You can read more about it here.