Digital PDFs
Documents
Guest
Register
Log In
MISC-6841C3C9
November 1983
100 pages
Original
32MB
view
download
Document:
Workstation Graphics Architecture
Order Number:
MISC-6841C3C9
Revision:
Pages:
100
Original Filename:
OCR Text
Page 1 Graphics .Architecture - PRELIMINARY I I I I I I Title: WORKSTATION GRAPHICS ARCHITECTURE Author: HENRY M. LEVY Date: 7-November-198:3 Version: l. 2 File: Dizzy::User$l:[Aurenz.wga.mem.wga]WGA.MEM I I I ABSTRACT I This do.cument describes, the software be·tween a · family of works.t a t ion display systems and ;a host computer. It defines commands to generate graphics and text, and commands to support keyboard, tablet, arid mouse interaction. These commands are transmitted by the host driver ' and executed by a microprocessor-based controller in the workstation. : I inter ~ace Revision: 0.0-0.4 Description Prelim. Draft and Revisions Author Date H. Levy 13-March-1982 to 10-January-1983 .... l. 0 ·VSlOO Release Base Level H. Levy l-March-1983 1.1 Updates based on , vs100 implemen. t"6.~!~:fr1 L. Samberg 20-Jline-1983 l. 2 Finalized Release for VSlOO implementation s. Aurenz 7-January-1984 PRELIMINARY CONFIDEr+ltAlt Graphics Architecture - PRELIMINARY Page 2 COPYRIGHT (c) 1983 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED. THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORAT I ON. DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. OF ITS Page 3 Graphics Architecture - PRELIMINARY 1.0 2.0 2.1 2.2 INTRODUCTION • . • . • • . • . DISPLAY VOCABULARY • • • • • • • 2.6 2.7 2.8 2.9 2.10 2.11 4.0 4.1 Microcode . Pixel . . . . . . • • 7 . • 8 . . • . . Mouse • . • . . . 8 . ...... 8 . . • 8 . ........... 8 • • • • • • Two-Space . • • • Bitmap • • . • • • Off set . . . . Extent . . . . . . Rectangle . . . • Frame Buffer • BITBLT . • . . . • . . Font • • Clipping Rectangle Cursor . Half tone . . • • • . . . . • • . • . . . . • . . . . . . . . . • • . . • . . . . • . . . . . . . . . . . . . . • • . • • . . . . . • . . Digitizing Tablet • • . . • • ARCHITECTURAL OVERVIEW • . . WORKSTATION OPERATION . . . . • . PARAMETERS TO GRAPHICS OPERATIONS Value 4 .1.1 4 .1. 2 4 .1. 3 4 .1. 4 4. l. 5 4. l. 6 4. l. 7 4. l. 8 4. l. 9 4. l.10 4.2 4.2.1 4.2.2 4.2.2.1 4.2.2.2 4.2.2.3 4.2.2.4 4.2.2.5 . . . . Constant . Address . . . . 4•2•3•3 4.2.3.4 4.2.3.5 4.2.3.6 4.2.4 4.2.4.l 4.2.4.2 4:.2.4.2.1 4.2.4.2.1.1 4.2.4.2.l.2 MAP • • . . . . . . . . . . . . c • • • • • . 8 . 8 . 9 . . . . . . . 9 • 9 9 9 . 9 . 9 10 10 10 10 11 13 13 13 13 13 14 14 14 14 14 15 15 16 17 21 21 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . •. . . • . . . . . . . . . . . . . . . . . . . . . • . . . . . . . • . . . . . . . . . . . . . . . . . . . .. . . . . . . • . . . . . . . . . . · . . . . . . . . . . 22 . 23 23 23 27 28 .•. • • • . . . . FONT DATA STRUCTURE Header Format . . . The Bitmap . . . . . . . . . . . CLIPPING RECTANGLES Draw Curve Command . . . . . . . . . . PATH . . . . . . . . . . . . , PATTERN STRING . . . . . . . . . . . PATTERN MULTIPLIER . , . . PATTERN STATE . . . . . . SECONDARY SOURCE . . . . . . . . SECONDARY SOURCE OFFSET Print Text Command . . . . . . . . . . SOURCE IMAGE . , . . . MASK FONT - . . . . . . Extent . . . . . . Rectangle . . . . Bitmap . . . . . . . . . Sub-Bi trnap . . . . . . . . Halftone . . . • . . . List . . . . . . . DISPLAY GRAPHICS COMMANDS • THE CLIPPING MODEL Copy Area Command SOURCE IMAGE SOURCE OFFSET . . . . SOURCE MASK DBSTINATION IMAGE BITMAP DESTINATION OFFSET 4.2.2.7 4.2.3 4.2.3.1 4.2.3.2 . . Offset............. 4.2.2.6 .;· • . Display . . . . . . . . . . . Firmware . . . . . . . . 2.3 2.4 2.5 2.12 2.13 2.14 2.15 2.16 2.17 3.0 • • • . . . . 29 . . . . 30 31 31 32 32 33 34 34 , . , , . . . . . ... 34 35 35 Page 4 kstation Graphics Architecture - PRELIMINARY The Leftarray . . . • . • . . . . . • • 4.2.4.2.1.3 DESTINATION IMAGE BITMAP . . • • • • 4.2.4.3 INITIAL DESTINATION OFFSET . • . • . • • 4.2.4.4 MAP • • • • • • • . • • . • • • • • 4.2.4.5 CLIPPING RECTANGLES . . • . . . . . • • • • 4.2 0 4 . 6 4.2.4.7 TEXT STRING • • • • . . • • • • • . CONTROL STRING • • . . . . • . . . . . . . • 4.2.4.8 INTER-CHARACTER PAD • . • . • • • . • • • • 4 . 2 - 4.9 SPACE PAD . • • • • . . • • . . . . • • 4.2 . 4.10 Fill Area Command • . . . • . • ..... 4.2.5 SOURCE IMAGE • • • • . . . . . . . . . • . . ~, .2.5.1 DESTINATION IMAGE BITMAP . . . . . • . . • . 4.2.5.2 DESTINATION OFFSET • . . . • • • • • . • • • 4.2.5.3 MAP • • • • 4.2.5.4 CLIPPING RECTANGLE . . . . . . • 4.2.5.5 4.2.5.6 PATH • • • • • • • • • • • . • • • · • • Flood Area Command • . . • . . • . 4.2.6 SOURCE IMAGE . . . • • . . . • 4.2.6.l DESTINATION IMAGE BITMAP . • • . 4.2.6.2 SEED POINT • . . . . . . . • . • . . . • • . 4.2.6.3 CLIPPING RECTANGLE • . . . . . . 4.2.6.4 !30Ui\!I>AR'Y' MAP • • • . . . . . . . . . . . • . 4.2.6.5 DISPLAY CURSOR COMMANDS . . . . . • . • . • 4.3 Load Cursor Command 4.3.1. CURSOR SOURCE IMAGE 4.3.1.1 CURSOR SOURCE OFFSET . . . . . • • • . . 4.3.1.2 4.3.l.3 CURSOR SOURCE MASK . . CURSOR MAP . . . . . 4.3.1.4 CURSOR ATTRIBUTES . . . . . . . . . . . . . 4.3.1.5 DEVICE ORIENTED COMMANDS 4.4 Attach Cursor Command . . . . . . . . . . 4.4.1 4.4.1.1 DEVICE TYPE . . . . . . . . . . . . . . . . Set Cursor Position Command . . . . . . . 4.4.2 4 .4 .2.1 LOCATION . . . . . . . . . . • . . . • . 4.4.3 Get Cursor Position Command • • . . . . . 4.4.4 Get Mouse Position Conunand . . . . . . . . . . 4.4.5 Set Mouse Characteristics Command . . • . 4.4.5.1 TRACKING RATIO . . . . . . . . . . . . . 4.4.5.2 THRESHOLD And SCALE FACTOR . . . • . . . 4 . 4.6 Set Tablet Characteristics Command . . . . 4.4.6.1 TRACKING RATIO . . . . . . . . . . . . . . . 4.4.6.2 QUANTIZATION RATIO . . . . . . . . . . . Get Tablet Position Command . . . . . . 4.4.7 4.4.8 Set Pointing Device Event Reporting . . . 4.4.8.1 ENABLE FLAG . . . . . . . . . . . . . . . . 4.5 MISCELLANEOUS COMMANDS . . . . . . . . . 4.5.1 Move Object Command . . . . . . . . . . . . . 4.5.1.1 OBJECT TYPE . . . . . . . . . . 4.5.1.2 OBJECT LENGTH . . . . . . . . . . . 4.5.1.3 SOURCE . . . . . . . . . 4.5.1.4 DESTINATION . . . . . . . . . Cl 4.5.1.5 ERRORS 4.5.1.6 4.5.1.6.1 4.5.1.6.2 NOTES . . . DEVICE TYPES BUFFERS • • • • • • • • • • • • • • • • • • 36 38 38 39 39 39 39 40 40 41 41 42 42 42 42 42 43 43 44 44 44 44 46 46 46 46 46 47 47 48 48 48 49 49 50 50 50 51 51 51 52 52 53 53 53 53 54 54 54 54 55 55 55 55 55 Graphics Architecture - PRELIMINARY Page 5 DATA FORMATS . • . • . • . • • . WORD DATA • • • . • . CHARACTER STRING • • • Report Status Command • . • . • . . . • • . . DEVICE TYPE . . . . . . . . . • • . DEVICE VERSION • • • • • • • • • • • • • FIRMWARE VERSION • . • . . . . . . . VISIBLE SCREEN FRAME BUFFER BITMAP • FREE FRAME BUFFER MEMORY • . • • • . . • . . FREE PROGRAM MEMORY SPACE . . • HOST MEMORY SPACE BASE ADDRESS • No Operation Command • . . • . • • CONTROL AND STATUS REGISTERS • • . • • • . Control And Status Register (CSRO) • . • • • Interrupt Reason Regi s ter . . . . • . . . . • . Device Event Register . • . . . . . Functi o n Parameter Register . . . . . . . • Device Pos ition Register . . . . . • . . • . Interrupt Vector Add r ess Register ..• Initial izati on And I ni tial Display Requirements Aborti ng A Request • . • • • •..... COMMAND PACKET FORMATS • . . • • . . . . . • . Copy Ar ea Command Packet • • . • . • • . Draw Curve Command Packet • • • • • • . Print Text Command Packet . . . . . . . . . . . Fill Area Command Packet . . . . . • . . Flood Area Command Packet . • . . . Load Cursor Command Packet . . . Attach Cursor Command Packet ... . Set Cu rsor Position Command Packet . . . . . Get Cursor Posit ion Command Packet . . . . . Get Mouse Position Command Packet ...... . Set Mouse Cha racteristics Command Packet • . . . Set Tablet Characte ristics Command Packet ••• Get Ta blet Position Command Packet . . . . . Set Poin ting Device Event Reporting ..... . Move Object Command Packet . Report Status Command Packet . . . • . . . . No Operation Command Packet ......... . CONSTANTS , OPCODES, MODIFIERS, AND ERROR CODES . . Control And Status Register 0 Function Codes . . Command Packet Operation Codes . . . . . . . . . Command Packet Operation Modifiers . . .. . Copy Area Command Modifiers . . . . . . . Draw Curve Command Modifiers . . .. . Print Text Command Modifiers . . . . .. Fill Area Command Modifiers .... Flood Area Command Modifiers . . . .. Load Cursor Cornmand Modifiers . . . . . . . . Set Mouse Characteristics Command Modifiers Set Tablet Characteristics Command Modifiers • Interrupt Reason Values . • . • . . . . VAXSTATION 100 RESTRICTIONS Number Of Planes . . . . . Halftone Representation 4.5.1.6.3 4.5.1.6.3.1 4.5.1.6.3.2 55 4.5.2 4.5.2.1 4.5.2.2 59 59 60 60 60 60 60 61 61 62 62 63 63 64 64 65 65 67 68 69 71 72 74 76 78 79 79 79 79 80 80 80 80 81 81 82 83 83 83 84 84 84 85 L5.2.3 4.5.2.4 4.5.2.5 4.5.2.6 4.5.2.7 4.5.3 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6 ~- 14 6.15 6.16 6.17 7.0 7.1 7.2 7.3 7.3.1 7. 3. 2 7. 3. 3 7. 3. 4 7. 3. 5 7.3.6 7. 3. 7 7. 3. 8 7.4 8.0 8.1 8.2 56 57 86 86 86 87 87 88 92 92 92 Page 6 Graphics Archite c ture - PRELIMINARY 9.0 9.1 9.2 9.3 9.4 9.5 ..... . ....... ........ . . . .... . . .. GENERAL IMPLEMENTATION RESTRICTIONS Word Access I /0 UNIBUS Window Mapping Bitmap Sto rage Requi rements Device Coo r dinate Management For WGA Keyboard I nte rfac e ..... .... 92 92 92 93 93 96 ., 1 kstation Graphics Architecture - PRELIMINARY 1.0 Page 7 INTRODUCTION This document describes the command protocol supported by workstation display systems. These display systems implement five basic output commands: 1. General bitmap copy operation, 2• Text output, 3. Curve drawing, 4. Area fill, 5. Area flood, and a collection of miscella n e ous commands. In addition, they support a keyboard and one or mo r e p ointing devices (mouse or tablet). The Workstation Graphics Architecture is intended to be general and flexible enough to compatibly support future workstation products, such as multi-plane (color) and higher-functionality systems. Page 8 Graphics Architecture - PRELIMINARY 2.0 DISPLAY VOCABULARY 2.1 Display For the purposes of this document, a physical device consisting of a high-resolution raster-scan monitor, keyboard, pointing device, control processor, microcode and firmware. 2.2 Firmware A control program that is downloaded from the host into (see Microcode). It is code to be executed by microprocessor in the display. 2.3 the the display control Microcode A control program which is fixed in hardware (i.e. not loadable), usually in ROMs or PROMs. It is code to be executed by the microcoded hardware in the display to perform high-speed BITBLT and graphical operations on framebuffer memory. 2.4 Pixel A single picture element or addressable point on a display. Each pixel has a value, represented by one or more bits, that describes its state (i.e., the intensity or color of that point). I I I I I I I I I I I 2.5 Two-Space The pixels in a bitmap or on the display are organized in a Cartesian (rectangular) coordinate system of two dimensions. The origin of the coordinate grid is in the upper-left-hand corner, with the positive X axis extending right and the positive Y axis extending down. All points (pixels) are thus specified by their X and Y offsets (in pixels) from this origin. I I I I 2.6 Bitmap I I I I I I I A data structure consisting of a rectangular array of pixel values. The specification of a bitmap includes its starting address in memory and its dimensions. its Width is the X dimension in pixels, and Its Height is the Y dimension in pixels. Its Depth indicates how many planes, or bits/pixel, the bitmap occupies. The starting address points to the upper-left-hand corner of the bitmap. Page 9 kstation Graphics Architecture - PRELIMINARY 2.7 Offset Used to specify a point relative to some origin in two-space (See Two-Space). The coordinates are signed 16-bit X and Y components. 2.8 Extent An extent (or, a rectangle extent) specifies the height and width, pixels, of a rectangle in two-space. Both dimensions must positive. 2.9 in be Rectangle Used to specify a rectangular portion of a bitmap. A rectangle in two-space is specified by an Offset (of its upper-left-hand corner) and an Extent, with the bitmap's upper-left-hand corner as the origin. 2.10 Frame Buffer The bitmap memory used to store the current value of each from which the physical display monitor is refreshed. 2.11 and BITBLT The transfer of a bit string or block from one (bit block transfer, pronounced "bit blit"). 2.12 pixel location to another Font A collection of logically related images within a bitmap which may be individually addressed by index, e.g. the symbols of a character set. 2.13 Clipping Rectangle A rectangle used to constrain an operation on a set of pixels in a bitmap. The intersection of a clipping rectangle with a destination bitmap rectangle forms a restricting boundary on the operation being executed. I Graphics Architecture - PRELIMINARY • 2.14 Page 10 Cursor A small image that is displayed on the screen to indicate the current position of a selected pointing device. The cursor is automatically moved by the display hardware to reflect pointing device movement. The cursor image does not interfere with the current state of the frame buffer. 2.15 Halftone A rectangular pattern used to tile a destination bitmap. That is, the halftone is replicated along its height and width to fill the destination. The point about which this replication is done is specified as an offset relative to the origin of the destination bitmap. Halftones are used to supply levels of shading or texture, as in newspaper printing. 2.16 Mouse A small box-like device capable of sensing XY movement along a surface. It generally has one or more buttons, the function of which is defined by a particular application. 2.17 Digitizing Tablet A flat rectangular surface capable of reporting the XY position of a special "pen" or "puck" placed on it. The pen/puck also has one or more buttons generally: again, their function is defined by a particular application. Graphics Architecture - PRELIMINARY 3.0 Page 11 ARCHITECTURAL OVERVIEW The Workstation Graphics Architecture supports a family of display systems that connect to VAX or PDP-11 workstations. These displays differ in price, performance, size, and physical characteristics (e.g., color vs. black and white, resolution), however they all obey the same basic command set. The commands are defined by this document. The workstation displays provide primitives to support the System Display Architecture (SDA), a high-level software interface to display programming. User application programs access the display via an SDA procedural interface. This interface allows for multiple applications to simultaneously access the display through separate windows on the display screen. Each application controls one or more virtual displays, and the position of virtual display windows on the physical screen is controlled by a screen manager responding directly to commands from the display operator. Thus, user application programs will never directly generate display commands as defined in this document; these commands are generated only by privileged operating system software. The workstation display and associated input devices are thus multiplexed among several application processes. Therefore, the display hardware must supply primitives for window management, movement of windows on the display, partial covering of one window by another, and output to windows not currently visible on the screen. Basic to all such operations is the ability to efficiently copy bitmap rectangles from one area of the frame buff er or off-screen memory to another. In addition to the simple copy, the hardware also allows construction of the destination bitmap as a function of the source or source and destination bitmaps. Each workstation graphics processor consists of a controlling microprocessor with its private instruction and data memory, a display monitor, a frame buffer memory from which the monitor is refreshed, and an interface to host memory. It may also have some additional memory for staging graphics operations or caching commonly used images, fonts, halftones, and so on. The display micro-processor typically has its private memory, the frame buffer memory, and some section of host memory mapped into its address space. Operations can be performed on data residing in any of these memories. That is, the workstation processor can operate on bitmaps stored in host memory as well as in local workstation memory. The instruction set of the display is formed by the microcode and firmware installed in it. All addresses communicated between host and display are 32-bit values. Some hosts, displays, or interconnects may not support a full 32-bit address space and will therefore ignore some upper bits of the address. All coordinates are 16-bit signed values. The maximum size of a bitmap dimension (height or width) is therefore 2**15-1 pixels. In comparison, common frame buffer dimensions for existing monitors are on the order of 2**10 pixels on a side. Graphics Architecture - PRELIMINARY Page 12 Host/display communications are handled through a shared-memory Control and Status Register interface. Graphics commands to the display processor are packet-oriented. The host transmits a command packet to the display; the display loads the command completion status in a control and status register and interrupts the host when done. Multiple command packets can be linked together to allow processing of several commands with a single device interaction. Other data may be transmitted spontaneously by the display to indicate the occurrence of various events. Command packets can contain the address of data in host memory to be read or written by the display. Any host data passed to the display by address must be locked in host memory for the duration of the command. Page 13 rkstation Graphics Architecture - PRELIMINARY 4.0 WORKSTATION OPERATION This section describes the basic graphics operations of the workstation display system. These operations generally affect the contents of bitmaps stored in host or display memory. The workstation provides support for five basic graphics operations: 4.1 1. General bitmap copy (raster operations) 2. Text output 3. Curve drawing 4. Area fill 5. Area flood PARAMETERS TO GRAPHICS OPERATIONS The fundamental parameters to these basic operations are described below. Many terms are also discussed above in the Display Vocabulary. The components of each parameter will be described, as will its representation in the packet. Only the "generic" parameters are mentioned here; specialized parameters associated with only one command are mentioned in the section describing that command. Please refer to the section on Command Packet Formats for complete specification of all packets. 4.1.1 Value - Used in this section to denote a single word. are built up to form the parameters. 4.1.2 Groups of these words Constant - A constant is a 16-bit binary value passed directly in a command packet. In an N-plane bitmap, only the least significant N bits of the constant are used. The format of a Constant is: Value<l5:0> - Constant Value 4.1.3 Address - A 32-bit address which points to an object (e.g. bitmap, font, string) in display-addressable memory. Note that the low word is given first. The format of an Address is: Value<l5:0> - Low word of address Graphics Architecture - PRELIMINARY .I Value<l5:0> Page 14 - High word of address I I I 4.1.4 Offset - An Offset specifies a point relative to some origin in two-space (See _ Two-Space). It usually designates the upper-left-hand corner of a 1\!ectangle or bitmap. The coordinates are signed 16-bit X and Y components. - X coordinate, in pixels Value<l5:0> - Y coordinate, in pixels Value<l5:0> 4.1.5 Extent - An extent (or, a rectangle extent) specifies the height and width, pixels, of a rectangle in two-space. Both dimensions must positive. Value<l5:0> - Rectangle Width, in pixels Value<l5:0> - Rectangle Height, in pixels 4.1.6 in be Rectangle - Used to specify a rectangular portion of a bitmap. A rectangle in two-space is specified by an Offset (of its upper-left-hand corner) and an Extent, with the bitmap's upper-left-hand corner as the origin. Offset<31:0> - Coordinates of rectangle origin Extent<31:0> - Width and height of rectangle 4.1.7 Bitmap - A bitmap specifies a segment of memory containing the values of all of the pixels in a rectangle. The representation of the bitmap is device-dependent. A bitmap is specified by: Address<31:0> - Base address of the bitmap memory Value<l5:0> - Width of the bitmap, in pixels Value<l5:0> - Height of the bitmap, in pixels Value<l5:0> - Number of bits per pixel in the bitmap 4.1.8 Sub-Bitmap - A sub-bitmap specifies a rectangular subset of the pixels in a bitmap. It is thus specified by a bitmap, as above, plus the origin and extent of a rectangle within that bitmap: Bitrnap<79:0> - Specifi c ation of a bitmap memory Offset<31:0> - Origin of subset rectangle within bitmap Extent<Jl:O> - Extent of subset rectangle Graphics Architecture - PRELIMINARY 4.1.9 Page 15 Halftone - A halftone is a rectangular pattern used to tile a bitmap (in the same way tiles are used to lay a design on a floor). The Halftone Alignment Offset specifies the origin of the halftone bitmap relative to the origin of the destination bitmap in two-space. e.g. if the Offset is (0,0), the Halftone will be aligned to the upper-left-hand corner of the destination bitmap. A halftone is specified as a bitmap: Bitmap<79:0> - Specification of the bitmap Offset<31:0> - Alignment Offset of halftone pattern 4.1.10 List - A list is any one-dimensional array of fixed-sized elements. Examples of lists are character strings, clipping rectangle lists, and line-drawing paths. The size of the individual elements is either known implicitly or specified by other parameters in the command. A list is specified by its base address and its length (a COUNT of the elements). Address<31:0> - Address of the start of the list Value<lS:O> - Length of the list (COUNT) wo~ kstation Graphics Architecture - PRELIMINARY Page 16 \... 4.2 DISPLAY GRAPHICS COMMANDS As previously stated, the workstation display executes a set of five basic commands; each command is capable of processing some number of different parameter types or formats. In this section we describe the commands and their parameters in more detail. Before presenting the commands, it is necessary to describe a model of the machine implemented by the workstation micro-processor. At its most basic level, this machine inputs a source bitmap and uses it to modify a destination bitmap in a specified way. However, in the most general case, only certain pixels in the source may be used, and only certain pixels in the destination may be available for modification. Our model indicates how these sources and destinations are specified. A picture of this machine is shown below: v +---------+ +---------+ SOURCE I I IMAGE 1-->I I I +---------+ +-+ +-+ +--------+ +-----------+ SOURCE I !Ml IOI !CLIPPING! !DESTINATION! MASK . 1-->IAl-->IFl-->IRECTANG. 1-->I IMAGE I Ip I IF I I I I BITMAP +---------+ +-+ +-+ +--------+ +-----------+ This machine is logically divided into three parts. The first part, consisting of the source image and source mask, determines what pixels of the source will be used to update the destination. The last part, consisting of the clipping rectangles and destination image bitmap, determines what pixels of the destination are available for modification. The map box in the center specifies a function with which source pixel values may be transformed before replacing destination pixels. Or, the destination pixels may be replaced with a function of both source and destination pixels, as shown by the arrow leading from the destination to t he map. The destination offset box (OFF) in the center specifies where the source pixels are to be placed relative to the origin of the destination bitmap. '\ ~-. Page 17 wGrkstation Graphics Architecture - PRELIMINARY 4.2.1 THE CLIPPING MODEL - Here is a graphical illustration of the "Implied Clipping" which may take place when processing a source bitmap through the above machine. Only a subset of these operations need take place in most cases, depending on the user's selection of parameters. The operation proceeds in four steps: [Step l] First, the Mask parameter is processed. It may be either a Sub-Bitmap or Rectangle mask. Mask Bitmap +-----------------------+ [A] I I I +---------------+---------------+ 11111111111111111 11111111111111111 11111111111111111 +-------+---------------+ +-------------------------------+ Rectangle o A Sub-Bitmap Mask specifies a Rectangle (offset and extent) within a Mask Bitmap. The Mask Offset specifies Point [A], and the selected intersection (the Sub-Bitmap Mask) is shown in "l's". o If a Rectangle Mask is used instead of a Sub Bitmap Mask, no clipping is needed and [Step l] is skipped. That is, the dimensions of the 'selected intersection' are taken directly from the Rectangle Extent in the packet. o The resulting Mask Rectangle (the Extent of the result) is placed on the source as below in step 2: Graphics Architecture - PRELIMINARY Page 18 [Step 2] Next, the Source is processed. It may be either Bitmap, Constant, or Halftone. Source Bitmap +---------------+ [ B] I I +-------!--------+ 122222221111111111 122222221111111111 Resultant Mask Rectangle from [Step l] 122222221111111111 +-------1--------+ I +---------------+ o The Source Offset, Point [B], specifies where the resultant Mask is placed relative to the Source Bitmap's origin. The "2's" represent the selected part of the Source Bitmap. Note that they now also represent the selected part of a Sub-Bitmap mask. o If the source is a Constant or Halftone, no clipping is necessary and [Step 2] is skipped. The Resultant Mask is passed on unchanged to [Step 3]. The Resulting Mask is then placed on the destination bitmap below in step 3: ~- ~;----\., ·J#t Page 19 \ ~}orkstat ion Graphics Architecture - PRELIMINARY [Step 3] Next, the Destination bitmap and Clipping Rectangles are processed. There may be several clipping rectangles. [Step 3] is repeated for each. Destination Bitmap +-----------------------------------------------+ [ D] +-----------------+ I I [ cJ I I I +-----1--+ I I I I I I I I 1444441331 1444441331 Resultant Mask I I I I I I +-------------1---------------------------------+ 1222221221 +-----1--+ I A Clipping Rectangle +-----------------+ o The Resultant Mask Rectangle is placed on the Destination Bitmap according to the Destination Offset Point [C]. Then, one or more Clipping Rectangles may be applied to further restrict this selected area. The Clipping Rectangles are specified by an Offset Point [D] and an Extent (height and width). o In this example, the "2's" were eliminated when the Resultant Ma was clipped to the Destination, the "J's" were eliminated when the Clipping Rectangle was applied, and the "4's" represent the resultant area available for modification. '"'workstation '.. Graphics Architecture - PRELIMINARY ; .-~ Page 20 [Step 4] o Now, these accumulated offsets and extents are "traced back" to find the corresponding selected areas of the Source Bitmap and Sub-Bitmap Mask: Destination Bitmap +-----------------------------------------------+ I I I I I I +-----+. . . 1444441 1444441 I I I I I I +-------+-----+---------------------------------+ Source Bitmap +---------------+ [B] +-----+.+ 1444441 I I 44444 I I 1-----+ I + ••••••• + +---------------+ Mask Bitmap +-----------------------+ I I I I I I I [A J +-----+ ••••••••• + 1444441 1444441 +-----+ +-------+---------------+ workstation Graphics Architecture - PRELIMINARY Page 21 Copy Area Command - 4.2.2 The copy area command is the fundamental operation of the display system. Other operations are extensions of this basic copy area function. In its simplest form, copy area merely moves a source bitmap to a destination bitmap. That is, the pixels in a selected rectangular area of a destination bitmap are replaced by corresponding pixels in an identically-sized rectangular area of a source bitmap. Both bitmaps must be in display-addressable memory. In addition to simple replacement, the values moved to the destination can be either (1) a function of the source pixel values, or (2) a function of both source and destination pixel values. A Mask parameter may also be used to select some subset of the source. Finally, the user may specify one or more Clipping Rectangles to further alter the area affected by the operation. The seven parameters accepted by the copy area command are: o Source Image o Source Off set o Source Mask o Destination Image Bitmap o Destination Offset o Map o Clipping Rectangles These parameters are described in detail in the following sections. The formats of the parameters in the command packet are those shown in Section 4.1 above. Complete packets are pictured in Section 6. 4.2.2.1 SOURCE IMAGE - The source image parameter specifies a bitmap whose pixel values are used to update the destination. The source image can be specified in three ways. 1. First, the source parameter can be a single constant value that is used to replace all pixels in the destination. This would be used, for example, to set the entire destination to a single value (color or shade). 2. Second, the source can be specified as a bitmap in display-addressable memory. If the source and destination bitmaps overlop, the copy operation sequences through the pixels so that source pixels are not modified before they are used to update the destination. /' ·workstation Graphics Architecture - PRELIMINARY 3. 4.2.2.2 Page 22 Third, the source can specify a halftone to be used to tile the destination as specified by the remaining parameters. A halftone is represeted as a bitmap. The bitmap is conceptually replicated horizontally and vertically as needed to fill the destination. SOURCE OFFSET - The source offset parameter consists of a point (two 16-bit signed values) specifying where the source mask parameter, described below, is to be placed relative to the source. 4.2.2.3 SOURCE MASK - The source mask parameter defines a bounded subset of the source to be used to modify destination pixels. That is, the source mask can restrict the set of source bitmap pixels used in the copy operation. Two mask formats are available, depending on how the source subset is to be determined. 1. First, the mask can select a rectangular subset of the source bitmap. Only a rectangle extent need be specified (its height and width), since the source offset parameter, described above, determines where the origin of the rectangle will be placed relative to the source. 2. Second, the mask can be specified as a bitmap of zero and one values. This is the most general form, in which the one-valued elements of the bitmap select an arbitrary set of pixels from the source to be used in the operation. That is, the mask bitmap is used as a template. Once again, the source off set determines how the mask is to be placed relative to the source bitmap. The mask is specified as a sub-bitmap, as defined in the previous section . .Either source mask format can be selected with any of the possible source image parameters. For example, selection of a rectangle mask with a constant or halftone source generates a rectangle filled with that color or halftone for use as the source. The copy area command can thus be used as a simple rectangle fill. More complex fill operations can be performed with the fill area command, to be described later. Page 23 workstation Graphics Architecture - PRELIMINARY 4.2.2.4 DESTINATION IMAGE BITMAP - The destination image is always a modified. 4.2.2.5 display-addressable bitmap to be DESTINATION OFFSET - The destination offset parameter determines the placement of source pixels in the destination bitmap. Refer to the Clipping Model: after the source image and mask have been processed, the Destination Offset is used to specify the origin of the result. The result is then placed on the destination bitmap. 4.2.2.6 MAP - A set of source pixel values can be mapped into a different set of destination pixel values by using a form of the map parameter. A map can have three forms: 1. Identity Map. No map is specified. directly replace the destination pixels. The source pixels 2. Source Table-Lookup Map. In this case, each source pixel is used as an index into a table of destination pixel values. To map the pixels in an N-plane bitmap to pixels in an M-plane bitmap, the table would have 2**N entries. Each of these entries is a 16-bit word, of which the least-significant M bits are defined. 'l Page 24 ~~rkstation Graphics Architecture - PRELIMINARY consider, for example, the case below~ T~e so~rce bitmap has two planes (Z = 2), and the destination bitmap has three planes (Z = 3). The source pixels may therefore have values o through 3, and the destination pixels may have values 0 through 7. In this example, then, t~e source ma~ wo~ld ~ave 2**2 = 4 locations, which contain the destination pixel values, stored in the least-significant 3 bits of each location. Get pixel from source SRC +------------+ +------------+ I 10000001111111 I 13333333333331 I 11111100000001-+ +------------+ I I Table look-up I 15 2 1 0 I +----------+-----+ I +->[0] 11 0 11 +----------+-----+ [l] IO 1 OI +----------+-----+ [2] 11 O OI +----------+-----+ [3] 11 1 11 Replace pixel in desti DST +------------+ +------------+ I +------------+ I I 15555552222221 I I I 777777777777 I I-+ 12222255555551-+ +------------+ (5) >---+ (2) (4) (7) +-- - -------+-----+ If the source z parameter (the number of bits/pixel) is equal to l, then the table may be included in the WGA command If the source z packet (2**1 = 2 16-bit word entries). parameter is greater than 1, then the lookup table will not fit in the packet, and must be referred to via a pointer to the table's base address. 3. Function Code. The map may be a function code which designates one of a number of logical operations to be performed on the destination, using the source and destination pixel values as operands. This form of map assumes that the pixels in both the source and destination planes have the same number of significant bits. Since only one word is needed to specify the function code value, it may be passed either directly (literal function code) or indirectly ( pointer to function code), even if the z parameters of the source and destination are > 1. N-plane-source / N-plane-destination operations are performed w~rkstation I I I I I I I I I I I I I I I I I· I I I I Page 25 Graphics Architecture - PRELIMINARY on corresponding values. bits between source and destination pixel The user may specify any 2-operand logical function by its "Boolean Characteristic Number". This number is generated as below: Consider a two-input truth table, where the source destination pixel values are the inputs, and the destination pixel value is the output. and new Source Pixel Value I Destination Pixel Value I I Output Pixel Value I I v v I I v 0 0 a 0 1 1 1 0 1 b --------+--- I I c d I +-----> abed Since there are two inputs, there are four possible combinations. The result of these combinations may be arranged, as shown above, into a four-bit number the Characteristic Number. This defines a logical mapping function to the display: Map Function Code Parameter: +---------------------+ lab c di +---------------------+ 15 3 2 1 0 The Characteristic Number is a 4-bit value, define a set of 16 functions: Function Code I and Logical Function ---------------+-----------------0 1 2 3 4 5 6 7 8 9 A 0 src AND dst src AND NOT dst src NOT src AND dst dst src XOR dst src OR dst NOT src AND NOT dst NOT src XOR dst NOT dst so it may Workstation Graphics Architecture - PRELIMINARY B c D E F src OR NOT dst NOT src NOT src OR dst NOT src OR NOT dst 1 Page 26 Page 27 workstation Graphics Architecture - PRELIMINARY Note that since these are "bitwise" operations, two N-bit pixels may also be operands to the same 16 functions. The selected function is applied to corresponding bits in the operands. Hence, the same Characteristic Number/Function Code may be used to describe an operation between any two operands, no matter what their size. E~ample: src +---------+ I 0 1 0 1 I +---------+ x x x x 0 0 0 0 R R R R +---------+ dst New dst I 1 o o 1 I To XOR between two 4-bit pi use function code 6: Source Pixel Value I Destination Pixel Value I I Output Pixel Value I I I v v I v +---------+ --------+--- +---------+ 0 0 1 I 1 1 0 0 I +---------+ 1 0 1 0 1 I I I I 0 1 1 0 I +-----> 0110 4.2.2.7 = 6 CLIPPING RECTANGLES - As shown in the Clipping Model, Copy Area operations are clipped to the boundaries of the destination bitmap. To clip the operation within the destination, one or more Clipping Rectangles may be used. A Clipping Rectangle specifies an area of the destination available for modification. A Clipping Rectangle is defined by an Offset (relative to the origin of the Destination Bitmap) and an Extent. The union of all of the Clipping rectangles Provides a boundary defining the area of the destination that can be modified. The clipping rectangles should not overlap. A single Clipping Rectangle may be given directly in a command packet. If more than one is required, a List of Clipping Rectangles must be specified. Workstation Graphics Architecture - PRELIMINARY 4.2.3 Page 28 Draw Curve Command - The Draw Curve command is used to paint a source bitmap along a Path defined by a given sequence of points. The path between any two points may be either straight or curved. The Draw Curve command uses the same parameters as the Copy Area command, and has additional parameters to specify the path and pattern string. The command proceeds as follows. First, the source is determined by the Source Bitmap, Source Mask, and Source Offset. Second, this source image is painted through the curve by successively moving its origin through the sequence of points within the Destination Bitmap as determined by the Path parameter. The source is combined with the destination as specified by the Map. The parameters to the Draw Curve command are: o Source Image o Source Off set o Source Mask o Destination Image Bitmap o Destination Offset o Map. o Clipping Rectangles o Path o Pattern String o Pattern Multiplier o Pattern State o Secondary Source o Secondary Source Offset Specification of the first seven parameters is identical to the copy area command. The next sections describe the curve-specific parameters. Page 29 Workstation Graphics Architecture - PRELIMINARY 4.2.3.1 PATH - A path is specified as a list of segments. Each path segment is described by its ending point and a Flag Word. The starting point is the end of the previous segment. The format of a path element (point) is: 0 15 +---------------+ I X offset I Y offset I +---------------+ +---------------+ FLAGS +---------------+ The Flag Word describes the characteristics contains the following indicator bits: 1. Bit 0 - the Offset-Relative I of that Path-Relative segment, bit, and indicates how the ending point coordinates are to be interpreted. If bit 0 is clear (Offset-Relative mode), this point is interpreted as a point relative to the Destination Offset parameter specified above. If bit 0 is set (Path-Relative mode), this point is interpreted relative to the end of the previous segment in the list. 2. Bit 1 - the Draw I Move bit, indicates whether or not the segment should actually be drawn. If bit 1 is clear, the segment will be drawn. If bit 1 is set, the segment will not be drawn; the position is simply advanced to the next point. With this bit set (Move), several disconnected segments may be drawn with a single Draw Curve command. This bit would be set (Move), for example, to define the starting point of the first segment in a Path. Invisible segments can be also be used to provide additional information to the cubic spline algorithm. An invisible segment does not advance the pattern string, if one is specified. 3. Bit 2 - the Straight I Curved bit, indicates how the source should be moved from the starting to the ending point. If bit 2 is clear, a straight line is painted to the current point. If bit 2 is set, a curve is drawn using a cubic spline algorithm. For a curve to be drawn through a point, it must have a preceeding segment and succeeding segment to define the point's tangents. Then the curve will merge smoothly with the preceeding and following segments without abrupt bends. 4. Bit 3 - the Start Closed Figure bit, when set, indicates that this point is the first in a series of segments that def i nes a closed figure (i.e. circle, square, polygon). Page 30 workstation Graphics Architecture - PRELIMINARY 5. Bit 4 - the End Closed Figure bit, when set, indicates that this is the last point in the closed figure. The first and last points (that is, the start and end points) for a closed figure must be identical. 6. Bit 5 - the Draw Last Point bit, when set, indicates that the final point in the segment will be drawn. the endpoint will not be drawn. If bit 5 is clear, Therefore, by manipulating the bits in the Flag Word, The Path may consist of both straight-line segments and curved (cubic spline) segments. These segments may be drawn "brush up" or "brush down". Using this mechanism, additional points can be supplied before the first visible point and after the final visible point, to define a curve more accurately. When drawing ~ multi-segment path using a mapping function such as XOR, end-point-writing can be disabled for each segment so that its end-points are written only once. The flag word MUST be used to specify the starting point of closed figures. For example, a circle would be specified by the path: point point point point point point following and ending five-point 1: move to Pl, start closed figure 2: 3: 4: 5: draw curve draw curve draw curve draw curve to to to to P2 P3 P4 Pl, end closed figure A segment of length zero (i.e., same starting and ending point) causes a single point to be drawn. If the source image is specified as a halftone, the halftone pattern is always aligned to a fixed point (the Halftone Alignment Offset). This gives the effect of painting with a halftone. 4.2.3.2 PATTERN STRING - The Pattern String Parameter is used to draw dashed or patterned segments in the Path. As mentioned above, segments may be either "straight" or "curved". A dashed segment alternates between writing and not writing pieces of the segment based on the sequence of set and clear bits in the pattern string. Patterned segments require the specification of a secondary source parameter. A patterned segment alternates between the source and the secondary source based on the sequence of set and clear bits in the pattern string. This would be used, for example, to draw a line that alternates between two colors. Page 31 Workstation Graphics Architecture - PRELIMINARY The Pattern String parameter is a 16-bit word which contains the The pattern may be 0 to 16 bits long. The Least drawing pattern. Significant Bit is used first, and the pattern rotates to the right, wrapping around as needed. The pattern is only applied to segments that have the Draw flag bit set as described above; invisible (Draw flag clear} segments do not advance the pattern. A Pattern String of length 0 draws a solid segment (as though there were no pattern). The Draw Curve command causes an iterated copy area of the source to each pixel in the destination between segment endpoints. The Pattern String specifies how or whether the destination is to be modified at each pixel. A command modifier bit determines the mode in which the pattern string parameter will be used. The two modes are: 1. Single Source Mode - In this mode, a set bit in the pattern causes the source to be copied to the current destination pixel along the curve path, and a cleared bit causes the destination pixel to be skipped. This format lets the existing background "show through" the spaces in the pattern. The result is called a Dashed Line. 2. Alternate Source Mode - In this mode, a set bit in the pattern causes the source to be copied to the current destination pixel along the curve path, and a cleared bit causes a different source to be copied to the destination. This Secondary Source is passed in the alternate source Patterned Line. mode is used. The command result packet when is called a Thus, Single Source mode alternates between writing and not writing of a single source. Alternate Source Mode alternates between the writing of two different sources. 4.2.3.3 PATTERN MULTIPLIER - The Pattern Multiplier parameter specifies the number of times each bit in the Pattern String should be repeated before moving on to the next bit. For example, if the Pattern String is '10' and the Pattern Multiplier is 3, the pattern '111000' will be used to generate the patterned curves and lines in the draw command. 4.2.3~4 PATTERN STATE - The Pattern State parameter allows a draw curve command to continue at the P attern String position at which a previous draw cu r ve comple~ed. In this way, Pattern Strings can be used across multiple Draw Curve commands. workstation Graphics Architecture - PRELIMINARY Page 32 The Pattern State consists of two 16-bit words, the Pattern Position and Pattern Count. Pattern Position specifies the starting bit within the pattern string, and must be less than the size of the string (that is, it runs from zero to length-1). Pattern Count specifies the starting count to be used for that bit on its first use, and must be less than or equal to the pattern multiplier (that is, it runs from one to the multiplier count). The Pattern State parameter can be updated by the display following the completion of a Draw Curve command to indicate where in the Pattern String the next Draw Curve command should begin. The Pattern State can be specified as a literal in the command packet or as the address of the two-word parameter to be updated. If a Pattern State is specified in the Draw Curve command, scanning of the Pattern String begins at the specified Pattern Position. The specified starting bit is then repeated PATTERN MULTIPLIER PATTERN COUNT times. The scan then continues at the following bit, with each bit used PATTERN MULTIPLIER times. 4.2.3.5 SECONDARY SOURCE - In alternate source mode, the secondary source parameter specifies the source that will be copied to the destination whenever a zero bit in the pattern string is encountered. The secondary source can be specified as any of the formats allowed for a source in the copy area command. 4.2.3.6 SECONDARY SOURCE OFFSET - The secondary source offset specifies how the source mask will be applied to the secondary source, when the secondary source is selected in pattern string alternate source mode. workstation Graphics Architecture - PRELIMINARY 4.2.4 Page 33 Print Text Command - The Print Text command is the basic character string output operation for the Workstation Graphics Architecture. The command scans along a given text string, looking up the character indexes in a user-defined font. The selected character cells are written horizontally, one after the other, in the destination bitmap. For special formatting of output strings, such as horizontal and vertical adjustments (e.g. subscripts), an optional control string may be included. To support simple string justification, the user may set the spacing between character cells by specifying a fixed inter-character pad. The width of the space character may be adjusted by specifying a fixed additional space pad. The Print Text command is an extension of the basic Copy Area. The text string is used to select bitmap cells in the font that become the source parameters to the copy operations. The images of the characters or symbols in a font are stored in a bitmap. This bitmap, plus some other indexing information, forms the WGA font data structure. The font is specified as the address of such a data structure in display-addressable memory, and may be used either as a bitmap source image or as a bitmap mask. The parameters to Print Text are: o Source Image o Mask Font o Destination Image Bitmap o Initial Destination Offset o Map o Clipping Rectangles o Text String o Control String o Inter-character Pad o Space Pad The sections below describe the parameters in more detail. workstation Graphics Architecture - PRELIMINARY 4.2.4.1 Page 34 SOURCE IMAGE - The source image may be specified in one of three ways: 1. First, it can be the address of a font data structure, as defined below. The character cells in the font bitmap are copied directly to the destination bitmap, with no mask involved. The pixel values copied may, however, be modified with a mapping function. 2. Second, the source image can be a constant pixel value. This value is used as the writing color for characters whose symbols are defined by a mask font. 3. Third, the source image can be a halftone. The halftone is used as the writing color for characters whose symbols are defined by a mask font. 4.2.4.2 MASK FONT - - The mask font parameter is the address of a one-bit-per-pixel font data structure that defines the symbol shapes of the characters in the font. The mask font is used in conjunction with a constant or halftone source to define the shape and writing color of the characters in the text string. 4.2.4.2.1 FONT DATA STRUCTURE - - The font parameter is specified as the address of a font data structure in display-addressable memory. This structure has three parts: o The Header o The Image Bitmap o The Leftarray [optional] The Header contains central information about the font, the Bitmap contains the character images, and the Leftarray is a table of offsets used to find the character cells in the Bitmap. The Font parameter in the command packet is the base address of the Header. All "pointers" in the Header, e.g. the LEFTARRAY pointer and the pointer in the BITMAP specification, are byte offsets relative to this address. So to compute the base address of the Leftarray, for example, one must add the Leftarray pointer (offset) to the Font parameter (Header address). In normal usage the data structure is contiguous. L Page 35 workstation Graphics Architecture - PRELIMINARY 4.2.4.2.1.1 Header Format bitmap FONT BITMAP. Specification containing the character images Value<l5:0> FIRSTCHAR. font. Value<l5:0> LASTCHAR. The last valid character index in the font. Any character not within the range (FIRSTCHAR to LASTCHAR) inclusive is an error. The display terminates processing and reports the error to the host. Address<31:0> LEFTARRAY. A pointer to an array of 16-bit elements. There is one element for each character in the font between FIRSTCHAR and LASTCHAR. Each element contains the X offset (see Offset in Dis~lay Vocabulary) of the left edge of a character cell in the bitmap. If the WIDTH parameter is non-zero, then all cells have the same width, no Leftarray is needed, and this pointer need not be defined. Value<l5:0> BASELINE. The Y offset of the character baseline from the top of the character cells (since origin is upper left). Value<l5:0> SPACE. The index of the space character font (32 decimal for ASCII fonts). Value<l5:0> WIDTH. If all characters in a font have the same width (a fixed-width font), then this parameter specifies that width (in pixels), and no Leftarray is needed. For variable-width fonts (ones with a Leftarray), this parameter must be zero. 4.2.4.2.1.2 of the Bitmap<79:0> The first valid character index in the in the The Bitmap - The actual character images are stored in "strike" format; that is, all the character images are concatenated to form a horizontal bitmap strip. The first character is on the left and the last is on the right. The characters are aligned so that they have a common baseline. The height of the bitmap extends (at a minimum) from the bottom of the lowest descender to the top of the tallest character. There is no restriction on the height of a font, or the width of the characters within it, save for certain practical restrictions such as memory address space. Each character in the font is represented in the bitmap; absent characters have images of zero width. Ii workstation Graphics Architecture - PRELIMINARY 4.2.4.2.1.3 Page 36 The Leftarray - Each character in a variable-width font is indexed through the Leftarray. If the WIDTH parameter is non-zero, this array is not needed. The following symbols are defined for the figure and explanation below: F = The index of the first defined character in the font. L = The index of the last defined character in the font. R = L - F, The range of defined characters in the font. N = index - F, The "normalized" index of the character. When a character index is fetched from the text string, it is "normalized" to N, which is in the range 0 to R. Note that there are therefore R+l characters in the font. And the Leftarray has R+2 elements. is Now the off set of the left edge of character N (xl in the figure) found in the N'th element of Leftarray, and the left edge of the next character ( x2 in the figure) is found in the next element. Subtracting these two numbers gives the width (in pixels) of the character N. All of the characters have the same height - the height of the Bitmap. Note the case for the last character in the font. There are no characters following it, but there is a location in Leftarray containing the proper 'left edge' so that the last character's width may be correctly computed as before. Page 37 workstation Graphics Architecture - PRELIMINARY ACCESSING CHARACTER CELLS IN A VARIABLE-WIDTH WGA FONT Font Bitmap containing the character cells x -------------------------------------------------> <---------- x3 --------------------------------------------> <---------- x2 -----------------------> <---------- xl -------------> <---------- +--------------------------+---------+---------------------+-----+ !Cell I !For I ICharacter I I !Index I I l"N" I +--------------------------+---------+---------------------+-----+ +--> I I I I I I I I I I +---(FONT + BITMAP PTR) +-----------------+ (FONT + LEFT PTR)-------+ I I I I I Font Data Structure I Header I 15 o I +---------------+ FONT -->I BITMAP PTR (LO) I +---------------+ +-----------------------+ Leftarray 15 +---- - ----------+ I I I BITMAP PTR (HI) I +---------------+ x +---------------+ +---------------+ z +------~--------+ FIRSTCHAR +---------------+ LASTCHAR +---------------+ I LEFT PTR {LO) I +---------------+ I LEFT PTR (HI) I +---------------+ BASELINE +---------------+ I SPACE I WIDTH +---------------+ I +---------------+ 0 I +---------------+ +--> [ 0 ] I +---------------+ [N] xl I---+ I I I I I +---------------+ I [N+l] x2 1-------+ +---------------+ I I I I I I I I I I I I +---------------+ x3 1-----------+ +---------------+ [R+l] X +---------------+ [R] Page 38 workstation Graphics Architecture - PRELIMINARY A font may be used in two ways to specify the First, a font may be used as a source image. character images. In this case, each rectangular character cell is copied to the destination. The cell contains both the character image and a background. A map parameter can be used to transform the pixel values for the image and background. Multiplaned systems can use a source image font to contain anti-aliased characters (characters with grey scale). Second, the font may be used as a source mask, or, mask font. A mask font is always one bit per pixel, independent of the number of bits per pixel in the destination bitmap. The cells of the mask font simply define the shapes of the characters. When a mask font is used, the source image parameter specifies the writing color. The source image can be either a constant or a halftone. When characters are output using a mask font, only the character shapes themselves are written, that is, there is no background rectangle for the characters. Mask fonts thus allow for writing of characters over other images without obliterating the underlying rectangular area, or for writing overstruck characters. They also provide a storage-efficient mechanism for writing halftone or single-colored characters. 4.2.4.3 DESTINATION IMAGE BITMAP - The destination image bitmap is identical to bitmap specified in the copy area command. 4.2.4.4 the destination image INITIAL DESTINATION OFFSET - The Initial Destination Offset is a point in the destination image bitmap where character writing begins. It is the same as the Destination Offset mentioned in the Clipping Model, but may be used in one of four modes. There are two modifier bits associated with the Initial Destination Offset, named Update and Indirection, respectively. They work as follows: Initial Destinat i on Offset Modifier Bits U = Update, I = Indirection U I I I mode ---+---+----------0 0 l 1 0 1 1 0 literal indirect update literal update i ndirect 1. literal The (x,y) offset 1s used as given in the WGA command packet. The updated offset is not saved when the command is finished. Page 39 workstation Graphics Architecture - PRELIMINARY 2. indirect The (x,y) offset is stored in a 2 word block pointed to by an address given in the WGA command packet. The offset in the block will not be updated when the command is finished. 3. update literal The (x,y) offset is used as given in the WGA command packet. The updated offset is saved by storing it back in the WGA com packet. An offset saved in this way may be referenced by re-u the same WGA packet. This is the case in single-character ech (see below). 4. update indirect The (x,y) offset is stored in a 2 word block pointed to by an address given in the WGA command packet. The updated offset w be saved by writing it back to this same block. The address p in the WGA packet will remain unchanged. (Note: For efficient echoing of keyboard input characters, a print text command packet specifying a single character string can be cached in display local memory. This packet will specify the address of a single character buffer (in host memory) and the address of the initial x-y destination offset (also in host memory). The host need only load the character and issue the print text command, assuming that the x-y position is maintained by the display as indicated above. Storing the packet in display memory saves the time required to copy the command over the host/device interface.) 4.2.4.5 MAP - This command. parameter is specified as in the copy 4.2.4.6 CLIPPING RECTANGLES - The clipping rectangles to the clipping rectangles in the copy area command. are area identical 4.2.4.7 TEXT STRING - The text string is a list of 8-bit or 16-bit character indices. The size of the characters is determined by an opcode modifier. 4.2.4.8 CONTROL STRING - The control string is a list of 16-bit words that specify how the text string is to be output. Normally, characters are written on a single horizontal line with the spacing determined by the width of each character as stored in the font. However, the control string provides a series of commands that allow for x-y position adjustment as well as text string character skipping. ~ach control string consists of a 16-bit opcode follpwed two 16-bit operands. by zero The control commands are defined as follows: to Page 40 workstation Graphics Architecture - PRELIMINARY 1. OUT(N) (opcode=O) outputs the next N characters of string, where N is the single operand. 2. OUTALL (opcode=l) outputs all text string. 3. SKIP(N) (opcode=2) skips the next N characters string, where N is the single operand. 4. ADJUST(X,Y) (opcode=3) adjusts the current character position by X and Y, where X and Y are signed horizontal and vertical adjustments specified in pixels, where X and Y are the two operands. remaining characters of the text of the the text If the text string is exhausted before the control string, processing of the control string continues with the following interpretation: (1) any ADJUST commands are obeyed, (2) any OUTALL commands are ignored, and (3) any SKIP(N) or OUT(N) commands with N > 0 cause termination of the command with error status. If the control string is exhausted before the text string, the command terminates successfully at that point. 4.2.4.9 INTER-CHARACTER PAD - The inter-character pad parameter is a constant value specifying the number of pixels to be added to the current destination offset following each character printed (including the last character in the text string). 4.2.4.10 SPACE PAD - The space pad parameter is a constant value specifying the number of pixels to be added to the current destination offset following each space character printed. workstation Graphics Architecture - PRELIMINARY 4.2.5 Page 41 Fill Area Command - The fill area command is used to construct a source consisting of one or more closed shapes, where each of the closed shapes is filled with a single color or halftone value. The generated source image is copied to the specified location in a destination bitmap. For example, fill can be used to place a circle filled with a single color or shade within a destination bitmap. The fill command is used when the boundary or boundaries of the area to be filled are known and can be defined by a list of straight or curved segments. The flood area command, on the other hand, is used when the boundary is not completely known, but the user can specify one internal point of the closed area. The source parameter specifies the pixel value or halftone to be used to fill the bounded area or areas. A path list, specified as in the draw curve command, specifies the boundaries of the areas to be filled. The path list defines the bounded areas within the specified destination bitmap. Thus, this command causes one or more areas of a destination bitmap to be filled with one or more similarly-colored shapes. At most one clipping rectangle can be used with fill area. The parameters to the fill area command are: o Source Image o Destination Image Bitmap o Destination Offset o Map o Clipping Rectangle o Path The parameters are described as follows: 4.2.5.1 SOURCE IMAGE - The source image specifies the constant pixel value or halftone with which the closed area specified by the path parameter will be filled. The constant or halftone is specified as in the copy area command. Bitmap source image is not allowed. Page 42 workstation Graphics Architecture - PRELIMINARY 4.2.5.2 DESTINATION IMAGE BITMAP - The destination image bitmap is identical to the destination image bitmap in the copy area command. It specifies the bitmap in which the filled shape will be placed. 4.2.5.3 DESTINATION OFFSET - The destination offset is identical to the destination offset in the copy area command, and specifies the placement of the filled image in the destination. 4.2.5.4 MAP - The Map parameter is identical to the map in the copy area command. 4.2.5.5 CLIPPING RECTANGLE - The clipping rectangle parameter for the fill area command specifies a single clipping rectangle to constrain the fill operation. If no clipping rectangle is supplied, the operation is size of the destination bitmap. 4.2.5.6 constrained by the within the PATH - The path specifies one or more closed areas to be filled destination bitmap by the pixel values specified by the source parameter. A path is specified as a list of segments. The segments are described by a path list specified exactly as in the draw curve command. Each segment of the path can be a straight or curved line. Multiple disjoint closed areas are generated through use of the move flag bit. If the path describes an open figure, the results are unpredictable, but the operation will always be confined to the given bounding box (either the clipping rectangle or the destination bitmap border). Workstation Graphics Architecture - PRELIMINARY 4.2.6 Page 43 Flood Area Command - The flood area command is used to fill bounded areas of a destination with a single color (pixel value) or halftone pattern. Moreover, the flood command is similar to copy area with two particular differences: (1) the source pixels are not mapped, but are copied directly, and (2) the destination pixels that are modified are determined by a flood algorithm, and lie within a closed area bounded by one or more pixel values. In more detail, the flood algorithm proceeds in several steps. First, the algorithm determines the area of the destination to be flooded; that is, it locates the inside and outside portion of the closed area. Moreover, the algorithm builds a binary mask which when applied to the destination, will select those pixels on the inside of the flooded area. The determination of the bounded area requires two parameters: a seed point and a map. The seed specifies a single pixel within the destination; this point is known to be within the bounded area. The boundary map is a table of zeros and ones, used to determine whether points are internal or boundary points. The algorithm searches every pixel adjacent to the seed pixel. The value of each pixel is mapped through the boundary map table. If the mapped value of the pixel is zero, then this point is an inside point, otherwise it is a boundary point. If an inside point is found, the algorithm continues to examine all of its neighbors. Processing continues until the neighbors of all internal points have been examined. If the seed point is found to lie on a boundary, the algorithm terminates immediately. Once the boundary has been determined, the inside area is flooded with the source. The parameters to flood area are: o Source Image o Destination Image Bitmap o Seed Point o Clipping Rectangle o Boundary Map The parameters are described in more detail in the following sections. 4.2.6.1 SOURCE IMAGE - The source image can be specified in two of the three formats available for the copy area command. For flooding, the source will be either (1) a constant, flooding the bounded area with a single color, or (2) a halftone, flooding the area with a halftone pattern. Page 44 Workstation Graphics Architecture - PRELIMINARY 4.2.6.2 DESTINATION IMAGE BITMAP - The destination image bitmap is the bitmap containing the image to flooded. 4.2.6.3 be SEED POINT - The seed point specifies the coordinates of a single point in the destination bitmap that lies within the internal region to be flooded. 4.2.6.4 CLIPPING RECTANGLE - The clipping rectangle parameter for the flood area command specifies a single clipping rectangle to constrain the flood operation. If no clipping rectangle is supplied, the operation is size of the destination image bitmap. 4.2.6.5 constrained by the BOUNDARY MAP - The Boundary Map tells the command which pixels of the closed figure in the destination bitmap are internal (to be flooded) and which are on the boundary (to be left alone). The Boundary Map parameter is a table whose one-bit elements are indexed by the pixel values in the destination. If the element is set, the corresponding pixel value is an external point, and if the element is clear, the pixel value is an internal point. Note that unlike the previous commands, the Flood Area command map used to map pixels in the destination. is For an N-bit-per-pixel destination bitmap, 2**N pixel values are possible, and so a table with 2**N entries is needed. However, since each table entry contains either a zero (indicating an internal point) or a one (indicating a point on the boundary), only one bit is needed for each entry. If N is less than or equal to four, then the table only uses one word, and only 2N bits of it are defined. For example, in a system with 3 bits per pixel, the 8-bit boundary map 00101110 indicates that pixel values 1, 2, 3, and 5 are boundary values, while pixel values O, 4, 6, and 7 are interior values. If N is greater than four, however, more than one word i s needed. The least-significant four bits are used to select the proper bit within a word as before, and the remaining most-significant bits are used to select the proper word in the boundary map. Example: 6 bit-per-pixel destination bitmap pixel value = 35 (hex) workstation Graphics Architecture - PRELIMINARY -pixel value Page 45 boundary map 15 5 4 3 2 1 0 5 0 ..................... 0 . . . . . . . . . . . . . . .. . . . . . 1 +-----------+ 11 110 1 0 11 +-----------+ A ___ A _______ A bit offset .....................I 2 +------------------------------v word off set +----------+-+------+ +----------------------->I IOI I 3 +----------+-+------+ and pixel value 35 (hex) is an internal point. workstation Graphics Architecture - PRELIMINARY 4.3 Page 46 DISPLAY CURSOR COMMANDS The display cursor is a small image or icon that is automatically displayed on the screen at a point determined by the position of the default pointing device. The default pointing device is usually a mouse, but may also be a graphics tablet. The cursor is automatically moved by the display micro-processor to reflect movements of the default pointing device. The maximum size of the cursor icon is 64x64 pixels. The icon is cached by the display and modification of the icon bitmap in memory will not affect the im~ge on the screen. 4.3.1 Load Cursor Command - The load cursor command initializes the cursor to a new image. The image is specified by source image, source mask, and map parameters, as in the copy area command. The display device places the origin of the cursor rectangle at the current position of the pointing device. The command has the following parameters: o Cursor Source Image o Cursor Source Off set o Cursor Source Mask o Cursor Map o Cursor Attributes whose definition follows. 4.3.1.1 CURSOR SOURCE IMAGE - This cursor source image specifies the image of the cursor icon. parameter is specified as in the copy area command. 4.3.1.2 This CURSOR SOURCE OFFSET - This parameter is specified as in the copy area command. 4.3.1.3 CURSOR SOURCE MASK - This parameter is specified as in the copy area command, and generally defines the shape of the cursor icon. Page 47 workstation Graphics Architecture - PRELIMINARY 4.3.1.4 CURSOR MAP - This parameter is specified as in the copy area command. The map parameter defines how the cursor is added to the screen. If no map is specified, the pixel values specified by source and source mask are used to replace the pixels in the frame buffer at a destination determined by the cursor reference point. That is, the cursor image is written to the screen. Or, some systems may use a cursor that is XOR'ed or OR'ed onto the screen, in which case a full map would be specified. In any case, the screen state is not affected by the cursor; when the cursor is moved, the original pixel values in the area previously occupied by the cursor are restored. 4.3.1.5 CURSOR ATTRIBUTES - The cursor attributes parameter defines how the cursor The bits are defined as follows: ATTRIBUTES<O> is displayed. This bit specifies whether the cursor should blink or not. When set to 0, no blinking of the cursor occurs; when set to 1, the cursor is blinked at an implementation-defined interval. Workstation Graphics Architecture - PRELIMINARY 4.4 Page 48 DEVICE ORIENTED COMMANDS 4.4.1 Attach Cursor Command - At any point in time, the cursor may "track" the position and movements of a single pointing device connected to the display. The Attach Cursor command tells the display which device to use. If "No Device" is selected, the cursor is "disconnected" from all devices, but its position may still be changed with the "Set Cursor Position" command. The command has only one parameter: o 4.4.1.1 Device Type DEVICE TYPE - This specifies which device will control the movements of the The defined parameter values are: 0 = no device 1 = mouse 3 = tablet cursor. Page 49 Workstation Graphics Architecture - PRELIMINARY 4.4.2 Set Cursor Position Command - This command moves the cursor to the point specified by the parameter: o Location If the cursor is attached to the mouse, the mouse's position will also be set. The mouse only reports relative movement from a given point, and so its 'position' may be defined by the user. The tablet, however, reports an absolute position on the tablet surface, and this position may not be redefined by the user. Therefore, an error will occur if the user attempts to set the position of the cursor when it is attached to the graphics tablet. While the cursor may not be moved off the invisible by loading a zeroed mask bitmap. 4.4.2.1 screen, it can be made LOCATION - The Location parameter specifies an XY offset from the origin (upper-left-hand-corner) of the visible screen. The cursor's origin is aligned to this point. Cursor Movement Within the Visible Screen Area Maximum X Visible Screen ---+ I v +---------------------------------------+-------+ I I I I I I I I I I Cursor Position • Maximum Y ----->+ ...•..••••.•••••••••••••.•••.•.•..••••• o-------+ +---------------------------------------+-------+ I Cursor Image must be entirely visible If the Location is not within the 4ectangle bounded by Maximum X and Maximum Y, the Location will be clipped to the rectangle's boundaries, such that the entire cursor is on the screen. Page 50 workstation Graphics Architecture - PRELIMINARY 4.4.3 Get Cursor Position Command - This command requests the current position of the cursor. The cursor position is returned in a two-word field in the command packet. There are no input parameters; however, the command two-word field in addition to the header. 4.4.4 packet contains a Get Mouse Position Command - This command requests the current position of the mouse. is returned in a two-word field in the command packet. The position There are no input parameters; however, the command packet contains a two-word field in addition to the header. Normally, the reported position will be identical to that accumulated by the device as it moves about its origin point. However, if the mouse is attached to the cursor (via the "Attach Cursor" command), then the position reported will conform to the position of the cursor (and thus will be constrained to the boundaries of the visible screen, etc.). 4.4.5 Set Mouse Characteristics Command - This command is used to specify how the cursor tracks mouse movement when the cursor is attached to the mouse. The mouse has no absolute position; its position is reported as relative movements from a given point. The mouse reports CHANGE in position as it moves. Hence, the mouse position is updated by adding the accumulated change on to the current position. Of course, the change could be positive or negative. It is frequently useful to "scale" this accumulated change in order to alter the mouse's "action" or "responsiveness". The WGA has two scaling algorithms from which to choose. This incremental movement may be scaled in one of two ways: Linearly or Exponentially. A command modifier is used to select which one will be used. The parameters to Set Mouse Characteristics are either: o Tracking Ratio o o Threshold Scale Factor or: Page 51 workstation Graphics Architecture - PRELIMINARY 4.4.5.1 TRACKING RATIO - The tracking ratio specifies the distance relationship between device movement and cursor movement on the screen. It consists of two 16-bit integers, a multiplier and a divisor. Each unit of device movement corresponds to cursor movement = (device_movement*multiplier)/divisor units of movement on the screen. linearly. 4.4.5.2 Thus, the cursor tracks the device THRESHOLD And SCALE FACTOR - When an exponentially tracking (accelerating) cursor is selected, tracking is linear (with a Tracking Ratio of 1:1) up until the Threshold is reached. When the incremental mouse movement exceeds the threshold, the move is scaled by the Scale Factor. For example: Threshold = 2 Scale Factor = 3 Mouse Movement -5 -4 -3 -2 4.4.6 Resulting Cursor Movement -11 -8 -5 -2 -1 -1 0 1 2 3 4 0 1 2 5 8 Set Tablet Characteristics Command - This command is used to specify how cursor tracking is handled when the cursor is attached to the tablet. The tablet reports an absolute position which is scaled/modified by the Tracking Ratio or Quantization Ratio. As with the Set Mouse Characteristics command, the scaling algorithm is selected by a command modifier. Since the tablet always reports absolute positions (which correspond to well-defined locations on the tablet surface), exponential mapping is not defined. The parameters to Set Tablet Characteristics are either: o 11 Tracking Ratio Page 52 Workstation Graphics Architecture - PRELIMINARY or: o Quantization Ratio 4.4.6.1 TRACKING RATIO - This parameter specifies a linear scaling ratio as in Characteristics command. 4.4.6.2 the Set Mouse QUANTIZATION RATIO - This scaling algorithm divides, or quantizes, the surface of the tablet and display screen into rectangular cells. When the tablet pointer is moved from one "input cell" to another, the output position is moved to the corresponding "output cell". Movement within a cell is ignored: only when the ~ointing device moves from one cell to another is a position change reported to the host. There are two components in this Quantization Ratio: the Input Grid SPacing (I.GSP) and the Output Grid SPacing (0.GSP). The I.GSP specifies the cell size on the tablet surface, and the O.GSP specifies the cell size on the display surface. Each GSP parameter has X and Y components, so the user may specify different aspect ratios for the input and output. This is useful for "correcting" the geometrical differences between different devices. The position reported is the upper-left-hand cell: it is an Offset in Two-Space. corner of the output This scaling algorithm may be used to eliminate the output-coordinate "jitter" so common in high-resolution graphics tablets. It can also facilitate many graphical design applications. I.GSP = 3 X 5 O.GSP = 5 X 5 Example: Input Grid Spacing 0,0 3,0 6,0 +---+---+---+---+---+ Output Grid Spacing 0,0 5,0 10,0 +-----+-~---+-----+-----+-----+ I 0,5 +---+---+---+---+---+ 0,10 +---+---+---+---+---+ I I 0,15 +---+---+---+---+---+ I 0,5 +-----+-----+-----+-----+-----+ I I I I I I I I I I 0,10 +-----+-----+-----+-----+-----+ I I I I +-----+-----+-----+-----+-----+ I I ; . 1 ,- ~ Page 53 wo rkstation Graphics Architecture - PRELIMINARY +---+---+---+---+---+ 4.4.7 +-----+-----+-----+-----+-----+ Get Tablet Position Command - This command requests the current position of the graphics tablet pointing device. The position is returned in a two-word field in the command packet. There are no input parameters; however, the command packet contains a two-word field in addition to the header. Normally, the reported position will be identical to that transmitted by the physical tablet device. However, if the tablet device is attached to the cursor (via the "Attach Cursor" command), then the position reported will conform to the position of the cursor (and thus will be constrained to the boundaries of the visible screen, etc.). Set Pointing Device Event Reporting - 4.4.8 If the host wants to be notified (via an interrupt) when one or more pointing devices moves, it may enable "event-reporting" for the desired devices. If event reporting is enabled, the display will interrupt the host at most once every l/60'th of a second for each device that has moved since the last interval. There is one parameter: o 4.4.8.1 Enable Flag ENABLE FLAG - The enable flag parameter enables or disables movement event reporting for pointing devices. The flag is bit-encoded by device. A cleared bit disables and a set bit enables event reporting for the corresponding device. This parameter is encoded as follows: All bits 0 = no device bit 0 set = mouse bit 2 set = tablet 4.5 MISCELLANEOUS COMMANDS Page 54 w6ikstation Graphics Architecture - PRELIMINARY 4.5.1 Move Object Command - The move object command is used to move arbitrary data from of the system to another. Some examples are: o o one part Loading fonts into display memory Sending control strings to the keyboard The sections of the system involved are: o o VAX and Display Memory Peripherals (Keyboard, USART ports, etc.) Parameters for the move object command are: o o o o Object Type Object Length Source Destination 4.5.1.l OBJECT TYPE - The object type parameter indicates what format the data is in and the source and destination types. Data Format Source Destination ------ ----------- 3 reserved data words character strings character strings memory memory peripheral memory peripheral memory 4.5.1.2 OBJECT LENGTH - Type ----------- 0 1 2 The object length parameter indicates object to be moved. 4.5.1.3 the length in bytes of SOURCE - Depends on object type: o Memory: o Peripheral: Address of word-aligned and word padded buff er Device type value the wo~kstation 4.5.1.4 Graphics Architecture - PRELIMINARY Page 55 DESTINATION - Depends on object type: o o 4.5.1.5 Memory: Address of word-aligned and word padded buffer Peripheral: Device type value ERRORS - Invalid Device Error: Reference to an invalid peripheral device type or an illegal operation for a specific device. 4 • 5 • 1. 6 4.5.1.6.1 NOTES - DEVICE TYPES - Device type values: 0 = no device 1 = mouse 2 = keyboard 3 = tablet 4 = USART - AUX 1 5 = USART - console 6,7 =reserved 4.5.1.6.2 BUFFERS - Buffers must be word-aligned and word padded. Padding might be needed because all buffer must be an even number of bytes long and an extra byte might be needed at the end of the buffer. (The VSlOO only supports word transfers.) 4.5.1.6.3 DATA FORMATS - Data formats that Move Object supports: Word Data Character String Workstation Graphics Architecture - PRELIMINARY 4.5.1.6.3.l Page 56 WORD DATA Format of Word Data Buff er Object Type 1 +== =============+ Word 0 0 Word 1 2 Word 2 4 +===============+ +===============+ <- - word data buffer address word data buffer length in bytes +===============+ 1\\\\\\\\\\\\\\\1 +===============+ Word n +===============+ n*2 Example of a ten word buffer: +===============+ Word 0 00 Word 1 02 Word 2 04 Word 3 06 Word 4 08 +===============+ +===============+ +===============+ +===============+ +===============+ Word 5 OA Word 6 oc Word 7 OE Word 8 10 Word 9 12 +===============+ +===============+ +===============+ +===============+ I +===============+ <-- buff er address buffer length = 14H (20 decimal .· · kstation Graphics Architecture - PRELIMINARY 4.5.1.6.3.2 Page 57 CHARACTER STRING Format of Character String Buffer Object Type 2 and 3 +===============+ I Char 11 Count I 0 <-- +===============+ I Char 31 Char 21 2 character buffer address character buff er length in bytes +===============+ Example of an odd number of characters: +===============+ I Char 11 3 I 0 <-- +===============+ character buffer address character buff er length = 4 I Char 31 Char 21 2 +===============+ Example of an even number of characters: +===============+ I Char 11 4 +===============+ 0 I Char 31 Char 21 2 +===============+ I f i 11 I Char 4 I 4 +===============+ <-- (padding) character buffer address character buff er length = 6 Wd'rkstat ion Graphics Architecture - PRELIMINARY Page 58 Sending Control Strings to the Keyboard from the Host Processor The WGA Move Object Command will be used to send keyboard control strings to the LK201 keyboard. With this support the host will be able to control the keyboard; for example: o o o o Enable/Disable keyclicks Ring the bell Set the volume of the bell Control the LEDs Example #1: Ring the bell (A7H). Move Object Parameters: Object Type = Object Length = Source = Destination = 2 (memory to peripheral) 2 (length of character buffer) Address of character buff er 2 (Keyboard) Character Buffer: +===============+ + A7 1 + 0 +===============+ Example #2: Enable the bell (23H) and set the bell volume to 4 (84H). Move Object Parameters: Object Type = Object Length = Source = Destination 2 (memory to peripheral) 4 (length of character buffer) Address of character buff er 2 (Keyboard) Character Buffer: +===============+ + 23 2 + 0 +===============+ o I 84 + 2 + +===============+ ~ ~ ~orkstation 4.5.2 Graphics Architecture - PRELIMINARY Page 59 Report Status Command - The Report Status command requests the return of information about the current status and configuration of the display processor. The information returned includes: o Device Type o Device Version o Micro-code Version o Visible Screen Frame Buffer Bitmap o Free Frame Buff er Memory and Byte Length o Free Program Memory Space Address and Byte Length o Host Memory Space Base Address and Byte Length All addresses are in the physical address space of the display microprocessor. The host uses the base addresses reported by this command to map addresses in its space to addresses in the display's space. The returned parameters are described in more detail below. 4.5.2.1 DEVICE TYPE - A 32-bit value that indicates the device connected. This parameter is encoded as follows: 31 24123 16115 type of 0 +-------------------------------------+ S2 Sl Option Number +-------------------------------------+ The low order word is a 16 bit binary option number and the high order two bytes are the option suffix encoded in ASCII (i.e. the "AA" in VS100-AA}. Note that the suffix is encoded in standard VAX-11 address order (an even address points to the low-order byte). Example: VS100-AB I binary I decimal I hexadecimal ------------+-----------+-----------+---------------------- Opt ion ASCII "A" ASCII "B" 0110 0100 0100 0001 0100 0010 100 65 66 Device type is: 42410064 Hex 64 41 42 Page 60 Graphics Architecture - PRELIMINARY 4.5.2.2 DEVICE VERSION - A 16-bit binary number indicating what changes have been made display hardware (the revision level). 4.5.2.3 to the FIRMWARE VERSION - Two (2) 8-bit binary values representing the major and minor version numbers of the firmware currently loaded in the display. Again, they are stored in standard address order. 15 0 817 +----------------------------------+ Minor Major +----------------------------------+ When the Report Status command is processed intialization, this field is returned as zero. the ROM during A bitmap specification indicating the address and size of buffer bitmap from which the visible screen is refreshed. the frame 4.5.2.4 4.5.2.5 by VISIBLE SCREEN FRAME BUFFER BITMAP - FREE FRAME BUFFER MEMORY - The base address and length of storage in the frame buff er memory not used by the visible screen. This memory is available for use by the host software. 4.5.2.6 FREE PROGRAM MEMORY SPACE - The base address of additional memory in the microprocessor's program/data space that is available for use by the host software. When the ROM-based report status command is executed during intialization (see below, section on initialization and initial display requirements), the base address of microprocessor program/data space is returned. This space could be used for storing frequently used data. The size of this space will likely be much smaller than the off-screen framebuf fer space. Graphics Architecture - PRELIMINARY 4.5.2.7 Page 61 HOST MEMORY SPACE BASE ADDRESS - The base address, in the display microprocessor's space, of the memory space shared with the host. Host addresses passed to the display must be biased by this value. The display also returns this value to the host in CSRs during initialization. 4.5.3 No Operation Command - The no operation command simply causes the display to read the and respond with a command completion interrupt. There parameters. packet are no Page 62 workstation Graphics Architecture - PRELIMINARY 5.0 CONTROL AND STATUS REGISTERS The workstation graphics display communicates with the host via an interface that utilizes a set of control and status registers (CSRs). These CSRs are implemented as shared memory and not as hardware registers. Therefore, a strict protocol must be obeyed to avoid race conditions when using the CSRs. The CSRs and their programming are described in the following sections. 5.1 Control And Status Register (CSRO) The control and status register is the main control register transmitting commands to the display processor. Its format is: 15 6 5 1 0 for +---------------------------------------+ Reserved IIEIFUNCTIONIGOI +---------------------------------------+ CSRO Control and Status Register where the fields have the following uses: GO = CSRO<O> The GO bit is set by the host to indicate that the next command has been set up and the device should process the command. FUNCTION = CSR0<5:1> The function field is set by the host to indicate the display command to execute, i.e., this is the command opcode. Functions 0 through 15 are implementation-independent definitions and 16 through 31 are implementation-dependent. IE = CSR0<6> The interrupt enable bit, when set, allows the display to interrupt the host when a command is completed, a mouse event occurs, a keyboard event occurs, or an error occurs. There is only one interrupt vector; the host determines the event by scanning the interrupt reason flags. (Note: when the host initializes or reboots, it should clear IE until it is capable of receiving display interrupts.) Use of CSRO must follow a strict protocol. When GO is set to zero, the device is ready for a new command. Only the host can modify FUNCTION and GO when GO is zero. When GO is set, the device is processing a command. Only the device can modify FUNCTION once GO is set. At initialization, the device sets GO and FUNCTION to zero to indicate that it is ready for processing. Host can then load FUNCTION and set GO to perform an operation. donQ. The device will clear both when it is Page 63 workstation Graphics Architecture - PRELIMINARY 5.2 Interrupt Reason Register The interrupt reason register is written by the display to indicate the event causing an interrupt. Interrupt reasons are bit-encoded; each bit indicates a different condition. Bit 15 of the interrupt reason register is an error bit. If set, the low-order 15 bits contain a display error code. Errors that also have bit 14 set are diagnostic errors. The format of the Interrupt Reason Register is: 15 14 0 +---------------------------------------+ IE ID I INTERRUPT REASON +---------------------------------------+ CSRl Interrupt Reason Register Like CSRO, use of CSRl must be synchronized. When interrupt reason is zero, the device can complete a request. Only the device can write CSRl when it is set to zero. When interrupt reason is nonzero, the host has not yet examined an event and the display may not write to CSRl. After the host has processed an interrupt, it sets CSRl to zero. The device can then write the interrupt reason for the next event. 5.3 Device Event Register The Device Event Register indicates events on keyboard or pointing device buttons attached to the display. The events are generally reported as up or down transitions on numbered keys. The format of the Device Event Register is: 15 13 12 9 8 7 0 +-------------------------------------+ I Reserved I DEV I T I KEYCODE +-------------------------------------+ CSR2 Keyboard Receive Register where: KEYCODE=CSR2<7:0> This field is written by the display to indicate on which key a transition has occurred. The key codes are integers from 0 to 255. The meaning of these codes depends on the particular device involved. T=CSR2<8> The transition indicator specifies whether an up transition (T=O) or a down transition (T=l) has occurred. Not all of the button-event devi c es connected to the display may operate in exactly the same fashion, though. Some keys on the keyboard, for example, may only report down-transitions, while the buttons on the mouse Page 64 workstation Graphics Architecture - PRELIMINARY report both up and down transitions. The user should refer to device-specific documentation for the particulars. DEV=CSR2<12:9> The device field specifies the device responsible for generating the event. This field is encoded as follows: 0 = no device 1 = mouse 2 keyboard 3 = tablet 4 = USART - AUX #1 5 = USART - console 5.4 Function Parameter Register The function parameter register consists of two 16-bit CSRs, CSR3 and CSR4. This 32-bit register pair is loaded with the address of a packet to be transmitted to the display. When a command packet (or list of linked commands) is completed (or aborted), the number of packets successfully completed is written into this register pair. During initialization, the device writes in CSR3/CSR4 the location at which host memory is mapped within its local address space. The host must then offset all host memory addresses by this amount when communicating with the display. 15 0 +---------------------------------------+ PACKET (LOW ADDRESS) +---------------------------------------+ CSR3 CSR4 PACKET (HIGH ADDRESS) +---------------------------------------+ Function Parameter Register 5.5 Device Position Register The Device Position Register contains the current position of the device whose movement generated the most recent interrupt. If the device is attached to the cursor, the interrupt reason will be "Cursor Moved"; the device position will be the same as the cursor position. If the device is not attached to the cursor, then the interrupt will indicate on: movement of that particular device. See al3o the sections Page 65 workstation Graphics Architecture - PRELIMINARY Interrupt Reason Register Set Cur~or Position Get Cursor Position Get Mouse Position Get Tablet Position Set Pointing Device Event Reporting The format of the Device Position Register is: 15 0 +---------------------------------------+ I XPOS I +---------------------------------------+ YPOS I +---------------------------------------+ CSR5 CSR6 Current Device Position The Device Position Register should only be examined immediately following a device event interrupt. These interrupts will occur at most once every l/60'th of a second. The display will update the Device Position Register prior to interrupting. Because the update requires two non-interlocked 16-bit writes, it would be possible for the host to read a new XPOS with an old YPOS if the registers were read at random times. Therefore, when servicing a device interrupt, the host should copy the device position to a local storage area. 5.6 Interrupt Vector Address Register The Interrupt Vector Address Register is set by the host to the address of an entry in the UNIBUS interrupt vector block which contains the PC and PSL of the device interrupt service routine. When the device wants to interrupt the host, these values are used to invoke interrupt servicing. 0 15 CSR7 +---------------------------------------+ Interrupt Vector Address +---------------------------------------+ 5.7 Initialization And Initial Display Requirements The workstation graphics display must contain a ROM with code capable . of processing a minimum of five immediate commands; that is, five function codes that can be loaded into the function field of CSRO. These commands are: 1. INIT (FUNCTION 1). The INIT conunand causes the display micro-processor, if currently in operation, to halt execution and re-enter the initial ROM routine. An identical function Page 66 workstation Graphics Architecture - PRELIMINARY is performed on power-up of the display module. When the ROM is entered, it automatically stores the location at which host memory is mapped within the microprocessor's address space in the Function Parameter Registers, CSR3 and CSR4. When the host communicates a host memory address to the display, it must first add this value to the host address. This initial address is thus required by the host in order to transmit any host-mapped command packets to the display. 2. SEND PACKET (FUNCTION=2). The SEND PACKET command causes the display to read and process a command packet; the address of the command packet is loaded by the host into the Function Parameter Registers, CSR3 and CSR4, prior to setting FUNCTION CSRO . 3. START DISPLAY (FUNCTION=3). The START DISPLAY command starts execution of the display micro-processor at the address specified in the Function Parameter Register (CSR3/CSR4). The start display command is executed during initialization to begin execution of display microcode. It causes the initial display ROM to invoke the firmware at the specified address. Start display is an immediate function and not a message. It is executed by loading the start display opcode into the CSRO function field and setting the GO bit. The firmware responds with the "Started Executing" interrupt reason. The firmware start address is contained in the Function Parameter Register pair. 4. ABORT (FUNCTION=4). The ABORT function code stops any command being executed by the display. The display responds with the "command aborted" interrupt reason, and returns the number of successfully completed command packets in the Function Parameter Register. 5. EXECUTE POWER UP SEQUENCE (FUNCTION=5). This function causes -the display to branch to its power-up sequence. is a more "drastic" initialization than INIT. implementations may, for example, go in to a "self-test" here. code This Some mode In addition, the initial display code must be capable of reading and processing two command packet opcodes as transmitted by a send packet request. These commands are: 1. Report Status returns information about the status and addressing environment to the host, 2. Move Object allows down-line loading micro-processor code into display local memory. of display's display Workstation Graphics Architecture - PRELIMINARY 5.8 Page 67 Aborting A Request Since some commands can take seconds or minutes to complete and commands can be linked together, it must be possible to abort the current command sequence. To abort an operation, the host loads the ABORT function code into the CSRO function field. Note that this violates the rules for access to CSRO. It is possible that after the ABORT is written and before the function field is examined by the device, the command will complete and the device will write a zero in the CSRO function code. Therefore, when processing an abort, the host driver must be capable of accepting two interrupt reasons: aborted and command completion. The driver must also be able to ignore an aborted interrupt reason when no command is in progress. Workstation Graphics Architecture - PRELIMINARY 6.0 Page 68 COMMAND PACKET FORMATS This section describes the formats of the display command packets. Each command packet has two parts, a header and a command message. The header format is common among all commands and has the following format: 8 7 15 0 +---------------+ I qual. I opcode! O +---------------+ I modi f i er s I 2 modifiers 4 link I 6 link 8 +---------------+ +- ---------- ----+ +---------------+ +---------------+ The opcode is an 8-bit value. Associated with the opcode is an 8-bit qualifiers field that contains command-independent qualifiers. In addition, many of the commands have command-dependent options in the specification of one or more parameters in the packet. For each parameter with specification options, the 32-bit opcode modifiers field indicates which option was chosen for that command. Although different options for a single parameter may require different size specifications, all packets for each opcode are of fixed size. Space is left in the packet for the largest size of each parameter offering several options. Thus, for each opcode, each parameter always starts at the same offset from the top of the packet, independent of the specification options chosen for the parameters. The single command-independent qualifier currently defined is the Wait For Refresh qualifier, specified by bit zero of the 8-bit qualifiers field. If this bit is set to 1, the packet is processed as normal; however, physical screen operations are syncronized with the vertical blanking interrupt. The link field is the 32-bit address of the next packet to be processed, if any. By linking packets, the host can initiate several commands with a single interaction. A zero value in the link field terminates the list. If any error occurs, the list is aborted at the point of error. The device returns the count of the number of packets successfully processed in the function parameter register, CSR3. For example, if the first packet is in error, a zero value will be returned, on. if the second is an error, a one will be returned, and so Page 69 Workstation Graphics Architecture - PRELIMINARY 6.1 Copy Area Command Packet 0 15 +===============+ (low) I 10 I ADDRESS +SOURCE IMAGE BITMAP -+ (high) I 12 +---------------+ I SIZE ( x) -+ +- ( y) I 16 -+ +( z) SOURCE OFFSET I 14 I 18 +===============+ I OFFSET (x) I 20 -+ +- ( y) I 22 +===============+ [bitmap] +===============+ I ADDRESS +- (low) I 24 +===============+ CONSTANT +---------------+ I I I I I I I <reserved> +- <reserved> ( y) SOURCE MASK +I OFFSET ( x) +===============+ <reserved> I 30 I 32 I ( y) I EXTENT (x) I 34 -+ I 36 +---------------+ +- I 38 -+ ( y) I 40 (x) I -+ I ( y) +- I -+ < z) I +===============+ I ALIGNMENT (x) I I OFFSET -+ <y > I [halftone] +---------------+ +- +- I SIZE +===============+ -+ ( z) -+ +---------------+ [constant] I 28 -+ -+ +===============+ (high) I 26 ( x) (low) I (high) I I +- I +---------------+ I SIZE I ADDRESS +- I I I I I I I +===============+ -+ +- +===============+ I I I I I I I I I I I I I +---------------+ I EXTENT II I -I ( y) I (x) +===============+ +===============+ [sub-bitmap] [rectangle] Page 70 Workstation Graphics Architecture - PRELIMINARY +===============+ I ADDRESS (low) I 42 -+ +(high) I 44 I DESTIN. +---------------+ ( x) I 46 IMAGE I SIZE -+ BITMAP +( y) I 48 -+ +( z ) I 50 +===============+ (x) I 52 DESTIN. I OFFSET -+ OFFSET +( y > I 54 +===============+ +===============+ I ADDRESS (low) I 56 MAP +- -+ (high) I 58 +===============+ [map address] +===============+ I ADDRESS (low) I 60 CLIPPING+-+ RECTANG. I (high) I 62 +---------------+ I COUNT +---------------+ 64 <reserved> 66 +========= ======+ [rectangle list] +===============+ I LITERAL MAP +- -+ +===============+ [literal map table] +===============+ I OFFSET ( x) I -+ +- ( y) I +---------------+ I EXTENT (x) I -+ +- I +===============+ [literal rectangle] ( y) Page 71 Workstation Graphics Architecture - PRELIMINARY 6.2 Draw Curve Command Packet The draw curve command packet is identical to the packet with the following additional fields: copy area command +===============+ I ADDRESS (low) I 68 I (high) I 70 +PATH -+ +---------------+ I COUNT +===============+ 72 +===============+ I PATTERN LENGTH I 74 +---------------+ PATTERN 76 PATTERN STRING +---------------+ I PATTERN MULT. I 78 +===============+ +===============+ I PATTERN POSIT. I 80 PATTERN +---------------+ STATE I PATTERN COUNT I 82 (low) I -+ (high) I +===============+ [literal] [state pointer] +===============+ +===============+ (low) I 84 -+ +- (high) I 86 CONSTANT +---------------+ I SIZE ( x) +- I 88 +===============+ I OFFSET ( x) I 94 -+ +- (y) I 96 +===============+ [bitmap] -+ (high) I ( x) +- +- <reserved> I -+ +===============+ [constant] I -+ ( z) +===============+ I -+ ( y) I 90 I 92 (low) I +- <reserved> -+ ( z) I ADDRESS +- I SIZE -+ +- +===============+ +---------------+ +---------------+ ( y) OFFSET I ADDRESS +- +===============+ I ADDRESS SECOND SOURCE +===============+ I +===============+ I ALIGNMENT (x) I +- -+ I OFFSET (y > I +===============+ [halftone] Page 72 Workstation Graphics Architecture - PRELIMINARY 6.3 Print Text Command Packet The print text command is similar to the copy area command, and has the following format. The differences are in specification of font (instead of source mask), the alternative specification of initial destination offset (instead of destination offset), and the additional parameters. 15 0 +===============+ I ADDRESS +- (low) I 10 -+ +===============+ I CONSTANT +---------------+ +===============+ I ADDRESS -+ (high) I (high)! 12 SOURCE IMAGE +---------------+ +---------------+ I SIZE 14 <reserved> -+ ( y) <reserved> +- +===============+ I 18 20 <reserved> -+ I +===============+ 22 +===============+ I ADDRESS (low) I 24 -+ (high)! 26 +---------------+ MASK FONT +- -+ +- -+ +- -+ +- <reserved> -+ +- -+ +- -+ 28 30 32 34 36 38 40 +===============+ +===============+ I ADDRESS +- (low) I 42 -+ (high) I 44 DESTIN. +---------------+ BITMAP +- IMAGE I SIZE ( x) I 46 -+ ( y) +- I 48 -+ +===============+ I +- [source font] +- (x) I +- 16 +- (low) I +- <reserved> I -+ I -+ (z > I I +===============+ I ALIGNMENT (x) I +- -+ I OFFSET ( y) I +===============+ +===============+ [constant] [halftone] Page 73 Workstation Graphics Architecture - PRELIMINARY (z) I 50 +====~==========+ +===============+ INITIAL I OFFSET ( x) I 52 DESTIN. +-+ OFFSET (y) I 54 +===============+ [literal] +===============+ I ADDRESS (low) I +===============+ I ADDRESS (low) I 56 +===============+ I LITERAL MAP MAP +- -+ (high)! 58 +===============+ [map address] +===============+ !ADDRESS (low)I 60 CLIPPING+-+ RECTANG.I (high)! 62 +---------------+ I COUNT 64 +---------------+ <reserved> 66 +===============+ [rectangle list] TEXT STRING +===============+ I ADDRESS (low) I 68 +-+ (high) I 70 +---------------+ 72 I COUNT +===============+ +===============+ I ADDRESS (low) I 74 CONTROL +-+ (high) I 76 STRING +---------------+ 78 I COUNT +===============+ INTERCHAR PAD +===============+ 80 I COUNT +===============+ SPACE PAD +===============+ 82 I COUNT +===============+ -+ +- <high) I +===============+ [offset pointer] +- -+ +===============+ [literal map table] +===============+ I OFFSET ( x) I +- -+ ( y) I +---------------+ I EXTENT (x) I -+ +( y) I +===============+ [literal rectangle] Page 74 Workstation Graphics Architecture - PRELIMINARY 6.4 Fill Area Command Packet The command packet for the fill area command has the following format: 0 15 +===============+ I CONSTANT I 10 +---------------+ SOURCE IMAGE BITMAP I I I I I I I 12 14 +===============+ I ADDRESS +- (low) I -+ (high) I +---------------+ I SIZE ( x) ( y) 16 I 18 20 +- <reserved> I +---------------+ ( z) 22 I +===============+ ' I ALIGNMENT (x) +- -+ I -+ +- +===============+ I -+ +- <reserved> I -+ I OFFSET ( y) I +---------------+ [halftone] [constant] +===============+ I ADDRESS +DESTIN. IMAGE BITMAP (low) I 24 -+ (high) I 26 +---------------+ I SIZE ( x) +- ( y) +- I -+ 28 I 30 -+ ( z ) I 32 +===============+ DESTIN. I OFFSET OFFSET +- ( x) I (y) I 34 -+ I 36 +===============+ +===============+ +===============+ +- +- I ADDRESS MAP (low) I 38 -+ I LITERAL MAP I -+ (high) I 40 +===============+ [map address] +===============+ I OFFSET +- ( x) +===============+ [literal map table] I 42 -+ CLIPPING! (y) I 44 RECT. +---------------+ I EXTENT (x) I 46 +-+ (y) I 48 I +===============+ Workstation Graphics Architecture - PRELIMINARY +===============+ I ADDRESS +- PATH (low) I 50 -+ (high)! 52 +---------------+ I COUNT +===============+ 54 Page 75 Page 76 Workstation Graphics Architecture - PRELIMINARY 6.5 Flood Area Command Packet The command packet for format: the 15 0 +===============+ I CONSTANT I 10 +---------------+ 12 SOURCE IMAGE BITMAP 14 <reserved> flood area command +===============+ I ADDRESS ( low) I +- -+ (high) I +---------------+ I SIZE (x) 16 ( y) +- 18 +===============+ I I 20 +- <reserved> -+ I 22 +---------------+ [constant] I -+ +- I -+ ( z) I +---------------+ I ALIGNMENT (x) I +- -+ I OFFSET (y > I +---------------+ [halftone] +===============+ I ADDRESS (low) I 24 +- -+ (high) I 26 DESTIN. +---------------+ ( x) I 28 IMAGE I SIZE +-+ BITMAP ( y) +- I 30 -+ ( z) I 32 +===============+ SEED POINT +===============+ I OFFSET (x) I 34 +- -+ (y) I 36 +===============+ +===============+ I OFFSET ( x) I 3 8 +- -+ CLIPPING! (y) I 40 RECT. +- - -------------+ I EXTENT (x) I 42 +- -+ (y) I 44 +===============+ +===============+ i ADDRESS (low) I 46 BOUNDARY+-+ MAP I (high) I 48 +===============+ !BOUNDARY (low) +- I -+ I BOUNDARY (high) I has the following Workstation Graphics Architecture - PRELIMINARY +===============+ [boundary address] +===============+ [literal boundary] Page 77 Page 78 Workstation Graphics Architecture - PRELIMINARY 6.6 Load Cursor Command Packet 15 0 +===============+ (low) I 10 I ADDRESS +CURSOR SOURCE IMAGE BITMAP -+ (high) I 12 CONSTANT I +---------------+ +---------------+ I SIZE ( x) +- ( y) +I ( z) I OFFSET ( x) I 14 I SIZE I 16 -+ I 20 +- -+ I (y) I 22 +===============+ ( z) +- +- -+ I +===============+ -+ ( x) CURSOR SOURCE MASK I 28 -+ ( y) +- <reserved> I 30 -+ ( z) I 32 +---------------+ I OFFSET ( x) I 34 -+ +- (y) I 36 +---------------+ +---------------+ I EXTENT I EXTENT II ( x) +- I 38 -+ ( y) I 40 +===============+ [sub-bitmap] MAP +===============+ [rectangle] +===============+ +- +- (low) I 42 -+ I LITERAL MAP -+ (high) I 44 I CURSOR ATTRIB. I -I ( y) I ( x) +===============+ I ADDRESS +===============+ +===============+ [map address] [literal map table] +===============+ I VALUE 46 I ALIGNMENT (x) I -+ I OFFSET ( y) I +===============+ [halftone] +---------------+ I SIZE I +- <reserved> (high) I 26 +- I -+ +===============+ [constant] (low) I 24 I -+ +===============+ [bitmap] I ADDRESS ( x) (y) +- +===============+ +===============+ (high) I +- <reserved> I 18 +===============+ I ADDRESS (low) I +-+ +---------------+ -+ +===============+ SOURCE OFFSET +===============+ Workstation Graphics Architecture - PRELIMINARY 6.7 Page 79 Attach Cursor Command Packet +========:======+ DEVICE 6.8 I VALUE +===============+ 10 Set Cursor Position Command Packet +===============+ I OFFSET (x) LOCATION+- I I 10 -+ (y) I 12 +===============+ 6.9 Get Cursor Position Command Packet This command has a two-word field in which the display returns the the display returns the current position of the cursor. +===============+ CURRENT I RETURN CURSOR +POSIT I ON I OFFSET (x) I 10 -+ (y) I 12 +===============+ 6.10 Get Mouse Position Command Packet This command has a two-word field in which current position of the mouse. +===~===========+ CURRENT I RETURN MOUSE +POSITION! OFFSET (x) I 10 -+ (y) I 12 +===============+ Workstation Graphics Architecture - PRELIMINARY 6.11 Set Mouse Characteristics Command Packet +===============+ TRACKING! MULTIPLIER I 10 RATIO +---------------+ I DIVISOR 12 +===============+ [Linear Tracking] 6.12 Page 80 +===============+ I THRESHOLD I 10 I SCALE FACTOR 12 +---------------+ +===============+ [Exponential Tracking] Set Tablet Characteristics Command Packet +===============+ +==============+ TRACKING! MULTIPLIER 10 RATIO +--------------+ I DIVISOR 12 X I 10 INPUT GSP Y I 12 +==============+ +---------------+ +- <reserved> -+ +---------------+ I OUTPUT GSP X I 14 OUTPUT GSP Y I 16 I +--------------+ [Linear 6.13 INPUT GSP +---------------+ +---------------+ [Quantized Tracking] Tracking] Get Tablet Position Command Packet This command has a two-word field in which the display returns the current position of the tablet. +===============+ CURRENT I RETURN TABLET +POSITION! OFFSET (x) I 10 -+ (y) I 12 +===============+ 6.14 Set Pointing Device Event Reporting This command enables or disables periodic reporting tablet movement. ENABLE FLAGS +===============+ I VALUE +===============+ 10 of mouse and/or Workstation Graphics Architecture - PRELIMINARY 6.15 Page 81 Move Object Command Packet +===============+ TYPE LENGTH I VALUE I 10 +===============+ I VALUE 12 +- -+ I 14 +===============+ OBJECT I ADDRESS ADDRESS +- (low) I 16 -+ I (high) I 18 DESTIN. I ADDRESS ADDRESS +- (low) I 20 +===============+ -+ (high)! 22 +===============+ 6.16 Report Status Command Packet For the report status command, the packet contains no input parameters except for the opcode header. However, the packet contains space for the following information that is filled by the display. +===============+ DEVICE TYPE I VALUE +- (low) I 10 -+ (high) I 12 DEVICE +===============+ VERSION I VALUE I 14 +===============+ MICRO- +===============+ CODE 16 I VALUE VERSION +===============+ +===============+ I ADDRESS +- (low) I 18 -+ (high) I 20 VISIBLE FRAME +---------------+ ( x) I 22 BUFFER I SIZE -+ BITMAP +( y) I 24 -+ +( z) I 26 +===============+ +===============+ I ADDRESS FREE +- (low) I 28 -+ • Workstation Graphics Architecture - PRELIMINARY FRAME BUFFER MEMORY Page 82 (high)I 30 +-----~---------+ I COUNT (low) I 32 I (high) I 34 +- -+ +===============+ +===============+ I ADDRESS +- (low) I 36 -+ (high) I 38 FREE I PROGRAM +===============+ SPACE (low) I 40 I COUNT MEMORY +-+ (high) I 42 I +===============+ +===============+ I ADDRESS (low) I 44 I (high) I 46 I COUNT (low) I 48 +HOST MEMORY SPACE BASE -+ +===============+ +- -+ (high) I 50 +===============+ 6.17 No Operation Command Packet This command has no parameters, and consists only of the packet opcode header. Workstation Graphics Architecture - PRELIMINARY 7.0 CONSTANTS, OPCODES, MODIFIERS, AND ERROR CODES This section specifies the constants used as opcodes, error codes for onyx commands and return codes. 7.1 Page 83 modifiers, and Control And Status Register 0 Function Codes The following function codes are defined for CSRO functions . . Implementation-independent functions: INIT = 1 SEND PACKET = 2 START DISPLAY = 3 ABORT-= 4 EXECUTE POWERUP_SEQUENCE = 5 VSlOO Implementation-dependent functions: BBA ON = 16 BBA-OFF = 17 SET-INFINITE RETRIES = 18 SET-FINITE RETRIES = 19 7.2 Command Packet Operation Codes The following are the values of the 8-bit operation codes specified in the low byte of the first word transmitted in a device command. These commands are all interperted by display microcode or firmware. NO OPERATION COPY AREA DRAW-CURVE PRINT TEXT FLOOD AREA LOAD CURSOR SET CURSOR POSITION ATTACH CURSOR GET CURSOR POSITION MOVE OBJECT REPORT STATUS FILL AREA GET MOUSE POSITION SET-MOUSE-CHARACTERISTICS GET-TABLET POSITION SET-POINTING DEV REPORTING SET-TABLET CHARACTERISTICS = 0 = l = 2 = 3 = 4 = 5 = 6 = 7 = 8 = 9 = 10 = 11 = 12 13 = 14 = 15 16 The following commands are interpreted only by display ROM, and are thus given different operation codes, even though there is some overlapping of the commands. This prohibits accidental interpretation of a command intended ~or a different machine state. Workstation Graphics Architecture - PRELIMINARY Page 84 MOVE OBJECT = 128 REPORT-STATUS= 129 7.3 Command Packet Operation Modifiers The modifiers field specifies, for each command, which optional parameters are specified and what format is present for parameters with multipie formats. The following modifiers are defined below, listed separately for each command. 7.3.1 Copy Area Command Modifiers - PARAMETER FIELD SOURCE mod<2: O> VALUE MEANING 0 1 2 constant bitmap halftone 0 1 rectangle bitmap SOURCE MASK mod<5:3> DEST. OFF. mod<8:6> MAP mod<Ll:9> 0 1 2 3 4 identity map source map address source map . literal function code address function code literal CLIPPING RECTANGLES mod<l4:12> 0 1 2 none literal rectangle rectangle list addr. 7.3.2 (not used) Draw Curve Command Modifiers VALUE MEANING mod<2:0> 0 1 2 constant bitmap half tone SOURCE MASK mod<5:3> 0 rectangle bitmap DEST. OFF. mod<8:6> MAP mod<ll:9> PARAMETER FIELD SOURCE 1 (not used) 0 identity map Workstation Graphics Architecture - PRELIMINARY Page 85 1 2 3 4 source map address source map literal function code address function code literal CLIPPING RECTANGLES mod<l4:12> 0 1 2 none literal rectangle rectangle list addr. DRAWING MODE mod<l5> 0 1 Solid Segment Dashed/Patterned Segment PATTERN STATE mod<l7:16> 0 1 2 3 Literal pattern state Indirect pattern state Update literal pattern sta Update indirect pattern st PATTERN MODE mod<l9:18> 0 1 2 3 No secondary source {Dashe Constant secondary source Bitmap secondary source Halftone secondary source 7.3.3 Print Text Command Modifiers VALUE MEANING PARAMETER FIELD SOURCE mod<2:0> 0 1 2 constant source font halftone MASK FONT mod<5:3> 0 1 no mask mask font supplied DEST. OFF. mod<8:6> 0 1 2 3 dest offset dest off set update dest update dest MAP mod<ll:9> 0 1 2 3 4 identity map source map address source map literal function code address function code literal CLIPPING RECTANGLES mod<l4:12> 0 1 none literal rectangle rectangle list addr. 2 TEXT mod<l5> 0 1 mod<l6> 0 1 STRING CONTROL STRING literal indirect literal indirect 8 bit characters 16 bit characters no control string control str i ng Page 86 Workstation Graphics Architecture - PRELIMINARY 7.3.4 Fill Area Command Modifiers - PARAMETER FIELD SOURCE mod<2:0> SOURCE MASK mod<5:3> (not used) DEST. OFF. mod<8:6> (not used) MAP mod<ll:9> 0 1 2 3 4 identity map source map address source map literal function code address function code literal CLIPPING RECTANGLE mod<l4:12> 0 1 none literal rectangle 7.3.5 VALUE MEANING constant (not used) half tone 0 1 2 Flood Area Command Modifiers - PARAMETER FIELD SOURCE rnod<2:0> VALUE MEANING 0 constant (not used) half tone 1 2 SOURCE MASK rnod<5:3> (not used) DEST. OFF. mod<8:6> (not used) MAP mod<ll:9> (not used) CLIPPING RECTANGLE mod<l4:12> BOUNDARY MAP rnod<l5> 0 none literal rectangle 1 0 literal pointer 1 7.3.6 Load Cursor Command Modifiers - PARAMETER FIELD VALUE MEANING SOURCE mod <2:0> 0 1 2 constant bitmap halftone ___/ Page 87 workstation Graphics Architecture - PRELIMINARY SOURCE MASK - mod<5:3> 0 1 DEST. OFF. mod<8:6> MAP mod<ll:9> (not used) 0 1 2 3 4 7.3.7 identity map source map address source map literal function code address function code literal Set Mouse Characteristics Command Modifiers - PARAMETER FIELD TRACKING mod<2:0> 7.3.8 rectangle bitmap VALUE 0 1 MEANING Linear Exponential Set Tablet Characteristics Command Modifiers - PARAMETER FIELD TRACKING mod<2:0> VALUE MEANING 0 1 Linear Quantized Workstation Graphics Architecture - PRELIMINARY 7.4 Page 88 Interrupt Reason Values The following are the values returned by the display in the Interrupt Reason Register (CSRl) following display interrupt. Interrupt reasons (bit 15 = 0) are unary encoded. Errors (bit 15 = 1) are binary encoded. * * WGA Completion Codes (15 reserved) * INT ID INT-CD INT-SE INT-BE INT-CM INT TM INT-MM INT-PD equ equ equ equ equ equ equ equ $0001 $0002 $0004 $0008 $0010 $0020 $0040 $0080 Initialisation Done Command Done Started Executing Button Event Cursor Moved Tablet Moved Mouse Moved Powerup Done * These are the error messages generated by the * VSlOO, VS125 and VS300. Some errors are specific to * one device. The following key indicates the error code's * status for each device: * IS generated by this device * * IS NOT generated by this device * + New, was not defined in previous versions * I Changed, Redefined from previous versions * * * The key contains two characters. The first indicates the status * for the VSl00/125, and the second indicates the status for the VS300. * For example: * *- Error code is generated by VSl00/125 only * - * Error code is generated by VS300 only * * ** Both VSl00/125 and VS300 generate this code * * * !- -+ ++ VSl00/125 only, code has new definition VS300 only, new error code added VSl00/125 and VS300, new error code added * WGA Hardware Error Codes (32 reserved) * * Error Mnemonic NO ERROR ERR BASE ERR-NYI ERR-IFC ERR-ICC ERR-RN ERR RO ERR-LD ERR BE Value equ equ equ equ equ equ equ equ equ Key 0 -+ $8000 ERR BASE+O ERR-BASE+l ERR-BASE+2 ERR-BASE+3 ** ** ** ** ** ERR BASE+4 ERR-BASE+5 ERR-BASE+6 *- **- Description Normal Successful Completion Error-Encountered bit Not Yet Implemented Invalid Function Code Invalid Command Code Bus Error: Non-Existant Memo Bus Error: Retry Overtlow Bus Error: Link Down Bus Error: Unexplained Workstation Graphics Architecture - PRELIMINARY ERR AE ERR SI ERR II ERR BN ERR BNI ERR-KBO ERR-TBO ERR-BBO ERR-ITP equ equ equ equ equ equ equ equ equ ERR BASE+7 ERR-BASE+8 ERR-BASE+9 ERR-BASE+lO ERR-BASE+ll ERR-BASE+l2 ERR-BASE+l3 ERR-BASE+l4 ERR-BASE+l5 Page 89 *- Address Error Spurious Interrupt Illegal Instruction BBA NXM (Non-Existant Memory BBA Not Installed Keyboard Buffer Overflow Tablet Buff er Overflow Button Buffer Overflow Invalid Tablet Packet Key Description ** ** *- *****- * WGA Packet Error Codes (32 reserved) * * Error Mnemonic Value ERR ISRCMB ERR-ISRCBW ERR ISRCBH ERR ISRCC ERR-ISRCBD ERR-ISRCD equ equ equ equ equ equ ERR BASE+32 ERR-BASE+33 ERR-BASE+34 ERR-BASE+35 ERR-BASE+36 ERR-BASE+37 -+ ERR IMSKMB ERR-IMSKBW ERR-IMSKBH ERR-IMSKBD equ equ equ equ ERR BASE+38 ERR-BASE+39 ERR-BASE+40 ERR-BASE+41 ** ,• ** ** ** Invalid MSK Modifier Bits Invalid MSK Bitmap Width Invalid MSK Bitmap Height Invalid MSK Bitmap Depth ERR IDSTMB equ ERR BASE+44 ,. ** Invalid DST-Offset Modifier ERR IDSTBW ERR-IDSTBH ERR-IDSTBD equ equ equ . ERR BASE+45 ERR-BASE+46 ERR-BASE+47 ** ** ** Invalid DST Bitmap Width Invalid DST Bitmap Height Invalid DST Bitmap Depth ERR NOAREA equ ERR BASE+48 -+ No Resultant Area ERR IMAPMB ERR-IMAPFC ERR ZIMAP ERR-ZCIMAP equ equ equ equ ERR BASE+50 ERR-BASE+51 ERR-BASE+52 ERR-BASE+53 ** -+ -+ -+ Invalid Map Modifier Bits Invalid Map Function Code Depth Incompatible with Map Depth Combination Incompatib ERR ICLPMB ERR-ICLPRC equ equ ERR BASE+54 ERR-BASE+55 ** ** Invalid ClipR Modifier Bits Invalid ClipR Count ERR SMC ITC ERR-ITC-MULT ERR-ITC-DIV equ equ equ ERR BASE+56 ERR-BASE+57 ERR-BASE+58 +- ! -+ Invalid Tracking Ratio Invalid Tracking Multiplier Invalid Tracking Divisor ERR ICD ERR-MO IBC ERR MO IOT ERR-MO-IDT equ equ equ equ ERR BASE+59 ERR-BASE+60 ERR-BASE+61 ERR-BASE+62 ERR IPC equ ** ** ** * ** ** ** *** ERR-BASE+63 * WGA Draw Curve Error Codes (16 reserved) Invalid SRC Modifier Bits Invalid SRC Bitmap Width Invalid SRC Bitmap Height Invalid SRC Constant Invalid SRC Bitmap Depth Invalid SRC Bitmap Dimension ** Invalid Cursor Device Invalid Byte Count Invalid Object Type ** Invalid Path Count Inva l id Devic~ Type Workstation Graphics Architecture - PRELIMINARY * * Error Mnemonic ERR DC IPC ERR-DC-IPSL ERR-DC-IPSM ERR-DC-ICF ERR-DC-IPSP ERR-DC-IPSMB ERR-DC-IPMMB ERR-DC-IPSC ERR-DC-ISSRCBW ERR-DC-ISSRCBH ERR-DC-ISSRCBD ERR-DC-ISSRCC ERR-DC-IDPM equ equ equ equ equ equ equ equ equ equ equ equ equ Page 90 Value Key Description ERR BASE+64 ERR-BASE+65 ERR-BASE+66 ERR-BASE+67 ERR-BASE+68 ERR-BASE+69 ERR-BASE+70 ERR-BASE+71 ERR-BASE+72 ERR-BASE+73 ERR-BASE+74 ERR-BASE+75 ERR-BASE+76 ** . ** ** . ** ** ** ** ** ** ** ** *++ Invalid Path Count Invalid Pattern Length Invalid Pattern Multiplier Invalid Closed Figure Invalid Pattern Position Invalid Pattern String Modif Invalid Pattern Mode Modif ie Invalid Pattern Count Invalid Second SRC Bitmap Wi Invalid Second SRC Bitmap He Invalid Second SRC Bitmap De Invalid Second SRC Constant Incompatible Drawing/Pattern Value Key Description ERR BASE+80 ERR-BASE+81 ERR-BASE+82 ERR-BASE+83 ERR-BASE+84 ERR-BASE+85 ERR-BASE+86 ERR-BASE+87 ERR-BASE+88 ERR-BASE+89 ERR-BASE+90 ERR-BASE+91 ERR-BASE+92 ERR-BASE+93 ** ** +* Invalid Control String Lengt Invalid Control String Opcod Invalid Control String Param Invalid Text String Length Invalid Character Index Text String Exhausted No Font Present Invalid SRC Font width Invalid SRC Font height Invalid SRC Font depth Invalid MSK Font width Invalid MSK Font height Invalid MSK Font depth Conflicting SRC/MSK Fonts Value Key Description ERR BASE+96 ERR-BASE+98 ERR-BASE+99 ERR-BASE+lOO ** ** Invalid SRC Bitmap Seed Point is on boundary Stack Overflow Invalid Boundary Ma~ Modif ie I I * * WGA Print Text Error Codes (16 reserved) * * Error Mnemonic ERR PT ICSL ERR-PT-ICSO ERR-PT-ICSP ERR PT ITSL ERR-PT-IC! ERR-PT-TSE ERR-PT-NFP ERR PT ISRCFW ERR-PT-ISRCFH ERR-PT-ISRCFD ERR-PT-IMSKFW ERR-PT-IMSKFH ERR-PT-IMSKFD ERR-PT-CSMF equ equ equ equ equ equ equ equ equ equ equ equ equ equ ** ** ** ** ** ** ** ** ** ** ** * * WGA Flood Area Error Codes (16 reserved) * * Error Mnemonic ERR FA ISRCB ERR-FA-SP I OB ERR-FA-SO ERR-FA-IBMMB equ equ equ equ ** ** ** WGA Fill_Polygon Error Codes (16 reserved) * * Error Mnemonic ERR FP ISRCB ERR-FP-SO ERR FP IPC Value equ equ equ ERR BASET112 ERR-BASE+ll3 ERR-BASE+ll4 Key ** ** ** Description Invalid SRC Bitmap Stack Overflow Invalid Point Count Workstation Graphics Architecture - PRELIMINARY ERR FP !CF equ ERR BASE+ll5 ** Page 91 Invalid Closed Figure * * WGA Powerup Error Codes (32 reserved) * * Error Mnemonic ERR PASS ERR-68K ERR-RC ERR PR ERR-CRT ERR-TU ERR KU ERR-FOE ERR-VTO ERR-SB ERR-BS ERR-BC ERR-TTO ERR-FOO ERR-KTO ERR-KST equ equ equ equ equ equ equ equ equ equ equ equ equ equ equ equ Value Key Description ERR BASE+l28 ERR-BASE+l29 ERR-BASE+l30 ERR-BASE+l31 ERR-BASE+l32 ERR-BASE+l33 ERR-BASE+l34 ERR-BASE+l35 ERR-BASE+l36 ERR-BASE+l37 ERR-BASE+l38 ERR-BASE+l39 ERR-BASE+l40 ERR-BASE+l41 ERR-BASE+l42 ERR-BASE+l43 **- Base for test numbers 68000 CPU ROM Checksum Program RAM CRTC Register Tablet USART Keyboard USART FOTR Electrical Loop Back Vsync Time Out Screen Buff er BBA Scratchpad RAM BBA Copyarea Command Tablet Time Out FOTR Optical Loop Back Keyboard Time Out Keyboard Self-Test **- **- **- ****- ***- *- ** WGA Load Cursor Error Codes (16 reserved) * * Error Mnemonic ERR LDC IATRV ERR-LDC-ICH ERR-LDC-I CW ERR-NOVALCUR equ equ equ equ Value Key Description ERR BASE+l60 ERR-BASE+l61 ERR-BASE+l62 ERR-BASE+l63 ++ ++ ++ ++ Invalid Cursor Attribute Val Invalid Cursor Height Invalid Cursor Width No Valid Cursor Defined ) Workstation Graphics Architecture - PRELIMINARY 8.0 Page 92 VAXSTATION 100 RESTRICTIONS The following architectural restrictions apply to the VAXstation implementation of the Workstation graphics architecture. 8.1 Number Of Planes Since the VSlOO has only one bit plane of framebuffer parameter may only have the value 1. 8.2 100 memory, the Z Halftone Representation The VAXstation 100 uses only a single format for a halftone bitmap. The halftone pattern must be specified as a square bitmap 16 pixels on a side. Therefore, to use a "standard" four-by-four halftone pattern, the pattern is simply replicated horizontally and vertically to form a 16xl6 pattern. 9.0 GENERAL IMPLEMENTATION RESTRICTIONS The following restrictions apply to all VAX/UNIBUS implementations of the Workstation graphics architecture. Hence, the term "display" is used instead of "VSlOO". 9.1 Word Access I/O All 16-bit word parameters must be word-aligned. Additionally, the display may only access host memory by words. Any byte strings of odd length, then, should be padded with an extra byte so that no "undefined" data is accessed. 9.2 UNIBUS Window Mapping It is often the case that the display is asked to perform an operation between a source rectangle and a destination rectangle which overlap. That is, both source and destination bitmaps occupy the same (or nearly the same) area of memory. In this case, the display firmware must determine the proper memory-copy direction, so that no data is overwritten. It does this by comparing the base addresses of the two memory blocks in question. For this reason, it is important that the driver software (responsible for mapping UNIBUS memory to the display) maintain a one-to-one correspondence between areas of memory side of the UBW. Sp~cifically, on each an ~rea of VAX memory must neve ~) b· e made to appear to the display as two different areas of memory. . Page 93 Workstation Graphics Architecture - PRELIMINARY 9.3 Bitmap Storage Requirements The display represents a bitmap as a sequence of horizontal scan lines stored in contiguous memory locations. Each scan line must begin on a 16-bit word boundary. That is, although a bitmap can have any horizontal width in pixels, the storage in which the bitmap is kept must have sufficient space so that each horizontal line can be word-aligned. If the horizontal width in pixels is not evenly divisible by 16, the last bits in the last word of the storage for each horizontal line will be unused. For any bitmap of dimensions (X,Y) on the display, the storage requirement is ((X+l5)/16)Y words. 9.4 Device Coordinate Management For WGA The Device Position Registers, defined by the WGA, are used to hold the current XY position of the cursor. They are also used to report the current XY position of any pointing devices, e.g. mouse and/or tablet, which may be attached to the VAXstation. The WGA also defines a phenomenon known as Event Reporting. If reporting is enabled for a particular device, it will interrupt the host at a maximum rate of 60 Hz. It places its XY position in the Cursor Position Registers and issues a "'device' moved" interrupt reason. The following paragraphs enumerate the situations, and how they are implemented. [l] State: [la] possible Event~Reporting No Device Attached to the Cursor Mouse Event Reporting set On the Vsync interrupt, a service routine within the VSlOO will read the current mouse XY position. If it has changed from the last time, it will be placed in the Device Position Registers. An interrupt is then sent to the host indicating "MOUSE MOVED". If the mouse has not moved, nothing happens. Note that since the mouse is not connected to anything here, its position is not confined to the visible screen. may vary from 32767 to -32768. [lb] Tablet Event Reporting set Its coordinates Page 94 Workstation Graphics Architecture - PRELIMINARY On the Vsync interrupt, a service routine will read the current tablet XY position. If it has changed from the last time, it will be placed in the Device Position Registers. It then issues an interrupt to the host indicating "TABLET MOVED". If the tablet has not moved, nothing happens. Note that the tablet position is not clipped to the visible screen boundaries unless it's attached to the cursor. [le] Both Mouse and Tablet Event Reporting set In this case, both case [la] · and [lb] happen concurrently. However, only one device will be reported on any one Vsync. The devices will be polled ~n a round-robin-like fashion. On one Vsync, device (i) will be checked FIRST. If no action, device (i+l) is checked, and so on, until an 'active' one is found (or until there are no more devices}. ( i +l) On the next Vsync, device will be the first one checked, and so on. This method has the following properties: o No more than 60 interrupts per second are sent to no matter how many devices are reporting. [2] State: [2a] o No device will be 'locked out' by a higher-priorit or a more-rapidly-interrupting device. o Each individual device may still interrupt at 60Hz it has no 'competition'. o The worst case for device acknowledgement is 60/N N reporting devices. Mouse is Attached to the Cursor Mouse Event Reporting set All happens as in [la], except that now the interrupt reason will be "CURSOR MOVED" instead of "MOUSE MOVED". Of course, since the mouse and cursor are attached, their XY positions Workstation Graphics Architecture - PRELIMINARY Page 95 always be the same. This implies, of course, that the mouse XY position will now be clipped to the visible screen. [2b] Tablet Event Reporting set All happens as in case [le], except that cases [2a] and [lb] are happening concurrently, instead of cases [la] and [lb]. [2c] Both Mouse and Tablet Event Reporting set This is the same as case [2b] above. [3] State: [3a] Tablet is Attached to the Cursor Mouse Event Reporting set All happens as in case [le], except that cases [la] and [3b] are happening concurrently, instead of cases [la] and [lb]. [3b] Tablet Event Reporting set All happens as in [lb], except that now the interrupt reason will be "CURSOR MOVED" instead of "TABLET MOVED". Since the tablet and cursor are attached, their XY positions will always be the same as long as they are within the visible screen. Should the tablet position stray from the visible screen, both the tablet and the cursor XY position will be clipped to the screen's boundaries. [ 3c] Both Mouse and Tablet Event Reporting set This is the same as case [3a] above. Workstation Graphics Architecture - PRELIMINARY 9.5 Page 96 Keyboard Interface If the input data is a keycode, a transition bit is generated, the keyboard device code added, and the result is returned, where it will become a button event to the VAXen host. If the key is in Autorepeating/Down-Only mode, no up-transition events will be generated. An autorepeating key will thus appear as a succession of down-events. If the key is in Up/Down mode, both up and down transitions will be generated. If the input data is an error message, or an ignored by the VSlOO. acknowledgement, it is There are a few codes which are treated specially: o The Metronome character, for example, is not passed to the host, but is used to repeat the most recently depressed character. o The state of the control-key code is monitored. When the 'control' key is depressed, the firmware will automaticall issue a 'temporary autorepeat inhibit' to the keyboard to keep control keys from autorepeating. o The 'Allups' keycode will generate up-transitions for all up/down-mode keys which are down at the time. o Other special codes not related to actual keys will be discard Since the user is not allowed to change the mode of the keyboard divisions, Prefix-To-Keys-Down should never occur. The keyboard divisions are initialized According to the following defaults: Division Mode 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Autorepeat down Autorepeat down Autorepeat down Down only Up down Up down Autorepeat down Autorepeat down Autorepeat down Autorepeat down Autorepeat down Autorepeat down Down only Autorepeat down Main array Numeric keypad Delete character Return and Tab characters Lock, Compose, and AlO Shift keys and Control key Horizontal arrow keys Vertical arrow keys Edit keypad keys Local function keys (G99-G04) Second function key set (G05-G09) Third function key set (Gl0-Gl4) HELP and MENU keys (Gl5-Gl6) Fifth function key set (G20-G23) In Up/Down mode, both up- and down-transitions are reported. In Autorepeat and Down-Only mode, only down-transitions are repor- ~ e /
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies