Atari Graphics 1 Mode

Atari Graphics 1 Mode

Atari Graphics 1 Mode

The Atari computer utilizes multiple graphics modes. Several of these can display text and ascii characters, and others can show pixels. Although it is important to grasp the concept that every Graphics mode on the Atari utilizes pixels. 

Each Graphic mode reserves a specific amount of memory for its display list. The display list builds the screen you see with the text window at the bottom. See the Display List tutorial for further information.

Atari Graphics Mode begins with a horizontal resolution ranging from 0 to 19. The vertical resolution goes from 0 to 19. If screen display is placed outside of these coordinates, an error will occur and the program will stop.

Before we begin having some fun with the graphics, let’s take a lesson in the Atari’s character set. If you haven’t checked it out already, also be sure to check out the Atari Character Set tutorial.

The Atari character set allows you to display characters from 0-255 on your screen. Several of these have their own type of function such as clearing a screen, inserts, etc. The majority of the characters though can be used to display words and characters on the screen display. The text modes of the Atari have been very popular in game title screens.

Please Note: In this example we are using the Windows tool Atari Altirra emulator. To learn more about this be sure to check out the Atari Altirra tutorial.

Be sure to check out the Atari Basics example to see some simple ways to display text on the screen in the Atari Graphics 1 mode. We are going to review this again to stay consistent with the learning guide for this page.

The Atari allows you to display text on the Graphics 1 screen with a special print command that is used to access the screen. Let’s see a quick example below with a simple computer program.

10 GRAPHICS 1

20 PRINT #6;”GRAPHICS 1″

If you continue to add new lines to the program with PRINT #6, the Atari will force a cartridge return and move down one line. It will continue doing this until the display reaches line 19 in the vertical direction. Let’s add a few more lines to see this in action. For clarity, a screenshot of the program is seen below.

10 GRAPHICS 1

20 PRINT #6;”GRAPHICS 1″

30 PRINT #6;”HAS A NICE”

40 PRINT #6;”SCREEN DISPLAY”

Four Colors in Graphics 1

Another important thing to note is that the Atari personal computer has built in Console keys. See the Atari Computer History to learn more about this. When using the Altirra the reset key is done by pressing the F5 key. So you can use this when you need to access your program again, being sure to type LIST (then Enter on your keyboard) to see it in memory as well.

You can also use up to four colors for your text displays in Atari Graphics 1 Mode. The colors range from 0-4, so technically there are five, but the background will be black. 

In order to access the other colors, you will need to change your text displays a little. First we will mix uppercase and lowercase and observe the output. Type in the following program below to see this in action.

Tip: Pressing the Caps Lock key on your keyboard will switch from uppercase to lowercase.

10 GRAPHICS 1

20 PRINT #6;”graphics 1″

30 PRINT #6;”HAS A NICE”

40 PRINT #6;”screen DISPLAY”

Likewise you can get even more colors by setting the uppercase letters and lowercase letters to inverse. If you examine the Atari keyboard at the lower right, you will see a key with a shape showing a divider through it. That is the Atari inverse key. Type in the following program to get even more cool colors!

Note: Since the Atari inverse key character cannot be reproduced using the Atari Altirra emulator, I have decided to use a reference code to signal when you need to press the inverse key. The {I} below means to be sure that inverse is on. This will be visible since you will see the character surrounded by a white outline. I also created a code that shows {IO} to clarify to turn off the inverse mode.

When using the Atari Altirra it can emulate the Atari keyboard. However, sometimes it can be difficult to locate certain special keys. So to get the inverse to display just press the End key. It serves as a toggle, so you can press it again to turn off the inverse mode.

10 GRAPHICS 1

20 PRINT #6;”graphics 1″

30 PRINT #6;”{I}has a nice”

40 PRINT #6;”{I}SCREEN {IO} display”

Display ATASCII Characters in Graphics 1

As mentioned earlier, you can also use nearly any character in the Atari character set. Let’s try a new example, where we display the entire character set to the screen. See if you can find out why it failed and they don’t all display. If you refer to the character set found on my Atari Character Set page you may discover the answer. You can locate all 128 characters with the screenshots I have appended to the bottom of the page there. They will cycle into each new color after a set ends.

A new command will also appear when you type in the program below. It is called CHR$. It stands for “character string” and is used to display any character for the Atari ASCII (also known as ATASCII) character set. If you try to use something like PRINT #6;X; instead, you will only see numbers display from 0 to 255

A tip for you is to remember that now all characters will display on the screen, but can serve to perform different actions on the display instead.

10 GRAPHICS 1

20 FOR X=0 TO 255

30 PRINT #6;CHR$(X);

40 NEXT X

In the above example program that prints the entire character set on the screen a few new commands have been introduced. Line 20 creates a loop that counts from 0 to 255 to read all of the characters in the character set.

Line 40 continues to get the next character in the loop. A loop will count like this

X=0
X=1
X=2
X=3

…and so on

It continues until we finally get to the end

X=254
X=255

Then it will go to the next instruction in the program.

Position Text Cursor at X, Y

For the final example in this tutorial, let’s learn how to change when text shows up on the screen. We are going to introduce a new command called POSITION. This command allows you to specify the horizontal and vertical coordinates of the text. Look at a simple example

10 GRAPHICS 1
20 POSITION 4,2:? #6;”GRAPHICS 1″

Let’s look at this closely. Line 20 shows the command POSITION 4,2. This tells the Atari to position the cursor character 4 lines starting from the left. The next part that shows ,2 will instruct the Atari to place the cursor 6 lines from the top of the screen going down.

Now let’s add the rest of the program lines below. Hopefully this is making better sense. Try to position the cursor to create a title screen or your name, address, and email for a fun example.

10 GRAPHICS 1
20 POSITION 4,2:? #6;”GRAPHICS 1″
30 POSITION 2,4:? #6;”example {I}PROGRAM”
40 POSITION 3,6:? #6;”{I}At{IO}aR{I}i{IO} CHARACTER”
50 POSITION 7,8:? #6;”disp{I}LAY”

Print to the Atari Text Window

You may be wondering how to write to that blue text window at the bottom of the Atari Graphics 1 Mode screen. Since it is currently occupying the display list for Graphics 0 the following lines below would allow you to write to the window.

10 GRAPHICS 1
20 PRINT #6;”our text is in the upper area”
30 PRINT “Now it’s down in the bottom window.”

Before we conclude this session, I wanted to show you the Graphics 1 screen seen in a grid. Study this grid and learn how to position character in different areas. So to recap, if you follow the lines at the top listed as 0,4,8,12,16,19, any of those blocks would be the horizontal position (parameter 1) in the POSITION statement.

Then look at the numbers going down the page, listed as 0,4,8,12,16,20,23. These represent the vertical position (parameter 2) in the POSITION statement.

The book Compute!’s First Book of Atari Graphics lists the mode, resolution with text, resolution without a text window, colors available, and memory consumed in a chart. I have displayed it here for reference purposes to aid your on your journey as you start using Graphics modes and need to be aware of what is going on.

Display text in Graphics 2

The Atari can also be switched to Graphics mode 2. In this display, the text is double height and double-width. The screen ranges from 0-19 horizontally, and 0-9 vertically. Below is yet another simple program to demonstrate this.

10 GRAPHICS 2
20 POSITION 2,4
30 ? #6;”GRAPHICS {I}mode 2″

Also if you add 16 to the Graphics mode the text window will disappear. Unfortunately this also forces the display list off the screen since it reaches the bottom, so you must keep a loop going to see it on the screen.

10 GRAPHICS 2+16
20 POSITION 2,4
30 ? #6;”GRAPHICS {I}mode 2″
40 GOTO 40

The program can be exited by pressing the F7 key (break) or F5 (Reset). The F7 key exited with a STOP command to end the program.

So I hope you enjoyed this session on Atari Graphics 1 Mode. In summary you can display characters from 0-128 in this mode. Using lowercase characters, uppercase characters, and lowercase/inverse, and uppercase/inverse allows you to get different colors for your text. Finally you can place your text anywhere on the screen using the POSITION command.

Please be sure to bookmark this page so you don’t miss out on more of the exciting tutorials to come! Also you can leave any comments below about any questions you may have.