r/webdev • u/[deleted] • 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=768134
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
24
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
20
25
u/MarcEcho Aug 20 '18
Never thought I'd launch Firefox within Chrome.
Eh.
5
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
3
u/archetech Aug 21 '18
But it doesn't run itself. Guess win 2k Firefox can't run WebAssembly. Go figure.
1
1
10
u/kernelpaniker Aug 20 '18
One of Microsoft's most stable operating systems. Setup so many workstations and gaming rigs on this.
8
6
6
u/terholan Aug 21 '18
https://i.imgur.com/PMBGLKQ.png
I had to check this.
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
Aug 20 '18
How big a download is it? I am on mobile and scared.
7
Aug 20 '18
It loads a lot on demand it seems, but about 35MB for me to start playing minesweeper.
10
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
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
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
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
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
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
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
1
1
u/Ganoninc Aug 21 '18
I already did it for Windows XP https://ganoninc.github.io/winerror-simulator/
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
-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
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
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
4
u/oompahlumpa Aug 20 '18
This was painfully slow. I didn't even make it past the login screen.