Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 3 KB

README.md

File metadata and controls

31 lines (19 loc) · 3 KB

Fork of the Basilisk II and SheepShaver Macintosh emulators, modified to be compiled to WebAssembly and run in the browser. Part of the Infinite Mac, see its README and introductory blog post for more details.

Based on James Friend's original browser port of Basilisk II.

How It Works

The TECH document describes the basic Basilisk II architecture. The WebAssembly port ends up being a modified Unix version, with a subset of Unix implementations of Basilisk II parts are replaced with JavaScript-based ones. They generally use the ES_ASM() macros to call into JavaScript code, with EmulatorWorkerApi in the infinite-mac repo serving as the receiving endpoint.

The Basilisk emulator runs in an infinite loop (simulating the classic Mac and its CPU) thus it cannot yield to the browser's event loop. Therefore it is executed in a web worker, which interacts with the main browser thread for input and output. SharedArrayBuffers and Atomics operations are used to efficiently communicate with the worker in the absence of postMessage/message event handlers.

SheepShaver ends up working pretty much the same way.

Build Instructions

Not a standalone project, see the build instructions in the infinite-mac repo for details on how to build this.

Branches

This repository contains multiple branches, the notable ones are:

To sync with the upstream kanjitalk755/macemu fork, run:

git remote add upstream-kanjitalk755 https://github.com/kanjitalk755/macemu.git
git fetch upstream-kanjitalk755
git rebase --committer-date-is-author-date upstream-kanjitalk755/master