Emulated Windows 3.11 in the Browser

(pieter.com)

155 points | by jalev 1 day ago

32 comments

  • dachris 1 day ago
    Started the Visual Basic dev env, added a button to the form, MsgBox "Hello World", and it worked.

    So simple, so easy. Those were the days.

    • pjmlp 1 day ago
      You can still have that experience with VB.NET, C#, Delphi, FreePascal, Gambas, Xojo and C++ Builder.

      Instead folks go with Electron crap.

      • anthk 1 day ago
        TCL/Tk too, albeit being far less intuitive than Lazarus+FreePascal. Altough it has far less code, so it's a draw on difficulty. The average Joe would just spend time measuring the sizes of the frames and that's it.
        • pjmlp 1 day ago
          In a sense yeah, but as far as I remember it never had a good UI designer.
    • zabzonk 1 day ago
      Well, MessageBox() in the Win32 API is just a simple C function call: https://learn.microsoft.com/en-us/windows/win32/api/winuser/...

      I wrote a blog about this many years ago: https://latedev.wordpress.com/2011/10/06/simple-windows-dial...

      • dcrazy 19 hours ago
        It’s everything leading up to the MessageBox() call that VB makes trivial.
  • achairapart 1 day ago
    Exited to dos, found Bubble Bobble in GAMES directory and started to play. And that's mostly what I used to do as a kid at the times of Windows 3.11!
  • redbell 1 day ago
    Oh, I didn't immediately noticed that this was made by Pieter Levels!

    Discussion from Nov, 2024 with 160 points and 75 comments: https://news.ycombinator.com/item?id=42104531

  • theun 1 day ago
    Very excited to see Superlogo there! As a Dutch kid I grew up with Windows 3.11 and have devoured all "Programmeren voor Kinderen" books that made me learn to love programming.
  • oliwary 1 day ago
    This is super cool! Ran into an issue though, the first time it boots perfectly, after the first refresh it loads for a bit (downloads the image again instead of from cache) and then a cachebuster URL is added and loading starts over, without ever finishing. Ideally it would just load from cache on refresh.
  • canjobear 1 day ago
    I was expecting it to boot to DOS and then having to typing "win"
    • felixfurtak 1 day ago
      autoexec.bat does that for you!
      • genewitch 1 day ago
        unless you hold shift after POST.

        True story, and keep it in your hat if you know it:

        I was expelled from highschool about 3 months in to my freshman year for doing this on the library computers to bypass the librarian needing to log us in, because the Mac lab printers weren't working and the report was due next period. Librarian was like "nah i'm on lunch" so i waited like 15 minutes, bypassed, printed, exited windows.

        She was fuming, shaking showing printed papers with "autoexec.bat" showing an edit time[1] while she "was on lunch" and i "was the only one in there".

        I actually got expelled from that school 3 times, twice for "hacking."

        [1] hold shift to get to MS-DOS without restriction, edit AUTOEXEC.BAT to comment out the "security" "software" line, reboot. remove the commented line, reboot.

    • Finnucane 1 day ago
      And then crash.
  • ksec 8 hours ago
    I think, I may be wrong Windows 3.11 was the last Window that provide instantaneous GUI response. Windows 95 was still fast by today's standard but it wasn't "instant".
    • owlstuffing 7 hours ago
      Windows 3.x did not have preemptive multitasking, apps had to yield in the message loop (cooperative multitasking). This meant that an instantaneous response was possible, but often wasn't, at all. Win95 brought true preemptive multitasking, which was a breath of fresh air.
  • GeertB 9 hours ago
    Can't help myself: whenever I see Windows 3.11, I have to compute the difference between it and Windows 3.1. So, I fire up the calculator from the Accessories folder, and compute 3.11 - 3.1. The result: 0.00. Try it! :-)
  • stuart78 1 day ago
    Very pleased to see Abuse in there, but unfortunately it didn't load for me. I spent way too many hours in that game back in the day.
    • dwd 1 day ago
      The Pentium boot process brings back memories.

      I really would have liked to play Syndicate.

  • smusamashah 1 day ago
    Can we have icons like these again please.

    I started from Windows 98 and always loved the icons. They actually represented the application and purpose. These days they are more focused on looking modern. Lots of times they are not even distinguishable between each other.

    • rzzzt 1 day ago
      C:\Windows\System32\moricons.dll is still available, you can set them on shortcuts in Properties with the "Change icon" button.
    • owlstuffing 1 day ago
      Indeed! The UI in general is more intuitive compared with mod flat bs.
  • mr_tox 1 day ago
    what is this feeling? oh, yes, it's damn nostalgia
  • katzenversteher 1 day ago
    I was super happy when I found OMF 2097 in the games 2 folder. That game has insanely good music.
  • alt227 1 day ago
    I love everything except the mouse emulation, it makes it really clunky and hard to click on anything. Any way to let me just use the normal pointer in the browser instead of a javascript abstracted one?
  • VerifiedReports 1 day ago
    "For the best experience, use Chrome."

    That's not Windows 3.11. That kind of thing is circa 2000, and a state none of us should want the Web to return to.

    • ktm5j 1 day ago
      If this were a commercial project then I could understand the complaint.. but this is just a small, for-fun project and they have little motivation to put the extra effort into support for all browsers.
      • userbinator 1 day ago
        Bellard (yes, him) already had a working VM of Windows 2000 in the browser around a decade ago, with no specific "support for all browsers" (whatever that means):

        https://bellard.org/jslinux/vm.html?url=win2k.cfg&mem=192&gr...

        • bastawhiz 1 day ago
          Sadly we can't all be Bellard
          • anthk 1 day ago
            Also, look at 8086tiny, or PCulator/XTulator. These could be ported with ease to EMSCripten and run everywhere, not just in Chrome.

            Chrome almost became the new IE and Google, despite it's motto, the new Microsoft. Ok, the desktop? Android rules the smartphone sales in the world, and its online services are used by millions, with far more metadata grabbing than w9x/wxp on its day and with the same propietary OSes.

            • bastawhiz 18 hours ago
              Consider: maybe it's not a matter of non-standard APIs, but bad performance. It's not simply porting to the lowest common denominator, it's making sure the code doesn't run at a snail's pace because the JIT/wasm compiler has a pathological edge case.
      • VerifiedReports 1 day ago
        I'm not really complaining; just harking back to a shitty time that is, on some commercial sites, threatening to return. Especially as Apple finally allows Chrome on iOS, eroding the main bastion against it: Safari.
    • hypercube33 10 hours ago
      You know 3.11 was end of support 2001 and some versions were still supported to 2008 so technically it's in era.
    • gfody 1 day ago
      it's too late, we're in chrome monoculture era for a while now
  • mvkel 1 day ago
    Excited for the inevitable "Windows 3.11 - 98K MRR" in pieter's X bio.
  • alexjplant 1 day ago
    The long pause after "Verifying DMI Pool Data..." as the disk image downloaded aroused a dormant feeling of dread in me as I panicked and wondered why Windows wasn't loading... back in the day it meant getting yelled at for "breaking" the computer and tasked with spending the day reinstalling Windows and everybody's programs.

    Nostalgia tends to make things seem better than they were. Moments like this remind me how much tech has improved over the years.

    • M95D 16 hours ago
      I used a doublespace/drivespace volume for Windows. Backup was just booting from a floppy and making a copy of that file. Reinstall was "format c:", "sys a: c:", copy the volume file and dblspace.ini from backup.
  • cyberax 1 day ago
    Ah. Every time I look at the UI, I realize just how much the modern UI/UX degraded.

    We had clear colorful icons, text labels, scrollbars, clearly distinguishable checkboxes. And now we have UI that actively promotes "rebelliousness" and "being in the know".

  • amiga386 23 hours ago
    I feel personally attacked. I still use that exact mousepad from 1994. It's a 32 year old mousepad.
  • Synaesthesia 1 day ago
    Altavista search engine is a throwback for me.
  • absynth 1 day ago
    Plenty of people would have used this purely for Cardfile.

    em-dosbox is a good project.

  • pjmlp 1 day ago
    Love the experience, and it has been a while that I haven't seen a BIOS system configuration, what a throwback.
  • cheema33 1 day ago
    Very impressive. Does anybody know the technical details of how this demo was put together?
    • Gormo 15 hours ago
      Looks like it's a really polished deployment of em-dosbox, i.e. DOSBox via Emscripten.
  • xavortm 1 day ago
    Look at how fast Excel loads. Compare to modern high-end PC with it's latest version.
    • pjerem 1 day ago
      I came to write exactly this comment.

      The thing runs instantly. And that's in a VM in Javascript.

    • bitwize 1 day ago
      Office really chugged on the PCs of the time though. We can debate whether modern Excel actually delivers enough more value than historical Excel to justify being as more resource-hungry, thus slower to load, as it is. But historical Excel appears fast on modern hardware, even in emulation, because the CPU, RAM, and permanent storage have had 30 years to evolve since it was released. Contemporary 386s and 486s would not have been that snappy.
      • gerdesj 1 day ago
        I beg to differ. I'm 55.

        Let's go back to say around 1994/5. I've just got a job as the first dedicated IT bod for a pie factory near Plymouth (Devon not MA)! Win 3.11 was pretty much everywhere and was almost reliable - patching wasn't really a thing then in the MS world. By then Pentium (586) was a thing but the majority of machines were 80486, 80386s were still useful. There were also the 386/486 SX/DX and DX2 and Cyrix and so on.

        The planning spreadsheets were a series of Lotus 1-2-3 jobbies with a lot of manual copy and pasting and I gradually ported it to a Excel VBA job. To cut a long story short, I was running Win311 and Excel on a Pentium 75 with 16MB RAM, IDE HDD. Excel was way quicker to start than on a modern PC running Win 11 with an SSD.

        Yes, a lot of things took a while but I ended up with a finite capacity plan in VBA for an entire factory that took less than five minutes per run. That was for meat and dough prep, make, bake and wrap and dispatch for 150 odd finished product lines. It generated a labour plan as well and ran totally to forecast (which it also did). Pasties, sossie rolls etc are generally made to forecast - they take a while to get through the plant and have to be delivered into depot with enough code (shelf life) for the customer (store) to be able to sell them and the consumer to not be given a dose of the trots. As reality kicked in, you input the actual orders etc and it refined the plan.

        OK not the best tool for the job but I hope I show that a spreadsheet back in the day was more than capable of doing useful things. I've just fired up LO calc on my laptop with a SSD and it took longer than I remember old school Excel starting up or perhaps the same time.

        • nebula8804 1 day ago
          The world runs on Excel. It is the largest development environment by far and no fancy language/framework can come close to touch it. The reason is because it acts as the glue to get real life things done in everything from large governments, militaries, large corporations all the way down to the small bed and breakfast operation across the entire world. Normal people have gotten real processes built by just twiddling around in Excel.
          • anthk 1 day ago
            Sadly, Excel and the dumbness of the environment generated disasters on Genomics (and tons of other research areas too) causing millions if not billions of losses. Hint: skewed experiments/data and so on, making years of effort worthless.

            That woudn't happen under BioPython/BioPer/Rl and a custom dedicated interface with no data mangling at all.

            Poeple in the 90's joked about how MS turned the whole IT industry 20 years back. Now, literally, and not just IT.

            And that's sad, because you have Turbo Pascal, Windows NT, the VB6 IDE against C/C++ libraries... good products on MS where data correctned was granted with low level libraries called from VB. For sure BLAS/Lapack would exist in the 90's as products for Visual C/C++.

            Reusing MS Office for advanced tasks was the key of the shitty computing we were suffering on tons of places. Such as the idiots using Excel tables for Covid patients instead of having a proper SQL database. Even SQlite (IDK about the constraints, maybe it fits) could have been a better choice.

            People said with Unix "Worse it's beter". He, nowadays even NDB 'databases' would grant you correctness on scientific data (it's plain text with tuples) that these rotten binary, propietary, office bound pseudo databases and spreadsheets. Or even AWK with CSV's/TSV's.

            • bitwize 21 hours ago
              You're forgetting that Excel is the most ergonomic programming language in the world, full stop, nothing else even comes close. Until it's as easy to build something with those other things as it is to whip up a sheet in Excel, they're not leaving the starting gate when it comes to usage, especially by people who are not professional software devs
              • anthk 19 hours ago
                Ergonomic? Who cares? By 'ergonomic' a notebook it's zillions better than Excel or even Org-mode from Emacs when you don't even have to deal with the limited input from the cells, or worse, localized functions in spreadsheets. Go try debugging some functions in Spanish or German being yourself a native English speaker.

                The most ergonomic programming environment in the world today it's a mix between a notebook and a REPL with live changes. Something like a cross between Smalltalk and Jupyter, and that doesn't exist yet. Org-mode for Elisp it's close as it allows you to do literate programming, a REPL and such in a 'live' and documented way.

        • muyuu 1 day ago
          yep and that was Windows which introduced levels of latency and waiting times much worse than equivalent DOS software, but with easier to use and more intuitive menus instead of the usual DOS UI routine of either no menus or menus that showed with key combos, and power users knowing many key combination combos which weren't strictly necessary but both accelerated things and impressed newbs into thinking computers were too hard for them

          on a 486, Lotus 1-2-3 was essentially instant - even from floppy disks it would run faster than excel does today on a top of the line machine

        • nurettin 1 day ago
          I did earn some bread with vba as well, and always advocate for efficiency, but I just opened a 12MB xlsx file in LO, and it took a couple of seconds on a 2024 thinkpad.

          As far as I remember, my Win 3.11 machine (a 486 DX with 4MB RAM and 30MB HDD) wouldn't be able to store or open such a file, let alone recognize the extension. Also, it would call the file 2026022~.XL~ or something. And it took more than a couple of seconds to load office programs for sure. It would take well over a minute to load a book from a 1.44MB floppy.

          Anyway, software and computers have come a long way and I'm grateful for it.

          • necovek 1 day ago
            That file name thing was from Win95 keeping DOS (FAT) compatibility by introducing FAT32/VFAT: long file names were truncated to standard 8.3 names from DOS (and by extension, Win3.11 too) with fs extensions used to store long file names alongside DOS names. Win95 would show long names, DOS would show shorter ones.

            Also, file formats were binary optimized at the time, compared to current XML behemoths compressed with zip. So 12MB file in 1993 is probably something like 100k+ rows, and try that out today.

            • nurettin 1 day ago
              Yes, and I seem to remember that 100k lines was well over the excel 5.0 limits at the time. Correct me if I'm wrong.
              • necovek 23 hours ago
                Yeah, search confirms it was limited to 16k rows.
      • queuebert 1 day ago
        This is just not true. The only chugging back then was reading from disks, and the entire Office suite was only a handful of 3.5" floppies. If you had already started Excel earlier, then it was likely still cached in RAM and would start nearly instantly. If not, then it was still only a few seconds.

        Now what was slow was actual computations. Like try running a big spreadsheet in Excel or counting words in a big Word document on that hardware. It takes a very long time, while on modern hardware it's nearly instant.

        • dcrazy 1 day ago
          This does not match my memory of using Windows 3.1. Excel would likely not have been cached in RAM from a previous run because a typical Windows 3.1 machine only had 4 megabytes of RAM.
      • runjake 1 day ago
        This isn't true at all, based on my experiences. Contemporary 386s were kind of slow, I guess, but these programs did not chug on a 486. I spent tons and tons of time in Excel and Access and writing VB/VBScript/macros.
    • nebula8804 1 day ago
      They haven't released the old Excels as open source right?

      Wonder if its feasible to reverse the old version using LLMs, vibecode it to run on modern platforms and then shorehorn in support for modern XLS format. At the rate LLMs are improving I hope someone will eventually partake in this challenge!

      • mschuster91 1 day ago
        > Wonder if its feasible to reverse the old version using LLMs, vibecode it to run on modern platforms and then shorehorn in support for modern XLS format.

        Oh no it won't. Photoshop PSD and the legacy Office file formats have one thing in common... they are raw dumps of the C in-memory structs representing the contents. That's how they save and load so fast [1], in contrast to the modern formats which are a bunch of XMLs in a ZIP in a trenchcoat. Unfortunately, that makes reverse engineering them not just a challenge in itself, but also reimplementing because you have to reimplement Microsoft's original engines piece by piece, quirk by quirk.

        And that's before wading into the mess that is OLE or, yes, the older people will shudder, ActiveX. Or the wonders that VBA macros could achieve, including just running stuff directly from kernel32.dll. I'm reasonably sure you could import the DirectX DLLs into an Office VBA macro and implement a full blown 3D shooter engine with DirectX instead of Excel.

        And that's also why conversion in either direction almost always carries loss potential, simply put, not each quirk of the legacy format has been carried over to the "new" XML storage format, and certainly not into OpenOffice XML.

        [1] https://www.joelonsoftware.com/2008/02/19/why-are-the-micros...

        • nebula8804 1 day ago
          I mean if people are reverse engineering entire n64 games into its original code that can target the original SGI compilers, then it is possible to reverse this other code. I don't think there is a drive to do so though. Thats where I hope some future LLM could help lower that barrier to people already well experienced in reversing.

          >And that's also why conversion in either direction almost always carries loss potential, simply put, not each quirk of the legacy format has been carried over to the "new" XML storage format, and certainly not into OpenOffice XML.

          Can modern Office reliably open the old formats? If so they must have implemented the parsers correctly no?

          • mschuster91 21 hours ago
            > Can modern Office reliably open the old formats? If so they must have implemented the parsers correctly no?

            It can. But at two costs: first, MS has to keep all that legacy garbage code around - and we all know that just blindly deserializing stuff from potentially hostile input raw into C structs is ripe for getting exploited, and there have been a lot of bugs in there. And the second cost is, you can't reliably save an old document into a new XML document, hence the warning you get "this document was created in an old version of Office, are you sure you want to save it".

  • Aardwolf 1 day ago
    My only complaint is the esc button you need in some of the games, make the fullscreen go to the small display again
  • ranger_danger 1 day ago
    Just a black screen for me.
  • dintech 1 day ago
    I loved messing around with this for a short time. Very nostalgic.
  • jalev 1 day ago
    I've been playing freecell on it for the last hour or so
    • avadodin 1 day ago
      Freecell is actually a 32-bit Windows application running through a Wine-like compatibility layer called Win32s on 16-bit Windows.
      • roytam87 1 day ago
        But Microsoft Entertainment Pack 2 came first with FreeCell.
  • t1234s 1 day ago
    I forgot how good the old version of excel was
  • ChrisArchitect 1 day ago
    Some previous discussion:

    2024 https://news.ycombinator.com/item?id=42104531

  • 29athrowaway 1 day ago
    You can add Visual Basic 3 and Turbo C
  • doublerabbit 1 day ago
    Great. Attempting to use this on my 2mb ADSL is exactly like loading it from floopy disk. A true nostalgic expirence.
  • eqvinox 1 day ago
    IPv6 seems broken on this website.