Macintosh Programmer's Workshop (mpw) compatibility layer
Go to file
2016-11-13 21:19:25 -05:00
bin windows updates... 2016-11-11 11:58:28 -05:00
cpu windows updates... 2016-11-11 11:58:28 -05:00
cxx misc updates. 2016-11-11 12:02:06 -05:00
include misc updates. 2016-11-11 12:02:06 -05:00
macos convert error_code to macos error. 2016-11-11 12:01:34 -05:00
mplite upstream (lemon) mplite tweaks. 2016-07-18 21:54:08 -04:00
mpw use new file abstraction. 2016-11-04 12:31:22 -04:00
native misc updates. 2016-11-11 12:02:06 -05:00
submodule submodule update. 2016-08-31 20:38:39 -04:00
test sane tests for inf/nan num2dec / dec2str 2015-03-10 12:49:11 -04:00
toolbox testing -- static constants so long double padding is deterministic. 2016-11-13 21:19:25 -05:00
unit_testing testing -- static constants so long double padding is deterministic. 2016-11-13 21:19:25 -05:00
verbatim Smarter handling of : after a variable. 2015-02-08 14:49:08 -05:00
winclude . 2016-11-13 21:15:26 -05:00
.gitignore windows updates... 2016-11-11 11:58:28 -05:00
.gitmodules add submodule 2016-08-31 20:37:53 -04:00
.travis.yml Update .travis.yml 2016-01-27 14:21:35 -05:00
CHANGELOG.text changeling, bump version 2015-02-12 20:14:15 -05:00
CMakeLists.txt windows updates... 2016-11-11 11:58:28 -05:00
config.h.in windows updates... 2016-11-11 11:58:28 -05:00
README.md Update README.md 2015-06-23 13:31:11 -04:00
README.text updated readme 2013-08-16 22:53:04 -04: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

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:

#!/usr/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.