2013-08-17 02:45:57 +00:00
|
|
|
MPW Emulator
|
|
|
|
------------
|
|
|
|
|
|
|
|
by Kelvin W Sherlock, _et alia_
|
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
Please check the [wiki](https://github.com/ksherlock/mpw/wiki/_pages) for useful information.
|
|
|
|
|
2015-06-23 17:31:11 +00:00
|
|
|
Please check the [releases](https://github.com/ksherlock/mpw/releases) for compiled binaries.
|
|
|
|
|
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
## System compatibility
|
2013-08-17 02:45:57 +00:00
|
|
|
|
2015-02-14 14:57:40 +00:00
|
|
|
Currently, only OS X 10.8+ with case-insensitive HFS+ is supported.
|
2013-08-17 02:45:57 +00:00
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
## License
|
2013-08-17 02:45:57 +00:00
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
The 680x0 CPU code is from [WinFellow](http://fellow.sourceforge.net) and is
|
2015-02-14 14:57:40 +00:00
|
|
|
licensed under GPL v2 or later. Consequently, the compiled binary is licensed
|
2013-08-17 02:45:57 +00:00
|
|
|
under the GPL v2 as well.
|
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
The memory allocator (NewHandle/NewPointer) code is from [mempoolite](https://github.com/jeftyneg/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.
|
2013-08-17 02:45:57 +00:00
|
|
|
|
|
|
|
## Building
|
|
|
|
|
2022-10-08 14:19:16 +00:00
|
|
|
First initialize and fetch submodules:
|
|
|
|
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
2013-08-17 02:45:57 +00:00
|
|
|
Compiling requires cmake, ragel, lemon, and a recent version of clang++ with
|
2015-02-14 14:57:40 +00:00
|
|
|
c++11 support. It has only been built and tested with OS X 10.8+.
|
2013-08-17 02:45:57 +00:00
|
|
|
|
2022-09-23 17:34:06 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
2013-08-17 02:45:57 +00:00
|
|
|
|
2013-08-17 02:51:28 +00:00
|
|
|
This will generate `bin/mpw` and `bin/disasm`.
|
2013-08-17 02:45:57 +00:00
|
|
|
|
|
|
|
## 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 $@
|
|
|
|
|
|
|
|
|
2015-02-14 14:57:40 +00:00
|
|
|
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.
|
2013-08-17 02:45:57 +00:00
|
|
|
|