Systems
News
5/14/2012
05:24 PM
Connect Directly
RSS
E-Mail
50%
50%

System Description: The Apple-II by Stephen Wozniak

In this BYTE article from May 1977 Stephen Wozniak describes the hardware and system software in the then brand new Apple II. Circuit diagrams and BASIC listing are included.

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 2: This series of photos shows the steps in writing an animated BASIC game using the Apple-II computer's BASIC interpreter. This sequence highlights the process of writing a paddle versus "wall" game where the object of play is to knock bricks out of the wall and eventually get the ball to go all the way through. This game is similar to many seen in amusement parks and arcades, and is typical of the kind of game which can be implemented with Appie-II's BASIC software. Using the split screen graphics and text display mode, the BASIC statements are shown at the bottom of each picture.

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 2 continued:

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.

Photo 2e: Finally, the last steps in finesse are the score displays and related captions which complete the game. This game is controlled by using one of the analog inputs of the Apple-II to determine the index of the current location of the paddle, so that by twisting the pot the paddle is moved; the speaker output is used to generate a sound burst when the ball hits the paddle or wall.
High resolution graphics is the remaining Apple-II display mode. This mode of display is set up by system software routines which are delivered with the computer, but are not built into the system read only memory. (Even with 8 K bytes for the read only memory space, there sometimes isn't enough room to fit all the needed features.) In the high resolution mode, 8 K bytes of main memory store the data for a display of 280 horizontal dot positions by 192 vertical dot positions; so to allow enough room for some BASIC software to play games with this mode the system requires at least 12 K of memory. If a color television is used with this high resolution mode, the available colors are black, white, violet and green. A mixed mode with 160 rows of 280 dots plus four lines of scrolling text can also be set up. Applications of the high resolution graphics modes include game boards, mazes, maps, plots and histograms, user definable character sets, and games like Space War in its original animation graphics versions.

Some Details

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

Previous
2 of 5
Next
Comment  | 
Print  | 
More Insights
The Business of Going Digital
The Business of Going Digital
Digital business isn't about changing code; it's about changing what legacy sales, distribution, customer service, and product groups do in the new digital age. It's about bringing big data analytics, mobile, social, marketing automation, cloud computing, and the app economy together to launch new products and services. We're seeing new titles in this digital revolution, new responsibilities, new business models, and major shifts in technology spending.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - July 22, 2014
Sophisticated attacks demand real-time risk management and continuous monitoring. Here's how federal agencies are meeting that challenge.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
A UBM Tech Radio episode on the changing economics of Flash storage used in data tiering -- sponsored by Dell.
Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.