The 2600 contains a 6507 processor, essentially a slightly stripped down version of the one found in the Commodore 64 and Apple II series. The 2600 graphic chip, called Stella, requires 2600 games to be written to display only one line at a time (one scanline). This means that all processing has to take place in between the time it takes to draw each line or screen! Also, the Atari 2600 can only hold four kilobytes of code at a time! Chips weren't cheap back in the 1980s, so most games are only 8k. Few, if any, are larger than 16k.
To truly understand how the 2600 works, we must examine the screen elements. The 2600 only allows for six different ways of displaying objects. There are two player objects, two missiles (one for each player), one ball, and the playfield. Each had a few effects that could be used to modify them. In case it's not obvious yet, the 2600 was really only designed with games like Combat and Pong in mind.
Let's start with the two players. These have a fairly high resolution (for the 2600). They allow two main effects. The first lets the programmer place up to three copies of the player on the same horizontal plane. The second lets the player be stretched to two or three times its "normal" width. The biplane and jet games in Combat illustrate both of these effects.
It is possible to use multiple copies of the players on different horizontal planes. This requires drawing the first copy during one frame (a complete scan of the TV screen from top to bottom) and the next copy during the next frame. Because TV screens refresh so fast, this technique usually causes no problems. But if too many copies are made, it can lead to flicker. This is what happens with the "ghosts" in Atari 2600 Pac-Man. You might note that later programmers were able to reduce the flicker for Ms. Pac-Man and Pac-Man Jr.
The missiles, one for each player, basically have to be straight lines. The programmer can alter their width slightly. If you've played 2600 Burger Time by M-Network, you might have wondered why the hot dogs look so un-hot-dog-like. Because the programmer used the first player for the actual player and the second for the egg, all he had left to work with was the missiles.
I'm a little fuzzy on how the ball works, but I think it has to be a square. Using the same technique for displaying multiple players, it is sometimes used to "round out" blocky playfield graphics, which is the last element left to discuss.
Playfield graphics often make up the background or terrain of the screen. The resolution can be determined by the programmer within certain limits, but the higher it is, the less time there is to do other things. The programmer can define the shape of half the playfield and then either mirror or copy it on the second half. Adventure has examples of both mirroring and copying.
These are only the basics of Atari 2600 programming. As you can imagine, it takes a lot of work to create a good game with all of these constraints. If you'd like to learn more about Atari 2600 technical details or programming, I recommend Nick Bensema's Home Page, Bob Colbert's Supercharger Development Files, and the Stella Mailing List.
Copyright 1997 i5ive communications inc. Used with permission.
[April 27, 2013: The article originally said the 2600 contained a 6502 processor, which is the exact same processor as the Apple II and Commodore 64. This has been corrected. It might not matter to the layman, but I like to get details right.
Nick Bensema is still around, but isn't advertising that site, just a LiveJournal. Bob Colbert's site seems to have disappeared, but you can still find his Makewav utility around. While the Stella link above works, you'll notice it only goes through 2006. It seems the list ran to at least 2011, but is now defunct.]
No comments:
Post a Comment