-- DisplayFace.mesa (last edited by: McJones on: July 30, 1980 5:43 PM)
-- 1) Is SetScanLineWakeup really necessary? Is it implementable on all controllers?
-- 2) Is 16 word alignment of globalState area necessary on D0?
DIRECTORY
BitBlt USING [BBTable],
Environment USING [Base, PageCount, PageNumber];
DisplayFace: DEFINITIONS =
BEGIN
-- 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.
hasBuffer: READONLY BOOLEAN;
-- TRUE => display implementation provides real memory for bitmap;
-- FALSE => client provides real memory for bitmap.
pagesForBitmap: READONLY Environment.PageCount; -- size of virtual memory required to hold full size bitmap; may be larger than implied by size of visible image
Connect: PROCEDURE [bitmap: Environment.PageNumber]; -- 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).
Disconnect: PROCEDURE; -- 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.)
TurnOn: PROCEDURE; -- 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.
TurnOff: PROCEDURE; -- Display must be in ’on’ mode; places display in ’off’ mode, causing background color to be displayed on screen.
GetBitBltTable: PROCEDURE RETURNS [BitBlt.BBTable];
SetBackground: PROCEDURE [background: Background];
Background: TYPE = {white, black};
-- white => normal (black on white) view of bitmap (0=>white, 1=>black);
-- black => inverted (white on black) view of bitmap (0=>black, 1=>white);
width, height: READONLY CARDINAL [0..32767]; -- 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 BOOLEAN; -- Is the refresh two-way interlaced?
SetScanLineWakeup: PROCEDURE [line: CARDINAL, mask: WORD]; -- Causes naked notify using specifed interrupt mask each time the specified line is refreshed on the screen.
GetScanLine: PROCEDURE RETURNS [line: CARDINAL]; -- Returns scan line currently being refreshed on the screen.
hasBorder: READONLY BOOLEAN; -- Is border pattern implemented?
SetBorderPattern: PROCEDURE [oddPairs, evenPairs: [0..377B]]; -- 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.)
SetCursorPattern: PROCEDURE [cusorPtr: CursorPtr]; -- 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.
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.
-- General
globalStateSize: READONLY CARDINAL;
GlobalStatePtr: TYPE = Environment.Base RELATIVE POINTER;
InitializeCleanup: PROCEDURE;
Initialize: PROCEDURE [globalState: GlobalStatePtr, wakeVF: WORD]; -- 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).
END.
LOG
Time: February 6, 1980 2:22 PMBy: RedellAction: Created file
Time: February 7, 1980 6:30 PMBy: GobbelAction: Made width and height be subranges to avoid signed/unsigned problems
Time: July 19, 1980 2:11 PMBy: McJonesAction: Added cursorPosition and (temporarily) mousePosition
Time: July 29, 1980 10:00 AMBy: McJonesAction: Added hasBorder; removed SetCursorPosition; split off MouseFace
Time: July 30, 1980 5:43 PMBy: McJonesAction: Added pagesForBitmap, GetBitBltTable; buffered=>hasBuffer