29.12.2014 Views

Apple Orchard 1980 Fall v1n2 reduced

Apple Orchard 1980 Fall v1n2 reduced

Apple Orchard 1980 Fall v1n2 reduced

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PAGE 12 THE APPLE ORCHARD FALL <strong>1980</strong><br />

UNDERSTANDING<br />

HI-RES GRAPHICS<br />

and how to include text 1n your<br />

Hi-res Graphics Programs<br />

by Loy Spurlock<br />

Reprinted from APPLESAUCE, Vol. 1, No. 7, Oct. 1979<br />

and Call-<strong>Apple</strong>, January, <strong>1980</strong>.<br />

This article is about APPLE ll's HI-RES graphics. It will<br />

cover three basic areas.<br />

They are:<br />

1. How the screen is formatted.<br />

2. Which RAM is used to get the picture you want.<br />

3. How the RAM is used to get the picture you want.<br />

We will be discussing mainly how to put text into your graphics<br />

pictures. However, if you can understand how to put text<br />

in Hi-res, you will be able to define your own character set and<br />

put almost anything you want on the screen. We will do it with<br />

Integer Basic so that the majority of the beginners will be able to<br />

understand what is going on. If you know and understand assembly<br />

language, you will probably have no problem using the information.<br />

The last page of this article is an Integer Basic program that<br />

will allow you to put text into your Hi-res pictures with just a<br />

few lines of BASIC.<br />

There are six charts throughout this article that might be helpful<br />

in understanding the balance of the article.<br />

They are :<br />

Chart #1.<br />

Chart #2.<br />

Chart #3.<br />

Chart #4.<br />

Chart #5,<br />

Chart #6.<br />

Full screen chart as it appears in the text mode.<br />

A blowup of the upper left corner of chart #1.<br />

A blowup of the upper left corner of chart #2.<br />

Total addressing of Hi-res page #1.<br />

Addressing and data charts in binary.<br />

Final breakdown of each bit in each byte.<br />

At this point, I would suggest that you look the charts over<br />

and get familiar with them. Read the text that is with the charts<br />

so that you will know what that chart contains. After you do<br />

that, then come back and continue.<br />

To start off, we will discuss memory locations used by the Hires<br />

graphics. There are two pages of Hi-res graphics. You can have<br />

a different picture on each one of them and flip from one to the<br />

other by doing the proper pokes as listed on page 30 of the red<br />

manual. The first page uses the RAM from location 8192 to<br />

16383 and the second page uses RAM from 16384 to 24575:<br />

This means that if you have only a 16K machine, you cannot<br />

access page #2 because you will not have any RAM to operate it.<br />

So we will only be covering the use of page #1 in this article.<br />

If you wish to use page 2, you can use all this information by just<br />

startinq at 16384 instead of 8192.<br />

Each RAM location in the Hi-res area is continually analyzed<br />

by the hardware in the machine to determine what to put on the<br />

monitor screen. Each RAM location controls 7 dots on the<br />

screen the size of the period. If the proper value is in any given<br />

RAM location, all 7 dots will be turned on, creating a line two<br />

dots longer than the line at the top of the 'T'. Look at figure 1<br />

on chart #5. That represents the 8 bits in every RAM location in<br />

the machine. Think of these bits as separate switches with which<br />

each can be turned on or off. The bit on the right represents the<br />

value of 1 when it is turned on. Box number 2 represents the<br />

value of 2 when it is on. The 3rd box is valued at 4, the 4th at<br />

8, the 5th at 16, the 6th at 32, the 7th at 64 and the 8th at 128.<br />

To turn one or any combination of bits on, it is necessary for you<br />

to PO KE the proper value into the location that you want to<br />

control. If you wanted to turn only the 1st bit on, you would<br />

POKE your location with the number 1, which is the value of<br />

the only bit that you want on. If you wanted only the 4th bit<br />

on, you would POKE the location with an 8 because that is the<br />

value of the 4th bit. Now let's light up 2 bits. To turn the 2nd<br />

and 5th bits on, you add the 2 values together. The 2nd bit is<br />

valued at 2 and the 5th bit at 16. 2+16=18, so, you would POKE<br />

your location with an 18, which is the value of the 2 bits that<br />

you want on.<br />

Now, let's put this to use. Before we go into detail about the<br />

RAM formatting of the screen, we are going to play with turning<br />

bits on and off. Turn your APPLE on. While in the monitor<br />

mode, we will clear the Hi-res graphics page. With the'*' prompt<br />

showing, type '2000:0', then hit return. Do not type the apostrophies,<br />

only what is between them. Now type '2001 < 2000.3FFF<br />

M' and hit return. Now go to basic and type 'GR'. This will put<br />

you into LO-RES graphics. Now type POKE -16297,0 which will<br />

put you in HI-RES graphics. You should now be looking at a<br />

totally blank screen.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!