Hacker News new | comments | show | ask | jobs | submit login
Early Macintosh Emulation Comes to the Archive (archive.org)
273 points by jf 160 days ago | hide | past | web | 57 comments | favorite

I did the initial work of porting this emulator to the browser (most credit should go to the original emulator author however: http://hampa.ch/pce).

I wrote up the process and hacks that went in to making this possible here: https://jamesfriend.com.au/porting-pce-emulator-browser

The most gross/fun part was how I made the Mac OS mouse position align with your real mouse cursor: by writing its position directly to the emulated computer's memory. Classic Mac OS held the mouse position in a few fixed global memory locations. I realised I could just write to those memory locations every few CPU cycles. I could have instead written a driver which ran inside the emulated OS to communicate with the emulator program, but this was simpler!

Awsome! I need to finish that game of Fool's Errand [1] I started a quarter century ago and doing it on a modern machine seems just wrong.

1. http://www.thefoolandhismoney.com/02-FE/index.htm

That, and 3 in Three, were such unique puzzle games!

EDIT: A sequel came out a mere 25 years later called http://www.thefoolandhismoney.com/06-FM/index.htm

And 3 in Three.

Sadly it's not working for me, seems to be off by half. The emulated mouse is always at x/2 y/2 compared to the real mouse pointer.

I believe Chrome misreports the mouse position if you zoom the page, or if you have a hidpi display. Care to share more details?

This was in Safari on a retina mac book pro

Is this a Retina display issue, perhaps?

Interesting. What browser are you using?

heh. Enterprising pranksters could also rewrite those locations using an init. I believe gravity mouse was the name of it.

Your mouse hack is funny. I take it you don't implement hardware other than the CPU for the emulator?

The norm would be to disable the real mouse cursor (make it invisible) and then feed the guest mouse movement via MMIO and an IRQ. You don't need a driver because classic MacOS already has one for the emulated hardware.

I see that most of the work you did on PCE.js is 3-4 years old at this point.

What happened in the meantime?

Why did you choose PCE over (e.g.) Basilisk II?

How do you provide the Macintosh ROM?

PCE has very simple code, and unlike Basilisk II, doesn't make use of threads (which Emscripten didn't support at the time). Basilisk II also uses a SIGSEGV handler to catch invalid memory accesses, this would have to be coded around. I'd still like to port Basilisk II, which is feasible now due to new browser APIs, but it's a big project.

The Macintosh ROM is up to the website (e.g. archive.org) to provide, along with the disk images.

What about Executor and syn68k from ARDI? It got open sourced. You'd get something like MacOS system 6.0.7 or 7.0.0 running on an emulated 68LC040.

At the very least, that gets you a ROM.

I tried it out on a MacBookPro, and the tap to click function on the trackpad appears to not be working. A physical trackpad click works though.

I do wonder, from a legal perspective, did the Internet Archive get permission from Apple or are they merely trusting that no one will enforce their rights on abandoned software? Especially since they seem to be doing the same with MS-DOS/Windows 3.1[1].

[1] https://blog.archive.org/2016/02/11/internet-archive-does-wi...

If I remember correctly (disclaimer: it's been a while since I read about this, and IANAL), they don't get permission in advance, but rather take steps to make themselves harder to attack legally. There are two prongs to the strategy:

1) Disable access to works upon request, but only after challenging the requesting party to substantiate the claim that they represent the actual copyright owner. Apparently, a whole goddamn lot of copyrights have hazy ownership thanks to corporate mergers/dissolutions/reorganizations being messy, but the claimed owners are rarely called on it. I suppose the implicit promise is that IA would demand the same in a lawsuit.

2) Only allow access to some works via "streaming", e.g. running a game in an in-browser emulator at archive.org but not providing download links. Of course a technically savvy user can retrieve the underlying files, but this purportedly puts it under the legal framework of "broadcasting" rather than "copying", which is supposed to somehow limit legal remedies available to copyright owners.

More generally, the Internet Archive does a bunch of things that make it harder/uninteresting to pursue for copyright issues.

1.) That you list is a big one. With respect to websites, the ability to change robots.txt goes a long way toward creating an assumption of ownership even retroactively.

2.) The IA is non-commercial.

3.) The IA doesn't have deep pockets.

Add it all up and although much of what the IA does archive is in a pretty murky legal area, the fact that it's willing to take most things down and that there isn't a big payday to be gained from suing them, leaves them mostly free to do what they do.

Definitely seems like the latter. It's pretty strange to see archive.org adding more and more stuff that's under copyright without explicit permission.

They have a ton of copyrighted games, they have recordings of concerts from artists who almost certainly haven't authorized that. Personally I love this, I just really hope they don't get sued into the ground.

DMCA exemption.


And the Archive could always move out of US jurisdiction if absolutely required.

> Following deliberation, the Copyright Office ruled in late October 2003 that four exemptions should be added to the anti-circumvention clause of the DMCA, to be valid until the next Copyright Office rulemaking in 2006, including two that are related to the Internet Archive's original comments: [...]

It's past 2006 now. This text seems outdated. Furthermore, it states:

> In 2003 the Internet Archive, as part of research into vintage software archiving, discovered possible archiving issues involving the Digital Millenium Copyright Act. This could make it impossible to legally archive early computer software and games, even for accredited institutions wishing to store limited amounts of non-distributable, archival images.

I don't believe we're looking at "non-distributable archival images" here.

I suppose we'll just need to wait for someone to sue the Internet Archive and have the EFF step in.

I'm not sure if even the EFF can rationally justify the amount of copyrighted materials on there.

I think the sheer quantity of really valuable copyright-free things on there would be a pretty good case.

This is one of my favourite things on the internet: https://archive.org/details/EALand_FinalCountdown

And it would probably vanish in a few years without something like archive.org.

DMCA exemptions are for the additional restrictions imposed by the DMCA on circumventing "access controls", i.e. DRM, even for otherwise noninfringing purposes. This is separate from plain old copyright infringement, i.e. making/distributing copies without permission: that has certain exemptions baked into the law, including fair use, but isn't subject to the periodic Library of Congress rulemaking.

In this case, archive.org is distributing copies of the software to everyone's browser, and I don't think there's any plausible case that it's fair use or that any of the other exemptions apply. I'd expect it to count as infringing in most non-US jurisdictions as well, though probably not all.

In practice, though, even if Apple decides to do something about this (unlikely), they'll probably just send a takedown notice rather than actually sue the Internet Archive. I'd call it a calculated risk on the Archive's part.

They have good legal advisers on these matters. https://www.eff.org/press/releases/internet-archive-received...

Their Amiga emulator lasted 2-3 weeks before they pulled it offline, probably due to legal issues.

The Amiga world is massively more copyright-happy than e.g. Apple.

There was a legal dispute around OS 4 https://en.wikipedia.org/wiki/History_of_the_AmigaOS_4_dispu...

MorphOS, the popular AmigaOS clone, is also proprietary and "the price is 79 EUR for one laptop or desktop computer" (lol that's more expensive than an iBook G4 you can run it on)

The accepted way to run emulators is https://www.amigaforever.com ($$$), using pirated ROMs is very discouraged by the community.

Aminet only hosts freeware/shareware/FOSS!

Meanwhile, Macintosh Garden hosts pretty much everything for Mac OS 9 and earlier (and some things for OS X PowerPC too). You can get all OS 9 versions of Photoshop. MS Office. Baldur's Gate. Fallout 2. And Mac OS itself.

The situation with the Amiga emulation was more related to compatibility issues. When I tested about 100 images, only about 15 worked properly. This was related to configuration issues, but also due to the use of the free Aros ROMs. Most software resulted in s Guru Meditation error. At the moment, the real kickstart ROMs are distributed/licensed by Cloanto and not available for online distribution. But ad mentioned, it likely wasn't a legal issue why they took it offline... It wasn't mature enough.

It's always surprised me the amount of stuff hosted on archive.org that hasn't been removed. Not criticising the Internet Archive - I think what they do is great, and obviously it isn't in their interests to start preemptively looking for this sort of thing - just surprised the copyright holders haven't intervened on, for instance, a cracked version of Windows 7[1] (assuming description is accurate) or a rip of Fast Seven.

[1] https://archive.org/details/WINDOWS7ALLINONEPREACTIVATED [2] https://archive.org/details/F7YIFY

The Internet Archive is made up almost exclusively of copyrighted content that they did not ask permission to host. That's pretty much the point.

Several things strike me going down this memory lane:

1) How modern and responsive the UI behavior is.

2) How many subtle improvements there have been (e.g. the old Mac menu behavior that I liked I find annoying). No command-A for select all in MacWrite.

3) How screen updates I used to think were instantaneous decidedly were not. (That said, I couldn't trigger the "ultra slow update" mode and watch menus drawing one line of pixels at a time).

4) Copyright notices for third party companies in "Apple" software (e.g. MacWrite is copyright "Encore Systems".

Somewhat OT but it should be more widely known that you can run NeXTSTEP on VMWare.


It's pretty creamy.

And with shoebill[1] you can run A/UX, Apple's Unix with a MacOS GUI.

What I love is that it was a real Unix, but it could run Mac apps, and it even provided a graphical interface to select/explain the command line switches of some Unix tools.

[1] https://github.com/pruten/shoebill

and you can emulate various NeXT with the Previous emulator http://previous.unixdude.net/

Discussion forums: http://www.nextcomputers.org/forums/viewtopic.php?t=2642&sta...

previous-ly on HN: https://news.ycombinator.com/item?id=8745943

This is why I donate. To me this is important. We already lost the library of Alexandria once (or multiple times really until its final destruction). Let's not have our hubris do that again.

The donation link, to save everyone a search: https://archive.org/donate/

Dark Castle! It was so great for the time.


The Dark Castle games are what I intend to try first when I get BasiliskII[0] set up on Playstation Vita.


I ran into Jonathan Gay at CGDC, and upon realizing who he was, I squatted down, raised up my arms up above my head, flapped my hands, and chanted "Nya nya nya nya nya!"

Dark Castle was so cool, I totally forgave him for writing Flash.

TIL the author of Dark Castle went on to write Flash. (Didn't it start out as some Macromedia thing?)

Jonathan Gay [1] and Charlie Jackson [2] founded FutureWave Software [3], and developed a drawing program called "SmartSketch", to which they added animation features and renamed "FutureSplash Animator" to challenge Macromedia Shockwave [4], which Macromedia (nee "Macromind") then bought and renamed "Macromedia Flash".

[1] https://en.wikipedia.org/wiki/Jonathan_Gay

[2] https://en.wikipedia.org/wiki/Charlie_Jackson_(software)

[3] https://en.wikipedia.org/wiki/FutureWave_Software

[4] https://en.wikipedia.org/wiki/Adobe_Shockwave

wow, that's awesome!

Also, any old Dark Castle fans should note that "Return to Dark Castle" exists and was finally released a few years ago https://itunes.apple.com/us/app/return-to-dark-castle/id4107... (possibly the longest wait for a game sequel ever?)

That is the second sequel. The first one was Beyond Dark Castle, a truly excellent game.

Ah good point. Yeah, finished both of those back in the day.

Part of me wants to download and play that, but another part is afraid. Games were hard back then, and Dark Castle was brutal! I can still hear that weird yodel you make after a non-fatal fall almost 30 years later.

So many hours of my childhood were spent playing early Mac games, especially Dark Castle and Prince of Persia.

Ubisoft did release an iOS port of the original Prince of Persia: https://appsto.re/us/FNmRB.i

But sadly Apple is about to discontinue support for iOS apps that don't support 64 bit. I expect that Prince of Persia Classic will get lost to that.

What strikes me is that Excel almost hasn't changed. Yes, they added some colors.

Shufflepuck! I'm so excited to play that again.

Please can we get a copy of LogoWriter on one of those? That was how I first learned to program, on a Mac Plus when I was about 7 or 8 years old.

Basilisk II on a current Mac may be a more useful option for those interested. I routinely run Mac OS 8.0 with hyperCard... on my 2016 MacBook Pro using Basilisk II.

Interesting that this is done in-broswer; it looks like they're using Emscripten for emulation.

Correct, also for the other runnable software (e.g. Apple II collection) and livingroom consoles :)

Awesome. Mac Plus was my first real computer as a kid, played a lot of games. World Builder scripting was the first programming I ever did.

oh man, Crystal Quest! amazing. the mouse control seems wonky though, sudden bursts of acceleration, and jitter even when the mouse isn't moving?

As I recall, the mouse sets acceleration, but not the position of the gamer's piece, so it is possible to have movement even if the mouse is left alone.

FWIW, I just tried the emulator on MacOS Sierra and Chrome and it works just like I remember it.

Impressive work :)

Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact