ASCII by Jason Scott

Jason Scott's Weblog

The Emularity —

Last week, on the heels of the DOS emulation announcement, one of the JSMESS developers, James Baicoianu, got Windows 3.11 running in a window with Javascript.


That’s impressive enough on its own right – it’s running inside the EM-DOSBOX system, since Windows 3.x was essentially a very complicated program running inside DOS. (When Windows 95 came out, a big deal was made by Gates and Co. that it was the “end” of the DOS prompt, although they were seriously off by a number of years.)

It runs at a good clip, and it has the stuff you’d expect to be in there.

windeskBai, tinkerer that he is, was not quite content with that. He wanted this operating system, sitting inside of a browser and running in Javascript, to connect with the outside world.

That took him about 3 days.

winThat’s Netscape 1.0n, released in December of 1994, running inside Windows 3.11, released in August of 1993, running inside of Google Chrome 39.0.2171.99 m, released about a week ago, on a Windows 7 PC, released in 2009.

And it’s connected to TEXTFILES.COM.

Windows 3.11 definitely works, and all the icons in there click through to the actual programs actually working. You can open solitaire and minesweeper, you can fire up MS-DOS, you can play with the calculator or play audio, and you can definitely boot up Netscape and NSCA Mosaic, or mIRC 2.5a or ping/traceroute to your heart’s content.

The world these Mosaic and Netscape browsers wake up in is very, very different. Websites, on the whole, and due to the way this is being done, don’t work.

hackernewsdefconIt turns out a number of fundamental aspects of The Web have changed since this time. There are modifications to the stream that can be done to get around some of this, and we’ll have screenshots when that happens. But for now, the connections are generally pretty sad looking.

digitalTo connect to the outside world, the Windows 3.11 instance is running Trumpet Winsock, one of the original TCP/IP conversions for Windows, and which uses a long-forgotten (but probably still in use here and there) protocol called PPP to “dial a modem” (actually, connect to a server), and transfer data to a PPP node (really just a standard web connection).

This means that somewhere, this instance needs to be connected to a proxy server, which assigns a 10.x.x.x address to the “Windows” machine, and then forwards the connections through. Basically, world’s weirdest, most hipster ISP on the face of the earth.

In other words, this is janky and imperfect and totally a hack.

But it works.

It took about three weeks after I decided we needed to go with EM-DOSBOX in addition to JSMESS to work with DOS programs, that we had it up on the site and going out to millions. It has taken two weeks after that for this situation to arrive.

Contrast with how it took poor Justin De Vesine, working hard with Justin Kerk and a host of other contributors, eight months to get JSMESS’s first machine (a colecovision) to run at 14% normal speed inside a browser, for one cartridge.

IMG_1813717583062Welcome to the Emularity, where the tools, processes and techniques developed over the past few years means we’re going to be iteratively improving the whole process quicker, and quicker, and we’ll be absorbing more and more aspects of historical computer information.

Now the stage is set – the amount of programs that can be run inside the browser is going to increase heavily over time. The actions that can be done against these programs, like where they can be pulled from or pushed out to, will also increase.

What becomes the priority (as it has been for some time) is tracking down as much of the old software as possible, especially the stuff that doesn’t sell itself like games or graphics do. I’m talking about educational, business, and utility software that risks dropping down between the cracks. I’m talking about obscure operating systems and OS variants that fell out of maintenance and favor. And I’m most certainly talking about in-process versions of later released works, which could stand to be seen in their glory, halfway done, and full of possibilities.

Documentation for the software just skyrocketed in value – we had bai reading 1995 books on PPP troubleshooting to get things going. MS-DOS programs on the Internet Archive will need links to manuals to become more useful (this is coming). And just grabbing context will continue to be a full-time job, hopefully split among a group of people who are as passionate as the folks I’ve been lucky enough to come into contact with so far.

I can entertain debates about the worthiness of this whole endeavor as an abstract anytime anyone wants. But the flywheel’s in motion. It’s not going to slow down.

We’re there.


I should have known this was click-juice. Welcome everyone. To speak specifically to folks who “just want to try it”, I ask for patience in terms of this being available to try – it’s still so new and fragile, and frankly, it doesn’t help to have thousands of people hit on the thing, go crazy when it acts weird, and complain bitterly.

If you’re new to the Javascript Emulator party we’ve been throwing for the last year, may I humbly suggest visiting the Internet Archive’s Console Living Room, Software Library and Arcade? With over 25,000 items to try, there’s plenty to keep your attention before the next generation of stuff becomes playable.


Categorised as: computer history

Comments are disabled on this post


  1. E[X] says:

    >long-forgotten (but probably still in use here and there) protocol called PPP to “dial a modem”

    PPP is extremely common, all DSL modems use it.

    • Well technically your DSL modem uses PPPoE, not PPP. But yeah, PPP is far from being forgotten…

    • Mantastas says:

      Not all – pure ETHoA or IPoA is *very* common in other countries (less client-side setup). But yes, PPPoE is not gone.

      PPTP and L2TP/IPSec VPNs also are really just PPP under the hood.

      • Sean Harlow says:

        Oh how I wish it was the same way here in the US. As a guy trying to support remote sites with no competent IT that must use non-ISP-provided routers, PPPoE is the bane of my existence. The number of possible ways it can fail where the lights on the modem all look good but we can’t get to the internet is incredible.

        To add to the “places where PPP is used” list, many single T1 connections use PPP-over-HDLC (though more in my experience use IP directly on top of Cisco HDLC) and I believe it’s basically required for bonded T1s. Somehow (probably the lack of authentication) PPP on T1s never causes me the same kind of problems as PPPoEoA on DSL.

  2. JWZ wrote a proxy to translate between HTTP/1.0 and HTTP/1.1 to let old browsers surf the modern web. Maybe you can implement something similar?

    See for details

    • daniel15 says:

      That proxy looks really promising. The main issue is the missing Host header (as back then, sites had dedicated IP addresses and there wasn’t such a thing as virtual hosting differentiated by host header) so just having a proxy that inserts the host header should suffice.

      • mr anonymous says:

        Win3.11 rox!
        Love this old os, would rather use it than windows 7…

        looks much better ,starts faster, everything is just better

        No eyecandy crap, but good looking icons and text
        I dont need icons the size of my hand, Im not handicapped yet 😉

        I will be back when you get it running, and then try out myself on a spare machine, Win311 that works with surfing
        but I would install it normally to get the full experience, with floppy drives and all

        just to get the floppy sound, a mouse that works 100%
        and maybe an old printer too / dial up ppp conn 😉

  3. Josh Renaud says:

    Jason, could similar techniques be used to let folks run, say, Telemate in DOS, and telnet to a BBS?

  4. Criação says:

    Jason, your work (and the work of all those blessed volunteers) never ceases to amaze me!

  5. Dan Price says:

    The statement “Windows 3.x was essentially a very complicated program running inside DOS” isn’t actually true. Raymond Chen has explained this in his blog, here’s a pertinent example:

    Essentially, DOS was used to launch Windows, and then DOS was pushed aside/shut down and Windows was in control. From the article:

    “It’s kind of stunning to realize that Enhanced mode Windows was really a completely new operating system with multiple virtual machines, pre-emptively multi-tasked with virtual memory. In principle, it could have created a virtual machine and hosted yet another random operating system inside it, but in practice the only two operating systems it bothered to host were Standard mode Windows and MS-DOS.”

  6. ChrisG says:

    Making a radio out of a coconut is one thing, making a coconut out of a radio is another thing entirely.

  7. Windows 3.x continues to call DOS int 21h services while running. That is how file access works in this emulator, because DOSBox does not emulate hard disk. Windows 3.11 has 32 bit file access and 32 bit disk access which could take over from DOS and the BIOS if supported hardware is detected.

  8. ender says:

    Interesting that Trumpet is used in PPP mode – in my own experiments with networking in DOSBox, I used a version of DOSBox that includes ne2000 emulation, loaded a packet driver for it, ran winpkt, then had Trumpet use the packet interface. Worked like a charm.

  9. I’d forgotten how clean the Windows 3.1 interface was. Now running WIndows 7 on a display with 10 times the number of pixels and I have trouble reading the text. Progress. You can keep it.

  10. dibi58 says:

    long forgotten, let’s make it ‘almost forgotten:’
    int S0/0/0
    ip address
    no fair-queue
    clock rate 64000
    encapsulation ppp
    ppp authentication chap
    no shut

  11. […] Windows 3.11 emulated in Javascript – completely amazing! […]