Skip to content

A Mac with everything you'd want in 1995, all in your web browser.

License

Notifications You must be signed in to change notification settings

A-Random-Person-on-Github/infinite-mac

 
 

Repository files navigation

Infinite Mac

A 90's era classic Mac with everything you'd want. Available in System 7, Mac OS 8, Mac OS 9 and KanjiTalk (Japanese) flavors. For a high-level overview and the backstory, see the launch blog post and subsequent ones.

Development

This project uses Git LFS, ensure that the LFS tooling is installed before cloning the repo.

This project uses submodules, use git clone --recursive https://github.com/mihaip/infinite-mac.git to clone it (or run git submodule update --init --recursive if you have an existing checkout).

Common development tasks, all done via npm run:

  • start: Run local dev server (will be running at http://localhost:3127). Depends on having disk images built (import-disks needs to be run at least once).
  • import-emulator <emulator>: Copy generated WebAssembly from an emulator submodule (only necessary if modifying the emulator cores, see below for how to rebuild them). The following emulators are supported:
  • import-disks: Build disk images for serving. Copies base OS images for the above emulators, and imports other software (found in Library/) into an "Infinite HD" disk image. Chunks disk images and generates a manifest for serving. This requires the macOS versions of Basilisk II and Mini vMac to be installed, since they are used as part of the image building process.

Common deployment tasks (also done via npm run)

  • build: Rebuild for either local use (in the build/ directory) or for Cloudflare Worker use
  • worker-dev: Preview built assets in a local Cloudflare Worker (requires a separate build invocation, result will be running at http://localhost:3128)
  • worker-deploy: Deploy built assets to the live version of the Cloudflare Worker (requires a separate build invocation)

Dependencies

Dependencies can be installed with:

npm install -g wrangler
npm install
pip3 install -r requirements.txt
npm run build-xadmaster

Building the emulators

Basilisk II and SheepShaver the original 68K and PowerPC emulators that enable this project.They are hosted in a separate repo and are included via a Git submodule. Rebuilding them is only required when making changes to the emulator core, the generated files are in src/emulator and included in the Git repository.

To begin, ensure that you have a Docker image built with the Emscripten toolchain and supporting libraries:

docker build -t macemu_emsdk .

Open a shell into the Docker container:

docker run --rm -it -v `realpath macemu`:/macemu -v `realpath minivmac`:/minivmac --entrypoint bash macemu_emsdk

Once in that container, you can use a couple of helper scripts to build them:

Basilisk II

cd /macemu/BasiliskII/src/Unix
# Bootstrap Basilisk II, to generate the CPU emulator code
./_embootstrap.sh
# Switch into building for WASM
./_emconfigure.sh
# Actually compile Basilisk II targetting WASM
make -j8

Once it has built, use npm run import-emulator basiliskii from the host to update the files in src/emulator.

SheepShaver

cd /macemu/SheepShaver/src/Unix
# Configure for building for WASM
./_emconfigure.sh
# Actually compile SheepShaver targetting WASM
make -j8

Once it has built, use npm run import-emulator sheepshaver from the host to update the files in src/emulator.

Mini vMac

cd /minivmac
# Configure for building for WASM
./emscripten_setup.sh
# This configures the Mac Plus model by default, alternative outputs can be
# configured with additionl arguments:
# - `-m 128K -speed z`: Mac 128K (uses 1x speed by default to be more realistic)
# - `-m 512Ke`: Mac 512ke
# - `-m SE`: Mac SE
# - `-m II`: Mac II
# Actually compile Mini vMac targetting WASM
make -j8

Once it has built, use npm run import-emulator minivmac-<model> from the host to update the files in src/emulator.

About

A Mac with everything you'd want in 1995, all in your web browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 79.4%
  • Python 14.1%
  • CSS 5.2%
  • Shell 0.6%
  • JavaScript 0.3%
  • HTML 0.3%
  • Dockerfile 0.1%