Running a Hypercard stack on a modern Mac

Hypercard in SheepShaver emulator

A bunch of people have emailed me about getting Hypercard stacks running under emulation. Here is a pretty easy guide to running a Hypercard stack on a recent Mac (eg. running Mavericks, Mountain Lion, etc):

Place the Hypercard stack you want to access somewhere within your user folder: eg. Documents, or Desktop.

Download this zip file [95mb] containing the SheepShaver classic Mac emulator bundled with Mac OS 9 and Hypercard.

Extract and open hypercard.sheepvm. This should boot Mac OS 9.

On the Mac OS 9 desktop there should be a disk called "Unix". This is a virtual disk which actually lets you access files on your computer (eg. outside the emulator). Opening it is equivalent to opening your OS X /Users/ directory.

Why port emulators to the browser?

MacPaint Woodblock sample image

In a discussion on Hacker News about emulators being ported to the browser, I drew attention to my own project, PCE.js, which emulates a Macintosh Plus and an IBM PC/XT. Some of the questions brought up included why someone would undertake such a project, and also the legal considerations of including the software ROM required to boot the machine.

PCE.js - Classic Mac OS in the browser

PCE.js MacPaint screenshot

I've just completed porting Hampa Hug's excellent PCE emulator to run in the browser, using Emscripten. I've mainly focused on the pce-macplus build. This is pretty awesome because it means you can run classic Mac OS in the browser. Check it out: PCE.js - Classic Mac OS in the browser.

I've also got the pce-ibmpc build working (emulating an IBM compatible, up to a 286 CPU), and and pce-atarist, an Atari ST emulator also, with browser demos coming soon for each.

A dump of the source is available here but I'll try to clean it up and make it available on GitHub when I get the chance.

Update: source on GitHub, and I've added an IBM PC Demo.

Working implementation of SDL_CreateRGBSurfaceFrom for Emscripten

Emscripten is a pretty damn neat tool or porting existing native codebases to the browser. There are a bunch of cool projects using it to port graphical apps such as games and emulators, especially those which already use the Simple DirectMedia Layer (SDL) library to abstract video, sound and I/O. The SDL abstractions provide portability across different OS platforms, and because Emscripten implements of parts of SDL in Javascript, some of that portability can be extended to the browser. However, Emscripten's SDL 'shims' are still very much a work in progress, and in a current project of my own (porting a classic Mac OS emulator), I've run into some parts where I've had to fill in the gaps myself.

Specifically, if you're finding your SDL-based, Emscripten compiled app is failing to render to the canvas, the issue may be that the app is trying to use the incomplete SDL_CreateRGBSurfaceFrom method to create an SDL surface from a buffer of pixels.

Installing Pygame on Mac OS 10.8 Mountain Lion

I decided to install and play around with Pygame today, mainly as an excuse to write some Python for a minor departure from all the Javascript/Coffeescript I've been writing lately. Unfortunately the process wasn't entirely frictionless, due to Pygame not yet accounting for Apple's move to XQuartz as the recommended X11 implementation for Mac OS as of 10.8 Mountain Lion. As a result I ran into some compilation errors while Pygame was building it's native extensions, which fortunately were not too hard to fix as I had some familiarity with changes to X11 on Mountain Lion.

Caniuse.com Mirror

UPDATE: original site is back online, I took down the mirror

I rely on caniuse.com to look up browser compatibility of various new features in CSS, JS, SVG etc. I noticed the other day that seems to be down (possibly pending a re-launch). Considering it's such a useful resource I decided to extract it from Google's cache and throw up a mirror.

You can find it at caniuse.jsdf.co.

Hacker News theme

A while back I restyled Hacker News using the Stylebot extension for Chrome. Initially I just wanted to apply a fixed width, as the site's fluid layout can result in some very long lines on a large/wide display.

Over time I added in some other usability improvements, such as:

  • larger 'vote' buttons with more space in between them, which helps to avoid mis-clicks on the downvote arrow (a common complaint on HN)
  • stronger delineation between unread and read articles, using a faint cyan highlight on those which are unread, while read articles almost fade into the background
  • monospace fonts optimised for code

Works best with Helvetica Neue and Menlo installed (as they are by default on Mac OS). Alternatively, Anonymous Pro will be used for code if installed.

Vote arrows use the CSS border based triangle technique.

Setting up a new Mac for Node.js and Drupal development

So you've got a fresh, clean Mountain Lion install and you need to get up and running for local development. Recently I spent a day doing just that, so I thought I'd write it all down, to save me from having to look all this stuff up again.

Hi.

So I finally got round to putting together a new blog. Theme soon to come.

It will be based on Stanford's Open Framework Drupal theme, which in turn is based on Twitter Bootstrap.

Subscribe to Front page feed