Cyder lets you run Classic Mac OS applications on modern operating systems (like macOS and Linux) -- you can think of it as functionally equivalent to WINE but for Classic Mas OS.
Cyder employs a form of high-level emulation (HLE). It uses the Musashi Motorola 68k emulator to run original m68k binaries but all calls to the Macintosh Toolbox are intercepted and implemented in native code to run on the host. Cyder is currently targeting compatiblity with Mac OS 6.0.8 but may target higher versions as time goes on.
A major goal of the project is to be easy to understand and learn from (it was started as a learning exercise by the author) and promote a better understanding of retro computers.
Ensure submodules are sync'd:
git submodule update --init --recursiveDependencies:
- SDL2
- Python 3.8
- CMake 3.5
- Optionally Ninja
Using cyder.py
cyder.py uses Ninja to build (allowing for faster incremental builds)
# To build all targets
./cyder build
# To build the emulator
./cyder build emu
# To run the emulator
./cyder run emu <path_to_rsrc_fork>
# To build and run the emulator
./cyder bar emu <path_to_rsrc_fork>Using Ninja
mkdir -p build/out
cmake -GNinja -Bbuild/out
# Only this command is needed to build from now on
ninja -C build/out
# To run the emulator
./build/out/exe/emu <path_to_rsrc_fork>Using Make
mkdir build && cd build
cmake ..
# To build all targets
make
# To run the emulator
./build/exe/emu <path_to_rsrc_fork>With Emscripten (Web)
Instructions to get Emscripten and set it up are found here.
# Create fresh build directory for Emscripten
mkdir embuild && cd $_
emcmake cmake ..
# Build `emu`
emmake -j16 emu
# Copy the HTML next to the generated JS/WASM
cp ../html/index.html exe/
# Run with Emscripten
emrun exe/index.html --browser chromeMac OS applications are stored with two forks: 1) the data fork which stores unstructured data and 2) the resource fork which stores structured data (details such as icon bitmaps, the shapes of windows, definitions of menus and their contents, and application code).
Unfortunately, modern filesystems do not understand the concept of forks and trying to copy a Mac OS application around will result in corrupted or missing data (the exception to this rule is modern macOS which has retained partial compatibility with HFS/HFS+ used on the classic Mac OS).
Cyder gets around these limitations by reading raw resource forks. These can be produced on Linux by finding or producing (from an emulator) a .bin (MacBinary) or .hqx (BinHex) and then unpacking it into separate data and resource fork files using a tool like ./cyder bar macbinary <file.bin> or hexbin -f <file.hqx>.
1000 Miles: A clone of Mille Bornes by Robert Harris (1987)
MacPaint: Created by Bill Atkinson (1984)
"Bill": An Essential Background Application by Jeff Hokit (1987)
Galaxy: Simple starfield at examples/galaxy.rsrc
"KoYoMi": Simple Calendar by V.J. Catkick (1986)
Window Demo: An example of window management at examples/window.rsrc