HowTos / MacRig

Setting up a Mac OS 9 machine for a Rig


  • Install Matlab, the latest was 5.2.1, please make sure you are using this version as it is the most stable, can drag and drop from the install cd.
  • Install Psychtoolbox, the latest was 2.55, can drag and drop from install cd, or download from the old Psychtoolbox website.
  • In monitor preferences, set refresh rate to the same refresh rate as in your code, check that monitor size, distance from screen are all correct (set size and distance in serviceRex.m or initScreen.m and refresh rate in setGlobalDefaults.m).
  • In monitor preferences, set colors to 256, if the colors are set to "millions", the dots will be BLACK.
  • If you get an error about backgrounding not being off, you can stick this code in the initScreen.m Screen('Preference','Backgrounding',0);
  • Install the National Instruments card to talk to rex. You should install the drive before you install the card. You can download the driver from here (the standard, not the minimal). You need to make sure that you install the right driver for the card that you have. If you have a PCI-DIO-96 card, use the verion NI-DAQ 4.9.x. Once you have the driver installed (it shouldn't matter where it installs, just remember where it did), shutdown the computer and install the pci card. Make sure you ground yourself first (touch something metal). Once the computer is rebooted, you need to configure the driver. Open the folder that was installed, and you should see an application for configuring the board.

You can now look at the installed pci boards in the control panels and make sure it sees the board. Now you need to make sure that pcmsg.m has the correct address for your board (you will have to re-compile pcsmsg.mex after you do this), because the address of the board is actually hard-coded into pcsmsg. You can find the address by looking at the device in the control panels. The only other thing to be careful of is the extensions. If you are re-installing a NI-DAQ card, make sure that you don't have the old driver still in the extensions. To test things, do "send done" from a Rex prompt and see if they talk. Also, you can do pcmsg('get') and pcmsg('wait') on matlab. Supposedly pcmsg('get') will query the board and then come back if there is no message, but sometimes this seems to work even when using the wrong address for the board.

You should also make sure that you have a decent video (display) card in. If you are not using a decent card, the dots will look weird, and when dots appear close together they will appear as a line instead of as a dot. Video cards known to work correctly:

  • nvidia,nvmac, geforce2mx 1027F
  • nvidia,nvmac, geforce2mx 1038F

There is a lot of useful information on the old psychtoolbox website about video cards and drivers.

Now, you should make sure your mac isn't going to try to index your hard drive in the middle of an experiment. Press apple-f or open Sherlock the apple drop menu. You should see your hard drive listed, and a check next to it. Go to the Find menu on top and click on "Index Volumes". Now unclick the box next to your hard drive and under "Use Schedule". This will turn off indexing.