Skip to content
/ macemu Public
forked from kanjitalk755/macemu

Emscripten/WebAssembly ports of the Basilisk II and SheepShaver emulators

Notifications You must be signed in to change notification settings

mihaip/macemu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Emscripten/WebAssembly ports of the Basilisk II and SheepShaver emulators

Resources

Stars

Watchers

Forks

Languages

  • C++ 65.4%
  • C 27.0%
  • M4 2.6%
  • Objective-C++ 1.7%
  • Assembly 1.2%
  • Makefile 0.7%
  • Other 1.4%