Hacker News new | past | comments | ask | show | jobs | submit login
Windows 1.0 emulator (copy.sh)
95 points by agonzalezro on March 30, 2015 | hide | past | favorite | 39 comments



Fun fact: Microsoft has maintained backwards compatibility so effectively that the utilities that shipped with windows 1.0 (notepad, calc, etc) will work on recent versions (search for 'man upgrades windows 1.0 to windows 7) ... say what you want about Microsoft, but if you've ever worked on operating systems, this is absolutely incredible.


I thought Linux also had a very strict ABI compatibility policy also.

Executable formats have changed some, and I don't know if recent Linux systems would support the a.out format of early Linux. And shared libraries change too. But if you had a fully-statically-linked binary (and enabled a.out support if necessary), I think Linux should also support very old binaries.


> I thought Linux also had a very strict ABI compatibility policy also.

Yes, it does.

> But if you had a fully-statically-linked binary (and enabled a.out support if necessary), I think Linux should also support very old binaries.

And it does.


Microsoft accomplished this with dynamically linked applications, which is a more difficult feat. It also led to 'DLL hell', but they have resolved this fairly effectively in modern versions of windows (at the cost of using gobs of hard drive space, mitigating the benefit of dynamic linking to some extent). In Windows 8 they've introduce a technology called 'page combining' which mitigates some of the problem in physical RAM. It does exactly what it sounds like - it searches RAM for identical pages, and when it finds them, it manipulates the page table to use one physical copy for all of the virtual copies. If some process tries to modify it, a copy-on-write operation is performed. This significantly reduces physical memory usage in Windows 8.


And Linux (and all Unices, as far as I know) have done the same thing without DLL Hell by using versioned share object files, the .so.0.1 and so.1 and so on you see on the end of binary libraries.


Windows 3.1 removed real mode support thus breaking compatibility with Windows 2 and Windows 1 apps.

What Microsoft did is replace various included applications completely with every upgrade. There's no compatibility. Things like notepad.exe for Windows 1 is simply replaced with a version made for Windows 3.1 when you upgrade. Likewise when you upgrade from 3.1 to 95.

You absolutely cannot run Windows 1 applications in modern day Windows. Heck the CPUs these days literally do not support real mode anymore. You can upgrade but that's really just a series of complete OS replacements in this case.


> Heck the CPUs these days literally do not support real mode anymore.

They do, actually; a brand new Core i7 still runs 16-bit real-mode and 32-bit real-mode.

Now, if you're running in 64-bit mode, there's no vm86 mode you can use to run 16-bit applications on a 64-bit kernel. However, the CPU still supports 16-bit real mode, and under a 32-bit kernel you can run 16-bit applications.


There are tricky ways to get vm86 working with 64-bit operating systems, although it's not as nice as with 32-bit.

Edit: An edit went on the wrong comment somehow. Ignore what it said.


And indeed, Wine can run 16-bit Windows applications on 64-bit Linux. You could say that at this point Linux is more Windows-compatible than Windows itself :)


You absolutely can run Windows 1 applications in modern day Windows, as long as it's the 32-bit version.

Here's a screenshot of Windows 8 (32-bit) running four different Windows 1.01 apps:

http://toastytech.com/guis/win816bit.png


You're talking about source compatibility. (Windows 1 was never 32-bit.)

Most people here seem to be talking about binary (.exe) compatibility.


Nope, this is binary compatibility. The apps you see in the screenshot are binaries straight from Windows 1 install media. Literally every 16- or 32-bit version of Windows from 1 to 8 will run Windows 1 apps.

I'm sorry if I was unclear in my wording, I mean the modern Windows version must be 32-bit to be able to run 16-bit Windows apps.


Oh, I misunderstood you. "Modern" windows is 64-bit in my mind.


Windows 3.1 removed real mode support thus breaking compatibility with Windows 2 and Windows 1 apps.

That's just not true. Windows 3.1 removed real-mode support in Windows itself -- in other words, the last version you can run on a 8086 CPU is Windows 3.0.

But pre-3.0 16-bit Windows apps certainly didn't stop working.

Also, present-day x86 CPUs definitely can run real-mode software using virtual 8086 mode: http://en.wikipedia.org/wiki/Virtual_8086_mode

This is the same mode that Windows 3.x used to run multiple real-mode DOS apps simultaneously on a 386 processor.


The trick there is that there is no such thing as "real-mode windows applications". The 16-bit ABI is essentially same regardless of whether windows run in real mode or protected mode.


Also, it is true that Windows Setup would replace old bundled applications with the upgraded versions (otherwise it wouldn't really be an upgrade,) but if you had older applications that didn't come with the new OS (REVERSI.EXE was no longer available in Windows 3.1, there was no CARDFILE.EXE in Windows 95, and so forth) Setup would just leave them alone, and they would run happily on the new OS.

There were some exceptions to this; I remember as a kid upgrading my 486 from Windows 3.1 to 95 for the first time, and being disappointed that Setup replaced Paintbrush and Write with Paint and Wordpad, because I liked Paintbrush better. It actually replaced PBRUSH.EXE and WRITE.EXE with dummy EXE:s that would just launch MSPAINT.EXE and WORDPAD.EXE instead. These dummy files are still in recent Windows versions for compatibility with stuff like ancient apps that create shortcuts to launch Write with their docs.

It was trivial to retrieve PBRUSH.EXE from Windows 3.1 install media, however, and it works fine on Windows 95 as well as every subsequent 32-bit Windows.


When you have the source code available to recompile software, that "compatibility" issue disappears (like for most tools on Linux). It's simply a different approach.


If recompiling older sources were as straightforward as running older windows binaries in recent versions...


At least with the sources you can try to do something about it. When "compatibility" fails, you are left with your eyes to cry.


You know, ASM code can be hacked, and the older the ASM code, the less complex it is, because the compilers were not as aggressive as today's.

This has been done with abandoned games to fix bugs and compatibility issues, ex. Forgotten Empires (the mod)[1]

ASM code can also be ported between platforms (ex. from 16-bit DOS to 64-bit Linux), as long as you replace OS-specific calls, interrupts, IO access, etc., although the effort will be greater.

People should stop pretending that a compiled binary is a black box, because it isn't.

Still, the point that Windows makes backwards-compatibility as straightforward as possible prevails, since the cases where you need to do complicated maneuvers like hacking ASM code to fix compatibility issues are scarce.

I still get amazed that I can play some obscure games designed for Windows 95 and compiled using the DirectX 3 SDK. I can't say the same about Linux since I hadn't been able to recompile without fixing code old open source games, because X kernel version broke Y version of Z framework.

[1] http://www.forgottenempires.net/fe


Or you emulate an older OS (DosBox etc.) or use a VM.


I wish they did the same with the xbox.


It actually supports more profiles: http://copy.sh/v86/ (for example running a Solaris or an Arch Linux)


Gotta love those bold colors, and the flat Modern UI interface way ahead of its time.

Now, if you excuse me, I'll turn on some 80's music on Spotify while I'm playing with this.


Pretty cool, mouse was way off for me in chrome.


Same in Firefox but it's OK if you switch to full-screen mode.


That's also quite common in virtual machines. You just need to trap the cursor in a corner. Then, as long as you keep the mouse inside the window, both will be synchronized.


I haven't had them be synchronised even after doing that, the cursor inside the VM moved faster the host cursor. That's ok though, it'd be an issue if the cursor in the VM moved slower.

Edit: Just pressing the Lock Mouse button works very well. esc will remove the lock.


Click "Lock mouse" button.


Always a good reminder that tiling window managers have been around for a really long time.


Pretty amazing. All it needs now is a copy of Balance of Power.


I was just now trying to figure out how to get the 1990 edition running on my mac.


Does it take down your computer when it bluescreens?


You can run Windows 3.1/95/98 in DosBox.


I've ran Windows 3.1 in DOSBox before. I can't say it was a fun experience, it's not very stable. Trying to use The Way Things Work, a multimedia CD-ROM from Dorling Kindersley, would crash it occasionally.

If you want to run old Windows, I suggest a proper virtual machine.


Honestly QEmu is a better choice for this kind of things.


It's hard to get networking functional inside DosBox, but works pretty well beyond that. I use this for some old Windows games (Castle of the Winds etc) and other nostalgiaware (Visual Basic, AmiPro etc). :)


Or PCem-X.


Fun :) thank you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: