Macintosh Programmer's Workshop (mpw) compatibility layer
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Kelvin Sherlock 2dcb161f5e ResolveAliasFile - byte ptrs should only write 1 byte. 4 months ago
.github/workflows Remove macOS 10.15 runner; add macOS 12 runner (#53) 4 months ago
bin Add error message when loader can't load command (#55) 4 months ago
cpu sync cpu code with fellow. fixes some instruction times and 64-bit division. 5 years ago
cxx clean up trailing whitespace / end of file linefeed. 8 years ago
libsane@9c2af7c48d more SANE tests. 6 months ago
macos clean up makefiles a bit. 6 years ago
mplite clean up makefiles a bit. 6 years ago
mpw search for ragel and exit if not found. Also use found path when running ragel or lemon. 4 months ago
test more SANE tests. 6 months ago
toolbox ResolveAliasFile - byte ptrs should only write 1 byte. 4 months ago
verbatim Use /bin/sh; quote shell variables (#46) 4 months ago
.gitignore updated gitignore 8 years ago
.gitmodules use libsane... 5 years ago
.travis.yml Update .travis.yml 2 years ago
CHANGELOG.text changeling, bump version 8 years ago
CMakeLists.txt Don't overwrite user-specified CFLAGS and CXXFLAGS (#51) 4 months ago Use /bin/sh; quote shell variables (#46) 4 months ago
README.text Use /bin/sh; quote shell variables (#46) 4 months ago
TODO.txt todo update 10 years ago

MPW Emulator

by Kelvin W Sherlock, et alia

Please check the wiki for useful information.

Please check the releases for compiled binaries.

System compatibility

Currently, only OS X 10.8+ with case-insensitive HFS+ is supported.


The 680x0 CPU code is from WinFellow and is licensed under GPL v2 or later. Consequently, the compiled binary is licensed under the GPL v2 as well.

The memory allocator (NewHandle/NewPointer) code is from mempoolite, which is a fork of the SQLite zero-alloc allocator by Jefty Negapatan and D. Richard Hipp. It, as is SQLite, is in the public domain.


First initialize and fetch submodules:

git submodule init
git submodule update

Compiling requires cmake, ragel, lemon, and a recent version of clang++ with c++11 support. It has only been built and tested with OS X 10.8+.

mkdir build
cd build
cmake ..

This will generate bin/mpw and bin/disasm.


Certain configuration and execution files are generally useful. They are stored in an mpw directory, which may be located:

$MPW (shell variable)
~/mpw/ (your home directory)

The layout is reminiscent of actual MPW installations.


Environment file

The Environment.text file is new; it contains MPW environment variables (many of them set the library and include file locations). The format is fairly simple.

# this is a comment

#this sets a variable
name = value

# this sets a variable if it is undefined.
name ?= value

# values may refer to other variables


mpw [mpw flags] command-name [command arguments]

you may also create shell aliases:

alias AsmIIgs='mpw AsmIIgs'

or create a shell script (in /usr/local/bin, etc)



exec mpw AsmIIgs "$@"

mpw uses the MPW $Commands variable to find the command, similar to $PATH on Unix. If the $Commands variable is not set, mpw looks in the current directory and then in the $MPW:Tools: directory.