PsychToolbox and Radius card problem with G4?

Hi,

I'm at home and have only read through your code, not actually run
it on a system with a Radius card in it. The code looks OK, but
here is one thing you can try.

SCREEN('OpenWindow',....) will open your window in whatever
pixel depth the monitor is currently set to. So if your monitor
is set in 8-bit mode (256 colors) on one system and 16- (thousands
of colors) or 32-bit (millions of colors) mode on another system, you
could get different results. My expectation is that your code would
work OK in either 8- or 32-bit mode, but in 16-bit mode it is
much harder to say what will happen.

Could you try changing your SCREEN('OpenWindow' call to:

[screenPtr, screenRect] = screen(monitor, 'OpenWindow', 0,[],8);

and let me know what happens? This will force an 8-bit open regardless
of the system setting and is probably what you want in general.
If it fixes your problem, I won't think further. If not, I'll see if
I can replicate the problem on one of my systems. I don't have a G4
configuration but can try it with a G3.

Best,

DB

P.S. As an aside and not likely to be related to your problem, the
Radius drivers behave slightly differently in 8 and 32 bit modes.
In 32 bit mode, the call to SetGamma takes effect immediately,
without waiting for a call to SetClut.

P.P.S. Our experience is that you get a considerable speed gain
if you turn filesharing off. You can control it within MATLAB
using our FileShare MEX file. Again, this seems unlikely to
be related to your problem.

>Problem:
>I can't modify the gamma table on our 10-bit display card. The code
>below should display a sequence of increasingly bright colored
>patches; it is a subset of our spectrophotometric calibration code.
>Instead, I get a faint gray patch all the time. I get the same problem
>using PsychToolbox v2.36, 2.43, and 2.44. The same code runs
>properly on a PowerMac 7300, and may be okay on a G3.
>
>Sample Code:
>% script TestCalib.m
>
>monitor = 1;
>
>synchFreq = 200/3; % Low res - standard for NEC MultiSync LCD2000
>tsize = [50 50];
>% Specify which colors to step through and calibrate
>gunColors = [1 0 0; 0 1 0; 0 0 1];
>
>% Specify framebuffer values to measure
>nSteps = 32;
>p = 1.7; % slope of the power function
>fbValues = round(1023*linspace(0,1,nSteps).^(1/p));
>
>% Open the screen
>[screenPtr, screenRect] = screen(monitor, 'OpenWindow', 0);
>
>% Set up the gamma table
>targetMap = gray(256) * max(fbValues);
>targetClut = 1;
>
>% Set up the calibration patch
>xc = (screenRect(RectRight) - screenRect(RectLeft))/2;
>yc = (screenRect(RectBottom) - screenRect(RectTop))/2;
>targetRect([RectTop RectLeft RectBottom RectRight])= ...
> [yc xc yc xc]+[-tsize(1) -tsize(2) tsize(1) tsize(2)]/2;
>screen(screenPtr, 'FillRect', targetClut, targetRect);
>
>% Put up a sequence of colored patches of increasing intensities:
>for gun = 1:size(gunColors,1)
> for fb = 1:length(fbValues)
> targetMap(targetClut+1,:) = gunColors(gun,:) * fbValues(fb);
> screen(screenPtr, 'Gamma', targetMap, 10);
> screen(screenPtr, 'SetClut', gray(256)*255);
> pause(1)
> end
>end
>
>screen(screenPtr, 'Close');
>
>---------------------------------------------------------------------
>-----------------------
>
>Results of ScreenTest:
>****** heeger's Power Mac G4/400, Mac OS 9.0.4 ******
>G4, 400 MHz, memory bus 100 MHz, 57.364 Mflop/s
>PsychToolbox 2.43, 10 July 2000, MATLAB 5.2.1.1421
>QuickTime 4.1
>FileSharing is on.
>Screen saver present, now disabled.
>Using UpTime-based timing, which is very accurate and reliable.
>Has serial port arbitration.
>*** Screen 0
>*************************************************************
>ATY,Rage128Ps (.Display_Rage128 version 1.0f1) in slot SLOT-A
>8 bit dacs. 832x624 75 Hz. (56,60,65,67,70,72,75,76,85,90,100,120 Hz
>avail)
>NOTE: DipPriorityAfterSetClut is true. Works around Rage128 driver bug.
>NOTE: MinimumSetClutPriority is 2. Works around Rage128 driver bug.
>pixel size 8 16 32 bits
>pages 1 1 1
>CopyWindow (ie CopyBits) 88 92 93 MB/s
>GetClut equals SetClut? == == ==
>SetClutDriverWaitsForBlanking? Yes
>At priority 7 ... No blanking
>intrpts.
>SetClut (cscSetEntries) min dur. 0.0 0.0 0.0 frames
>At priority 1 ... Blanking
>interrupts.
>SetClut (cscSetEntries) min dur. 0.0 0.0 0.0 frames
>SetClut suppresses ints. for 0.0 0.0 0.0 frames
>*** Screen 1
>*************************************************************
>RDUS,Marin (.Display_Marin version 2.0)
>10 bit dacs. 640x480 67 Hz. (60,67,75 Hz avail)
>pixel size 1 4 8 16 32 bits
>pages 1 1 1 1 1
>CopyWindow (ie CopyBits) 10 11 11 11 11 MB/s
>GetClut equals SetClut? == == == == ==
>SetClutDriverWaitsForBlanking? Yes
>At priority 7 ... No
>blanking intrpts.
>SetClut (cscSetEntries) min dur. 0.1 0.1 0.1 0.1 0.1 frames
>
>At priority 1 ...
>Blanking interrupts.
>SetClut (cscSetEntries) min dur. 0.1 0.1 0.1 0.1 0.1 frames
>
>SetClut suppresses ints. for 0.0 0.0 0.0 0.0 0.0 frames
>
>**************************************************************************