RPCEmu Mac Guide
The following is largely deprecated and requires documentation update to be accurate with later versions of RPCEmu, please be careful to not mix and match different versions of code. Binary versions of an updated Cocoa GUI via from the RPCEmu Home Page and the code for the Cocoa GUI version is available from Francis Devereux's Repository and is due to be merged into the main code base. |
This guide leads you through the process of getting the "Spoon" editions of RPCEmu working on an Intel-powered Mac.
This guide has only been tested on an Intel-powered Mac Pro using Mac OS X Leopard 10.5.6. It may also work on Tiger and other versions of OS X, but this is not guaranteed.
Prerequisites
To get RPCEmu up and running, you will need the following:
- An Intel-based Mac, preferably running Leopard.
- The Developer Tools from your OS X install discs must be installed. These will create a folder named "Developer" in the root of your hard drive and install applications such as XCode and Interface Builder.
- It is also of benefit if you are somewhat familiar with the use of the Terminal application.
Installing The Developer Tools
The developer tools can be found in the following places:
- On the Leopard install DVD, in the Optional Installs/Xcode Tools folder. Double-click on XcodeTools.mpkg to start the installation.
- On your computer's install DVDs, in the Xcode Tools folder. You may have more than one disc. For a 2006 Mac Pro, the tools were on disc one; for a 2008 MacBook Air, on disc two. Double-click on XcodeTools.mpkg to start the installation.
- On Apple's web site: http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/
Once the installer is running, perform the following steps:
- Click on the "Next" button to skip the welcome page.
- Click on the "Continue" button on the page with the licence agreement and press "Agree" to confirm that you agree with the licence terms.
- On the third page, press the "Customize" button.
A list will show six items, beneath "Package Name", "Location" and "Action" columns. Ensure that the Unix Development Support item is ticked and press the "Install" button. The developer tools will then be installed. Once installation is complete, close the installer.
Downloading
You will need to download RPCEmu itself, as well as a library it uses named Allegro.
First, download the source code for RPCEmu:
http://www.marutan.net/rpcemuspoon/082/rpcemu-0.8.2.tar.gz
Secondly, the source code for Allegro (currently, version 4.2.2):
http://prdownloads.sourceforge.net/alleg/allegro-4.2.2.tar.gz?download
Copy both of the downloaded files to the same directory using the Finder. This guide assumes that you have copied them to ~/Public.
Compiling and installing Allegro
Allegro's web site describes it as "a portable library mainly aimed at video game and multimedia programming". It must be compiled and installed before you can successfully run RPCEmu.
Start the Terminal application by double-clicking on it. It should be in the "Utilities" folder in "Applications". A window will be opened. You should see a prompt that ends with a dollar sign ($) and a flashing cursor.
First, change directory to wherever you copied the Allegro and RPCEmu source files:
cd ~/Public
You must decompress Allegro. Type the following:
tar fzxv allegro-4.2.2.tar.gz
You will see a list of filenames flash past and eventually the $ prompt will reappear.
Change directory into the newly-created folder where the Allegro files have been placed:
cd allegro-4.2.2
You must first configure Allegro for building on OS X. Type the following two commands, pressing ENTER after each:
chmod +x fix.sh ./fix.sh macosx
You will see a short message telling you that Allegro has been configured for building on OS X.
Start the build by typing the following:
make
Depending on how fast your CPU is, this may take a few minutes. When it is finished, you will see another $ prompt.
You must now install Allegro. The relevant files are installed in the /usr/local folder. If this folder does not exist, the install will likely error.
First, create the folder:
mkdir /usr/local
If the folder already exists (i.e. you already have something installed there), the command will error. The error can safely be ignored.
On to the installation proper:
sudo make install
This will prompt you for your login password. Type it in and press RETURN. Shortly afterwards, you will see another prompt.
Return to the previous directory:
cd ..
Allegro is now installed and you can move to the second part of the process, getting RPCEmu up and running.
Building RPCEmu
You should now be in the directory where your two downloaded files are stored (e.g. ~/Public).
Type the following:
tar fzxv rpcemu-0.8.2.tar.gz
This will decompress the source for RPCEmu.
Change directory so you can start the compilation process:
cd rpcemu-0.8.2/src
Before compiling RPCEmu, you must copy a support file from the Allegro build directory to the RPCEmu directory:
cp ../../allegro-4.2.2/misc/allegro.m4 .
Next, type the following three commands, pressing RETURN after each:
aclocal -I . autoconf automake
You can now configure RPCEmu. Unfortunately, dynamic code compilation does not appear to work on a Mac, so RPCEmu must be compiled without it.
Type the following, again, pressing RETURN after each command:
./configure make
If the process has worked, the very last line before the $ prompt should read "cp rpcemu ..".
Type the following to change directory to where the binary for RPCEmu has been copied:
cd ..
After the build
Before you can run RPCEmu, you must copy your RISC OS ROM image to the roms folder in your rpcemu-0.8.2 folder (e.g. ~/Public/rpcemu-0.8.2). It is best to use RISC OS 4.02, but 3.7 will work as well. A hard drive image may also come in handy.
You may also want to change the default configuration, to speed up the emulator and give it more memory. From the command prompt, type the following:
nano -w rpc.cfg
Things you may want to change:
Change the cpu_type line to read:
cpu_type = SA110
Change the mem_size line to read:
mem_size = 128
To save your changes, type CTRL+O and press RETURN when prompted for a file name. Finally, press CTRL+X to exit and return to the command prompt.
To try it all out, type the following:
./rpcemu
If all goes well, you should see a window appear and the familiar desktop should be displayed.
Using the mouse
Most Macs will nowadays be equipped with a two (or more) button mouse. However, RPCEmu may not detect all your buttons: with a Microsoft Laser Mouse 5000, for example, only the left mouse button has any effect.
For a MENU (middle) click, hold down the ALT key whilst clicking. For an ADJUST (right) click, hold down the CTRL key whilst clicking.
Quirks
A number of quirks exist, relating to the keyboard:
- Caps Lock doesn't work at all using an Apple aluminium keyboard.
- If you have Spaces, Exposé and/or the Dashboard enabled in OS X, function keys F8 to F12 will invoke these instead of being picked up by the emulator. If you want access to the command line prompt, normally invoked by pressing F12, click on the "* commands" item in the switcher menu (on the far right of the icon bar).
Networking
Networking does not currently work on OS X. The code that 0.8.2 uses for Linux does not compile on a Mac and would need changing to work correctly.