{This is the first draft of an article I'm working on. It is not finished yet, and may be in need of serious corrections. It is written for the novice and intermediate -- experts & techs may find the information over simplified.} STUFF About Monitors & Graphics by Ronald Romine We have a lot of ground to cover, but instead of starting with the Amiga's graphics we are going to take a look at one of the most important pieces of graphic hardware you will ever use -- your monitor. Because, regardless of how good your computer's graphics may be, they won't amount to much if you can't display them, or display them well. There are several types of monitors (VGA, PAL, NTSC, monoterm, etc.), but they all have their roots in the standards & hardware designed for televisions. ----- The way televisions work: The main part is the CRT (the tube that is the screen). This is a large hollow tube with three "color guns" inside the back aimed to fire forward across the screen. Each color gun fires a single beam of light. With each of the beams firing a different colors. One gun fires only RED, another fires only BLUE, and the third fires only GREEN. Each color gun can fire its beam to generate a dim or bright "intensities" of its color. All three beams are set to fire upon the same spot at the same time -- the beam's lights mixing to form different colors. If only bright red is wanted, only the red gun fires and with a high level of brightness. If yellow is wanted, the RED & GREEN beams are fired. mixing to create a yellow beam of light. If black is wanted, NONE of the guns fire. White is generate by firing all three at full intensity, and greys are created by firing all three color guns at equal intensities. The actually picture is generated by aiming the guns at the top left corner, turning them on to generate a "beam" of light, and sweeping the beam from left-to-right to form a line -- a scanline. When the "beam" hits the right boundary, it: - turns off, - does a return to the left, - drops a down to the next scanline, - then turns back on to repeat the process. - When the last scanline is finished, it returns to the top left corner to re-drawn (change or refresh) the picture. The inside of the front of the tube (the screen) is coated with a phosphoresce substance. The phosphoresce coating is important, without it we would be watching a single colored dot racing from left to right, top to bottom. When the color beam hits the coating, the spot hit "glows" that color. (Like those glow in the dark toys you hold up to a light to be charged.) With televisions the color beam stays "on" constantly, leaving each scanline as a "giant multicolored smear". The "phosphors" (the spots struck by the beam) will fade very quickly allowing the next sweep of the beams to "re-draw" it in a new color. The speed & area the color beams cover differs in different countries. The NTSC televisions & monitors used in North America and many other countries have a color beam that moves at a speed of 15.75-kHz (15,750-Hz) from left-to-right (horizonally), and 60-Hz from top-to-bottom (vertically), refreshing (or re-drawing) the screen either 30 or 60 times a second, creating 525 scanlines top to bottom. The European (PAL) televisions & monitors use a slightly different speed of 15.60-kHz (15,600-Hz) from left-to-right, and 50-Hz top-to-bottom refreshing the screen either 25 or 50 times a second, creating 626 scanlines top to bottom. However, not all scanlines will be visible in NTSC and PAL displays. Some scanlines are displayed 'above & below' the television's (or monitors) casing. While the NTSC/PAL speeds are OK, the beams just aren't fast enough to refresh all the way from the top to the bottom of a screen before the phosphors at the top lose their brightness. So the designers made the screen to be "interlaced". The scanlines are separated into two fields of scanlines of 262.5 scanlines each (312.5 for PAL screens). The two fields are then interlaced, so the first field consists of the odd numbered scanlines (1,3,5,7,...,257,259,261) are draw on the screen first, then second field (the even numbered scanlines) is draw 'between' the first field. At any given time, the whole 'screen' appears to be filled. Using this method of interlacing with television gives a decent picture, but with computers this method starts to fail due to the use of "illegally" bright colors and the finer use of graphic details. The human eye can see the fading of one field of phosphors while the other field is being refreshed. This constant interlaced fading & refreshing appears as flickering. A common trick with computers is to use only one "field", and leave the other field turned off (but this halves the number of scanlines, thus the resolution.) The NTSC computer displays of 640x200 & 320x200 use this trick. You use only half the scanlines, but this gives the monitor the ability to refresh the single field at twice the speed (60-Hz), where as the interlaced mode (640x400, 320x400) refreshes each field at 30-Hz for a total of 60-Hz for the whole screen. ----- So far we haven't even covered RGB-analog, digital-RGB, composite, separate composite, or RF modulation. While we now know how televisions (thus monitors) draw their displays, we also need to cover the way they receive the data they use to generate their displays. Televisions receive the sound, luminance (black & white), and chroma (color) data encoded as a single radio frequency (RF) signal. The television must then separate the sound from the video (the chroma and luminance). Black&White televisions use the luminance for their pictures, while Color televisions use both the chroma for the picture's colors and the luminance for the color's intensity levels. It works, but the affect results in scanlines that are single multicolored smears. The picture starts becoming too fuzzy at resolutions wider than 320 pixels (40 characters). A 640 pixel wide screen becomes difficult to read on a television. The next step up, is a Composite monitor. These monitors have separate inputs for the video, and sound. This is the same system used on many VCR's. The sound is keep separately from the video and sent over a separate cable. The picture is a little sharper, but not by much. Then there is Separate Composite. The monitor has three separate inputs for the sound, the luminance, and the chrome. This is sometimes referred to as Y/C on VCR's. The picture is better than either RF or composite, but there is still room for improvement -- televisions, composite, and separate-composite monitors can display any color, or any number of colors, but not with the sharpness and clarity needed for higher resolutions. This leads to the RGB monitors. They come in two varieties: digital (RGBI), and analog (RGBA). Either should display resolutions up to 640 pixels wide with good results. The standard digital-RGB monitor has a DB-9 pin connector with three separate inputs for the RED, GREEN, and BLUE color signals, and a fourth input for the INTENSITY of the colors. (The sound is a separate connector.) These monitors are sharp, but limited to 16 colors, due to the method of input. The inputs receive their color as being either fully "on" or "off", for 8 color combinations, with the INTENSITY pin allowing for one alternate level of intensity for each signal -- creating 16 colors. There was a digital-RGB (EGA)monitor that had additional inputs for up to 64 colors, but required a video system designed to generate the additional signals for the monitor. The RGB-analog monitors, also have a DB-9 connector with separate pins for receiving the RED, GREEN, & BLUE color signals of the picture. However, each of these pins can detect various levels of intensity. If your computer can generate 16 intensities each of RED, GREEN, or BLUE, you can mix the colors for 4096 color combinations. With 256 intensities each, you can have 16,777,216 color combinations. This leads to the VGA & SVGA monitors. These monitor are similar to the RGB-analog monitors, but have departed from the NTSC & PAL standards. A VGA monitor still uses a top to bottom refresh of 60-Hz, but increases the left to right refresh to 31.44-kHz. This is twice the NTSC/PAL speed, which would greatly decrease the interlaced flicker that the human eye can detect, however, VGA made another alteration. The scanline fields can be 480 scanlines instead of just 200 or 256 scanlines. A VGA monitor can display a 640x480 60-Hz screen without interlacing. With interlacing you could display a 640x960 60-Hz screen, but it would flicker the same way the interlaced NTSC/PAL screens would. The SVGA monitors expand on the VGA standard, by allowing wider resolutions like 800x600, or 1024x768, and higher refresh rates like 72-Hz, and/or 38-kHz. ----- We've covered, display speeds, and scanline creation, but where do the 'pixels' come in? The Amiga and computers in general, go to the trouble of chopping the scanlines into discernible segments called pixels (short for picture elements). The computers break the scanlines down into pixels by having the color beam turned on-and-off at a constant speed while it is moving left-to-right. This transforms a scanline into a line of dots (the pixels). Each pixel's height is always the same as the scanline's height. The width of a pixel is the "speed" in which the beam can be turned on & off, however, this width also depends on how fast the scanlines are being drawn. We'll be ignoring overscaning, which if added would add more resolution to the width & height of the screen.  Turning the NTSC/PAL beam (moving at 15.75-kHz) on & off within: - 140ns (nanoseconds), will slice scanlines into 320 pixels, - 70ns , will slice scanlines into 640 pixels, - 35ns , will slice scanlines into 1280 pixels. A VGA (31.44-kHz) monitor moves the color beam at twice the speed of a NTSC/PAL monitor. At the same pixel on a VGA monitor, will become twice the width of a pixel on a NTSC/PAL monitor. The same pixel speeds on a VGA monitors will give : - 140ns (nanoseconds), will slice scanlines into 160 pixels, - 70ns , will slice scanlines into 320 pixels, - 35ns , will slice scanlines into 640 pixels. A 17.5ns clock would be need to give the higher SVGA resolutions (800, or 1024+ pixels across) screen. The Amiga also supports a 24.62-kHz mode called 'Super72'. At this scanline speed the pixel widths change to: - 140ns (nanoseconds), will slice scanlines into 200 pixels, - 70ns , will slice scanlines into 400 pixels, - 35ns , will slice scanlines into 800 pixels. At this point it would appear that all you need is faster pixels to get a better, more detailed display on you monitor, but this is not so. When we covered way monitors create scanlines, we did not cover the dot-pitch of monitors. Between the color guns, and the phosphors is a mesh shield. This shield is filled with diagonal lines of small holes (dots) that let the color beams pass through the shield to hit the phosphorus coating on the inside of the screen. Passing through this mesh helps remove the color beam's 'spread', reducing the number of surrounding phosphors that aren't suppose to be affected by the color beam as the beam passes. The finer this mesh, the lower the dot-pitch. The lower the dot-pitch, the smaller the computer's pixels can become. The Commodore's 1084 monitor has a dot-pitch of .41mm, which allows sharp NTSC 140ns (320x200) pixels, and decent NTSC 70ns (640x200) pixels, but the NTSC 35ns (1280x200) pixels are so thin that the color beam can't create one pixel without affecting the phosphors of the pixels in front and behind it. There are two ways to solve this problem. Either get a monitor with a finer mesh (.31mm, or .28mm dot-pitch), or get a monitor with a larger screen. The finer mesh allows the color beam to hit the phosphors or accurately. While a larger screen such as a 17-inch or 21-inch monitor will have a proportionally larger display area, the .41mm mesh remains the same -- rendering the phosphors proportionally smaller than they would be on a much smaller screen. While most televisions do not benefit greatly from a finer mesh with their smeary scanlines, computer monitors benefit as the screen resolution increases. ------ Now that we've looked at how a monitor works, it time to cover the how the Amiga graphics work. To do so, we are going to have to understand 'binary' numbers. Computers don't really understand numbers the way humans do, the number "3" means the same to a computer as the "3" on the face of a Swiss watch -- it is there for the human. What computers have is hundreds, thousands, MILLIONS of little "switches". By flipping switches in a certain order, "paths" are formed. These paths can be programs, operating systems, or data. It has became standard to group this switches in sets of eight. An 8-bit group is called a "byte" with each one of the eight bits being called a "nybble" of the byte. A bit can be either "on" or "off", there is no in-between. Most people are familiar with decimal numbers, which use a counting system based on the arrangements of ten different numerals (0 through 9). Binary is a counting system that uses only two numbers. "0 & 1". Binary is perfect for representing the computer's bits. The binary number "00000000" can both represent a byte's settings as well as the value the byte holds. If a switch (bit) is turned on, a numeral "1" is used, so all if all the switches of a byte are turned on -- "11111111" is the binary number being held, and if all switches are turned off we use "00000000". With only two numerals, the binary system uses POSITION to create larger numbers. Converting each bit (or byte) into its DECIMAL equivalent gives a translation system system: position : 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 number: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 A binary number is each ON digit added to the next ON digit. The binary number "00000000" is equal to "zero" in decimal, while "11111111" would be "255" in decimal. The number "00000010" is equal to decimal "two". Only the two switch is turn on. To get the decimal "thirty-three" you throw more switches, "00100001" which is position SIX and ONE added (0+0+32+0+0+0+0+1). A binary number with 8 digits allows for 256 position combinations, thus 8 bits allows counting up to 256 (0 to 255). To get a larger number requires more bits be used. You will need 16 bits for the counting up to 32,768, and 24 bits for the decimal number 16,777,216. --- With some understanding of the binary system, and how it relates to representing computer bits, we can cover the Amiga's method of graphics generation. From the monitor's point of view, it simply receives a signal that tells it at what speed to move the "electronic beams", and what color to generate for each pixel. The monitor only receives the "finished" signal -- already compressed into it's NTSC, PAL, or VGA format. The number of pixels per line, pixel width, number of scanlines used, and method of choosing their colors, is done inside the computer's graphic hardware. When you use a 320x200 pixel screen, a computer must store the color information for each pixel somewhere in its memory. Different computer designs will use different storage arrangements, but they will share some features. Imagining the screen as a 320x200 grid of lightbulbs either turned on or off, and each bulb can be only one color. Once you have the grid, a way is needed to define which colors the pixels given. There are two methods: Chunky-bits, and bit-planes. Each method reserving bits for holding a value identifying the color the pixel is to have. With an 8-bit graphic system, there are 8-bits reserved within the computer's memory for storing each pixel's color. Allowing each pixel to be one of 256 colors (256 binary combinations). This would be perfect *IF* you had only had a 256 color palette. Each color could be assigned a value from 0 to 255. But what happens if you have more than 256 colors? The OCS/ECS Amigas has a 12-bit palette (4096 color combinations), but only 6-bit graphics. PC/clone VGA cards have 18-bit palettes (262,144 combinations), with an 8-bit display system. And the AGA Amigas are 24-bit (16,777,216 combinations) with 8-bit displays. You simply can't label each color using the 8-bits reserved, because you couldn't store colors numbered over #255. A "Color LookUp Table" (CLUT) is used instead. With an 8-bit CLUT, the user could select 256 colors out of the systems 16,777,216 palette, each selected color is assigned a number between "0-255" (zero counts). If: - black was palette color #0, (uses 1 bit) - green was palette color #400 (uses 9 bits) - brown was palette color #4096 (uses 12 bits) - white was palette color #16,777,216. (uses 24 bits) selections through the CLUT could assign: - black as CLUT#0, (8-bits, binary "00000000") - green as CLUT#1, (8-bits, binary "00000001") - brown as CLUT#64, (8-bits, binary "01000000") - white as CLUT#255, (8-bits, binary "11111111") When the 1st pixel of scanline #1, is give color "00000000", the CLUT slot #0, is checked and black is TRANSMITTED to the monitor. When the 4th pixel of scanline #56 is given the color "01000000", CLUT slot #64 is checked, and brown is transmitted to the monitor as that pixel's color. -- But what makes Chunky-bits, different from bit-planes? With Chunky-bits, each pixel has 2, 4, or 8 bits of memory set aside as a block or chunky to the color information for that pixel. If you have a 16 color (4-bit) 320x200 pixel screen, there would be a 320x200 grid of 4-bit chunks (0000,0000,0000,0000,0000,etc.) stored in memory like a spreadsheet or 2-dimenional array. A 256 color screen would have 8-bit chunks (00000000,00000000,00000000, etc.). If you noticed, the more bits reserved for color -- the more memory is needed. With Chunky-bits a 320x200 screen reserving: 2-bits "00" allows 4 colors and uses 128,000 bits of memory 4-bits "0000" allows 16 colors and uses 256,000 bits of memory 8-bits "00000000" allows 256 colors and uses 512,000 bits of memory But what if need only 8 (3-bits), 64 (5-bits), or 128 (7-bits) colors? With Chunk-bits, you still have to set aside the full 2, 4, or 8 bits. The extra unused bits are dead weights. Using only 8 colors on a 320x200 pixel 4-bit screen wastes one bit per pixel, but those bits add up to 64,000 bits. Using just 64 colors on a 320x200 8-bit screen wastes 192,000 bits. This is can be the weakness of chunky-bit systems. However, the arrangement of the bits in chunks allows the system to manipulate the color information both easily & quickly. -- Instead of reserving the bits in 2, 4, or 8 bit chunks, Bit-planes set aside each of the pixel's bits -- one bit at a time, and each bit resides in a separate grid (or plane). With a 2 color screen of 320x200 pixels, only one bit "0", is reserved for each pixel to hold one of the two colors (the binary bit can be either CLUT#0, or CLUT#1). This 320x200x1-bit grid would use only 64,000 bits. If a 4 color 320x200 screen were desired, two separate grids of 320x200x1bit are opened. The first bit of the 1st grid is linked to the 1st bit of the second grid, giving "0+0" for 2-bits for storing the 4 color combinations (CLUT#1 through CLUT#4). These '1-bit' grids (planes) can be opened and linked one at a time to hold up to 8-bits (0+0+0+0+0+0+0+0). If you were to look at the chunky-bit system as using a two deminational array, you could the bitplane system uses a three dimensional array. Not only do you open the screen with a height and width, but also with a form of depth. Reserving the bitplanes for a 320x200 screen uses: 1-bits "0" for 2 colors and uses 64,000 bits of memory 2-bits "00" for 4 colors and uses 128,000 bits of memory 3-bits "000" for 8 colors and uses 192,000 bits of memory 4-bits "0000" for 16 colors and uses 256,000 bits of memory 5-bits "00000" for 32 colors and uses 320,000 bits of memory 6-bits "000000" for 64 colors and uses 384,000 bits of memory 7-bits "0000000" for 128 colors and uses 448,000 bits of memory 8-bits "00000000" for 256 colors and uses 512,000 bits of memory This allows for optimizing the amount of memory used to match the number of colors needed. This can be a great benefit to a graphics system that opens multiple screens with a limited amount of memory. One of the great weaknesses & strengths of bitplanes, is that each plane is acted on separately. If a 4-bitplane screen is scrolled up, the system must manipulate four planes of bits, instead of one four-bit plane. However, it is possible to link the planes in separate groups (planes 1+3+5, & planes 2+4+6) and scroll each group separately for parallax scrolling with each set of planes having their own palette. ----- All of this has been leading up to one thing -- the Amiga's graphics. What makes the Amiga's graphics so different for other computers of its class? It could be bitplanes, but the AtariST also uses bitplanes. It could be color, but the IBM/Clones offer color. Most computer systems were designed for business use -- to do wordprocessing, number crunching, and to act as terminals to larger computers. The displays didn't need much more than simple text output, and often not even in color. The speed in which the computer could process spreadsheets, and format text was the major considerations. The Amiga had its beginnings as a game system. The design for the Amiga started in the early 80's, when the first wave of the video game craze made game systems a booming industry. A small company named Amiga Inc., was working on the next generation of game machines. This new machine code named the Lorraine, was to be a 32-bit system. However, the video game market went bust. Luckily for the Lorraine, the designers had designed the her to expandable into a full computer system. This would allow the Lorraine to enter the computer market. But the Lorraine's luck didn't hold out -- Amiga Inc., ran out of money before the Lorraine could be finished. For better or worse, Commodore then purchased Amiga Inc., finished the design, and released the Lorraine as the 'Amiga' in 1985. Since the Lorraine was to be a consumer game system, its display system was designed to be hooked up to televisions. The Amiga actually benefited from this following of the NTSC/PAL standards. This allowed the Amiga to be used with televisions using a RF modulator, while also being able to output color composite, and through its custom Video port it could output both RGB-analog and RGB-digital. With the ability to lock its video output to match the signal produced by an external device, the possibilities of using the Amiga with VCR's , cameras, and other video equipment gave the Amiga a position in the market place that very few computers could match. But the NTSC/PAL is only part of the story, the rest is in the way the Amiga does its graphic generation. Game systems depend on their graphics. They need graphics that move, and move fast. Graphics that must be quickly generated, manipulated, and changed. Graphics that use color. Thus, the Amiga (Lorraine) had been designed to use a graphic co-processing system. Many computers are designed to make use of math co-processors. While the CPU does general processing for the system, the complex math is feed to a FPU which specializes in processing only math, and at high speeds. The IBM/Clones will often have both a CPU (80x86) and a math co-processor (86x87). The Amiga, AtariST, and MacIntosh will have a 680x0 CPU with either a 68881 or 68882 FPU chip. The Amiga uses a system of custom designed chips to handle the co-processing of graphics and sound. These chips are the Agnus, Denise, and Paula. Without these chips, the CPU would have to be involved in 100% of the graphics work load. With the aid of Agnus, Denise, and Paula, the CPU only has to be involved with 3% of the graphic work load. This frees a lot of processing time that can be used for other system processes. ------ {Draft ends here.} I hope to add info on what each custom chip does, info on HAM, HAM8, EHB modes, and differences between OCS, ECS, and AGA chips and abilities. I hoped to have these additioned aded before upload, but I decided to upload what I have for input, correction, and for those that have been waiting for these new file. Ron.