In the text mode, each character position may be displayed in normal (white character on black background) or inverse, or flashing modes. This information is specified by the high order bits of each character stored in the display memory. The cursor position, for example, is indicated by forcing the character at the cursor location to be in the flashing mode with inverse video.
User application programs may switch the display mode from character to color graphics with a single instruction, dividing the screen instantly into a patchwork of controllable color on a grid of 40 horizontal locations by 48 vertical locations. Each cell in the grid may be one of 15 colors, and software built into the system read only memory can be used to define the color of any point as set by X and Y coordinate integer values. Photo 1 shows a color scale for the 15 colors possible, and a simple BASIC program which generated the display. Here the scrolling window features are used to set the color graphics mode in the fixed portion of the screen (above) and set the text mode of operation in the scrolling portion (below). This mixed mode provides a 40 by 40 color graphics grid plus four lines of scrolling text at the bottom of the screen. A routine in the system read only memory selects this mode and sets up the scrolling window corresponding to the text portion. I've found this mode especially useful to BASIC programmers who can write animation games like Pong while holding a traditional BASIC conversation in the text region of the screen. This split screen mode of viewing is used for all the color graphics of photo 2 as well.
Photo 2a: The first step in any game is to generate the uniform color background for the action of the game. Here we use a blue field.
Photo 2b: Then we must add a liberal dose of obstacles and field pieces to make the problem interesting. For this game, the major obstacle is a brick wall of orangish (color 73) and greenish (color 72) bricks. Later on, since we can look at the contents of the screen directly, the game algorithm will be manipulating these bricks.
The same display memory region that is used for the text display is used for the color graphics. System software routines supplied in the read only memory of the processor allow users to simply clear the display, select colors, plot points, draw horizontal and vertical lines, and sense the color values presently at specified screen positions. I like to think of these system software subroutines as enhancements to the 6502 instruction set for the purposes of display control.
Photo 2c: Next, we must of course add a paddle, here created with a deeper yellowish orange (color 9) hue.
Photo 2d: Then, since no video court game is complete without a ball we must add a square "ball" to the program, and set up some of the parameters of its motion.
All the Apple-II video modes work identically, using a common clock timing chain which is shared by the processor, memory refresh and video generation logic. During each microprocessor clock cycle's φ1 clock pulse, an address is specified by the video circuits and directed to the programmable memory of the system through the address multiplexor (MUX) of figure 1. Display data is received by the three forms of video data generators toward the end of the φ2 pulse, and this data is then latched for use during the entire next clock cycle. Since all this action occurs during the φ1, pulse which lasts 500 ns, the video generator is able to take over the access to the memory at a time when the 6502 processor is busy with internal housekeeping and processing operations which leave the data bus free. During the φ2 pulse, when the processor takes command of the bus, the programmable memory of the system is used by the executing program as if the video generator