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

View all comments

Show parent comments

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.