12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

66 APPLE II COMPUTER GRAPHICSHi-Res adds another level to the addressing difficulty experienced withthe non-contiguous Low-Res mode, and requires four times the memoryfor display. Add to that a reduced number of colors readily available to theprogrammer, plus the limitation of not being able to put <strong>al</strong>l of the colors atany one location on the screen, and you may begin to wish you had nevereven heard of Hi-Res.Fortunately, there are sever<strong>al</strong> Hi-Res <strong>graphics</strong> editors on the mark<strong>et</strong>which take most of the work and frustration out of creating Hi-Res figures.If you do not have one of these editors, we suggest that you acquire onebefore attempting any serious endeavor. A good Hi-Res editor will takecare of the multitude of grubby d<strong>et</strong>ails involved with Hi-Res <strong>graphics</strong>. Itwill l<strong>et</strong> you draw lines, fi ll regions with color, and turn individu<strong>al</strong> screendots on and off. It will <strong>al</strong>so l<strong>et</strong> you save Hi-Res figures in shape tables (seeChapter 1 ©), and even save the entire screen. Y<strong>et</strong>, even with an editor youmust still understand the ins and outs of Hi-Res <strong>graphics</strong>.In the following chapters we intend to show you a number of ways totame the Hi-Res beast. In this chapter we will concentrate on mapping theHi-Res maze, gaining control of individu<strong>al</strong> dots, and creating simple figuresin black and white. Color, animation, and other nifty topics will be dis-. cussed in later chapters.Hi-Res MemoryThere are two storage locations for Hi-Res <strong>graphics</strong>. The primary page,page 1, is located from 8192 th rough 16383 ($2©©©-$3 FFF), and the secondarypage, page 2, runs from 16384 through 24575 ($4©©©-$5FFF). Mostof our work will be done with page 1, but the techniq ues and programsdiscussed will work identic<strong>al</strong>ly on page 2 by simply adding 8192 ($2©©©) tothe page 1 addresses.Perhaps we should begin with a program designed to turn on every Hi­Res dot, one at a time and sequenti<strong>al</strong>ly. We will start with location 8192and turn on the first bit in that byte, then turn it off and turn on the secondbit in the same byte. Then the second bit will go off and the third will goon, continuing to the eighth bit, which is left on when we begin with thenext byte (location 8193) and do the same thing with it, and so forththroughout the eritire screen. Even though we want to turn only one bit onor off at a time, we must POKE the entire byte, since bits do not have anaddress and hence cannot be referenced. For each byte we must POKEeight v<strong>al</strong>ues, ,one after another, and each v<strong>al</strong>ue will have only one bit on.The following lines of BASIC code will generate the eight v<strong>al</strong>ues required.FOR J = 1 TO 8x = 2"(8 - J)NEXT J

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

Saved successfully!

Ooh no, something went wrong!