Unofficial Mindstorms Software and Macintosh

Numerous alternatives for programming the RCX have been created independent of Lego. This page provides some guidelines for using a few of the more common alternatives on a Macintosh. In general, all of the alternatives were created for the serial IR tower. Presently, NQC is the only unofficial software that supports the USB tower on a Macintosh.


NQC Software

NQC is a computer language very similar to C that can be used to program the RCX. This is very different from using the Mindstorms or Robolab software to program the RCX. Most significantly, using NQC requires a basic understanding of how to write a computer program, while the other graphical approaches are much better suited for novices.

Three flavors of NQC are available for the Mac...

NQC for MPW - the command line version of NQC which is identical to the standard versions of NQC for Linux and Windows. You'll need to install the MPW Shell before you can run this version of NQC. Fortunately, the MPW shell is available free from Apple. Apple's main MPW page is here. You only need the shell itself, and not any of the other libraries, compilers, etc. As of version 2.4r2, NQC for MPW supports the USB tower provided that Lego's driver has been installed.

MacNQC - the same compiler as all of the other NQC variants, but wrapped up in a simple GUI that provides a text editor, test panel, etc. This is the easiest way to get started with NQC, although some programmers (such as myself) still prefer the MPW version. As of this writing (January 26, 2002), MacNQC has not yet incorporated USB support, although I suspect it will soon be added .

NQC for OS X - the command line version of NQC built for use with OS X. This version of NQC includes USB tower support without using the Lego driver.

The RCX also requires special software, called firmware, to be downloaded to it when it is first turned on (or after changing batteries). The firmware itself used to be part of the Mindstorms CD, but as of RIS 2.0, it cannot be accessed unless you actually install the software on a Windows machine.

To summarize, you'll need the following things to run NQC on a Mac...


LegOS

All of this information is based on a serial IR tower. I do not know of anyone using legOS via a USB IR tower on a Macintosh.

At present, I don't know of any port of the legOS tools to MacOS. Building a gcc cross compiler under anything other than Unix can be quite an undertaking, so I doubt we'll see the legOS tools ported to MPW. However, MacOS X is a Unix system...so getting legOS running under MacOS X shouldn't be too difficult.

Previously, I used legOS on my mac by running linuxPPC 1999. The installation and build process is pretty standard (see the legOS HOWTO), with one notable exception. The PPC build of gcc uses slightly different default compiler settings, so you'll need to add -fsigned-char to the definition of CFLAGS in the Makefiles for binutils and gcc prior to building those tools. I posted a little more information about this at http://news.lugnet.com/robotics/rcx/legos/?n=1202


pbForth

All of this information is based on a serial IR tower. I do not know of anyone using pbForth via a USB IR tower on a Macintosh.

pbForth works well on nearly any operating system. It is a replacement for the standard firmware and provides an interactive intepreter for running Forth programs on the RCX.

There really isn't anything difficult about using pbForth on a Mac, since the software itself is really running on the RCX and all you need is a terminal program to talk with the RCX and optionally a text editor to write your programs. To get started you should get:


 [Dave's Lego Site]