Quick guide to setting up PALib in OSX.
- Download the correct version of devkitARM for your CPU architecture
- Mount the DMG
- Run the package and install to the default location
- Download the latest stable version of PALib (make sure you get the zipped version)
- Unzip the archive
- Rename the resultant folder to “PAlib”
- Open a Finder window and browse to /opt/local
- Drag the “PAlib” folder into the Finder window - you will receive a prompt to authenticate yourself (click “Authenticate”), so type in your OSX password
That’s all of the files downloaded and installed. Next we need to start mucking about in the command line in order to replace devkitPro’s version of libnds with the version that ships with PALib.
- Open a Terminal window
sudo mv libnds libnds_old
- Enter your OSX password (the Terminal should prompt you with “Password:“)
- Open a Finder window and browse to /opt/local/PAlib
- Click on the “libnds” folder and press Command-C to copy it
- Click on the desktop and press Command-V to paste a copy of the “libnds” folder
- In the Finder, browse to /opt/local/devkitPro
- Drag the copy of the “libnds” folder from the desktop to the Finder window (authenticate when prompted by entering your OSX password)
That’s all of the files set up. Now we need to add the PALib environment variable to OSX.
Load the file “~/.profile” into a text editor - if you have Smultron installed (and if not, you should do - it’s great) you can type this in the Terminal:
Add the following line to the end of the file (you will have to type your OSX password in when saving):
Nearly done now. The last thing we need to do is comment out a couple of bugs in the DS Motion card code - you probably don’t need to do this if you’re working in C, and you definitely shouldn’t do this if you need to use the motion functionality (you’ll need to wait for a proper fix in that case):
- Open the file “/opt/local/PAlib/PAlib/include/nds/arm9/PA_Motion.h”
- Comment out line 23
- Change line 29 to
That, I think, should be everything. Note that this is correct at the time of writing, using devkitPro r20 and PALib 070717.