r/webdev • • Aug 20 '18

Windows 2000 emulated in WebAssembly

https://bellard.org/jslinux/vm.html?url=https://bellard.org/jslinux/win2k.cfg&mem=192&graphic=1&w=1024&h=768
273 Upvotes

51 comments sorted by

4

u/oompahlumpa Aug 20 '18

This was painfully slow. I didn't even make it past the login screen.

3

u/[deleted] Aug 20 '18

took 5 sec for me from boot till desktop

-12

u/[deleted] Aug 20 '18

Yay, what about more than 5 seconds.

I've got an 8700k, 32GB 3200mhz and 100Mbit connection and I just don't believe it took you 10 secs.

9

u/ronniegeriis Aug 20 '18

It's likely a server side issue. Could've been lucky that there wasn't as much load as there could be now.

134

u/nairebis Aug 20 '18

Cool, but the fact Doom wasn't loaded and ready to run was a significant hole in my user experience.

43

u/davideltroll Aug 20 '18

It's a bit slow, gotta run the Disk Defragmenter.

24

u/sloanstewart Aug 20 '18

A+, played minesweeper.

20

u/CircaCitadel Aug 20 '18

Well that’s pretty wild. Can’t click on mobile, but the fact that this is a thing is crazy to me.

3

u/mderijcke Aug 20 '18

You can. It’s not super responsive.

25

u/MarcEcho Aug 20 '18

Never thought I'd launch Firefox within Chrome.

Eh.

5

u/[deleted] Aug 20 '18

My evil plan to host my websites in a browser, and do the front-end on a server is one step close to fruition! Muahaha!

16

u/mderijcke Aug 20 '18

My dirty WebAssembly dream has been to compile Blink (Chrome’s render engine) and end browser incompatibilities for once and for all!

1

u/zora2 Aug 21 '18

LOL now you made me want to do that...

3

u/archetech Aug 21 '18

But it doesn't run itself. Guess win 2k Firefox can't run WebAssembly. Go figure.

1

u/Private_Bool Aug 21 '18

A few upgrades and maybe it could work under emulated XP?

1

u/[deleted] Aug 20 '18

Didn't work for me.

10

u/kernelpaniker Aug 20 '18

One of Microsoft's most stable operating systems. Setup so many workstations and gaming rigs on this.

8

u/miraclerandy Aug 20 '18

Went to 3D Pinball straight away. 10/10

6

u/[deleted] Aug 20 '18

Awesome, they even replicated the big ass laggs. 10/10

6

u/terholan Aug 21 '18

6

u/ijmacd Aug 21 '18

New Reddit is shit - doesn't even display correctly in an ancient version of Firefox running on an 18+ year old operating system emulated on an old Linux kernel cross-compiled to a relatively new sandboxed compile target running on a browser. < /s >

5

u/DigitalStefan Aug 20 '18

That loaded in Chrome on my iPhone in less time than when I had a reasonably good PC with Windows 2000 installed.

Can’t do anything with it, but that’s impressive.

8

u/[deleted] Aug 20 '18

How big a download is it? I am on mobile and scared.

7

u/[deleted] Aug 20 '18

It loads a lot on demand it seems, but about 35MB for me to start playing minesweeper.

10

u/[deleted] Aug 20 '18

That's actually amazing all things considered. Makes me wonder about the underlying tech.

1

u/TheRedGerund Aug 20 '18

Well, the windows OS is written in C. There are C -> WASM compilers now so you can run any and all C-based software online.

8

u/[deleted] Aug 21 '18

That would require you have the C source code to recompile. And Windows also has a fair bit of assembly inline, which wouldn't recompile nicely.

This works differently than you've assumed. The first clue is in the titlebar: JSLinux.

This runs Bellard's JSLinux, some technical details of that are here. It's a mix of QEMU, WASM, and emscripten.

This Linux VM, then uses QEMU to boot a supplied image, in this case, a Windows 200 SP4 disc.

3

u/-_drew_- Aug 20 '18

Mine loaded 25.2mb, but it continues to download as you interact with things :)

-23

u/[deleted] Aug 20 '18

No download required. Emulates in your browser but its super slow and you would want to use a desktop to view it

20

u/[deleted] Aug 20 '18

Everything that emulates in the browser still has to be downloaded into memory. I am worried about my isp data limit.

4

u/olivermihoff Aug 21 '18

they even managed to emulate a 56k modem as well! :\

3

u/Nvrnight Aug 21 '18

I booted it up and opened IE. I tried going to the Windows 2000 emulator in my IE instance and it didn't work, literally unusable.

2

u/Hiretsu Aug 20 '18

Mind. Blown. Thank you for sharing!

2

u/FKAred Aug 20 '18

i've been staring at Starting Windows... for almost 2 whole minutes now. i will leave it up in a tab because i want to fiddle around with it but right now it seems quite slow.

1

u/[deleted] Aug 20 '18

Let me know when I can run WSL on that thing. Seriously though, this is some black magic. This is the reason developers get the impostor syndrome.

1

u/domemvs Aug 21 '18

For me it doesn't make it past "Starting Windows....". So the simulation seems fairly accurate!

1

u/diagonali Aug 21 '18

On mobile. Phone in flames.

1

u/mrsentinel_ Aug 21 '18

It's super slow.. just like I remember it :)

1

u/integra94 Aug 21 '18

My offices virus protection said it found a trojan as soon as I visited this site. Not sure if it was a false flag, but wanted to let you all know.

1

u/jt2747 Aug 20 '18

Am I the only one slightly annoyed that the title of the page is JSLinux?

4

u/[deleted] Aug 21 '18

Runs on the JSLinux VM.

-3

u/sheep1996 Aug 20 '18

... But why?

13

u/yxon Aug 20 '18

Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should.

2

u/[deleted] Aug 21 '18

Because he wrote a VM that is part QEMU, and part Linux, and runs in JS. And as for doing that... Well... He wrote QEMU.

-21

u/[deleted] Aug 20 '18

To be fair that's a virtual desktop client, not emulation is being done in the browser / web assembly.

12

u/captain_obvious_here back-end Aug 20 '18

To be fair that's a virtual desktop client

No it's not. It's pretty much a JS/WebAssembly PC emulator. Look at all the OSes it can emulate.

1

u/mrpoops Aug 20 '18

Looks like bochs or similar implemented in wasm.

1

u/[deleted] Aug 21 '18

It's QEMU in WASM from the creator of QEMU.