DIRECTORY PrincOps USING [BBTable, PageCount, PageNumber]; DisplayFace: CEDAR DEFINITIONS = BEGIN hasBuffer: READONLY BOOL; pagesForBitmap: READONLY PrincOps.PageCount; Connect: PROC [bitmap: PrincOps.PageNumber]; Disconnect: PROC; TurnOn: PROC; TurnOff: PROC; GetBitBltTable: PROC RETURNS [PrincOps.BBTable]; SetBackground: PROC [background: Background]; Background: TYPE = {white, black}; width, height: READONLY NAT; -- Dimensions of screen in pixels pixelsPerInch: READONLY CARDINAL; -- Size of a pixel refreshRate: READONLY CARDINAL; -- Number of times per second that entire screen is refreshed. interlaced: READONLY BOOL; -- Is the refresh two-way interlaced? SetScanLineWakeup: PROC [line: CARDINAL, mask: WORD]; GetScanLine: PROC RETURNS [line: CARDINAL]; hasBorder: READONLY BOOL; -- Is border pattern implemented? SetBorderPattern: PROC [oddPairs, evenPairs: [0..377B]]; MonitorType: TYPE = {alto, lf}; monitorType: MonitorType; -- the monitor connected to this machine FieldRate: TYPE = {normalAlto, normalLF, lfBall60hz, lfPhillips60hz}; SetFieldRate: PROC [rate: FieldRate] RETURNS [ok: BOOL]; SetVerticalWaveforms: PROC [sync, visible, topBorder: CARDINAL] RETURNS [ok: BOOL]; SetCursorPattern: PROC [cursorPtr: CursorPtr]; CursorPtr: TYPE = LONG POINTER TO Cursor; Cursor: TYPE = ARRAY [0..16) OF WORD; cursorPosition: READONLY LONG POINTER TO Point; Point: TYPE = RECORD [x, y: INTEGER]; -- x and y , measured from upper-left corner of screen. globalStateSize: READONLY CARDINAL; GlobalStatePtr: TYPE = LONG POINTER; InitializeCleanup: PROC; Initialize: UNSAFE PROC [globalState: GlobalStatePtr, wakeVF: WORD]; END. `DisplayFace.mesa last edited by Levin on June 6, 1983 2:51 pm 1) Is SetScanLineWakeup really necessary? Is it implementable on all controllers? 2) Is 16 word alignment of globalState area necessary on D0? Processor-independent interface to bitmap display. There is no provision for multiple displays on a single machine. The display has two state variables: mode and background. The mode has three values: on, off, and disconnected; the background has two values: white and black. When the system is booted, state = disconnected, and background = white. TRUE => display implementation provides real memory for bitmap; FALSE => client provides real memory for bitmap. size of virtual memory required to hold full size bitmap; may be larger than implied by size of visible image Display must be in 'disconnected' mode; connects display to specified bitmap and leaves it in 'off' mode. Bitmap is taken by reference (first page in virtual address space); subsequent changes to bitmap in memory will affect screen image. Bitmap is always full size (i.e. pagesForBitmap pages). The bitmap does not appear on the screen until the display is turned on (see below). Display must be in 'off' mode; places display in 'disconnected' mode. Turns screen black, and minimizes consumption of resources (e.g. microprocessor time, memory accesses, etc.). The virtual memory area used for the bitmap may be reused for other purposes while the display is disconnected. The real memory may be reclaimed by the party providing it (i.e. if 'buffered' is FALSE, the face client may reclaim the real memory; if 'buffered' is TRUE, the face implementation may reclaim the real memory.) Display must be in 'off' mode; places display in 'on' mode, causing bitmap to be displayed on screen. Bitmap must have real memory mapped to it before this operation is invoked. Display must be in 'on' mode; places display in 'off' mode, causing background color to be displayed on screen. white => normal (black on white) view of bitmap (0=>white, 1=>black); black => inverted (white on black) view of bitmap (0=>black, 1=>white); Causes naked notify using specifed interrupt mask each time the specified line is refreshed on the screen. Returns scan line currently being refreshed on the screen. Defines bit pattern shown in visible screen area (if any) outside bitmap. The bit pattern for an individual scan line is defined by displaying a single byte repeatedly along the entire scan line. The same pattern is shown on alternating pairs of lines. (Byte for even pairs shown on lines -4, -3, 0, 1, 4, 5, etc. Byte for odd pairs shown on lines -2, -1, 2, 3, 6, 7, etc.) There are two basic types of monitors that can be connected to D-machines: the narrow Alto-style monitor and the wide LF (large-format) monitor. Alto monitors run at a fixed field rate (60 hz) which it is not reasonable to change. LF monitors normally run at a field rate of approximately 77 hz. However, this may be reduced to 60 hz for compatibility with videotape and other TV equipment. To complicate matters, there are two brands of LF monitors presently in use, one made by Ball Brothers and the other by Phillips. They respond in different ways to having their field rate reduced, and require different waveforms for reasonable results. The software cannot detect which brand of LF monitor is connected; this must be determined by the user. Shine a light through the ventilation slots in the top of the housing. If there is a horizontal logic board at the bottom (under the neck of the picture tube) then it is a Ball Brothers monitor. If the logic board is vertically oriented on the left-hand side (with a bunch of adjustments on the top) then it is a Phillips monitor. After changing the field rate, it may be necessary to adjust the monitor to restore the proper position of the picture. This is more likely to be needed with a Ball Brothers monitor than with a Phillips monitor. Establishes the new field rate, in a machine-independent fashion. Returns TRUE if the operation is reasonable and is implemented on this machine. Sets the vertical waveform parameters to arbitrary values. Sync is the duration of the sync pulse in scan lines; visible is the duration of the visible field including top and bottom borders (i.e., everything except sync); topBorder is the duration of the top border. All numbers describe scan lines in the even field and must be greater than zero. For an LF monitor, the standard values are sync=18, visible=430, topBorder=14. To obtain the normal field rate requires that sync+visible = 448. To obtain the 60 hz field rate requires that sync+visible = 578. At present, on the Dorado the three values can be adjusted independently; on the Dolphin and Dandelion nothing may be changed. Returns TRUE if the operation is implemented on this machine; no other check is made for reasonableness of the operation. Sets the cursor bitmap to the indicated pattern by value; subsequent changes to the indicated cursor in memory will not affect screen image, hence SetCursorPattern must be called each time the cursor pattern is changed. General This procedure initializes the implementation; 'globalState' is a client supplied block of globalStateSize words, 16-word aligned in first 64K of address space. Lifetime: permanently allocated and passed in on call to Initialize; 'wakeVF' is the wakeup mask for vertical-field interrupts (i.e. refresh of scan lines 0 and 1). ʲ˜Jšœ™Jšœ,™,J™JšœQ™QJšœ<™˜_Jšœ œœŸ%˜AJ˜šžœœœœ˜5Jšœl™l—šž œœœœ˜+Jšœ:™:—J˜Jšœ œœŸ!˜;šžœœ"˜8Jšœù™ù—J˜šœ œ˜Jšœ‘™‘Jšœ÷™÷Jšœý™ýJšœµ™µJšœÔ™Ô—J˜JšœŸ(˜CJ˜Jšœ œ6˜EJ˜šž œœœœ˜8Jšœ’™’—J˜š žœœœœœ˜SJšœŒ™ŒJšœP™PJšœN™NJšœA™AJšœ@™@Jšœ~™~Jšœy™y—J˜J˜šžœœ˜.JšœÝ™Ý—Jš œ œœœœ˜)Jš œœœ œœ˜%Jš œœœœœ˜/JšœœœœŸ7˜^J™Jšœ™J˜Jšœœœ˜#Jšœœœœ˜$J˜Jšžœœ˜J˜šž œ œ'œ˜DJšœÅ™Å—J˜Jšœ˜J˜—…—€’