MMBasic is Geoff Graham's and Peter Mather's BASIC for the Colour Maximite and the PicoMite. Thomas Hugo Williams ported it to Linux as MMBasic for Linux. MMB4M takes that port and builds it for the Mac.
With Homebrew:
brew tap TomSchimana/mmbasic
brew install mmbasicBy hand, download the zip for your Mac from the latest release:
mmb4m-0.1.2-silicon.zipfor Apple Silicon, any Mac with an M-series chipmmb4m-0.1.2-intel.zipfor an Intel Mac
Each holds the single file mmbasic.
macOS blocks a downloaded program without an Apple developer certificate, and this one has none yet. Once per download:
xattr -dr com.apple.quarantine mmbasic
./mmbasicRunning MMB4M covers the PATH and the command line.
mmbasic prog.bas # run and exit
mmbasic -i prog.bas # run, then stay at the prompt
mmbasic # prompt onlyQUIT exits. At the prompt, Ctrl-C stops the running program and gives the prompt back; in batch mode it ends the run with exit code 130.
Most run unchanged. The ones that do not are almost always graphics: MODE and PAGE do not exist here, and PRINT never draws to a surface.
Start the interpreter in Colour Maximite 2 mode and MODE, PAGE and the rest come back:
mmbasic -s "Colour Maximite 2" prog.basColour Maximite 2 programs says what comes back and what does not.
MMB4M is not the CMM2 firmware. It is MMBasic for Linux 0.8, an alpha from its development branch, and its language follows MMBasic 6.0 for the PicoMite. The Colour Maximite 2 mode simulates the device name, MODE, PAGE and the controllers. That is enough to write and test a CMM2 program's logic at a desk; graphics, sound and timing are close, not identical.
The language is MMBasic 6, and each machine's page carries its current user manual: Colour Maximite 2, whose firmware is a separate release of MMBasic with a manual of its own, and PicoMite with PicoMite VGA, the manual MMB4L follows and therefore the one this port follows. This is what a Mac does differently.
| What | On a Mac | Details |
|---|---|---|
MODE, PAGE |
There are no screen modes. A program opens its own window with GRAPHICS WINDOW 0, 640, 480 and draws into it. Both commands do work when MMB4M is started with -s "Colour Maximite 2" |
Graphics |
FRAMEBUFFER |
Not implemented. Colour Maximite 2 mode does not bring it back, PicoMite mode does. GRAPHICS BUFFER with GRAPHICS COPY draws off-screen the same way |
What MMB4M cannot do |
PRINT |
Writes to the terminal, never to a graphics surface, in Colour Maximite 2 mode as well. TEXT x, y, s$ draws onto the surface GRAPHICS WRITE selected |
Graphics |
SETPIN, PIN, PULSE, FLASH |
A Mac has no microcontroller pins, so there is nothing to switch to | What MMB4M cannot do |
| Serial | Nothing above 230400 baud; macOS defines no higher rate, and setting one fails. Ports are named /dev/cu.*, which ls /dev/cu.* lists |
What MMB4M cannot do |
| Timing | macOS is not a real-time system, so PAUSE and SETTICK drift more than on a microcontroller. SETTICK works, SETTICK FAST does not |
What MMB4M cannot do |
EDIT |
Opens MMBasic's own full-screen editor in the terminal, the one both machines have: F1 saves, F2 saves and runs, ESC leaves. OPTION EDITOR VIM, VSCODE, NANO or a command of your own switches to another editor, OPTION EDITOR INTERNAL switches back |
Editing programs |
SAVE |
Not needed: the file on disk is the program, and F1 in the editor writes it. SAVE "prog.bas" answers Unknown SAVE subcommand, because SAVE IMAGE does exist |
Editing programs |
GAMEPAD |
DEVICE GAMEPAD OPEN and CLOSE instead, for a controller connected to the Mac. The function GAMEPAD() is not there |
What exists here and not on a Colour Maximite 2 or a PicoMite |
!cmd |
At the prompt, short for SYSTEM: !ls lists the directory. !cd foo is the exception and becomes CHDIR "foo", because every other command runs in a forked process |
Running MMB4M |
MM.INFO$(DEVICE) |
Answers MMB4L, the device this port is built from, so a program written for MMBasic for Linux recognises the machine it is on. Under -s it answers the simulated device, while MM.INFO$(DEVICE X) keeps answering MMB4L. That is how this release behaves. A later version may answer MMB4M instead, with a way to keep programs written for the Linux device working |
What exists here and not on a Colour Maximite 2 or a PicoMite |
CONSOLE |
Sets the colours, the cursor and the title of the terminal. CONSOLE GETSIZE reads its size, which a terminal can change and neither machine's screen can |
What exists here and not on a Colour Maximite 2 or a PicoMite |
OPTION CODEPAGE |
Decides how bytes 128 to 255 print. A terminal is Unicode and a Colour Maximite 2 screen is not, so OPTION CODEPAGE CMM2 is needed before a CMM2 program's box characters come out right. It lasts for the session, not beyond |
Options |
| Command line | mmbasic prog.bas runs and exits, -i stays at the prompt afterwards, -d sets the starting directory, -s simulates another device, -l sets the log level, -v prints the version |
Running MMB4M |
| CMM2 programs | Start with -s "Colour Maximite 2", or -s CMM2 for short. Do not switch device from inside a running program: that faults at the next graphics command |
Colour Maximite 2 programs |
| PicoMite programs | Start with -s PicoMiteVGA, or one of PicoMiteHDMI, PicoMiteVGAUSB, PicoCalc, Game*Mite. MODE and FRAMEBUFFER come back, PAGE does not |
PicoMite programs |
| This version | 0.1.2, no known defects, and a list of what has been tried on a Mac and what has not | Known problems |
| Building it | One make, with the Xcode Command Line Tools and cmake. SDL2 is compiled in, so the result is a single file |
Building MMB4M |
MMB4M is not maintained by the authors of MMBasic and carries no promise from them. The supported versions are MMBasic for Linux and real Colour Maximite 2 hardware.
Geoff Graham gave permission on 2026-08-25 on two conditions: the name "MMBasic" stays, and the original copyright message keeps appearing at startup. Both are met.
MMBasic is the work of Geoff Graham and Peter Mather. MMBasic for Linux, including its graphics, sound and console, is the work of Thomas Hugo Williams, and it is his interpreter you are running. MMB4M changes what is needed to build and run it on a Mac and nothing else.
My thanks to Thomas Hugo Williams for years of work on MMB4L, and for the permission to build on it. Without that work there would be no Mac version.
The changelog records which MMBasic for Linux commit each version was built from.
MMBasic's own modified BSD licence, five numbered conditions, reproduced word for word in LICENSE.MMBasic. LICENSE says who holds what.
MMB4M is at alpha status, built and tested by one person on one Apple Silicon Mac. Not everything has been tried; known problems says what has and what has not. If something does not work, open an issue or get in touch through schimana.net. Questions about MMBasic itself belong on The Back Shed.