ibm personal computer professional graphics controller ...minuszerodegrees.net/oa/oa - ibm...

236
--- - ---- --- - - --- - - - --- ----- - - - --- Personal Computer --_.- Hardware Reference Library IBM Personal Computer Professional Graphics Controller Technical Reference 6138161 August 15, 1984 © CopyrighllBM Corporation 1984

Upload: others

Post on 26-Jan-2021

21 views

Category:

Documents


0 download

TRANSCRIPT

  • --- --------- - ---- - - ---------- ---- Personal Computer --_.- Hardware Reference Library

    IBM Personal Computer Professional Graphics Controller Technical Reference

    6138161 August 15, 1984 © CopyrighllBM Corporation 1984

  • Contents

    Description .................................... 1

    Programming the Mode Control and Status

    High-Function Graphics Programming

    Major Components .......................... 3

    System-Bus Interface ..................... 4

    Microprocessor Section . . . . . . . . . . . . . . . . . . .. 6

    Video Control Generator Section ............ 8

    Emulator Address Control ................ 11

    Graphics Emulator ...................... 13

    Display Memory ........................ 15

    Look-Up Table and Video Output Section .... 18

    Timing and Control Section ............... 19

    Emulator Modes ........................... 20

    Alphanumeric Mode ..................... 20

    Graphics Mode ......................... 24

    Description of Basic Operations ............ 28

    High-Function Graphics Mode ................ 29

    Alphanumeric Operation ................. 29

    Graphics Operation ..................... 30

    Description of Basic Operations ............ 32

    Programming Considerations ..................... 33

    Emulator Programming Considerations ......... 33

    Programming the 6845 CRT Controller ...... 33

    Registers ............................. 35

    Color-Select Register .................... 36

    Mode-Select Register .................... 38

    Status Register ......................... 41

    Sequence of Events for Changing Modes ..... 42

    Memory Requirements ................... 42

    Considerations ........................... 43

    Coordinate Space ....................... 45

    Video Generation ....................... 56

    Display Control ........................ 58

    Drawing Primitives ...................... 63

    Text ................................. 69

    Command Lists ......................... 71

    Look-Up Table ......................... 73

    August 15,1984 © Copyright IBM Corporation 1984 iii

  • Image Processing ....................... 74

    Read-Back Commands ................... 75

    System Reset .......................... 77

    Communications ........................ 78

    Communication Protocol ................. 80

    High-Function Graphics Commands ........... 83 ~

    Interface .................................... 179

    Connector Specifications ................... 180

    Specifications ................................ 181

    Logic Diagrams ............................... 183

    Glossary ................................... Glossary-l

    Index ........................................ Index-l

    August 15,1984 © Copyright IBM Corporation 1984 iv

  • v

  • vi

  • Description

    The IBM Personal Computer Professional Graphics Controller is an adapter that: (1) provides a high-function graphics capability

    ~ and (2) acts as an IBM Color/Graphics Monitor Adapter, with the exception of the 160-by-100 color/graphics mode.

    The operations of the Professional Graphics Controller are controlled by an 8088 Microprocessor. It carries out all communications through its data bus and address bus. The system-bus interface recognizes its own commands and passes only these commands to the controller. The interface allows the microprocessor to read or write to memory locations, using the IBM Professional Graphics Controller microprocessor's data and address busses.

    The microprocessor controls and initializes several sections of the controller. It defines the requirements of the controller's hardware so the controller can imitate the actions of the IBM Color / Graphics Monitor Adapter. The microprocessor also

    ~ regulates the emulator address control, which translates the system's I/O address information and stores the associated data in the graphics emulator memory for screen display. Finally, it initializes the video control generator, which generates timing pulses and the horizontal- and vertical-synchronization (sync) pulses.

    During operation, the microprocessor intercepts commands sent to the emulator and interprets them. The microprocessor can also accept and interpret the high-function graphics commands, writing the results in the display memory for screen display. Both the emulator and high-function graphics functions have access to the look-up table (LUT) and output section.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 1

  • The following is a block diagram of the Professional Graphics Controller.

    Sync

    Data Bus

    , '" ~ R!W Control

    SystemBu, L-__~'-.,j ~::~.~p ~ Interface Video

    V>

    Address Bus

    Video

    f-::==--'====~~ Output~ Section

    Timing

    and Address Control

    f-::=~;===:~ ~===~PE~L~B~u~.===J~ Emulator ~ Control Character ROM Section Row Address

    Emulator RAM Address Bus

    August 15,1984 2 Professional Graphics Controller

  • Major Components

    • System-Bus Interface

    Bidirectional Buffer

    Control Decode Logic

    ~ Address Decoder • Microprocessor Section

    8088 Microprocessor

    Clock Generator Control

    Address Latch

    Data Latch

    Decoders

    2K by 8-bit RAM

    64K by 8-bit ROM

    • Video Control Generator Section Video Controller Control Decoder 16- by 8-bit State Length Memory Synchronization Pulse Generator State Multiplexer Vertical and Horizontal State Counters

    ~ Vertical and Horizontal State Length Counters Buffer

    • Emulator Address Control Controller Cursor Generator Parameter Registers Character ROM Address Generator Row Address Generator Column Address Generator Microprocessor Address Buffers

    • Graphics Emulator

    16K by 16-bit Emulator RAM

    Shift Registers

    Character ROM

    Attribute Latch

    Emulator PEL Processing

    Buffer

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 3

  • • Display Memory High-Function Graphics Display Memory

    Latch Tri-State Bidirectional Driver Tri-State Latch 320K by 8-bit RAM

    Display RAM Address Control High-Function Graphics Scanner

    - ROM - Buffers

    • Look-Up Table (LUT) and Video Output Section Latches Look-Up Table Memory Buffer Triple Digital-to-Analog Converter

    • Timing and Control Section 50-MHz Oscillator High-Function Graphics Display Timing Generator Control Decoder and Latches

    System-Bus Interface

    Following is a block diagram of the system-bus interface.

    - s/. V sl ...- Bidirectionalk Data Bus IlP Bus

    -- Buffer "I I

    .. :l

    III

    E Q)

    t; 4/.> (J) R/W Control "'- Decoded Control Lines

    7 Control

    Decode U

    ~ LogIc 5/ ~

    ~~_BP / ). 20/ ...Address

    IlP Address BusDecoder20/ / ....

    7 >

    August 15,1984 4 Professional Graphics Controller © Copyright IBM Corporation 1984

  • The system-bus interface allows the system microprocessor to gain access to the display memory and emulated registers through the 'data,' 'address,' and 'control' lines. The system-bus interface can detect the attempt by the system microprocessor to execute a Memory Write command or an I/O Write command to either the

    ~ emulator memory addresses or the communications memory for the high-function graphics mode.

    When the interface logic detects an assigned address, a 'hold' signal is sent to the system microprocessor, which suspends the operation of the controller microprocessor until the proper time. Although the system microprocessor can gain access to the memory of the controller microprocessor (through a series of commands on the bus interface), it cannot directly access the display RAM, nor can it issue interrupts to the controller microprocessor. Likewise, the controller microprocessor cannot gain control of the system bus.

    If the system microprocessor writes to a register of the emulated 6845 CRT Controller, the data is stored in the controller's local RAM.

    The controller operates by mapping both the I/O addresses and the addressed memory into its own memory. It then reads these locations, interprets the data, and programs the hardware to imitate the IBM Color/Graphics Monitor Adapter. If high-function graphics commands are written to the communication area, the controller microprocessor interprets those commands and writes to the display memory for screen display.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 5

  • Microprocessor Section

    Following is a block diagram of the microprocessor section

    8088 ilP

    Horizontal Test

    Vertical Interrupt

    August 15,1984 6 Professional Graphics Controller CO Copyright IBM Corporation 1984

  • The microprocessor section is a standard 8088 Microprocessor arrangement. A 'timing control' line's input leads into a clock generator control. The control signal emitted from the clock generator provides the clock frequency that drives the 8088 Microprocessor. Address and data latches store the signals sent over the address and data busses. Both the address and data lines use two 32K by 8-bit ROMs and a single 2K by 8-bit static RAM. The decoders control chip-select and latch registers.

    A single, maskable interrupt occurs from the 'vertical interrupt' line. The test pin of the microprocessor samples the horizontalsynchronization pulse.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 7

  • Video Control Generator Section

    Following is a block diagram of the video control generator section.

    Control Signals

    4

    Video Controller P Data Bus

    Done

    Done

    Timing Control Signals

    August 15,19848 Professional Graphics Controller @ Copyright IBM Corporation 1984

  • The video controller monitors and sequences the video control generator section. The main loop of the control generator controls the format of the display screen. A display screen is divided into four states, as shown in the following.

    ,-.., I~ 820 PELs ~ I

    Vertical Sync

    640 PELs

    BBHari· L L

    lon- 508A A tal N 480 N Lines Active Sync K Lines K

    I IDisplay

    N N G G

    States~ 2 I 3 4 I~

    The state length memory is a part of the video control generator section. The contents of the state length memory provide the data to the state length counters, which then determine how long each state remains active. For each scan line, the state length memory loads this data, one at a time, into the horizontal state length counter. At the end of the count, the counter signals 'done' to the video controller, which then sets the control lines or particular stages of each state and sends the control information into the horizontal state counter. The video controller determines whether to start again at zero for some state, or to increment the state counter and begin on the next state. The horizontal state counter counts the number of states across the screen. From the state counter, the synchronization pulse generator determines the vertical- or horizontal-synchronization pulse and activates the

    ~ appropriate line.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 9

  • This same loop occurs for vertical states. The video controller monitors the current vertical and horizontal states through the state counters and synchronization pulse generator.

    The controller microprocessor can write directly to the state length memory to vary the size of each state on the screen. State lengths remain under program control.

    August 15,1984 10 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Emulator Address Control

    Following is a block diagram of the emulator address control.

    Timin Control I na 5

    Mode

    ,uP Data BUI

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 11

    ________________________--J~

  • For the emulator mode, the address control consists of two generators-a row address generator and a column address generator. Both are driven by a controller and produce the addresses needed for the emulator RAM.

    The controller microprocessor can access the address bus to ".-...... program the address generators using an address buffer, and can program the four parameter registers. The cursor generator compares the addresses saved in the address generator with those saved in the parameter registers. If a match is found, the cursor generator activates the 'cursor' line.

    The character ROM address generator produces a character ROM row address that defines which line to write using a font with 8 by 16 character cells.

    August 15,1984 12 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Graphics Emulator

    Following is a block diagram of the graphics emulator.

    Control IBM Alpha Video Data Shift Register

    Emulator

    RAM Address

    Bu,

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 13

  • The emulator RAM address bus sends signals to the 16K by 16-bit emulator RAM. The 16-bit-wide RAM allows the character and its attributes to be read simultaneously. The RAM shifts this information into a register that also acts as a latch. During the alphanumeric mode, this information travels through an attribute latch and the character ROM. The character ROM checks the shift in the look-up table (LUT) before passing the information through another shift register.

    The attributes determine the foreground and background colors of the character. The picture element (PEL) processor then shifts this information out onto the PEL bus.

    During the 320-by-200 and 640-by-200 modes, the emulator RAM shifts out the information 16 bits at a time. The shift register then shifts out its signals two bits at a time into the PEL processor. The 640-by-200 mode uses these two bits alternately as either black or white values. The 320-by-200 mode uses the same two bits to determine the color placed on the screen.

    The system microprocessor can read and write directly into the emulator RAM space using the CPU address bus.

    August 15,1984 14 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Display Memory

    The display memory block consists of the high-function graphics display memory and the display RAM address control.

    High-Function Graphics Display Memory

    Following is a block diagram of the high-function graphics display memory

    pP Data Latch Bus

    Control

    8

    Display Address Bus

    Shift Re ister Bus

    The high-function graphics display memory is logically arranged as an array of 640-by-480 PELs. Each PEL represents one byte of data. The Professional Graphics Controller provides a variety of PEL write modes to improve the transfer of data to display memory.

    The high-function graphics display memory consists of five, 32-bit-wide banks (32 bits equal 4 PELs). The controller microprocessor can write through the latch into the PEL memory. All information is read from each memory and displayed each

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 15

  • time the picture is scanned. This process begins when the tri-state drivers latch four PELs. Each tri-state driver is enabled individually as the beam crosses the screen. After the fourth PEL appears on the screen, four new PELs become latched.

    In the high-function graphics mode, the high-function graphics scanner generates addresses for a display access cycle on one of the five banks every 160 nanoseconds (ns). These cycles are staggered over an 800-ns period. Of the 32 bits of data latched from the memory, one PEL is released onto the shift register every 40 ns. The address selection generator, a field programmable logic sequencer (FPLS), interleaves microprocessor access cycles between display cycles, thus providing the possibility of access every 160 ns. This process achieves a display-memory access capacity of 32 bits every 80 ns.

    During a microprocessor write operation, even in multi-PEL write modes, all data from the microprocessor is latched, so the microprocessor receives a 'ready' instantly. The FPLS cycles to the correct locations, or to all locations, depending on the mode, while the microprocessor prepares for the next access.

    Another important aspect of the display memory is low power consumption. The staggered access technique reduces the RAM cycle time to as low as 400 ns, even with both the microprocessor and display at full capacity. When the display operates alone, the cycle time increases to 800 ns, minimizing RAM power consumption.

    ./

    August 15,1984 16 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Display RAM Address Control

    Following is a block diagram of the display RAM address control.

    8 Display Address Bus

    High-Function3

    Control Graphics Buffers

    Scanner

    r;::===~> Control8

    ROM

    16

    IlP Address Bus

    In the high-function graphics mode, the high-function graphics scanner operates as an address generator. The scanner output selects data from each of the five 32-bit-wide banks (for a total of 20 PELs written). The controller microprocessor expects memory to appear in a continuous manner; that is, 640 PELs across. The address-translator ROM is an address map of 640 adjacent memory locations. This provides the display format, thus leaving the controller microprocessor out of the conversion process.

    Because this address system operates on 20-PEL boundaries, the memory for each line maps into an adjacent space of 640 locations for microprocessor access. Otherwise, if the microprocessor did the work, the very high writing speeds would be reduced_

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 17

  • Look-Up Table and Video Output Section

    Following is a block diagram of the look-up table and video output section.

    latch Look·Up Table 12

    256 x 12 8 Memory

    Pixel Bus

    Red

    Latch Triple Green

    DAC Blue

    128

    BufferP Data Bus

    Shift registers from the display memory latch onto the PEL bus leading from the emulator. Both the emulator and high-function graphics modes use the same PEL bus. The latches provide an address for data in the look-up table (LUT). The eight lines of the PEL bus provide up to 256 colors, while the 256- by 12-bit LUT in memory provides a selection from a palette of 4096 colors. The LUT generates the color sent as output. The 12 LUT output lines (4 bits each for red, green, and blue) are the inputs to a triple digital-to-analog converter (DAC), which converts the signal to red, green, and blue (RGB) intensities. The controller microprocessor can write to and read from the LUT.

    August 15,1984 18 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Timing and Control Section

    Following is a block diagram of the timing and control section .

    ..

    System Control Signals

    ....

    I 50 MHz -Osc High-Function Graphics Display

    Timing

    s/

    I

    ... :> Control ....

    Generator Control

    s/ Control

    I 'J

    /oIP Control 3L

    s;. /oIP Address Bus :>

    Decoder and latches

    I

    /oIP Data tlus ~..

    The high-function graphics-display timing generator, which is driven by a 50-MHz oscillator, sends control signals for memory and for the latch control from the display memory. It signals the controller microprocessor when it is ready to receive or send data from display memory. Except for system control signals, the signals from the timing generator are latched and decoded. The controller microprocessor maintains some control of the latches and decoder. The timing generator also generates clock signals to synchronize the board functions.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 19

  • Emulator Modes

    To provide compatibility with the Color/Graphics Monitor Adapter protocols, the Professional Graphics Controller emulates the Color/Graphics Monitor Adapter in the alphanumeric and graphics modes. ~

    Note: If a Color/Graphics Adapter is already present in the system unit, the emulator section of the Professional Graphics Controller is disabled with the enable/disable jumper.

    Alphanumeric Mode

    Every display-character position in the alphanumeric mode is defined by two bytes in the regen buffer, not the system memory. Both the Professional Graphics Controller and the Color/Graphics Monitor Adapter use the following 2-byte character or attribute format.

    Attribute B e

    The attribute byte definitions are:

    7 6 5 4 3 2 1 0

    r B1 R G B111 R G B1

    Foreground ColorI I~ Foreground Intensity

    Background Color

    Foreground Blinking

    August 15,1984 20 Professional Graphics Controller © Copyright IBM Corporation \984

  • The following table provides a summary of available colors.

    I R G B Color 0 0 0 0 Black 0 0 0 1 Blue 0 0 1 0 Green 0 0 1 1 Cyan 0 1 0 0 Red 0 1 0 1 Magenta 0 1 1 0 Brown 0 1 1 1 White 1 0 0 0 Gra'l' 1 0 0 1 Light Blue 1 0 1 0 Light Green 1 0 1 1 Light Cyan 1 1 0 0 Light Red 1 1 0 1 Light Magenta 1 1 1 0 Yellow 1 1 1 1 White (High Intensit'l')

    In the alphanumeric mode, the display mode can be operated in either a 40-by-25 mode or a 80-by-25 mode.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 21

  • 40-by-25 Alphanumeric Mode

    The 40-by-25 alphanumeric mode:

    • Displays up to 25 rows of 40 characters each

    • Has a ROM character generator that contains dot patterns for a maximum of 256 different characters

    • Requires 2000 bytes of read/write memory (on the controller)

    • Has a 16-high by 8-wide character box

    • Has one character attribute for each character

    August 15,1984 22 Professional Graphics Controller © Copyright IBM Corporation 1984

  • 80-by-25 Alphanumeric Mode

    The 80-by-25 alphanumeric mode:

    • Supports the IBM Professional Graphics Display

    • Displays up to 25 rows of 80 characters each

    • Has a ROM character generator that contains dot patterns for a maximum of 256 different characters

    • Requires 4000 bytes of read/write memory (on the controller)

    • Has a 16-high by 8-wide character box

    • Has one character attribute for each character

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 23

  • Graphics Mode

    The Professional Graphics Controller has two modes available with the graphics mode-the 320-by-200 color/graphics mode and 640-by-200 black-and-white graphics mode. Both are supported in ROM. The following table summarizes the two modes.

    Modes Number of Colors Available (Includes Background Color)

    320 x 200 4 Colors Total 1 of 16 for Background and 1 of Green, Red, or Brown or 1 of Cyan, Magenta, or White

    640 x 200 Black-and-white only

    320-by-200 Color/Graphics Mode

    The 320-by-200 color/graphics mode supports the Color Display. It has the following features:

    • Contains a maximum of 200 rows of 320 picture elements (PELs), with each PEL being 2.4-high by I-wide

    • Preselects one of four colors for each PEL

    • Requires 16,000 bytes of read/write memory (on the controller)

    • Uses memory-mapped graphics

    August 15,1984 24 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • • Formats four PELs for each byte as follows:

    7 6 5 4 3 2 1 0 C1 CO C1 CO C1 CO C1 CO

    First Second Third Fourth

    Display Display Display Display

    PEL PEL PEL PEL

    • Organizes graphics storage in two banks of 8000 bytes, using the following format:

    Memory Address (in hex)

    Function

    B9F3F Even Scans (0,1,4,5,8,9...198)

    8,000 bytes

    B8000 Not Used

    BAOOO Odd Scans (2,3,6,7,10,11 ...199)

    8,000 bytes

    BBF3F Not Used

    BBFFF

    Address hex B8000 contains PEL information for the upper-left corner of the display.

    August 15,1984 © Copyright IBM Corporation 19S4 Professional Graphics Controller 25

  • • Determines color selection by the following logic:

    Cl co Function 0 0 Dot takes on the color of 1 of 16 preselected

    background colors

    0 1 Selects first color of preselected Color Set 1 or Color Set 2

    1 0 Selects second color of preslelcted Color Set 1 or Color Set 2

    1 1 Selects third color of preselected Color Set 1 or Color Set 2

    C1 and CO select 4 to 16 preselected colors. This color selection (palette) is pre loaded in an 110 port.

    The two color sets are:

    Color Set 1 Color Set 2

    Color 1 is green Color 1 is cyan

    Color 2 is red Color 2 is maQenta

    Color 3 is brown Color 3 is white

    August 15,1984 26 Professional Graphics Controller © Copyright IBM Corporation 1984

  • 640-by-200 Black-and-White Graphics Mode

    The 640-by-200 black-and-white graphics mode supports color monitors. This mode:

    ~. Contains a maximum of 200 rows of 640 PELs, with each PEL being I-high by I-wide.

    • Supports black-and-white mode only.

    • Requires 16,000 bytes of read/write memory (on the controller).

    • Uses the same addressing and mapping procedures as the 320-by-200 color/graphics mode, but the data format is different. In this mode, each bit in memory is mapped to a PEL on the screen.

    • Formats eight PELs per byte as follows:

    17161514131211101 .~.

    First Display PEL I J Second Display PE L

    Third Display PEL

    Fourth Display PEL

    Fifth Display PEL

    Sixth Display PE L

    Seventh Display PEL

    Eighth Display PE L

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 27

  • Description of Basic Operations

    In the alphanumeric mode, the controller fetches character and attribute information from its display buffer. The starting address of the display buffer is programmable through the 8088 Microprocessor, but it must be an even address. The character codes and attributes are then displayed according to their relative positions in the buffer as shown in the following.

    Memory

    Address (in hext Display Buffer

    88000

    (Even) Character Code A Starting

    88001Address Attribute A

    (Example of a 40 by 25 Screent88002

    ABCharacter Code B

    88003

    Attribute 8

    B87CE X

    Character Code X V ideo Screen

    Last 887CF Address Attribute X

    The processor and display control unit have equal access to the display buffer during all operating modes except the 640-by-200 alphanumeric mode. During this mode, the processor should have access to the display buffer during the vertical retrace time. If it does not, the display will be affected with random patterns as the processor is using the display buffer. In the alphanumeric mode, the characters are displayed from a prestored ROM character generator that contains the dot patterns of all the displayable characters.

    In the graphics mode, the displayed dots and colors (up to 16K bytes) are also fetched from the display buffer.

    August 15,1984 28 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • High-Function Graphics Mode

    The Professional Graphics Controller provides high function graphics capability for the PC by processing simple command strings into bit-mapped images in the controller. The Professional

    ,-...., Graphics Controller provides both alphanumeric and graphic capabilities.

    Alphanumeric Operation

    The alphanumeric operation:

    • Contains a built-in character font with character enlargement capabilities.

    • Uses a smoothing function for enlarged characters.

    • Permits characters to be drawn in a foreground color with a transparent background; therefore, whatever is behind the character remains there.

    • Contains programmable character fonts accessible through the high-function graphics command set.

    Note: The programmable character sets cannot be enlarged.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 29

  • Graphics Operation

    The high-function graphics mode supports the Professional Graphics Display. It has the following features:

    • Contains 480 rows of 640 PELs; the PELs are spaced the same distance vertically and horizontally providing the standard 4:3 screen aspect ratio.

    • The color of each PEL is selected from a set of 256 colors, which are selected from a palette of 4096 colors.

    • Requires 307,200 bytes of read/write memory (on the controller) .

    Note: This memory is addressable only through the high-function graphics commands and does not occupy system address space.

    • Uses memory-mapped graphics.

    • Formats one PEL for each byte.

    • Organizes a communications area consisting of a bank of 1000 bytes.

    August 15,1984 30 Professional Graphics Controller © Copyright IBM Corporation 1984

  • • Color selection is determined by the following logic:

    The display RAM supplies an 8-bit byte that is used as an address to the LUT. This 8-bit address selects one of 256 12-bit words from the LUT. This data provides the color information for each PEL to be sent to the screen. The 12-bit word is divided into three groups of 4-bits: 4 red, 4 green, and 4 blue, as shown in the following table.

    4 Bits I 4 Bits I 4 Bits

    Red I Green I Blue

    1 PEL

    1 Byte

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 31

  • Description of Basic Operations

    The controller microprocessor interprets high-function graphics commands and translates them into data that is stored in the display memory. The display memory is then scanned 60 times each second. Each byte is then sent to the LUT. Whatever data is in memory is used as an address to the LUT data to determine what is sent to the screen.

    August 15, 1984 32 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Programming Considerations

    The Professional Graphics Controller provides the operation of two individual adapters: (1) the Color/Graphics Monitor Adapter and (2) the High-Function Graphics Adapter. The emulation operation and the high-function graphics operation may be individually programmed. High-function graphics commands determine which of the two operations ~ppears on the screen.

    Emulator Programming Considerations

    The Professional Graphics Controller emulates the 6845 CRT Controller of the Color/Graphics Monitor Adapter.

    Programming the 6845 CRT Controller

    The CRT Controller has 19 accessible internal registers, which are used to define and control a raster-scan CRT display. One of these registers, the index register, is actually used as a pointer to the other 18 registers. It is a write-only register, and is loaded from the processor by executing an Out instruction to I/O address hex 3D4. The five least-significant bits of the I/O bus are loaded into the index register.

    To load any of the other 18 registers, the index register is first loaded with the necessary pointer; then the data register is loaded with the information to be placed in the selected register. The data register is loaded from the processor by an Out instruction to I/O address hex 3D5.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 33

  • The following table defines the values that must be loaded into the 6845 CRT Controller registers to control the different modes of operation supported by the controller.

    Address Register Register Units I/O 40 by 25 80 by 25 GraphicRegister Number Type Alpha- Alpha- Modes

    numeric numeric

    4 R4 Vertical Total Character Write 1F 1F 1F Row Only

    5 R5 Vertical Total Scan Line Write 06 06 06 Adjust Only

    6 R6 Vertical Character Write 19 19 19 Displayed Row Only

    7 R7 Vertical Sync Character Write lC lC lC Position Row Only

    A Rl0 Cursor Start Scan Line Write 06 06 06 Only

    B Rl1 Cursor End Scan Line Write 07 07 07 Only

    C R12 Start - Write 00 00 00 Address(H) Only

    D R13 Start - Write 00 00 00 Address(L) Only

    E R14 Cursor - Read/ XX XX XX Address(H) Write

    F R15 Cursor - Read/ XX XX XX Address(L) Write

    Note: All register values are in hexadecimal

    August 15, 1984 34 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • Programming the Mode Control and Status Registers

    The following shows the I/O registers of the Professional Graphics Controller.

    Function of Register Hex A9 AS A7 A6 A5 A4 A3 A2 Al AO Address

    Mode Control Register 308 1 1 1 1 0 1 1 0 0 0 (00)

    Color Select Register 309 1 1 1 1 0 1 1 0 0 1

    (00)

    Status Register (01) 30A 1 1 1 1 0 1 1 0 1 0

    6845 Index Register 304 1 1 1 1 0 1 0 1 0 0

    6845 Oata Register 305 1 1 1 1 0 1 0 1 0 1

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 35

  • Color-Select Register

    This is a 6-bit, output-only register (cannot be read). Its I/O address is hex 3D9, and it can be written to by using the 8088 Microprocessor's I/O Out command. Following is a description of the bits of the color-select register.

    Bit 0 Selects B (blue) background color in 320 x 200 graphics mode Selects B (blue) foreground color in 640 x 200 graphics mode

    Bit 1 Selects G (green) background color in 320 x 200 graphics mode Selects G (green) foreground color in 640 x 200 graphics mode

    Bit 2 Selects R (red) background color in 320 x 200 graphics mode Selects R (red) foreground color in 640 x 200 graphics mode

    Bit 3 Selects I (intensified) background color in 320 x 200 graphics mode Selects I (intensified) foreground color in 640 x 200 graphics mode

    Bit 4 Selects alternate, intensified set of colors in graphics mode

    Bit 5 Bit 6

    Selects active color set in graphics mode Not used

    Bit 7 Not used

    Bits 0, 1, 2, 3 Select the foreground color in the 640-by-200 color / graphics mode, and the background color (CO or C 1) in the 320 by 200 color/graphics mode.

    Bit 4 When set, selects an alternate, intensified set of colors.

    Bit 5 Used in the 320 by 200 color/graphics mode to select the active set of screen colors for the display.

    August 15, 1984 36 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • When bit 5 is set to 0, colors are determined as follows:

    C1 co Colors Selected 0 0 Background (Defined by

    bits 0-3 of port hex 309)

    0 1 Green

    1 0 Red

    1 1 Brown

    When bit 5 is set to 1, colors are determined as follows:

    C1 co Colors Selected 0 0 Background (Defined by

    bits 0-3 of port hex 309)

    0 1 Cyan

    1 0 Magenta

    1 1 White

    When bit 5 is set to °and bit 2 of the mode-select register is set to 1, colors are determined as follows:

    C1 co Colors Selected 0 0 Backqround

    0 1 Cyan

    1 0 Red

    1 1 White

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 37

  • Mode-Select Register

    This is a 6-bit, output-only register (cannot be read). Its I/O address is hex 3D8, and it can be written to using the 8088 Microprocessor's I/O Out command.

    The following table is a description of the register's functions when the bit values are set to 1.

    Bit 0 80 x 25 alphanumeric mode Bit 1 Graphics select Bit 2 Black/white select Bit 3 Enable video signal Bit 4 640 x 200 black/white mode Bit 5 Change background intensity to blink bit Bit 6 Not used Bit 7 Not used

    Bit 0 A 1 selects 80-by-25 alphanumeric mode. A a selects 40-by-25 alphanumeric mode.

    Bit 1 A 1 selects graphics mode. A a selects alphanumeric mode.

    August 15, 1984 38 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Bit 2· A 1 selects black-and-white mode. A 0 selects color mode.

    Bit 3 A 1 enables the video signal at certain times when modes are being changed. The video signal should be disabled when changing modes.

    Bit 4 A 1 selects the 640-by-200 mode black-and-white graphics mode. One of 8 colors can be selected on direct-drive sets in this mode by using register hex 3D9.

    Bit 5 When on (set to 1), this bit changes the character background intensity to the blinking attribute function for alphanumeric modes. When the high-order attribute bit is not selected, 16 background colors (or intensified colors) are available. For normal operation, this bit should be set to 1 to allow the blinking function.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 39

  • Mode-Select Register Summary

    The following table shows the mode-select registers.

    Bits

    0 1 2 3 4 5

    0 0 1 1 0 1 40 x 25 Alphanumeric Black-and-White

    0 0 0 1 0 1 40 x 25 Alphanumeric Color

    1 0 1 1 0 1 80 x 25 Alphanumeric Black-and-White

    1 0 0 1 0 1 80 x 25 Alphanumeric Color

    0 1 1 1 0 z 320 x 200 Black-and-White Graphics

    0 1 0 1 0 z 320 x 200 Color Graphics

    0 1 1 1 1 z 640 x 200 Black-and-White Graphics

    II I : Eo,,,, Bli 0' "nib"" 640 x 200 Black-and-White

    Enable Video Signal

    L-______.. Select Black-and-White Mode

    L-_______~ Select 320 x 200 Graphics

    L-________..... 80 x 25 Alphanumeric Select

    z = Don't care condition

    August 15, 1984 40 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Status Register

    The status register is a 4-bit, read-only register. Its I/O address is hex 3DA, and it can be read using the 8088 Microprocessor's I/O In command. The following table is a description of the register

    ~ functions.

    Bit 0 Display Enable Bit 1 Reserved Bit 2 Reserved Bit 3 Vertical Sync Bit 4 Not Used Bit 5 Not Used Bit 6 Not Used Bit 7 Not Used

    Bit 0 When set to 1, indicates that access to the regen buffer memory can be made without interfering with the display.

    Bit 3 When set to 1, indicates that the raster is in a vertical retrace mode. This is a good time to update the screen buffer.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 41

  • Sequence of Events for Changing Modes

    1. Determine the mode of operation.

    2. Reset the video enable bit in the mode-select register.

    3. Program the CRT Controller to select the mode.

    4. Program the mode- and color-select registers, including re-enabling video.

    Memory Requirements

    The memory used by this controller is provided entirely on-board. It consists of 16K bytes without parity. This memory is used as both a display buffer for alphanumeric data and as a bit map for graphics data. The regen buffer's address starts at hex B8000. The following table shows the memory requirements.

    Read/Write Memory Address Space (in hexl

    01000 System Read/Write Memory

    AOOOO

    B8000 Display Buffer (16K Bytesl

    BBFFF

    COOOO

    August 15, 1984 42 Professional Graphics Controller © Copyright IBM Corporation 1984

  • High-Function Graphics Programming Considerations

    The high-function graphics command set uses a wide range of two-dimensional and three-dimensional programs that include:

    • Drawing primitives with points, vectors, and polygons in two and three dimensions

    • Coordinate transformations with modeling (scaling, rotation, translation) and viewing transformations

    • Drawing primitives with rectangles, circles, ellipses, arcs, and sectors in two dimensions

    • Stored segments that define and execute command lists

    • Color control functions

    • Text generation

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 43

  • Following is a flowchart of the two- and three-dimensional commands.

    3D Commands

    2D Commands

    44 Professional Graphics Controller

    Modeling Transformation (4-by-4 Matrix)

    Viewing Transformation (4-by-4 Matrix)

    Hither/Yon Clipping

    3D to 2D Transformation

    Window Clipping and Viewport Transformation

    ~

    Standard 2D Draw Routines

    August 15, 1984 (0 Copyright IBM Corporation 19H4

  • Objects may be defined in three dimensions using the three-dimensional drawing commands. A modeling matrix allows the object to be moved (translated), changed in size (scaled), and rotated. A viewing matrix allows the object to be viewed from different directions and distances.

    Two clipping planes are defined at right angles to the line-of-sight. Any part of an object beyond the yon clipping plane and any part of an object in front of the hither clipping plane are not seen.

    Three-dimensional objects are projected onto a two-dimensional viewplane, which is the plane of the monitor's screen. Two-dimensional objects are defined directly on the viewplane. Coordinates on the viewplane are referred to as virtual coordinates. A window defines that area of the viewplane that is visible. Any part of an object outside the defined window is not seen. A viewport specifies a rectangular area on the monitor's screen that completely contains the defined window.

    Coordinate Space

    Two-dimensional commands operate on a virtual coordinate space whose x and y boundaries range from -32768.00000 bits to +32767.99999 bits, with 16 bits of precision to the right of the decimal point. The display screen, however, is 640 PELs wide by 480 high. Therefore, commands are available to specify how coordinates are converted from virtual values to screen values. In addition, portions of the physical screen may be declared "off limits" to drawing. This is accomplished through the command VWPORT, which defines a rectangular clipping viewport.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 45

  • The following figure shows the relationship of two-dimensional virtual coordinate space to real coordinate space.

    Virtual Coordinate Space (2D) Real Coordinate Space +32767.99999 Bits J-- 640 Bits --I0 1Transformation 480Process ~ y ISx-32768.00000 Bits +32767.99999

    (0,0) Bits (0,0)

    -32768.00000 Bits

    Three-dimensional drawing commands operate in a virtual coordinate space whose x and y boundaries range from -32768.00000 bits to +32767.99999 bits, but a z coordinate is added, which may have any value in the same range as x and y. All three-dimensional drawing may be divided into a series of points and lines; these points and lines are what are mapped onto the two-dimensional plane for actual writing to the display. ~

    The following figure shows the relationship of three-dimensional virtual coordinate space to real coordinate space,

    Virtual Coordinate Space (3D) Real Coordinate Space

    -32768.00000 Bits +32767.99999 Bits J....--640 Bits~

    , ;;~:!:~rmationDT "" y • 480 Bits1

    -32768.00000 Bitst------'..."k--x--.... +32767.99999 Bits (0,0,0)

    +32767.99999 Bits-32768.00000 Bits

    August 15, 1984 46 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Coordinate Transformations

    The high-function graphics mode refers to four coordinate systems when converting three-dimensional virtual coordinates to a screen image. The two-dimensional commands MOVE and

    ~ DRAW undergo a single transformation.

    Two-Dimensional Transformation

    The lowest level of transformation occurs following the two-dimensional command MOVE or DRAW. These commands use parameters given in two-dimensional virtual coordinates. The high-function graphics mode converts these points to screen coordinates. To understand this conversion, keep in mind that the window in two-dimensional virtual space maps onto the viewport of the screen.

    The WINDOW command defines an area (window) in two-dimensional virtual space to be mapped into a defined viewport with x and y virtual coordinate values, as follows:

    y Window

    ~ Yw2

    x w l,Ywl xw2

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 47

    x

  • The x and y values may range from -32768.00000 to +32767.99999. The VWPORT command defines an area (viewport) within the display screen with x and y screen coordinate values, as shown in the following.

    Viewport I

    Yv2 . . . . . . . . . . +. . .

    xv1,Yv1 xv2

    x

    0,0

    The x values range from 0 to 639, and the y values from 0 to 479. ~

    The two-dimensional command uses virtual coordinates; that is,

    X2dvir and Y2dvir. The high-function graphics mode converts

    these to screen coordinates, Xscrn and Yscrn, using the following

    equations.

    (Xv2 - XvI)

    Xscrn (X2dvir - XwI) x ----------------- + XvI

    (Xw2 - XwI)

    (Yv2 - YvI)

    Yscrn = (Y2dvir - Ywl) x ----------------- + YvI

    (Yw2 - Ywl)

    The X2dvir, Y2dvir are two-dimensional virtual coordinates. The variables Xwl, Xw2, Ywl, and Yw2 are window coordinates, and ,,-..... XvI, Xv2, Yvl, and Yv2 are viewport coordinates.

    August 15, 1984 48 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Three-Dimensional Transformation

    Three-dimensional transformations involve converting three-dimensional points to two dimensions. This process uses the following matrix operation for the conversion; that is

    ~ three-dimensional world coordinates to three-dimensional viewing coordinates:

    [Xview, Yview, Zview, 1 ] = [Xvi.rtual, Yvirtual, Zvirtual, 1] x [M] x [VRP] x [V]

    [M] represents the modeling matrix, [VRP] represents the view reference point matrix, and [V] denotes the viewing matrix. The three-dimensional viewing coordinates can be read back using the command FLAGRD 24. The last value of the viewing matrix remains 1 only if the last columns of all matrixes entered in this formula have the following form.

    x x x 0 x x x 0 x x x 0 x x X 1

    Otherwise, the result will have the form:

    [Xview, Yview, Zview, Q]

    To reduce this result to the form required, simply divide the X, Y, and Z values by the value Q. This operation gives a 1 as the final column value of the matrix, and proper values for the other three parameters.

    ~ The Modeling Matrix

    The modeling matrix, [M], rotates, translates, and scales the coordinate values of an object defined in three-dimensional

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 49

  • virtual coordinates. Rotation about any axis uses the right-hand rule. To understand this principle, refer to the coordinate space depicted below (the positive z direction comes out of the page).

    y

    x

    z

    To rotate in a positive direction around the y axis, the positive z axis rotates toward the positive x axis. To rotate in a positive direction around the x axis, the positive y axis rotates toward the positive z axis. To rotate in a positive direction around the z axis, the positive x axis rotates toward the positive y axis.

    Keep in mind that the order of rotation changes the viewing faces of the object. That is, an object rotated along the x axis, then the y axis, gives a different perspective than if the same object is rotated first along the y axis, then the x axis.

    August 15, 1984 50 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • The following illustration depicts various viewing perspectives.

    Original

    MDROTX 90 '" then ... MDROTY 90

    MDROTY 90 ... then ... MDROTX 90

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 51

  • Rotation involves the matrix operation,

    [M(new)] [M(old)] x [M(rst)]

    [M(rst)] represents the rotation, scaling, or translation matrix.

    For rotation, this matrix differs with each axis chosen as the axis

    of rotation. For each direction of rotation, the algorithm refers to

    the appropriate matrix as follows:

    1 0 0 0 0 cose sine 0

    Rx((;l} = 0 -sinO cosO 0 0 0 0

    cosO 0 -sinO 0 0 1 0 0

    Ry(O) sinO 0 cosO 0

    0 0 0

    case sine 0 0 -sine cose 0 0

    Rz(e) = 0 0 1 0 0 0 0 1

    The scaling operation uses the following matrix.

    Xs 0 0 0 o ys 0 0s o 0 Zs 0 000

    August 15, 1984 52 Professional Graphics Controller © Copyright IBM Corporation 1984

  • The translation operation uses the following matrix.

    000 000

    T 001 0 Xt Yt Zt

    Viewer Reference-Point Matrix

    The viewer reference-point matrix, [VRP], translates the point viewed by the user to the center of the currently defined window. Because the window coordinates map onto the viewport coordinates, this matrix also places the user-viewed point at the center of the viewport.

    The viewing matrix, [V], affects the degree of rotation of the object by moving the eye about the object, while keeping the object stationary. Like the modeling matrix, the viewing matrix uses the right-hand rule for rotation of the eye about the viewing

    ~ reference point.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 53

  • Three-Dimensional Hither and Yon Clipping

    Besides two-dimensional viewport clipping, the high-function graphics mode also clips in the third dimension. The hither and yon clipping designate two x-y planes along the z axis beyond which no drawing takes place.

    . . . . . . . . . .

    +y

    • _Yon Plane -z

    . . . . -x _-------JL...------. +x

    +z

    _ Hither Plane

    -y . . .

    August 15, 1984 54 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Three-Dimensional Viewing to Two-Dimensional Virtual Projection

    Using the DISTAN command, the user specifies the distance from the eye to the viewplane. The command PROJCT provides a

    ""viewing angle with a value ranging from 1 to 179 degrees. The high-function graphics mode projects the viewing coordinate into a two-dimensional coordinate value using the following formulas.

    DISTAN WINDOW DIAGONAL X2dvir ------------ x Xview x ------------------------

    DISTAN - Z 2 x DISTAN x tan(PROJCT)

    2

    DISTAN WINDOW DIAGONAL Y2dvir ------------ x Yview x ------------------------

    DISTAN - Z 2 x DISTAN x tan(PROJCT)

    2

    Placing the object closer magnifies the X and Y values. Increasing the viewing angle increases the amount of picture visible in the viewing field.

    If the PROJCT angle is 0, the projection is orthographic parallel (non-oblique), The high-function graphics mode projects the viewing coordinate into a two-dimensional coordinate value using the following formulas:

    X2dvir Xview

    Y2dvir Yview

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 55

  • Video Generation

    A total of 256 colors may be displayed on the screen at one time. A total of 4096 possible color selections is available to the LUTs. The video generation process begins when the video scanner reads the value of the PEL about to be displayed. The PEL value ~ consists of eight bits and is used as an address to the LUT. The PEL value selects one of 256 12-bit entries in the table. The three 4-bit output values from the LUT represent the red, green, and blue intensities required to compose the target PEL. Because the table outputs are 4 bits each for the three colors, the 256 simultaneous colors may be chosen from a 4096-color palette. The LUTINT command sets the entire look-up table from one of several predefined LUT selections. The LUT command loads individual LUT entries, and LUTRD reads them back.

    Each bit of each PEL resides in one of eight bit planes in the display memory. The bit planes are masked for reading and writing. These bit planes are shown in the following.

    Bit Plane 7

    Bit Plane 0

    480 Bits

    ~

    -~-

    '-'-

    '- 1~_______ 640 ________~

    Bits

    August 15, 1984. 56 Professional Graphics Controller CD Copyright IBM Corporation 1984

  • Current Point

    The current point is the x-y-z coordinate point at which the last command finished. Many high-function graphics commands use a current point in carrying out their functions. Two current points

    ~ are maintained; one is used by two-dimensional commands, the other by three-dimensional commands. For example, the two-dimensional command CIRCLE draws a circle centered on the two-dimensional current point; the three-dimensional command DRAW3 draws a vector that starts at the three-dimensional current point. The current points are moved whenever move and draw commands are executed. When referred to in the command descriptions, the applicable current point will be identified, unless it is clear from the context of the command.

    The command CONVRT will change a three-dimensional current point to a two-dimensional virtual coordinate. This conversion allows the user to overdraw a three-dimensional drawing with two-dimensional commands, such as text.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 57

  • Current Color

    The current color is the last color a COLOR command defines for general drawing. Drawing is possible in two modes-the complement drawing mode and the replace drawing mode. In the complement drawing mode, the PEL bit value in display RAM is ".-....., complemented from its current value. In the replace drawing mode, the PEL bit value in display RAM is changed to a specified value. The value comes from the current color, which is set by using the COLOR command.

    Note: In both cases, the actual value written into a PEL may be affected by a mask.

    Display Control

    Display control commands set or reset flags or define commonly used parameters. All these commands affect the way that later commands draw to the screen.

    Drawing Modes

    The high-function graphics mode provides several drawing modes. It has its own language. The Professional Graphics Controller also imitates two current graphics modes resident in the existing PC graphics systems. The Professional Graphics Controller will accept and execute all commands sent to either mode. To view the current status of commands sent to a particular mode, use the DISPLA command, indicating the appropriate mode as the parameter. This command simply switches between the high-function graphics screen and the emulator screen. All previous drawing sent to either screen remains intact during these switches, because Draw commands are independent of the viewing status; that is, high-function graphics commands affect the high-function graphics screen even while the emulator screen is displayed.

    August 15,198458 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Primitive Fills and Drawing Patterns

    The command PRMFIL sets an onloff flag to fill the commands that draw defined geometric shapes and create an enclosed area. Each command description will note the effects of any flags.

    ~

    The user can change the drawing pattern by using Pattern commands. The command LINPAT governs any vector or other command drawing a geometric shape (with PRMFIL off). the parameter, a 16-bit number, acts as a mask during drawing. Each bit sets an onloff pattern for a corresp6nding PEL on the screen. This pattern repeats every 16 PELs. A 1 in any bit position draws a PEL, while a 0 changes nothing. The value 65535

    produces a solid line.

    Similarly, the command AREAPT establishes a drawing pattern for an area using a 16-bit by 16-bit format. This command repeats in blocks of 16-by-16 PELs, duplicating the pattern in both a horizontal and vertical direction. To define a pattern, enter sixteen 16-bit words, visualizing their orientation on a grid. For example:

    Word Pattern Bit Order Number

    F XXXX XXXX XXX X 62415

    E XXXX XXXX XXX 31207

    D XXXX XXXX XX 15603

    C X XXX X XXX X X 40569

    B XX XXXX XXXX 53057

    A XXX XXX X XXX X 59294

    9 XXX X XXX X XXXX 62415

    8 XXXX XXXX XXX 31207

    7 XXXX XXX X XX 15603

    6 X XXXX XXXX X 40569

    5 XX XXXX XXXX 53057

    4 XXX XXX X XXXX 59294

    3 XXXX XXXX XXXX 62415

    2 XXX X XXXX XXX 31207

    1 XXXX XXXX XX 15603

    0 X XXX X XXXX X 40569

    FEDCBA9876543210

    August 15,1984

    © Copyright IBM Corporation 1984 Professional Graphics ControUer 59

  • Each word, then, would equal the decimal equivalent of the 16-bit number. For this example, use 40569 for word 0, 15603 for word 1, and so on. In hexadecimal mode, these same words should read 9E79 for word 0, 3CF3 for word 1, and so on.

    Masks

    Masks act as an overlay to either reveal or overwrite the bits of a PEL. In reference to bit planes, the mask can effectively separate planes and protect certain ones. Masks affect only read and write operations but do not affect the displayed PELs.

    Bit Planes

    The number of bits used to define the colors of a graphics system also defines the number of bit planes. Masks control the CPU reads and writes. By using LUT entries, the user can designate which bits will actually draw to the screen. This capability effectively produces backgrounds. For example, if a mask hides the first four bits of all color values, the system draws colors using only the last four bits. Colors defined using the first four bits can ~ be protected by suitably setting the LUTs. Switching among more than one LUT can produce animation.

    The following mask writes only PELs whose color-values (indexes) are given as xOH, where x can equal °to F.

    o ~ 8-Bit Mask Value

    '----.... Masked Bits

    '--------~ Written Bit

    Color values such as 19H and B4H will write as lxH and BxH respectively, where x leaves any previous draw untouched.

    August 15, 1984 60 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Area Pattern Mask

    The command FILMSK affects the two Area Fill commands. The 8-bit value of FILMSK is ANDed with the value of MASK and with each PEL value read in an Area Fill command. The high-function graphics mode then compares the ANDed value to the boundary color.

    Clipping

    The high-function graphics mode describes a clipping window and a set of clipping planes. Both the VWPORT and WINDOW command define a clipping border, for the screen and two-dimensional virtual space, respectively. The clipping window can change to include more or less of the image in two-dimensional virtual space. The viewport clipping window defines the area on the screen that is to contain the image. Redefining the coordinates of the viewport allows several clipped images to appear on the screen simultaneously.

    In three-dimension, the high-function graphics mode adds hither ~ and yon clipping capabilities. The previously defined clipping

    window projects forward and backward to define a clipping space. The high-function graphics mode calculates all intersecting clipping planes.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 61

  • Viewing

    Viewing involves selecting a viewing distance with the command DISTAN and a viewing angle with the command PROJCT.

    WAIT

    The command WAIT causes the system to pause for a specified number of frame scan cycles. An imbedded Wait command will hold the drawn image on the screen for a specified amount of time before continuing with the program. The Wait command bases its timing on frame time, which equals 1/60 of a second. Use this value to calculate the actual wait period. For example, specifying 300 frame times would give a wait period of 5 seconds.

    August 15, 1984 62 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • Drawing Primitives

    The term drawing primitives defines a group of commands that draw defined geometric shapes. The user specifies size and

    ,............ position with the parameters associated with each command.

    Two-Dimensional and Three-Dimensional Command Format

    Two-dimensional commands use no numbers within the 6-letter command. All three-dimensional commands end in the numeral 3. Coordinates for two-dimensional commands require one variable each-for the x and y values; the three-dimensional commands require three coordinate values (one each for the x, y, and z direction). Not all two-dimensional Draw commands have a three-dimensional counterpart.

    Move Commands

    The Move commands change the current point in either the two-dimensional or three-dimensional coordinate space, one current point for each space. The commands MOVE and MOVE3 specify a change using absolute coordinate values. These commands use the virtual coordinate systems. MOVER and MOVER3 change the current point by a relative amount, adding the parameter values to the current point to produce a new coordinate value as the current point.

    Point

    The Point command changes the PEL at the current point to the current color.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 63

  • Vectors

    Draw commands produce vectors (directed line segments)

    between two specified points. The current-point value supplies

    the first coordinate. The high-function graphics mode then draws ~

    a vector ending at the absolute coordinate values given in a

    DRAW or DRAW3 command or at the relative distance specified

    by the parameters of a DRAWR or a DRAWR3 commands.

    After a vector command, the current point shifts to the location

    of the last PEL drawn. The following examples show vectors.

    Parameter Point Parameter Point (x,V) (xO+dx,VO+dV)

    (xO,VO) (xO,VO) Current Point Current Point

    August 15, 1984 64 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Linear Forms

    The high-function graphics mode produces two closed linear forms: rectangles and polygons. Two points define a rectangle. The current point is one corner of the shape. The parameters, given in absolute values (RECT) or in a relative, offset distance (RECTR), specify the opposite corner. The current point does not change for any rectangle command. Rectangles are specified only in two dimensions. The following example shows rectangles:

    Parameter Point Parameter Point

    (x,Y) (xO+dx, yO+dy)

    \ \ (xO,yO)

    Current Point \ (xO,yO) Current Point \ Rectangle Rectangle Relative

    Each pair of coordinates in a Polygon command declares a vertex of any multisided figure. Two pairs of coordinate values, adjacent within a command's variable string, produce a side between them. The command effectively draws multiple vectors, changing the current point to the location of the last PEL drawn. This pattern continues until a vector has been drawn to the last coordinate. The final draw of the command connects the final coordinates given to the beginning point of the polygon. The current point returns to its original value. Again this command uses either absolute or relative coordinates-POLY or POLYR for two-dimensional, and POLY3 or POLYR3 for three-dimensional. All relative coordinates are expressed relative to the original point. Keep in mind that nonplanar values in three-dimensional polygons may produce undesired effects.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 65

  • The following is an example of a polygon.

    (x4,y4)

    Final Point

    in Parameter List

    Final

    Draw •

    (xO,yO) (xl,yl)

    Note: The primitive fill flag in PRMFIL 1 directs the high-function graphics mode to draw any of the above rectangles or polygons as a solid (that is, all enclosed PELs are set to the current color). Undesirable effects may occur .~ if the filled polygon intersects itself.

    Nonlinear Forms

    The high-function graphics mode also produces some nonlinear geometric shapes. The commands CIRCLE and ELIPSE require only radius values (both an x and y radius value for ELIPSE). The current point specifies the center of both of these figures. The parameters for the command ARC list a radius, a beginning angle value, and an ending angle value. The current point also serves as the center point of rotation for this command. The command SECTOR has the same parameter requirements as an ARC command, but produces a pie-shaped figure. That is, the end-points of the arc connect with vectors to the center point of rotation.

    Except when used with the ARC command, a PRMFIL command with the fill flag set on, will instruct the commands to produce solid shapes filled with PELs of the current color. All nonlinear commands draw only in two dimensions.

    August 15, 1984 66 Professional Graphics Controller © Copyright IBM Corporation 1984

  • The following illustrations show examples of nonlinear forms.

    ARC

    " Current Point

    Current Point

    ARC deg 0 deg 1 example CI RCLE radius example

    Current Point

    ELiPSE x radius y radius example

    SECTOR deg 0 deg 1 example

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 67

    ,,'-------------------------------------------------------------------------------

  • Area Fills

    The Area Fill commands employ a seed point. Before sending an Area Fill command, place the current point within the area to be filled. The current color must differ from the color being changed. The command AREA changes PELs outward in all directions from the current (seed) point until is encountered a color different from either the one being changed or the current color. The command AREABC allows the user to specify a color to act as a boundary. This command converts PELs from the seed point outward until PELs of the same color as the specified boundary color are encountered. The current color must differ from the boundary color. The following is an Area Fill example.

    Seed Point

    Color 4

    Color 1 Color 2 Boundary Color 3

    In the Area Fill example, set the current color to color 4. The Area Fill will fill only the area covered by color 1. The Area Boundary Fill specified with the boundary color set to color 3 will fill the area covered by color 1 and color 2.

    August 15, 1984 68 Professional Graphics Controller © Copyright IBM Corporation 1984

    --------------------------------------------------------------~-'

  • Text

    Various Text commands help in placing and moving text. The two-dimensional current point acts as a placement marker. For justifying text, this point defines the horizontal and vertical

    ~ placement of the text string, using the command TJUST (see the following). The default is H = 1, V = 1.

    H = 1 H=2 H=3

    r-----------------------------------------, --- V=3 L...-_________________T_ex_t_S_tr_in_9________________----l1 =~:~

    Altering the angle adjusts the slope of the centering point for each letter but not the rotation of the letter itself. The command TANGLE uses standard Cartesian coordinates to measure the angle, as shown in the following.

    deg 0

    To adjust the text size, use the command TSIZE. The parameter of this command specifies a two-dimensional virtual x-distance. Keep in mind that the high-function graphics mode sizes letters using the mapping of the window onto the viewport. For

    ~ example, a window of 320 PELs by 240 PELs mapped to a viewport of 640 PELs by 480 PELs would draw size 8 letters in a 16-PEL horizontal space. All text that exceeds the viewport

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 69

  • boundary undergoes clipping. The default, size 8, writes a character of 7 by 9 PELs in a cell of 8 by 12 PELs using one column for horizontal spacing between letters (see the following).

    ~I·~-----x------_~~I

    Use the commands TEXT or TEXTD to write text to the screen. TEXT uses a default text font; TEXTD uses any text defined in the command TDEFIN. This command requires a size specification followed by a bit value to describe each line of blocks. The first step is to outline an area that encompasses the character (see the following).

    Line Number 5 _ X X X X X Line Number 4 _ X X X X Line Number 3 _ X X Line Number 2 _ X X X X Line Number 1 _ X X

    7 6 5 4 3 2 1 o ___ Bit Number

    Then list each bit; start with the bottom, leftmost block and work to the right and up. The command for this character becomes:

    TDEFIN 'x' 85 0 0 1 0 000 1 1 1 1 0 000 1 0 0 1 0 000 1 1 1 1 0 000 1 0 0 1 1 1 1 1 0

    August 15, 1984 70 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • Command Lists

    Command lists consist of a series of valid high-function graphics commands executed by a single command. The commands CLBEG and CLEND mark the beginning and end of command lists. Two commands begin execution of command lists. CLRUN executes a single command list once; CLOOP executes a single command list a specified number of times. The commands CLDEL and CLBEG delete a command list previously defined by the specified parameter value. Space permitting, the user can define up to 256 command lists. Any command, except CLBEG, may appear within a command list definition. However, during the execution of a command list, the high-function graphics mode will not execute an imbedded CLDEL.

    The following examples show valid formats for command lists.

    CLBEG 8 CLBEG 17 CLEARS 0 CLEARS 0 MOVE 0 0 PRMFIL 1 PRMFIL 1 MOVER 10 0 COLOR 2 COLOR 2 SECTOR 100 60 359 CIRCLE 5 MOVE 10 10 CLEND COLOR 3 CLOOP 17 5 SECTOR 90 0 59 CLEND

    CLRUN 8

    Command list 8 will draw two sectors of different colors. Command list 17 will draw a small circle of radius 5. The command CLOOP repeats command list 17 five times, thus drawing five, small, tangential circles.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 71

  • The following example shows an invalid format for a command list.

    CLBEG 23 CLEARS 0 CLBEG 1

    CIRCLE 25 CLEND 2 CLDEL 14 CLEND

    Command list 23 is invalid because:

    • CLBEG cannot appear within a stream of command list commands.

    • If the high-function graphics mode receives CLRUN 23, the execution of CLDEL command would produce an error.

    August 15, 1984 72 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Look-Up Table

    The look-up table (LUT) contains the red, green, and blue intensity information associated with each color. A value, or index, identifies each color. The high-function graphics mode

    "" provides several default LUT selections, which are accessible with the command LUTINT. The user can change values by using the command LUT or by initializing a new table. The command LUTSAV stores the current LUT values. LUTSAV overwrites any previously saved LUT values. The saved values may be selected by the command LUTINT 255. The following block diagram illustrates LUT generation.

    States .., 0 I LUTINT 0 LUT CommandI

    !I

    I 1 I LUTINT 1 · · -=> · I "'-.,

    I 5 ,/"I LUTINT 5 I LUT "I ,/

    L I "-

    v ~ 255 I LUTINT 255I I /~

    LUTSAV Command

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 73

  • Image Processing

    The high-function graphics mode uses limited image-processing techniques. The user can read or write a line of PEL data with variable endpoints. The user specifies a line number and a beginning and ending point within that line. The Image Read command (IMAGER) returns the line data formatted as an Image Write command (IMAGEW). This format makes it easier to use stored image information. The following illustrates image processing.

    ,----------------,_ Line 479

    PELs -4-- Monitor Screen

    I •••••••••••••••••••••• ~I---- Specified Line , I

    Xl x2

    t PEL 0

    August 15, 1984 74 Professional Graphics ControUer © Copyright IBM Corporation 1984

  • Read-Back Commands

    The high-function graphics mode allows the user to read various parameters from the color board back to the program. Items readable in this way include LUT entries, both three-dimensional transformation matrixes, and the line pattern and line function flags. The read-back protocol is straightforward. When the high-function graphics mode executes one of the read-back commands (for example, FLAGRD), it puts the value of the requested item in the output buffer. In ASCII mode, the value is written as a decimal number followed by a carriage-return character. A high-level language, such as BASIC, need only execute an Input statement to get the data from the color board. Some data read-back commands return more than one value. The individual commands describe the format of the return in both ASCII and hexadecimal communication modes.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 75

  • The following table lists the flags readable by FLAGRD, and the size and type of the value returned.

    Flag

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    Name

    AREAPT

    CLiPH

    CLiPY

    COLOR

    DISPLA

    DISTAN

    DISTH

    DISTY

    FILMSK

    LlNFUN

    LlNPAT

    MASK

    MDORG

    2D current point

    3D current ~oint

    PRMFIL

    PROJCT

    TANGLE

    TJUST

    TSIZE

    VWPORT

    VWRPT

    WINDOW

    Transformed 3D

    current point

    Free memory

    available

    Type of Value

    Returned

    16 integers

    1 integer (byte)

    1 integer (byte)

    1 integer (byte)

    1 integer (byte)

    1 real number

    1 real number

    1 real number

    1 inteQer (byte)

    1 inteQer (byte)

    1 integer

    1 integer (byte)

    3 real numbers

    2 real numbers

    3 real numbers

    1 integer (byte)

    1 i ntege r (byte)

    1 word

    2 integers

    (bytes)

    1 real number

    4 integers

    3 real numbers

    4 real numbers

    3 real numbers

    1 integer

    The command LUTRD reads back the red, green, and blue intensity levels for a particular LUT index. To read back either the viewing matrix [V] specified in the command VWMATX, or the modeling matrix [M] specified in the command MDMATX, use the command MATXRD. This command returns a string of 16 values. These values of the 4-by-4 matrix begin at the upper-left corner and read across the rows.

    August 15,198476 Professional Graphics Controller CD Copyright IBM Corporation 191>4

  • System Reset

    The command RESETF resets all flags. The following table lists the default values of all flags that can be reset.

    Flag Name Default Value

    1 AREAPT 65535 16 times Solid area

    2 CLiPH Flaq = 0 Disabled

    3 CLiPY Flag = 0 Disabled

    4 COLOR Value = 255

    5 DISPLA No change after a RESETF

    6 DISTAN Distance = 500

    7 DISTH Distance = -30000

    8 DISTY Distance = 30000

    9 FILMSK Mask = 255 No PEL draw effect

    10 LlNFUN Function = 0 Replacement mode

    11 LlNPAT Pattern = 65535 Solid line

    12 MASK Mask = 255 All planes enabled

    13 MDORG OX = OY = OZ =0

    14 2D current point X=Y=O

    15 3D current point X=Y=Z=O

    16 PRMFIL Flac = 0 Primitive fill off

    17 PROJCT Angle = 60

    18 TANGLE Angle = 0 Horizontal, left-richt text

    19 TJUST H=V=1 Left, bottom justification

    20 TSIZE Size = 8 12 by 8 cell characters

    21 VWPORT 0,639,0,479 Entire screen

    22 VWRPT X=Y=Z=O

    23 WINDOW -320,319, -240, 239

    24 Transformed 3D X=Y=Z=O current point

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 77

  • Communications

    The Professional Graphics Controller accepts high-function graphics commands in either ASCII or hexadecimal format. In ASCII mode, English-like commands and their parameters are sent to the board as ASCII character strings. This allows easy ~ transmission of instructions from such high-level languages as BASIC. For example, to draw a circle of radius 55.05 centered at the screen center, execute a BASIC statement to transmit the following character string:

    MOVE 0,0 CIRCLE 55.05

    In hexadecimal communication mode, the commands are sent as a stream of bytes for greatest throughput. The statement above could be sent in hexadecimal mode as

    10 00 00 00 00 00 00 00 00 38 37 00 CD DC

    to realize substantial time savings.

    ASCII Communications

    ASCII mode commands are sent in a format designed to accommodate the restriction of a high-level language. The ASCII command consists of a command word (no more than six letters in length) and parameters, if applicable. Every command word has a short form, which is always three characters or less in length. Parameters may be either decimal numbers or text strings enclosed in quotes.

    Commands and parameters in a command line are separated by delimiters. A delimiter is one or more of the following, except when enclosed by quotation marks:

    • Space • Tab • Comma • Semicolon • Hyphen • Plus sign

    August 15, 1984 78 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Commands and parameters consist of letters, numbers, and decimal points. Any other character, except when enclosed in quotes, is illegal and will be ignored.

    When a hyphen immediately precedes a numeric parameter, that ~ number is interpreted as negative.

    Examples of Legal Commands:

    lOCI 5" Draw a circle of radius 5.

    "RECT 67-88" Draw a rectangle.

    "COLOR 2 FLOOD 3" Change the current color to 2,

    and flood the screen to the color 3. "LUTRD 3" Read LUT entry 3.

    Examples of Illegal Commands:

    "CIR 5" CIR is not a valid abbreviation. "RECT%67,-68" "%" is not a legal character. "COLOR 2 4 FLOOD 3" COLOR takes only one parameter. "LUTRD 3.4" The parameter to the LUTRD command

    is an integer.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 79

  • Communication Protocol

    The high-function graphics data is sent and received as a sequential stream of bytes. To realize maximum throughput between the system and the Professional Graphics Controller, a first-in-first-out (FIFO) buffer protocol has been set up. This 1""""'\ protocol must be adhered to for proper transmission and reception. These buffers, and their associated pointers and flags, are directly addressable when the system uses addresses in the hexadecimal range C6000 to C63FF.

    There are three channels through which data may pass to and from the controller. From the system's point of view, these channels are 'output' (for sending commands and parameters), 'input' (for receiving data read-back commands), and 'error' (for receiving high-function graphics-generated error and warning codes). Each channel has a FIFO buffer associated with it and each buffer has 256 bytes reserved in the lK-byte communication area. A portion of the remaining 256 bytes is reserved for three sets of buffer pointers-one pair for each channel-as well as the warm and cold restart and diagnostic flags. The following memory map shows the addresses as seen by the system. 1""""'\

    Memory Function Address (in hex)

    C6000 Output FIFO (256 bytes)

    C6100 Input FIFO (256 bytes)

    C6200 Error FIFO (256 bytes)

    C6300 Output FIFO Write Pointer

    C6301 Output FIFO Read Pointer

    C6302 Input FIFO Write Pointer -C6303 Input FIFO Read Pointer

    C6304 Error FIFO Write Pointer

    C6305 Error FIFO Read Pointer

    C6306 Cold Restart Flaq

    C6307 Warm Restart Flaq

    C6308 Error Enable Flag

    August 15, 1984 80 Professional Graphics Controller © Copyright IBM Corporation 1984

  • Each buffer has a one-byte read pointer and a one-byte write pointer, which refer to buffer locations relative to the base of the buffer in question. The read pointer always points to the next byte to be read; the write pointer always points to the next byte to be written. The buffer is empty when the read pointer is equal to the write pointer, because the byte that would be read has not yet been written. Alternately, the buffer is full when the write pointer is one less than the read pointer.

    A FIFO write must be done as follows:

    1. Ensure the buffer has room by comparing the write pointer to the read pointer. If the read pointer is only one greater than the write pointer, there is no room, and no writing may take place until there is room.

    2. Write one byte to the address specified by that buffer's base address plus the value in its write pointer.

    3. Increment the write pointer, modulo-255.

    More than one byte may be written if the buffer's write pointer is ~ increased by the same number as the number of bytes written.

    A FIFO read must be done as follows:

    1. Ensure the buffer has data by comparing the write pointer to the read pointer. If the read pointer is equal to the write pointer, the buffer is empty, and no reading may take place until there is data to be read.

    2. Read one byte from the address specified by that buffer's base address plus the value in its read pointer.

    3. Increment the read pointer, modulo-255.

    More than one byte may be read if the buffer's read pointer is increased by the same number as the number of bytes read.

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics ControUer 81

  • Error Handling

    The high-function graphics mode provides an error-reporting

    capability. If the host sets the error-enable flag in the

    communication area, the high-function graphics mode returns

    errors in the error buffer. In ASCII mode, the error is returned as ~

    a message, such as "Arithmetic Overflow." In hexadecimal mode,

    the error is returned as a single byte code.

    August 15, 1984 82 Professional Graphics Controller © Copyright IBM Corporation 1984

  • High-Function Graphics Commands The high-function graphics commands can be logically grouped into the following categories:

    ~ • Two-Dimensional Drawing ARC (AR) Arc CIRCLE (CI) Circle DRAW (D) Draw DRAWR (DR) Draw Relative ELIPSE (EL) Ellipse MOVE (M) Move MOVER (MR) Move Relative POINT (PT) Point POLY (P) Polygon POLYR (PR) Polygon Relative RECT (R) Rectangle RECTR (RR) Rectangle Relative SECTOR (S) Sector

    • Three-Dimensional Drawing DRAW3 (D3) Draw in 3D DRAWR3 (DR3) Draw Relative in 3D MOVE3 (M3) Move in 3D MOVER3 (MR3) Move Relative in 3D POINT3 (PT3) Point in 3D POLY3 (P3) Polygon in 3D POLYR3 (PR3) Polygon Relative in 3D

    • Modeling Transformations MATXRD (MRD) Matrix Read MDIDEN (MDI) Modeling Identity MDMATX (MDM) Modeling Matrix MDORG (MDO) Modeling Origin MDROTX (MDX) Modeling Rotate X Axis MDROTY (MDY) Modeling Rotate Y Axis MDROTZ (MDZ) Modeling Rotate Z Axis MDSCAL (MDS) Modeling Scale MDTRAN (MDT) Modeling Translation

    • Viewport/Window/Projection ~ CLIPH (CH) Clip Hither

    CLIPY (CY) Clip Yon CONVRT (CV) Convert DISTAN (DS) Distance DISTH (DH) Distance Hither

    August 15, 1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 83

  • DISTY (DY) Distance Yon PROJCT (PRO) Projection VWIDEN (VWI) Viewing Identity VWMATX (VWM) Viewing Matrix VWPORT (VWP) Viewport VWROTX (VWX) Viewing Rotate X Axis VWROTY (VWY) Viewing Rotate Y Axis VWROTZ (VWZ) Viewing Rotate Z Axis VWRPT (VWR) Viewing Reference Point WINDOW (WI) Window

    • Command List CLBEG (CB) Command List Begin CLDEL (CD) Command List Delete CLEND (CE) Command List End CLOOP (CL) Command List Loop CLRD (CRD) Command List Read CLRUN (CR) Command List Run

    • Mode Set/Read CA (CA) Communications ASCII CX (CX) Communications Hexadecimal DISPLA (DI) Display FLAGRD (FRD) Flag Read RESETF (RF) Reset Flags WAIT (W) Wait

    • Color/Fills/Patterns AREA (A) Area Fill AREABC (AB) Area Fill to Boundary Color AREAPT (AP) Area Pattern CLEARS (CLS) Clear Screen COLOR (C) Color FLOOD (F) Flood FILMSK (FM) Fill Mask LINFUN (LF) Line Function LINPAT (LP) Line Pattern MASK (MK) Mask PRMFIL (PF) Primitive Fill

    • Image Transmission IMAGER OR) Image Read IMAGEW OW) Image Write

    August 15, 1984 84 Professional Graphics Controller © Copyright IBM Corporation 1984

  • • Look-Up Table Operations LUT (L) Look-Up Table LUTINT (LI) Look-Up Table Initialize LUTRD (LRD) Look-Up Table Read LUTSAV (LS) Look-Up Table Save

    • Text TANGLE (TA) Text Angle TDEFIN (TD) Text Define TEXT (T) Text TEXTP (TP) Text Programmed TJUST (TJ) Text Justify TSIZE (TS) Text Size

    The high-function graphics commands appear on the following pages in alphabetic order.

    August 15,1984 © Copyright IBM Corporation 1984 Professional Graphics Controller 85

  • ARC (Arc)

    Purpose: Draw an arc in two dimensions.

    Command: ARC radius degO degl

    Description: ARC draws the arc of a circle in the current color. The center is at the current point. The radius is specified in the attribute radius, starting at the angle given in degO and ending at the angle given in deg1. The angles are expressed in degrees and are measured counterclockwise from a ray that is parallel to the X axis, starting at the origin and going toward increasing X values. Radius values are real numbers and may range from -8191 to 8191. Start and end angles are treated as modulo-360. If radius is negative, 180 degrees are added to both angles.

    Short Form: AR radius de gO deg1

    Hex Format: 3C lowradius lowfracradius 10wdegO lowdegl

    highradius highfracradius highdegO highdeg1

    Example:

    ASCII: AR 50.25 45 135

    HEX: 3C 32 00 00 40 2D 00 87 00

    Errors: Radius too large

    August 15, 1984 86 Professional Graphics Controller © Copyright IBM Corporation 1984

  • AREA (Area Fill)

    Purpose: Random area fill.

    ,...-..., Command: AREA

    Description: AREA sets all PELs in a given closed region to the current color. The region extends from the two-dimensional current point outward in all directions until reaching a boundary of PELs