Apple IIGS: Graphics Modes (10/94)



What are the available graphics modes available on the Apple IIgs?

The Apple IIGS can perform graphics under a number of different types of graphics displays: Lo-res and Hi-res modes found on all Apple II systems, the double Hi-res mode available on the Apple IIe and IIc, and new Super Hi-Res modes.

Both Lo-res and Hi-res modes are unchanged from the Apple II, and the manual "Applesoft on the IIGS" shows the commands for using those modes. The IIGS ROM doesn't have routines for the use of double Hi-res graphics; a programmer must add assembler routines that will properly draw lines, locate points, etc., in double Hi-res mode. Commercially available packages include these routines.

Only on the Apple IIGS performs in Super Hi-Res graphics modes with a resolution of 320 X 200 or 640 X 200. Using 320 X 200 mode permits a full 16 colors per line. 640 X 200 mode can also use 16 colors per line, but each pixel is limited to a choice of 4 of the 16 colors. Both modes are supported by the Apple IIGS QuickDraw II tools. To make programming easier, screen memory is mapped contiguously in Super Hi-Res mode.

320 X 200 Super Hi-Res mode
---------------------------
Each line of pixels in 320 mode is associated with a table of 16 entries that correspond to the 16 colors to be shown on that line. Each entry represents one of the possible 4096 colors available on the Apple IIGS. There may be as many as 16 color tables defined, permitting 256 colors on the screen at one time.

Within each line, a byte determines two pixels' colors. The high 4 bits of a byte contain a number from 0 to 15, which is used as an offset into the color table for that line. The pixel mapped to that memory location will have the color found at the appropriate table location. Similarly, the low 4 bits of that byte will determine the color of the adjacent pixel.

Pixels in 320 mode are almost square. The aspect ratio in this mode is 5:6 on an Apple Monochrome Monitor, an AppleColor Monitor, or an Apple RGB Monitor.

640 X 200 Super Hi-Res Mode
---------------------------
640 mode also allows 16 colors per line, but each pixel is limited to one of four colors (this mode is sometimes called Limited 16 Colors). As in 320 mode, each line addresses one of up to 16 color tables. However, each pixel in the line is represented by only 2 bits, so that each byte contains information about 4 pixels.

To represent 4 adjacent pixels, bits 7 and 6 choose from among colors 0 through 3 in the appropriate color palette, bits 5 and 4 choose colors 4 through 7, bits 3 and 2, from colors 8 through 11, and the last two bits choose from colors 12 through 15. Therefore, each pixel can be one of four colors, but there may be a total of 16 colors on each line.

The pixel aspect ratio in 640 mode is 5:12 on an Apple monitor, so that each pixel's height is approximately twice the width.

Color Fill Mode
---------------
The Apple IIGS can also use 320 X 200 mode with color fill. If this mode is chosen, the color zero (0) takes on a special meaning. A pixel with color 0 will have the same color as the preceding pixel, so that a series of bytes with value 80 00 00 would all be shown in the color represented by the eighth entry in the color palette. Using 0 to represent no color change limits the selection to only 15 colors per line, but does save time for the programmer.


Article Change History:
18 Oct 1994 - Reviewed for technical accuracy, revised formatting.

Support Information Services
Published Date: Feb 19, 2012