Macintosh Programmer's Workshop (mpw) compatibility layer
Go to file
Ryan Carsten Schmidt d59a35d3a9
ci: remove macos-11; add macos-13; upgrade to checkout@v4 and upload-artifact@v4 (#69)
* ci: upgrade to checkout@v4 and upload-artifact@v4

* ci: remove macos-11; add macos-13

macos-11 will be removed by the end of June; replace it with macos-13.
macos-14 a.k.a. macos-latest is already covered by cmake-fat.yml.
2024-05-30 00:07:02 -04:00
.github ci: remove macos-11; add macos-13; upgrade to checkout@v4 and upload-artifact@v4 (#69) 2024-05-30 00:07:02 -04:00
bin Fixed a few typos (#65) 2023-09-14 13:27:53 -04:00
cpu update m68k cpu to match current upstream code, which includes a handful of bug fixes (mostly timing related). 2023-10-05 18:47:48 -04:00
cxx clean up trailing whitespace / end of file linefeed. 2015-02-18 12:00:21 -05:00
libsane@8a47aacd7d submodule bump 2023-06-30 16:51:07 -04:00
macos Fixed a few typos (#65) 2023-09-14 13:27:53 -04:00
mplite Fixed a few typos (#65) 2023-09-14 13:27:53 -04:00
mpw search for ragel and exit if not found. Also use found path when running ragel or lemon. 2022-11-17 21:07:45 -05:00
test more SANE tests. 2022-10-10 21:06:44 -04:00
toolbox update m68k cpu to match current upstream code, which includes a handful of bug fixes (mostly timing related). 2023-10-05 18:47:48 -04:00
verbatim Fixed a few typos (#65) 2023-09-14 13:27:53 -04:00
.gitignore updated gitignore 2015-02-06 20:51:25 -05:00
.gitmodules use libsane... 2017-12-13 21:58:43 -05:00
.travis.yml Update .travis.yml 2021-05-31 00:33:52 -04:00
CHANGELOG.text changeling, bump version 2015-02-12 20:14:15 -05:00
CMakeLists.txt Don't overwrite user-specified CFLAGS and CXXFLAGS (#51) 2022-11-19 22:32:44 -05:00
README.md Use /bin/sh; quote shell variables (#46) 2022-11-15 19:00:16 -05:00
README.text Use /bin/sh; quote shell variables (#46) 2022-11-15 19:00:16 -05:00
TODO.txt todo update 2013-08-21 21:28:50 -04:00

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.

License

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.

Building

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 ..
make

This will generate bin/mpw and bin/disasm.

Installation

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)
/usr/local/share/mpw/
/usr/share/mpw/

The layout is reminiscent of actual MPW installations.

mpw/Environment.text
mpw/Tools/...
mpw/Interfaces/...
mpw/Libraries/...
mpw/Help/...

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
Libraries=$MPW:Libraries:Libraries:
Libraries=${MPW}:Libraries:Libraries:

Usage

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)

/usr/local/bin/AsmIIgs:

#!/bin/sh

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.