1

Introducing PMG

Surprise! Atari has a secret feature that sets it apart from most other personal computers. It's called Player-Missile Graphics (PMG for short). With PMG you can create all sorts of special graphic effects--effects that would be extremely difficult, if not impossible, with an Apple, IBM, or TRS-80.

EASY IMAGE CREATION

Once you know how, you can easily create your own "custom made" graphic images. Thanks to Atari's special direct memory access system (DMA), it's almost as easy as shading in squares on a piece of graph paper.

EXTRA COLORS

You can make your "babies" any color you want. These images (or "players," as Atari calls them) are independent of the usual screen images. Let's say you are using what is called "graphics mode 5." Normally, with this mode, you are limited to four colors. But with PMG you can have up to nine colors, because each player can be a different color.

THREE-DIMENSIONAL EFFECTS

PMG lets you simulate 3-D. Because players are independent of the other screen images, they can be set to hide behind (or go in front of) other objects. Also, it's really easy to change the size of a player and to make a player look like it is moving from a distant location into the foreground. Atari uses this technique effectively in STAR RAIDERS to animate the attacking spacecrafts. So can you!

ANIMATION

PMG greatly simplifies animation. With PMG you can move players quickly and smoothly with just a few commands. At the same time you can simultaneously create sound effects and carry out other processing. That's because PMG is controlled by two extra microprocessors called ANTIC and CTIA (or GTIA).

NOT JUST FOR GAMES

Atari first developed PMG to simplify game programming. But you can use PMG anywhere that animation or special screen images and colors are useful. For example, in an educational program you could grab the learner's attention with an animated arrow. The arrow could point out various parts of a diagram. In a music program you could use players for notes and have them dance across the screen along with the music. In a program that displays textual material, you could use players to highlight important words or sentences. Normally this is not so easy. Without PMG, graphic images cannot appear on the same line with text.

PMG could be useful in business programs, too. For example, you could design an animated warning routine to catch an operator's attention when a crucial entry was required. It might even make the job more fun and cut down on data entry errors.

LEARNING TO USE PMG

You may be saying to yourself: "If PMG is so great, why aren't more people using it?" Well for one reason, it has been really hard to learn--that is, up until now. PMG is perhaps the most powerful, yet least understood, feature of the Atari computer.

But relax. In this book we will take you step by step through everything you need to know to create sophisticated graphic effects far beyond the reach of most other micros.

OVERVIEW OF PMG SETUP

Here are the major programming tasks needed to set up PMG. (Don't try to understand all this right now. It's just an overview. Details will come later.)

Design the graphic images you want to display. Then calculate the data needed in memory to produce these images.

Allocate space in memory for PMG.

Dimension strings that will hold player image data.

Set the PMG memory to zero data.

Read the player image into the player image strings.

Set the color of the players.

Tell Atari where the PMG memory starts.

Tell Atari whether you want single- or double-line resolution.

Turn on PMG.

Set the initial position coordinates for players and missiles.

Animate the players and missiles as desired.

These are the basic things you'll need to get started. I'll cover them first. Then after you've mastered them I'll show you some advanced programming tricks you can amaze your friends with. "How did you do that?" they'll say.