![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Continuing my series on flight-sim and related software...
When I was young, the one thing a video game could consistently do to impress me was to show some kind of first-person perspective view (like about 2/3 of the high-end console and PC games that exist today). This wasn't so common back then. The level of technology at the time made it fairly difficult to do, and even if the game wasn't very good, I'd think it was cool. Many of the arcade games that tried it early on, like Battlezone and Star Wars, are rightly considered classics.
Many of the first games that attempted to try it were "space pilot" shoot-em-up games that put you in the cockpit of some kind of science-fiction starfighter, shooting at enemy spaceships. Space could actually make the presentation a little easier, because you just needed a black screen with some kind of stars or small objects streaming at you in perspective. There was no need to render a whole landscape.
Here, though, is a game that attempted a first-person flight-simulator-like view on an Atari 2600, with a moving and tilting horizon. It's Air Raiders, a 1982 "M Network" game from Mattel (highretrogamelord's video):
Air Raiders is a bit unusual for Mattel in that it's an original 2600 release instead of a port of an Intellivision game, which all their other "M Network" offerings were. If you want to play it, it's actually available in volume 3 of the Atari Flashback Classics collections on consoles. (I said a while ago that those collections only had games that lacked any third-party licenses--that's not strictly true: they've also got some M Network games.)
The game is OK, not great. It gets a bit repetitive, like many 2600 games do if you play them for more than a couple of minutes. But that flight-sim-like view is really cool. I was wondering how the heck they did that on the Atari 2600.
The 2600, famously, was really designed for games more like the early Video Olympics (Pong Sports) and Combat cartridges, and has no frame buffer representing its display screen in RAM; it doesn't have enough RAM for that. Its TIA video chip has just got a few registers whose bits represent the pixels, positions and colors of various objects on the current scanline. There are:
Notice that the horizon here only has three possible tilt positions: you can bank to the left at a fixed angle, bank to the right at a fixed angle, or fly straight. That is undoubtedly a helpful simplification. But it can move up and down in any of those fixed positions, and there's a grey runway that appears sometimes as well. I figured these things, as well as the peculiar cockpit arch over the top, were somehow displayed using the playfield object. But how? The horizon is neither symmetrical nor repeated.
The Stella emulator has a debug mode that swaps out fixed colors for the TIA's color registers. That can actually show you which objects are being used to represent things on screen. When you apply it to Air Raiders, the result is THIS:

What sorcery is this?
The purple areas represent the playfield object (shades of purple represent which bytes are being read). Yellow and red are the player objects, and gray is the raw background. Air Raiders can move that peculiar "X" made out of playfield triangles up and down by just shifting the values that it writes into the playfield registers at various times.
I think the rest is all done by playing with the color registers. Air Raiders must have some code to swap out the colors at the center of a scanline, right where the middle of the X is. Suppose you're banking to the left, so it wants to render a tilted horizon from upper left to lower right. Above the center of the X, on the left side of the screen, it colors the playfield green and the background sky blue. On the right side of the screen, it swaps the color registers so that both are blue.
Then below the center of the X, it does the reflected complement of that: on the left side, both playfield and background are green, and on the right side, the playfield is sky-blue and the background is green. The net effect is a tilted green horizon against blue sky.
If the horizon needs to be tilted the other way, the color-swapping trick is just done in the mirror reverse of this. If it's not tilted at all, that's much easier--all you have to do is change both color registers from blue to green partway down the screen. And the grey "runway" that appears sometimes is just displayed using these same objects, by leaving the playfield green but turning the background pixels gray near the bottom of the display!
Absolutely brilliant. To make a good-looking game on the 2600 you had to be very clever.
When I was young, the one thing a video game could consistently do to impress me was to show some kind of first-person perspective view (like about 2/3 of the high-end console and PC games that exist today). This wasn't so common back then. The level of technology at the time made it fairly difficult to do, and even if the game wasn't very good, I'd think it was cool. Many of the arcade games that tried it early on, like Battlezone and Star Wars, are rightly considered classics.
Many of the first games that attempted to try it were "space pilot" shoot-em-up games that put you in the cockpit of some kind of science-fiction starfighter, shooting at enemy spaceships. Space could actually make the presentation a little easier, because you just needed a black screen with some kind of stars or small objects streaming at you in perspective. There was no need to render a whole landscape.
Here, though, is a game that attempted a first-person flight-simulator-like view on an Atari 2600, with a moving and tilting horizon. It's Air Raiders, a 1982 "M Network" game from Mattel (highretrogamelord's video):
Air Raiders is a bit unusual for Mattel in that it's an original 2600 release instead of a port of an Intellivision game, which all their other "M Network" offerings were. If you want to play it, it's actually available in volume 3 of the Atari Flashback Classics collections on consoles. (I said a while ago that those collections only had games that lacked any third-party licenses--that's not strictly true: they've also got some M Network games.)
The game is OK, not great. It gets a bit repetitive, like many 2600 games do if you play them for more than a couple of minutes. But that flight-sim-like view is really cool. I was wondering how the heck they did that on the Atari 2600.
The 2600, famously, was really designed for games more like the early Video Olympics (Pong Sports) and Combat cartridges, and has no frame buffer representing its display screen in RAM; it doesn't have enough RAM for that. Its TIA video chip has just got a few registers whose bits represent the pixels, positions and colors of various objects on the current scanline. There are:
- two "players" (8 bits across with widths and colors you can set independently),
- associated "missiles" (just a pixel of adjustable width, colored like the associated player),
- the "ball" (another, independently colored pixel),
- and the "playfield" (two and a half bytes representing 20 chunky pixels, either reflected symmetrically or repeated twice across the scanline).
Notice that the horizon here only has three possible tilt positions: you can bank to the left at a fixed angle, bank to the right at a fixed angle, or fly straight. That is undoubtedly a helpful simplification. But it can move up and down in any of those fixed positions, and there's a grey runway that appears sometimes as well. I figured these things, as well as the peculiar cockpit arch over the top, were somehow displayed using the playfield object. But how? The horizon is neither symmetrical nor repeated.
The Stella emulator has a debug mode that swaps out fixed colors for the TIA's color registers. That can actually show you which objects are being used to represent things on screen. When you apply it to Air Raiders, the result is THIS:

What sorcery is this?
The purple areas represent the playfield object (shades of purple represent which bytes are being read). Yellow and red are the player objects, and gray is the raw background. Air Raiders can move that peculiar "X" made out of playfield triangles up and down by just shifting the values that it writes into the playfield registers at various times.
I think the rest is all done by playing with the color registers. Air Raiders must have some code to swap out the colors at the center of a scanline, right where the middle of the X is. Suppose you're banking to the left, so it wants to render a tilted horizon from upper left to lower right. Above the center of the X, on the left side of the screen, it colors the playfield green and the background sky blue. On the right side of the screen, it swaps the color registers so that both are blue.
Then below the center of the X, it does the reflected complement of that: on the left side, both playfield and background are green, and on the right side, the playfield is sky-blue and the background is green. The net effect is a tilted green horizon against blue sky.
If the horizon needs to be tilted the other way, the color-swapping trick is just done in the mirror reverse of this. If it's not tilted at all, that's much easier--all you have to do is change both color registers from blue to green partway down the screen. And the grey "runway" that appears sometimes is just displayed using these same objects, by leaving the playfield green but turning the background pixels gray near the bottom of the display!
Absolutely brilliant. To make a good-looking game on the 2600 you had to be very clever.