Apple II graphics

Apple II graphics

The Apple II graphics were comprised of idiosyncratic modes and settings that could be exploited. This graphics system debuted on the original Apple II, continued with the Apple II Plus and was carried forward and expanded with the Apple IIe, Enhanced IIe, IIc, IIc Plis and IIGS.

Peculiarity of graphics modes

The graphic modes of the Apple II series were peculiar even by the standards of the late 1970s and early 1980s. One notable peculiarity of these modes is a direct result of Apple founder Steve Wozniak's chip-saving design. Many home computer systems of the time (as well as today's PC-compatible machines) had architecture which assigned consecutive blocks of memory to non-consecutive rows on the screen in graphic modes, i.e., interlacing. But instead of the usual 2:1 factor, Apple's text and graphics modes are based on interlace factors of 8:1 and 64:1.

A second peculiarity of Apple II graphics—the so-called "color fringes"—is yet another by-product of Wozniak's design. While these occur in all modes, they play a crucial role in Hi-Resolution or Hi-Res mode (see below).

Video output on the machines

Reading or writing to certain memory addresses controlled "soft switches", which allowed the user to do many different things including displaying the graphics screen (any type) without erasing it, displaying the text screen, clearing the last key pressed, or accessing different memory banks. For example, one could switch from mixed graphics and text to an all-graphics display by accessing location C052h (49234). Then, to go back to mixed graphics and text, one would access C053h (49235).

Built-in video output hardware

Apple II

Apple II Plus

Apple IIe, IIc, IIc Plus, and IIGS

Besides a two-row, 15-pin output for dedicated RGB monitors and RF modulators, these Apples also featured an RCA composite video output jack. This enabled the computer to be connected to any TV, monitor, or other device that had an RCA-compatible video input jack, provided of course that both the sending unit (the computer) and the receiving video unit conform to the same standard (NTSC, PAL, or SECAM). This ability made the Apple II very useful in audiovisual work.

Add-on video output cards

Numerous add-on video display cards were available for the Apple II series. Some simply added 80-column and lowercase display capabilities, while others allowed output to an IBM CGA monitor through a DE9 output jack.

Graphics mode details

Low-Resolution (Lo-Res) graphics

The Lo-Res graphics mode was 40 pixels wide, corresponding to the 40 columns on the normal Apple II text screen. This mode could display either 40 rows of pixels with four lines of text at the bottom of the screen, or 48 rows of pixels with "no" room for text onscreen. The default for this was 40x40 graphics with text.

There are 16 colors available for use in this mode (actually 15, since the two shades of gray are almost identical). Note that six of the colors are identical to the colors available in High-Resolution (Hi-Res) mode.

This mode is mapped to the same area of memory as the main 40-column text screen (400h--7FFh), with each byte storing two pixels one on top of the other.

The Lo-Res graphics mode offered built-in commands to clear the screen, change the drawing color, plot individual pixels, plot horizontal lines, and plot vertical lines. There was also a "SCRN" function to extract the color stored in any pixel, one sorely lacking in the other modes.

The Lo-res screen "glitch"

A block of 128 bytes stores three rows of 40 characters each, with a remainder of eight bytes left after the third row is stored. But these bytes are not left empty. Instead, they store important information for external devices attached to the Apple II computer. This created problems with the user tried to save a text screen (or a Lo-Res graphics screen) directly from memory. The programmers at Apple responded by programming ProDOS so the user could not directly load a file (screen data, graphics data, or otherwise) at 400h. ProDOS programs to read and write data to this portion of memory subsequently arose; several appeared in "Nibble" magazine.

The "Line Graphics" mode

There was an undocumented graphics mode identical to Lo-Res graphics, but with different groupings of vertical lines instead of true colors. This mode was activated by accessing memory location C058h (49240). Accessing memory location C059h (49241) restored full-color Lo-Res graphics.

Screen 2 Low-Resolution graphics and text

Having two screens for displaying video images was an integral part of the Apple II family design. Accessing memory location C055h (49237) displayed "Screen 2" regardless of how the other "soft switches" were set. The text and Lo-Res Screen 2 space ranged from 800h (2048) to BFFh (3071). The interlacing is exactly the same as for the main screen ("Screen 1"). Applesoft BASIC programs are loaded at 801h (2049) by default; therefore, they will occupy the Text Screen 2 space unless the computer is instructed to load a program elsewhere in memory. By contrast, some commercial software programs for the Apple II used this memory space for various purposes--usually to display a help screen.

"Alternate Display Mode" on the Apple IIGS

Unlike the other Apple II machine types, the Apple IIGS featured a processor (the 65816) which could address more than 64K of RAM without special tricks. In the IIgs, RAM was split into banks of 64K. For example, one bank consisted of E00000h through E0FFFFh. The Apple IIgs had a chip called the "Mega II" which allowed it to run most programs written for other Apple II computers. The IIgs architecture mapped the screen data to memory bank E0h. However, in IIe emulation mode, screen data was stored in bank 00h. This presented a problem. The designers of the Mega II included routines to copy most screen data to bank E0h to ensure that Apple IIe-specific programs worked properly. But they forgot about Text Screen 2. This was not discovered until the Mega II chips had made it into the IIgs machines. So the other IIgs designers added a program called "Alternate Display Mode", which was accessible from the IIgs control panel. ["Nibble", February 1992]

High-Resolution (Hi-Res) graphics

When the Apple II came out, a new mode had been added for 280x192 high-resolution graphics. The Applesoft BASIC ROM contained routines to clear either of two Hi-Res screens, draw lines and points, and set the drawing color. The ROM also contained routines to draw, erase, scale and rotate vector-based shapes. Oddly enough, there were no routines to plot bitmapped shapes, draw circles and arcs, or fill a drawn area. Fortunately, many programs were written; many appeared in "Nibble" and other Apple II magazines.

The user could "switch in" four lines of text in the Hi-Res mode, just like in Lo-Res mode; however, this hid the bottom 32 lines, resulting in a 280x160 picture. (The ROM routines could still modify the bottom, even though it was hidden.)

The Apple II's Hi-Res mode was peculiar even by the standards of the day. While the CGA card on the competing IBM PC allowed the user to select one of two color sets for creating 320x200 graphics, only four colors (the background color and three drawing colors) were available at a time. By contrast, the Apple offered eight colors for high-resolution graphics (actually six, since black and white were both repeated in the scheme). There was a catch, however. Each row of 280 pixels was broken up into 40 blocks of seven pixels each. In memory, the lower seven bits of each byte represented the pixels, while the most significant bit served a special purpose. It determined which colors to display onscreen.

While this feature allows six colors onscreen simultaneously, it does have one unpleasant side effect. For example, if a programmer tried to draw a blue line on top of a green one, portions of the green line would change to orange. This is because drawing the blue line sets the MSB for each block of seven pixels in this case. "Green" and "orange" pixels are represented the same way in memory; the difference is in the setting (or clearing) of the MSB.

The Hi-Res mode on the Apple II was also peculiar for its 64:1 interlace factor. This was a direct result of Steve Wozniak's chip-saving design ["Nibble", July 1990] The 64:1 factor resulted in a "Venetian blind" effect when loading a Hi-Res screen into memory from floppy disk (or sometimes RAM disk) with the soft switches already set. "Screen holes" occur in the Hi-Res mode just as they do in the Lo-Res and text modes. Nothing was usually stored there—though they were occasionally used to store code in self-displaying executable pictures. Another notable exception is the Fotofile (FOT) format ["Apple II File Type Notes": FTN.08.0000] inherited by ProDOS from Apple SOS, which included metadata in the 121st byte (the first byte of the first hole) indicating how it should be displayed (colour mode, resolution), or converted to other graphics formats.

Finally, another quirk of Wozniak's design is that while any pixel could be black or white, only pixels with odd X-coordinates could be green or orange. Likewise, only even-numbered pixels could be violet or blue. ["Nibble", December 1988, p. 66] This is where the so-called "fringe benefit" comes in. The Apple video hardware interprets a sequence of three or more turned-on horizontal pixels as solid white, while a sequence of alternating pixels would display as color. Similarly, a sequence of three or more turned-off horizontal pixels would display as black.

There was no built-in command to extract the color of a pixel on the Hi-Res screen, or even to determine whether it was on at all. Several programs to determine if a pixel was lit were written, and a program to extract the pixel's true color was published in the April 1990 edition of "Nibble".

The Apple II Hi-Res graphics mode did have one crucial advantage over IBM's CGA. Just as there are two text screen pages (and two Lo-Res graphics pages), so there are also two Hi-Res pages, mapped one right after the other in memory. (The second Hi-Res screen was mapped to 4000h-5FFFh, or 16384-24575 in decimal.) The CGA, on the other hand, supported only one graphics page at a time. Not until the EGA video card was released could the IBM platform support multiple pages of graphics simultaneously. Naturally, this simplified animation on the Apple II. A programmer could display one page while altering the other (hidden) page.

Graphic modes which required 80-column support (Enhanced IIe, IIc, IIc Plus, IIGS)

Double Low-Resolution

This was an 80x40 (or 80x48) graphics mode available only on 80-column machines. Under Applesoft BASIC, enabling this mode required three steps. First, enabling 80 column mode with PR#3, Then enabling double-density graphics with POKE 49246,0, followed by GR. 10 PRINT CHR$(4)"PR#3" : PRINT CHR$(0); : POKE 49246,0 : GR(Note that PR#3 is deferred to the operating system, with PRINT CHR$(4) to avoid disconnecting it from BASIC—for complicated reasons. This is followed by a PRINT command to send a null character, because the newly assigned output device doesn't get initialised until the first character is sent to it—a common source of confusion.)

Once this was done, the Double Lo-Res screen was displayed and cleared, and the PLOT, HLIN, and VLIN commands worked normally with the x coordinate range extended to 0 though 79. (Only the Apple IIc and IIgs supported this in firmware. Using double-lo-res mode from BASIC on a IIe was much more complicated without adding an & command extension to BASIC.)

There were two major problems when using this mode in Applesoft. First, once the mode was activated, access to the printer became complicated, due to the 80 column display firmware being handled like a printer. Second, the SCRN (pixel read) function did not work properly. Fortunately, there was a program in the March 1990 issue of "Nibble" that took care of this problem.

At least one commercially available BASIC compiler, ZBASIC from Zedcor Systems, was known to support Double Lo-Res graphics.

Double High-Resolution

When the Apple IIe first came out, it coincided with their release of a new ("Revision B") 80-column card. This mode was discovered purely by accident when the motherboard was modified in a certain way. ["Nibble", February 1990]

The composition of the Double Hi-Res screen is very complicated. In addition to the 64:1 interlacing, the pixels in the individual rows are stored in an unusual way: each pixel was half its usual width and each byte of pixels alternated between the first and second bank of 64KB memory. Where three consecutive on pixels were white, six were now required in double high-resolution. Effectively, all pixel patterns used to make color in Lo-Res graphics blocks could be reproduced in Double Hi-Res graphics.

The ProDOS implementation of its RAM disk made access to the Double Hi-Res screen easier by making the first 8 KB file saved to /RAM store its data at 012000h to 013fffh by design. Also, a second page was possible, and a second file (or a larger first file) would store its data at 014000h to 015fffh. However, access via the ProDOS file system was slow and not well suited to page-flipping animation in Double Hi-Res, beyond the memory requirements.

Applications using Double High-Resolution

Despite the complexities involved in programming and using this mode, there were numerous applications which made use of it. Double Hi-Res graphics were featured in business applications, educational software, and games alike. The Apple version of GEOS used Double Hi-Res, as did Brøderbund's famous paint program, DazzleDraw. Numerous arcade games, and games written for other computers, were ported to the Apple II platform, and many took advantage of this graphics mode. There were also numerous utility programs and plug-in printer cards that allowed the user to print Double Hi-Res graphics on a dot-matrix printer or even the LaserWriter.

Apple IIGS graphics modes

"See also:" Apple IIGS graphics modes

The Apple IIGS featured not only the graphics modes of its precursors, but several new modes similar to ones found on the Atari ST and Commodore Amiga.

See also

* Apple II
* Apple IIc Plus
* Apple IIe Card
* "Nibble" magazine
* ComputerEyes


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Apple Network Server — Developer Apple Computer Release date February 1996 Discontinued April 1997 CPU PowerPC 604/PowerPC 604e, 132 200 MHz The Apple Network Server (ANS) was a short lived line of PowerPC based server c …   Wikipedia

  • Apple II series — The Apple II (often written as Apple ] [ or Apple //) was the first mass produced microcomputer product, manufactured by Apple Computer (now Apple Inc.). It was among the first home computers on the market, and became one of the most recognizable …   Wikipedia

  • Apple Mouse — For the specific wired model currently sold as the Apple Mouse , see Apple Mighty Mouse. Apple Mouse Five different Apple mice Developer Apple Inc. Type Mouse …   Wikipedia

  • Graphics Resolution — On the Apple II family of computers (including the Apple IIe and Apple IIgs), Graphics Resolutions (GR) is a low level graphics mode that is accessible through Applesoft BASIC (the command GR ) as well as compiled programs.This particular… …   Wikipedia

  • Apple Industrial Design Group — The Apple Industrial Design Group (IDg) is the industrial design arm of Apple Inc. responsible for crafting the appearance of all Apple products, including the Apple Macintosh computer line. Contents 1 History 1.1 Fog Design 1.2 Reformation …   Wikipedia

  • Apple displays — Apple Inc. currently sells only LCD computer displays; a wide variety of CRT computer displays have been sold in the past. CRT displays In the very beginning (throughout the 1970s), Apple did not manufacture or sell displays of any kind, instead… …   Wikipedia

  • Apple Mac mini — Gehäuse des Mac mini der ersten bis vierten Generation Mac mini der 6. Generation …   Deutsch Wikipedia

  • Apple Graphics Library — or AGL is the Apple Inc. API for use of OpenGL 3D graphics within Carbon windows. It is layered above CGL.External links* [ OpenGL/Reference/reference.html AGL Framework… …   Wikipedia

  • Graphics — (from Greek gr. ; see graphy) are visual presentations on some surface, such as a wall, canvas, computer screen, paper, or stone to brand, inform, illustrate, or entertain. Examples are photographs, drawings, Line Art, graphs, diagrams,… …   Wikipedia

  • Apple IIGS — Hersteller Apple Vorgestellt September 1986 Eingestellt Dezember 1992 Empf. Verkaufspreis US$999 (ca. 3.500 bis 5.000 DM, jeweils mit / ohne Farbmonitor und den 3,5 Laufwerken) …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”