RasterControllerFace.mesa
Copyright Ó 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Tim Diebert, September 3, 1985 11:52:24 am PDT
Dave Rumph, February 24, 1987 6:07:23 pm PST
DIRECTORY
Basics USING [BITAND, bitsPerWord],
RasterControllerDorado;
RasterControllerFace: CEDAR DEFINITIONS
IMPORTS Basics
~ BEGIN OPEN RasterControllerDorado;
bitsPerWord: NAT ~ Basics.bitsPerWord;
hardwareScanlineWords: READONLY NAT;
hardwareScanlinePages: READONLY NAT;
ChannelProc: TYPE ~ PROC [channel: ExtendedChannel, whatChanged, statusNow: LTStatus];
RegisterChannelProc: PUBLIC PROC [channel: ExtendedChannel, proc: ChannelProc];
The ChannelProc will be called when something interesting happens for that channel. The proc is called at priorityRealTime under a MONITOR, so it can BROADCAST or NOTIFY, but has to do what it does quickly. The client should register NIL before the going away if the proc is nested, and the frame is going away.
StartMicrocode: PUBLIC PROC [mrb: MRBPointer] RETURNS [ok: BOOL];
ResetMicrocode: PUBLIC PROC;
ShutupMicrocode: PUBLIC PROC;
SetUpForRealLineSync: PROC;
SetUpForFakeLineSync: PROC;
SetUpForRosClock: PROC;
SetUpForFakeClock: PROC;
SetUpForTestClock: PROC;
LineSync: PROC;
FakePixelClock: PROC;
CheckConfig: PROC RETURNS [HardwareConfig];
InitializeMRB: PROC [
mrb: MRBPointer,
stb: STBPointer ← NIL,
aRCB, bRCB, cRCB: RCBPointer ← NIL,
ccb: CCBPointer ← NIL,
flags: CARDINAL ← 0];
InitializeRCB: PROC [
rcb, next: RCBPointer ← NIL,
bitmap: LONG POINTERNIL,
activeWordsPerLine: CARDINAL ← 0,
wordsPerLine: CARDINAL ← 0,
lines: INTEGER ← 0, --Total number of scans to read
fMargin: CARDINAL ← 0,
sRepeat, fRepeat: INTEGER ← 0,
sReverse, fReverse: BOOLFALSE,
mosaic: BOOLFALSE,
bitsPerSample: [0..bitsPerWord] ← 1];
InitializeCCB: PROC [
ccb, next: CCBPointer ← NIL,
bitmap: LONG POINTERNIL,
words: CARDINAL ← 0,
lines: INTEGER ← 0, --Total number of scans to read
fMargin: CARDINAL ← 0,
sRepeat, fRepeat: INTEGER ← 0,
sReverse, fReverse: BOOLFALSE,
bitsPerSample: [0..bitsPerWord] ← 1,
cursorCtl: CursorCtl ← defaultCursorCtl,
modeCtl: ModeCtl ← defaultModeCtl,
halftoneCtl: HalftoneCtl ← defaultHalftoneCtl,
selCtl: SelCtl ← defaultSelCtl];
RoundUpC: PROC [val, size: CARDINAL] RETURNS [CARDINAL] ~ INLINE {
RETURN[Basics.BITAND[val+(size-1), CARDINAL.LAST-(size-1)]];
};
BitsPerSample: PROC [lgBitsPerPixel: [0..4]] RETURNS [[0..bitsPerWord]];
END.