You are currently viewing Atari Graphics 1

Atari Graphics 1

Atari Colors

Ever since the dawn of the Atari 2600 consoles and arcades, video games have constantly been thriving to push the limit of extending colors in machines. See the page the History of Atari to learn more about this.  In the very early stages of computers monochrome color was common in many games, so it wasn’t required to maintain a full concentration of creating a vivid blend of colors. We will learn about the Atari Graphics 1 mode in this session. 

Much later a company none other than Atari released arcade games with colors, but saw a need for a smaller market in the homes as soon the Atari 2600 was born. Although the primary mission of this website is not to honor the Atari 2600, but rather the later Atari computers that came into production. Since my first computer was an Atari 65xe that is the focus of this website at many levels.

So it is no surprise probably to guess that the Atari 65xe and 8-bit line of computers can produce color on a display as well. With the release of the more popular microchip GTIA, Atari was able to produce up to 256 colors, except not all at once unless you perform some fancy tricks with raster scan lines. Be sure to check out the tutorial Atari Raster Scan Line to learn more.

So when you leave the Atari 65xe or any of the 8-bit line of colors on for a specific period of time, an interrupt is triggered to start a fancy color splash on the screen maintained by a subroutine in memory register 77 ($4D – hexadecimal). This will allow the Atari personal computers to begin to cycle through a range of colors based on a timing speed built within. This was known to protect earlier computer displays from something called “color burn”, which could leave spots on the monitor permanently.

According to the Compute! book Mapping the Atari, memory register 77 is known as the attract mode. It rotates colors on the screen at low luminance levels when the computer is idle after about 8-9 minutes and the keys have not been touched, or the reset key. You can also type POKE 77, 128 to trigger this immediately forcing the count down timer to set the flag.

There are several other tutorials for Atari Graphics 1 and Graphics 3 that show how to display text on the screen. In this section, I’d like to reiterate that lesson, and now show you how to change the colors within these graphic modes using both commands, and POKE statements.

Atari Basic SETCOLOR

In the program example below, we have used a command called SETCOLOR to alter the background color from black to green.

10 GRAPHICS 1
20 POSITION 5,5:? #6;”GRAPHICS 1″
30 POSITION 6,7:? #6;”SETCOLOR”
40 REM CHANGE BACKGROUND TO GREEN
50 SETCOLOR 4,12,8

Atari SETCOLOR Defined

Let’s explore how the SETCOLOR command accomplishes this using Atari Graphics 1

. First take a look a simple diagram below that analyzes the command.

SETCOLOR (register), (hue), (luminance)

This is defined as:

register – can use values from 0-4 which extract from memory locations to manage the foreground, background, and border color.

hue – can use values from 0-15 to set a specific color (see below)

luminance – can use a value from 0-14, which controls the intensity of the brightness display. 0 = darkest, 14  = brightest.

(register)

0 = orange
1 = light green
2 = dark blue
4 = black (background)

(luminance)

Controls the brightness from 0-14. Can be used to create flashing displays of text.

(hue)

0 = gray
1 = light orange
2 = orange
3 = red-orange
4 = pink
5 = purple
6 = purple-blue
7 = blue

8 = blue
9 = light blue
10 = turquoise
11 = green-blue
12 = green
13 = yellow-green
14 = orange-green
15 = light orange

Now let’s set the background color back to black and use SETCOLOR to change some of the Atari Graphics 1 text colors on the display now that we have a color chart for this.

For example, let’s change the orange default text to a lighter blue with a luminance of 4.

10 GRAPHICS 1
20 POSITION 5,5:? #6;”GRAPHICS 1″
30 POSITION 6,7:? #6;”SETCOLOR”
40 SETCOLOR 0,7,4

For our next example we are going to change the remaining two default Atari Graphics 1 text colors of light green and dark blue. The program also has been modified a little. See if you can tell them apart by looking at the program below without skipping a head for a moment.

Since we cannot reproduce the inverse character I am using the code {I} to indicate that inverse mode follows that area on the line. The inverse is activated by pressing the End key and turned off by pressing it again when using the Atari Altirra emulator. On a regular Atari 65xe or 8-bit computer, it’s located in the bottom right corner. Be sure to also check out the Atari 65xe Computer page to learn more.

10 GRAPHICS 1
20 POSITION 5,5:? #6;”GRAPHICS 1″
30 POSITION 6,7:? #6;”SETCOLOR”
40 REM CHANGE REMAINING TEXT COLORS
50 POSITION 4,10:? #6;”text color”
60 POSITION 4,11:? #6;”{I}text color 2″
70 SETCOLOR 1,3,62
80 SETCOLOR 2,6,5

Atari POKE Colors

In the lesson with the Atari Graphics 1

, we will show you how to create a rainbow effect by cycling through the colors and doing some fancy tricks.

However, now we will explore some of the POKE commands that can accomplish the same thing as SETCOLOR, but can control a varied color range for your display. Let’s check out another example that changes all 4 registers, utilizing the hue, and luminance as usual. 

10 GRAPHICS 1
20 POSITION 5,5:? #6;”GRAPHICS 1″
30 POSITION 6,7:? #6;”SETCOLOR”
40 REM CHANGE REMAINING TEXT COLORS
50 POSITION 4,10:? #6;”text color”
60 POSITION 4,11:? #6;”{I}text color 2″
70 POKE 708,150
80 POKE 709,14
90 POKE 710,130

When you get to the Player Missile Graphics advanced tutorials, you will learn how to change colors of the characters.

Much later you will learn how to create a multi-sprite using raster lines across your sprites with some machine language code.

As mentioned in the Atari Graphics 1 example, you can also use GRAPHICS 2-7 to change colors as well. Be aware of the screen boundaries when switching modes to avoid the cursor going out of range and provoking an error.

In this lesson we reviewed the color attract mode, SETCOLOR command, and how to change colors also using POKE statements. 

We hope you enjoyed this series. Please be sure to bookmark this page to stay up to date with future tutorials on this website.

Please follow and like us:

smorrowatari

Steve has always had a passion for computers even before I owned one. His first personal computer was an Atari 65xe purchased at Children's Palace around 1986. In later years he attended DeVry University and received a Computer Science degree, works as a Front End Web Developer and is a born again Christian. Although this is a tech site, I am never shy to admit that I am a sinner saved by the blood of Jesus Christ. If you ever want to talk about salvation, I'm game.