
Run Windows 1.01 in your browser - chl
http://jsmachines.net/demos/pc/cga-win101/xt-cga-win101.xml
======
mambodog
As there seems to be a lot of interest in emulators in the browser, here's my
effort: I ported an emulator for classic Mac and IBM PC to the browser.

Mac System 7 Demo: [http://jamesfriend.com.au/pce-
js/](http://jamesfriend.com.au/pce-js/)

Windows 3.0 Demo: [http://jamesfriend.com.au/pce-js/ibmpc-
win/](http://jamesfriend.com.au/pce-js/ibmpc-win/)

IBM PC doesn't have mouse support... Yet. For Mac OS it's writing the mouse
position directly into memory, but I've yet to add that hack for Windows.

~~~
mbrubeck
Wow, awesome! For the Mac one with mouse support, you might want to add
".emscripten { cursor: none; }" to your stylesheet so the host cursor doesn't
cover up the emulated one.

~~~
mambodog
Thanks for that, I'd assumed that would run afoul of some kind of click-
jacking protection but fortunately it seems I was wrong :)

------
DanBC
I am really enjoying a lot of the retro things being posted recently. Sadly,
they miss out some of the details. Like Elite being playable at 4 MHz, but
really hard at 25 MHz, because that's how clocks worked then, and that's what
the turbo button did. (It was a de-turbo button, turning your machine into a
slow machine for compatibility. If it was connected, that is.)

And this makes me wonder about the Wayback machine. I can retrieve an old web
page, but can I recreate the experience of posting to that site? Is anyone
archiving the various social network sites code, so that the Future People can
recreate the experience of Friendster or Facebook or Myspace? Or are the
Future People going to have to guess by looking at screenshots and videos?

One of the first (perhaps the first?) commercial games for Windows was
"Balance of Power". I think it either came with a weird runtime version of Win
1.0, or a voucher to get it, for people running dos.

[http://theodor.lauppert.ws/games/bop.htm](http://theodor.lauppert.ws/games/bop.htm)

~~~
guyzero
it came with an embedded windows runtime - I think it was Microsoft not sure
quite yet how they'd license it.

~~~
tanzam75
> it came with an embedded windows runtime - I think it was Microsoft not sure
> quite yet how they'd license it.

The Windows port of Microsoft Excel also initially came bundled with a Windows
runtime. It wasn't really until Windows 3.0 that you could start take Windows
as a prereq. Before then, very few systems had Windows installed.

Wait a minute. "Windows Runtime" has a different meaning nowadays. Microsoft
is really reusing a lot of its existing trademarks for Windows 8, isn't it?
"Surface" was also a trademark that they already owned, for a giant
touchscreen table.

------
frozenport
>><machine id="ibm5160" class="pcjs" border="1" width="980px" pos="center"
style="background-color:#FAEBD7">

Tag of the future

~~~
jcutrell
Indeed.

What I might coin the "cloud tag".

------
pud
Every time I see an emulator like this on HN, my mind is blown.

Can someone explain to me and any other run-of-the-mill hackers reading this,
how an emulator like this is made?

I wouldn't even know where to start.

~~~
yohanatan
Run-of-the-mill hackers should know this.

You pick a sufficiently low-level abstraction layer and implement it in
Javascript. Everything above that layer 'just works'TM.

~~~
Segmentation
It's like drawing.
[http://i.imgur.com/RadSf.jpg](http://i.imgur.com/RadSf.jpg)

~~~
yohanatan
Hahaha, precisely. Or drawing turtles!

~~~
dllthomas
Drawing turtles?
[http://en.wikipedia.org/wiki/Turtle_graphics](http://en.wikipedia.org/wiki/Turtle_graphics)

------
ghc
Played Reversi in Windows 1.01. Still lost. I will go hang my head in shame
now.

~~~
vidarh
The key to Reversi is to win the corners (EDIT: you can lose while still
winning 2-3 corners, but losing the corners gives the opponent a much greater
chance to take large chunks of the edges and then purse to turn whole rows).
To win the corners, you must avoid the spots 1 out from the corners. To avoid
being forced to take the spots 1 out from the corners, one strategy is to
avoid the edges as long as possible, and then try to only take edge pieces
with at least one gap to the corners, and one gap to the opponent.

You also want to keep your options open, to prevent being forced into taking
the wrong piece near the edge or corners.

A simple strategy that works against this version relatively often is to at
the start look for positions that will take some of the opponents pieces while
ideally _increasing_ your possible moves, while being as far from the edges as
possible. Then when you are forced to put a piece near the edges, put it near
the centre of an edge (as far from corners as possible).

By then the options will be so constrained you can start looking a at
consequences of each option, with the goal being to avoid putting pieces near
the corners.

I'm not a particularly good player, and I got 3 out of 4 corners on my first
attempt by just relatively haphazardly following the above, which means the
default settings and/or overall strength of this version is pretty weak.

~~~
tanzam75
> _I 'm not a particularly good player, and I got 3 out of 4 corners on my
> first attempt by just relatively haphazardly following the above, which
> means the default settings and/or overall strength of this version is pretty
> weak._

It defaults to Beginner. Use the "Skill" menu to change it to Master. It'll be
much more challenging, and the AI will take a _lot longer_ to calculate its
move.

(Remember: This is Windows 1.01, so you have to hold down the mouse button to
use pull-down menus.)

------
NamTaf
The first time I ran this something went wrong I somehow didn't manage to even
boot in to windows but found myself at the command line, with only the DOS
floppy disks available.

The true Windows 1.01 experience.

~~~
ldite

      C:
      CD windows
      win

------
stormbrew
I love that windows 1.x had a tiling window manager. I think it's kind of a
shame that mode died for so long.

~~~
brudgers
Back in Windows 8. And improved in Windows 8.1.

EMACS, of course, never lost it.

~~~
girvo
I only wish it was a bit more flexible in W8 :(

------
jaxbot
All these features, and Reversi!
[http://www.youtube.com/watch?v=tGvHNNOLnCk](http://www.youtube.com/watch?v=tGvHNNOLnCk)

------
mintplant
Even better, Zork:
[http://jsmachines.net/disks/pc/games/infocom/zork1/](http://jsmachines.net/disks/pc/games/infocom/zork1/)

And it appears to save your state between runs, which is nice.

~~~
Pitarou
So that's:

1\. Zork

2\. running in the Infocom Virtual Machine

3\. running in an IBM PC emulator

4\. running in Javascript

6\. running in x86 machine code

and x86 maintains backwards compatibility with that original IBM PC through

7\. hardware instruction set translation

It's nice to know all those transistors aren't sitting idle.

~~~
curiousdannii
For fewer layers (and faster playing) you can use Parchment:
[http://iplayif.com/?story=http://www.batmantis.com/zorks/zor...](http://iplayif.com/?story=http://www.batmantis.com/zorks/zork1.z5&vm=gnusto)

Though the status line doesn't work... I should fix that.

And if you like Zork, try these modern classics:

Lost pig: [http://iplayif.com/?story=http://mirror.ifarchive.org/if-
arc...](http://iplayif.com/?story=http://mirror.ifarchive.org/if-
archive/games/zcode/LostPig.z8)

Spider and Web: [http://iplayif.com/?story=http://mirror.ifarchive.org/if-
arc...](http://iplayif.com/?story=http://mirror.ifarchive.org/if-
archive/games/zcode/Tangle.z5)

~~~
s-macke
Great. I like those interactive fiction and will play Lost pig :) What is
missing is some sort of save game option via web storage. And maybe you should
give some example links on the first page. _bookmarked_

------
tzury
After Bellard's JSLinux, it was just about time till more OS will be ported to
JS.

[http://bellard.org/jslinux/](http://bellard.org/jslinux/)

~~~
slacka
After PCjs and Bellard's, try Virtual x86, which can emulate FreeDOS, OpenBSD,
and KolibriOS.

[http://copy.sh/v24/](http://copy.sh/v24/)

As a hack, all of these JavaScript emulators are awesome to play with. But in
reality if you need performance for something in the past decade, like a N64
or newer arcade emulators, JS is still orders of magnitude slower than dynarec
emulators written in C. I hope something like PNaCl will come along to bridge
the performance gap.

~~~
s-macke
N64 might work. With WebGL support of course. And I hope too for a really new
standard for web programming. Java was the answer for some time, then Flash,
now Javascript. The big companies should sit together and agree on one
standard with typed variables. The JIT compilers of Javascript will reach
there limits sooner or later.

~~~
slacka
So I worked on a defuct N64 emulator, TRwin, back around 2000. Thirteen years
later and thanks to the power of the modern web, my PC that's literally orders
of magnitude faster runs the best JS emulator like a slide show. Using native
code, my celeron400 with a Voodo card could run it full speed.

JavaScript is a toy language. But I do agree that strong typing and
restrictions on GC like asm.js would help the situation. Unfortunately we
can't rely on the standards bodies to make good decisions. Static typing was
supposed to be in ECMAScript 4 back in 2008, but they abandoned it back in
2007.

It's still painfully clear to me the we are going backwards with all of these
bloated poorly designed layers in HTML5 and I have little faith in the
standards bodies.

[http://hulkholden.github.io/n64js/](http://hulkholden.github.io/n64js/)

------
fosk
This an insanely great emulation. Including the loading times.

------
dmead
the mouse tracking is fucked. it leaves the windows if i go to try and click
the top right corner

~~~
timmclean
It'd be nice if they implemented Pointer Lock:
[https://developer.mozilla.org/en-
US/docs/WebAPI/Pointer_Lock](https://developer.mozilla.org/en-
US/docs/WebAPI/Pointer_Lock)

------
csmatt
As someone who really enjoys the history of computing, this is awesome! I
don't think I've ever had a chance to play with Win 1 and probably wouldn't
have gone through the trouble of getting it running myself. This and others
like it would be neat for the Computer History Museum to have on its site.

------
conradfr
I can't seem to successfully reset the calculator after a divide by zero.

It's funny how when I closed Windows and ended on the DOS prompt I mindlessly
typed "win" & enter. Some habits never die I guess.

~~~
anonymfus
"C" key works for me as expected, where is problem?

~~~
conradfr
Yes it does, for some reasons I'm an idiot that was using buttons on the left
and didn't see the C.

------
adamjernst
Windows 1.01 feels much closer to Mac Classic than Windows 3.1 does. (Button
appearance, close button on left, menus must be held down to stay open, "Get
Info" instead of "Properties".)

------
obfuskater
It's really mind blowing how it's written entirely in javascript

------
marshray
Wow, it had been a long time since I'd played DONKEY.BAS.
[http://jsmachines.net/demos/pc/donkey/](http://jsmachines.net/demos/pc/donkey/)

~~~
tanzam75
Bill Gates and Neil Konzen wrote DONKEY.BAS. His name doesn't show up in the
program listing, though, even on PC-DOS 1.0. :-(

------
crb
Interesting to see Helvetica ("Helv") in Windows 1.0 Write. According to a
quick Wikipedia, Arial was only introduced with TrueType in Windows 3.x.

~~~
quarterto
It's actually MS Sans Serif not even trying to hide the fact it's a ripoff.
It's still in Windows 7 (don't know about 8), along with a TrueType version.
Major differences between MS Sans Serif and Helvetica are the uppercase R and
G. The overall typeface has a little more vertical stress. It's a way better
ripoff than Arial; it's a shame Arial became so ubiquitous in that capacity.

------
jmhain
I tried to unmaximize a window by dragging the title bar like in Windows 7 or
GNOME 3. I have no idea why I expected that to work.

~~~
Pitarou
Were you confused by the dead mouse scroll wheel, too? Or was that just me?

------
mrbuttons454
I still suck at Reversi. :(

------
abhididdigi
There is some issue with the mouse. When I click on terminal.exe and try to
click on "File", the mouse is coming out of the emulator. You would probably
want to create an interface like a VM, where the mouse comes out of the
emulator only when you press some combination of keys.

~~~
icoder
That'll probably impossible in the browser due to security reasons: otherwise
misuse could trap the user on a website

------
shurcooL
Nice, this one runs on an iPad mini! Not much slower than on a computer.

------
amenod
Unbelievable... I never knew how Windows looked before 3.0 - thanks!

------
fosap
I wonder what the license it. The guy from copy.sh promised to make it open
source, but didn't yet. Can I hope?

------
milesf
Yep, still as slow and glitchy as I remember it :)

This trend of retro computing is a wonderful trend.

------
Max_Horstmann
Glad it boots to desktop, not metro.

------
devsatish
the left top menu looks like bootstrap collapse :-). Nostalgia for sure..good
work

------
patelmiteshb
i am not sure but i am not able to do it.

------
tegansnyder
where is qbasic?

~~~
mwally
In the MS-DOS Executive, click the A-Drive, and the double-click on BASICA.EXE
(Basic Advanced).

QBasic didn't come until MS-DOS 5, the demo uses MS-DOS 2.

~~~
tanzam75
> QBasic didn't come until MS-DOS 5, the demo uses MS-DOS 2.

Actually, the demo is PC-DOS 2.0, not MS-DOS 2.0. Notice the disk that's in
the emulator's drive. Also, IBM replaced all of Microsoft's copyright notices:

    
    
      The IBM Personal Computer DOS
      Version 2.00 (C)Copyright IBM Corp 1981, 1982 1983
    

If they're using real disk images, then they must have an actual IBM ROM BASIC
in the emulator. PC-DOS BASIC(A) would only run on a true-blue IBM machine,
because it called into the ROM BASIC. In contrast, MS-DOS BASIC(A) was
implemented entirely in software and would run on any clone.

