Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

lecture 3

The document discusses raster-scan and random-scan graphics systems, detailing the architecture and functions of video controllers, display processors, and various graphics adapters. It explains how graphics commands are processed and the importance of RAM and video cards in rendering images. Additionally, it highlights the evolution of graphics libraries and their role in aiding developers in creating efficient graphics applications.

Uploaded by

Muhammad Danish
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

lecture 3

The document discusses raster-scan and random-scan graphics systems, detailing the architecture and functions of video controllers, display processors, and various graphics adapters. It explains how graphics commands are processed and the importance of RAM and video cards in rendering images. Additionally, it highlights the evolution of graphics libraries and their role in aiding developers in creating efficient graphics applications.

Uploaded by

Muhammad Danish
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

3-Graphics Systems II VU

Lecture No.3 Graphics Systems II


Raster-Scan Systems

Interactive raster graphics systems typically employ several processing units. In addition
to the CPU, a special purpose processor, called the video controller or display
controller is used to control the operation of the display device.

Organization of a simple raster system is shown in following figure. Here the frame
buffer can be anywhere in the system memory, and the video controller accesses the
frame buffer to refresh the screen.

Architecture of a simple raster graphics system

In addition to the video controller more sophisticated raster systems employ other
processors as coprocessors and accelerators to implement various graphics operations.

Video Controller
Following figure shows a commonly used organization for raster systems. A fixed area of
the system memory is reserved for the frame buffer, and the video controller is given
direct access to the frame-buffer memory.

Frame-buffer locations, and the corresponding screen positions, are referenced in


Cartesian coordinates.

34
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

Architecture of a raster system with a fixed portion of a system


memory reserved for the frame buffer.

In the following figure the basic refresh operations of the video controller are
diagrammed. Two registers are used to store the coordinates of the screen pixels. Initially,
the x register is set to 0 and the y register is set to ymax. The value stored in the frame
buffer for this pixel position is then retrieved and used to set the intensity of the CRT
beam. Then the x register is incremented by 1, and the process repeated for the next pixel
on the top scan line. This procedure is repeated for each pixel along the next line by
resetting x register to 0 and decrementing the y register by 1. Pixels along this scan line
are then processed in turn, and the procedure is repeated for each successive scan line.
After cycling through all pixels along the bottom scan line y=0, the video controller resets
to the first pixel position on the top scan line and the refresh process starts over.

Raster Scan Generator Horizontal and Vertical


Deflection Voltages

Register X Register Y

Memory Addresses Pixel Register Intensity

Frame Buffer
Basic Video Controller Refresh Operations

Since the screen must be refreshed at the rate of 60 frames per second, the simple
procedure illustrated in above figure cannot be accommodated by typical RAM chips.
The cycle time is too large making the process very slow. To speed up pixel processing,
video controllers can retrieve multiple pixel values from the refresh buffer on each pass.
35
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

The multiple pixel intensities are then stored in a separate register and used to control the
CRT beam intensity for a group of adjacent pixels. When that group of pixels has been
processed, the next block of pixel values is retrieved from the frame buffer.

Raster Scan Display Processor


Following figure shows one way to setup the organization of a raster system containing a
separate display processor, sometimes referred to as a graphics controller or a display
coprocessor. The purpose of the display processor is to free the CPU from the graphics
chores. In addition to the system memory, a separate display processor memory area can
also be provided.

A major task of the display processor is digitizing a picture definition given in an


application program into a set of pixel-intensity values for storage in the frame buffer.
This digitization process is called scan conversion.

Display Processor Frame Video


Memory Buffer Controller Monitor

CPU Display System Memory


Processor

System Bus

I/O Devices

Architecture of a raster graphics system with a display processor

Raster-Scan Characters
Graphics commands specifying straight lines and other geometric objects are scan
converted into a set of discrete intensity points. Scan converting a straight-line segment,
for example, means that we have to locate the pixel positions closest to the line path and
store the intensity for each position in the frame buffer. Similar methods are used for scan
converting curved lines and polygon outlines.

Characters can be defined with rectangular grids, as shown in following figure, or they
can be defined with curved outlines shown in the right hand side figure given below. The
array size for character grids can vary from about 5 by 7 to 9 by 12 or more for higher-
quality displays. A character grid is displayed by superimposing the rectangular grid
pattern into the frame buffer at a specified coordinate position. With characters that are
defined as curve outlines, character shapes are scan converted into the frame buffer.

36
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

Defined as a grid of Defined as a


pixel positions curve outline
Random-Scan Systems
The organization of a simple random scan system is shown in following figure. An
application program is input and stored in the system memory along with a graphics
package. Graphics commands in the application program are translated by the graphics
package into a display file stored in the system memory. This display file is then accessed
by the display processor to refresh the screen. The display processor cycles through each
command in the display file program once during every refresh cycle. Sometimes the
display processor in a random scan system is referred to as a display processing unit or
graphics controller.

Monitor
CPU System Display
Memory Processor

System Bus

I/O Devices

Architecture of a simple random scan system

Graphics Card or Display Adapters


A video card is typically an adapter, a removable expansion card in the PC. Thus, it can
be replaced!

A video display adapter which is the special printed circuit board that plugs into one of
the several expansion slots present on the mother board of the computer. A video display
adapter is simply referred as a video card.

37
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

The video card can also be an integral part of the system board; this is the case in certain
brands of PCs and is always the case in laptops and clear preference for the replaceable
video card in some PCs.

A number of display adapters are available with varying capabilities especially Intel
systems support following adapters:

ƒ Monochrome Adapter (MA)


ƒ Hercules Adapter (HA)
ƒ Color Graphics Adapter (CGA)
ƒ Enhanced Graphics Adapter (EGA)
ƒ Multicolor Graphics Adapter (MCGA)
ƒ Video Graphics Adapter (VGA)
ƒ Super Video Graphics Adapter (SVGA)
ƒ Extended Graphics Adapter (XGA)

Monochrome Adapter
The simplest and the first available adapter is MA. This adapter can display only text in
single color and has no graphics displaying capability. Originally this drawback only
prevented the users from playing video games, but today, even the most serious business
software uses graphics and color to great advantage. Hence, MA is no longer suitable,
though it offers clarity and high resolution.

Hercules Adapter
The Hercules card emulates the monochrome adapter but also operates in a graphics
mode. Having graphics capabilities the Hercules card became somewhat of a standard for
monochrome systems.

Color Graphics Adapter


This adapter can display text as well as graphics. In text mode it operates in 25 rows by
80 column mode with 16 colors. In graphics mode two resolutions are available:

ƒ Medium resolution graphics mode 320 * 200 with 4 colors available from palette
of 16 colors
ƒ and 640 * 200 with 2 colors

One drawback of CGA card is that it produces flicker and snow. Flicker is the annoying
tendency of the text to flash as it moves up or down. Snow is the flurry of bright dots that
can appear anywhere on the screen.

Enhanced Graphics Adapter


The EGA was introduced by IBM in 1984 as alternative to CGA card. The EGA could
emulate most of the functions and all the display modes of CGA and MA. The EGA
offered high resolution and was not plagued with the snow and flicker problems of CGA.
In addition EGA is designed to use the enhanced color monitor capable of displaying 640
* 350 in 16 colors from a palette of 64.

The EGA card has several internal registers. A serious limitation of the EGA card is that
it supports write operations to most of its internal registers, but no read operation. The
result is it is not possible for software to detect and preserve the state of the adapter,
38
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

which makes EGA unsuited for memory resident application or for multitasking like
windows and OS/2.

Multicolor Graphics Adapter


The MCGA was designed to emulate the CGA card and to maintain compatibility with all
the CGA modes. In addition to the text and graphics modes of the CGA, MCGA has two
new graphics modes:
640 * 480 with 2 colors
320 * 200 in with 256 colors

Video Graphics Adapter


The VGA supports all the display modes of MA, CGA and MCGA. In addition VGA
supports a graphics mode of 640 * 480 with 16 colors.

Super Video Graphics Adapter


The SVGA designation refers to enhancements to the VGA standard by independent
vendors. Unlike display adapters discussed earlier SVGA does not refer to a card that
meets a particular specification but to a group of cards that have different capabilities. For
example one card may have resolutions 800 * 600 and 1024 * 768, whereas, another card
may have same resolution but more colors. These cards have different capabilities, but
still both of them are classified as SVGA. Since each SVGA card has different
capabilities, you need special device driver programs for driving them. This means that
unlike VGA cards which can have a single driver that works with all VGA cards,
regardless of the vendor, each SVGA card must have a corresponding driver.

Extended Graphics Adapter


The XGA evolved from the VGA and provides greater resolution, more colors and much
better performance. The XGA has a graphics processor bus mastering. Being a bus master
adapter means that the XGA can take control of the system as though it were the mother
board. In essence, a bus master is an adapter of the mother board. The XGA offers 2 new
modes:
640 * 480 with 16 bit colors (65536 colors)
1024 * 768 with 8 bit colors (256 colors)

Video Card Supports the CPU


The video card provides a support function for the CPU. It is a processor like the CPU.
However it is especially designed to control screen images.

39
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

RAM on the Video Card


Video cards always have a certain amount of RAM. This RAM is also called the frame
buffer. Today video cards hold plenty of RAM, but earlier it was more important:

How much RAM? That is significant for color depth at the highest resolutions.
Which type of RAM? This is significant for card speed.

Video card RAM is necessary to keep the entire screen image in memory. The CPU sends
its data to the video card. The video processor forms a picture of the screen image and
stores it in the frame buffer. This picture is a large bit map. It is used to continually
update the screen image.

3D - lots of RAM
Supporting the demand for high quality 3D performance many new cards come with a
frame buffer of 16 or 32 MB RAM and they use the AGP interface for better bandwidth
and access to the main memory.

VRAM
Briefly, in principle all common RAM types can be used on the video card. Most cards
use very fast editions of ordinary RAM (SDRAM or DDR).

Some high end cards (like Matrox Millennium II) earlier used special VRAM (Video
RAM) chips. This was a RAM type, which only was used on video cards. In principle, a
VRAM cell is made up of two ordinary RAM cells, which are "glued" together.
Therefore, you use twice as much RAM than otherwise.

VRAM also costs twice as much. The smart feature is that the double cell allows the
video processor to simultaneously read old and write new data on the same RAM address.
Thus, VRAM has two gates which can be active at the same time. Therefore, it works
significantly faster.

With VRAM you will not gain speed improvements increasing the amount of RAM on
the graphics controller. VRAM is already capable of reading and writing simultaneously
due to the dual port design.
UMA and DVMT
On some older motherboards the video controller was integrated. Using SMBA (Shared
Memory Buffer Architecture) or UMA (Unified Memory Architecture) in which parts of
40
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

the system RAM were allocated and used as frame buffer. But sharing the memory was
very slow and the standards never became very popular.

A newer version of this is found in Intel chip set 810 and the better 815, which also
integrates the graphics controller and use parts of the system RAM as frame buffer. Here
the system is called Dynamic Video Memory Technology (D.V.M.T.).

The RAMDAC
All traditional graphics cards have a RAMDAC chip converting the signals from digital
to analog form. CRT monitors work on analog signals. The PC works with digital data
which are sent to the graphics adapter. Before these signals are sent to the monitor they
have to be converted into analog
output and this is processed in the
RAMDAC:

The recommendation on a good


RAMDAC goes like this:
ƒ External chip, not
integrated in the VGA
chip
ƒ Clock speed: 250 - 360
MHz.

Heavy Data Transport


The original VGA cards were said to be "flat." They were unintelligent. They received
signals and data from the CPU and forwarded them to the screen, nothing else. The CPU
had to make all necessary calculations to create the screen image.

As each screen image was a large bit map, the CPU had to move a lot of data from RAM
to the video card for each new screen image.

The graphic interfaces, like Windows, gained popularity in the early nineties. That
marked the end of the "flat" VGA cards. The PC became incredibly slow, when the CPU
had to use all its energy to produce screen images. You can try to calculate the required
amount of data.

A screen image in 1024 x 768 in 16 bit color is a 1.5 MB bit map. That is calculated as
1024 x 768 x 2 bytes. Each image change (with a refresh rate of 75 HZ there is 75 of
them each second) requires the movement of 1.5 MB data. That zaps the PC energy,
especially when we talk about games with continual image changes.

Furthermore, screen data have to be moved across the I/O bus. In the early nineties, we
did not have the PCI and AGP buses, which could move large volumes of data. The
transfer took place through the ISA bus, which has a very limited width. Additionally the
CPUs were 386’s and early 486’s, which also had limited power.

Accelerator Cards
In the early nineties the accelerator video cards appeared. Today all cards are accelerated
and they are connected to the CPU through high speed buses like PCI and AGP.

41
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

With accelerated video chips, Windows (and with that the CPU) need not calculate and
design the entire bit map from image to image. The video card is programmed to draw
lines, Windows and other image elements.

The CPU can, in a brief code, transmit


which image elements have changed
since the last transmission. This saves
the CPU a lot of work in creating screen
images. The video chip set carries the
heavy load:

All video cards are connected to the PCI or the AGP bus, this way providing maximum
data transmission. The AGP bus is an expanded and improved version of the PCI bus -
used for video cards only.

Modern video cards made for 3D gaming use expensive high-end RAM to secure a
sufficient bandwidth. If you for example want to see a game in a resolution of 1280 x
1024 at 80 Hz, you may need to move 400 MB of data each second - that is quite a lot.
The calculation goes like this:

1280 X 1024 pixels x 32 bit (color depth) x 80 = 419,430,400 bytes


419,430,400 bytes = 409,600 kilobytes = 400 megabytes.

Graphics Libraries
Graphics developers some time use 2D or 3D libraries to create graphics rapidly and
efficiently. These developers include game developers, animators, designers etc.

The following libraries are commonly used among developers:

FastGL
OpenGL
DirectX
Others

Advantages of Graphics Libraries

42
© Copyright Virtual University of Pakistan
3-Graphics Systems II VU

These libraries help developers to create fast and optimized animations and also help to
access features that are available in video hardware.

Hardware manufacturers give support in hardware for libraries. Famous manufacturers


include SIS, NVIDIA, ATI, INTEL etc.

Graphics Software
There is a lot of 2D and 3D software available in the market. These software provide
visual interface for creation of 2D and 3D animation / models image creation. These tools
are under use of movie makers, professional animators and designers.

These tools are flash, Maya, 3D studio max, adobe photo shop, CorelDraw, image viewer,
paintbrush etc.

43
© Copyright Virtual University of Pakistan

You might also like