Atari ST series Technical Reference Manual page 76

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

dress. Operating System functions write on the logical screen
when they output screen graphics. Normally, you'll want
graphics output to go to the same memory area that is being
displayed. There are some cases, however, where you'll
want to draw a number of graphics objects sequentially and
display them all at once so the user can't see you drawing
each one in turn. In such cases, a separate logical screen
comes in handy. To find the starting address of the logical
screen memory area, use the logbase() function:
long logscraddr;
logscraddr = Logbase();
where logscraddr is the starting address of the logical screen.
The screen resolution mode is another important piece of
information concerning the screen memory layout. Although
all three ST screen modes use the same amount of screen
memory (32K), different bits control different pixels in the
various screen modes. The Getrez() function can be used to
find the current screen resolution:
int rez;
rez = G etrez();
where rez is a code indicating the current screen resolution.
The three rez values are
Resolution
Number
0
Low resolution (320 x 200 pixels, 16 colors)
1
Medium resolution (640 x 200 pixels, 4 colors)
2
High resolution (640 x 400 pixels, 2 colors)
We stated above that the addresses of the physical and
logical screen memory block are not fixed. The user may
change these addresses along with the resolution mode, us­
ing the function Setscreen(). The format for this call is
int rez;
long logaddr, physaddr;
Setscreen(logaddr, physaddr, rez);
where logaddr is the starting address for the logical screen,
physaddr is the starting address for the physical screen dis­
play, and rez is the resolution mode (as shown above in the
Getrez() description). A negative number in any of the three
parameters will retain the current setting for that parameter.
Changing the address of the logical screen allows you to
CHAPTER 4
Resolution

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents