home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 11
/
q11.d81
/
t.screensketch
< prev
next >
Wrap
Text File
|
2022-08-28
|
14KB
|
293 lines
S C R E E N S K E T C H 8 0
by Jon Mattson
If you're anything like me, you find yourself designing custom screens
for programs all the time. Title screens, help screens, background
screens... the list is endless. And the work can seem pretty endless, too,
sometimes. If you have ever designed a nifty screen and then hit RETURN -
or, worse yet, CLR - and screwed up the whole thing, you know the true
meaning of frustration.
Fortunately, a number of useful utilities exist to make the task of
creating 40-column screens much easier. Unfortunately, few, if any, such
routines exist for the 80-column screen - pretty unfair, considering that
you have twice as much area to fill! This is not surprising when you
consider how tricky it can be to manipulate VDC data with machine language.
Saving the result from BASIC is impossible.
Enter SCREENSKETCH 80. It uses the power of the CONTROL80 language
extension to make screen design not only possible, but easy. For those
interested in CONTROL80, it is also a good demonstration of how best to use
that utility. Of course, you don't need to have CONTROL80 to use
SCREENSKETCH - a version of it is already built into the program in the
guise of the ML file "SS.C80".
SCREENSKETCH is totally menu-driven, so you will be using it like a pro
in no time. Plug your joystick into Port 2 or use the CRSR keys (RETURN =
FIRE). Since the CRSR keys do not allow diagonal movement, I have also
included an extra method of keyboard control:
I
U O
J K
N ,
M
You can freely switch between input methods at any time, since the
program continually scans both the joystick port and the keyboard. For
purposes of brevity, the rest of this article will refer to the joystick and
FIRE button, but the keyboard methods are always allowed, as well.
There is only one other key you need to remember: ESC. The ESCape key
is used to switch between the Command and Drawing Modes, and also allows you
to exit a menu without making any choices.
When you first run the program, you will be in Command Mode. A blue
menu bar will be at the top of the screen, with four choices: Character,
Screen, Files and Command. The Character choice will be highlighted, and
moving the joystick will allow you to select from the four menus. Pressing
FIRE will open the appropriate menu, allowing you to make specific choices
as noted below. Pressing ESC will switch to Drawing Mode.
In Drawing Mode, the menu bar disappears, allowing you access to the
whole screen. The joystick moves a flashing cursor, and the FIRE button
draws the currently selected Character and Attribute (see below) at that
location. By pressing the button and moving the stick simultaneously, you
can draw lines of characters. Note that this particular trick will not work
for the keyboard, since several keys cannot be scanned simultaneously.
Pressing ESC takes you back to Command Mode, causing the menu bar to
reappear over top of your work of art - don't worry, it was saved to memory
first.
There is also one shortcut in the Drawing Mode that allows you to erase
characters without going back to Command Mode. Just press the DEL key, and
the currently selected Character will automatically become a space, although
the current Attribute will be unchanged.
Now let's take a closer look at the Command Mode. When you press the
FIRE button, the menu of your choice will pop open, giving you a more
specific list of options. Move the joystick up and down to choose a
function, then press FIRE to activate it. The sub-menu window will then
close automatically. The ESC key can be used to close a window at any time
without making a choice.
There is one exception to this standard procedure: since the Character
window often requires several selections, the FIRE button will NOT
automatically close that window when a choice is made. You must use ESC to
exit the Character sub-menu.
All of the sub-menu selections are listed below with brief explanations.
Most of them are actually self-explanatory, so you will probably never have
to refer to this article again.
CHARACTER
---------
Before describing this sub-menu, I should probably do a quick
explanation of how the 80-column screen uses characters. This must, per
force, be a brief explanation, but what you don't understand will quickly
become clear through experimentation.
If you have tinkered with POKEs to the regular 40-column VIC screen, you
will know that each "square" is made up of two pieces of data: the actual
character code and the color. You must POKE to two different locations to
alter both the character and the color, starting at 1024 (any bank) and
55296 (bank 15) respectively.
On the 80-column VDC screen, the character code concept is unchanged.
However, color must be extended to include other video effects, such as
reverse, flash and underline. Furthermore, since the VDC can display two
different character sets simultaneously (termed "normal" and "alternate"
herein), there must be some way to tell which set any given character should
be taken from. Collectively, these effects are called Attributes.
Like the VIC, the VDC has two separate sections of memory: one for
character codes (pictures) and one for attributes (color and other video
effects). You don't need to worry about this memory management:
SCREENSKETCH does that for you. When you SAVE a picture, all of its
necessary components will automatically be saved with it - even flashing
areas! All you need to remember while designing a screen is that each
"paint brush" or "stamp" that you pick to draw with will be composed of a
Character and an Attribute grouping.
CHARACTER: While this selection is highlighted, moving the joystick left and
right will allow you to view all of the characters and pick one to draw with
- the "currently selected Character" previously mentioned. Note that the
sample character shows only the current choice - not its color or other
attributes. Watch the "Attributes" line to see what you will actually be
drawing.
ATTRIBUTES: You cannot actually highlight this selection; instead, you will
be able to highlight each of the items which compose it (see below).
However, the Attribute line shows you a picture of what the currently
selected Character will look like with the currently selected Attributes -
in other words, this picture shows what you will actually be drawing.
The following 8 sub-choices are all portions of the total Attribute
code. In each case, moving the joystick or pressing FIRE will simply toggle
the attribute between off (-) and on (X). Watch the sample character on the
attributes line to see what effects each change has.
ALTERNATE: Chooses between each of the two character sets available - normal
(off) and alternate (on).
REVERSE: Reverses the foreground and background colors of the corresponding
character. This is similar to toggling the RVS ON and RVS OFF keys.
UNDERLINE: This simply causes the character to be underlined.
FLASH (or Blink): Causes the character to flash on and off automatically.
This is independent from program control, being a function of the VDC.
RED, GREEN, BLUE, INTENSITY: These four attributes set the color of the
character. By mixing them, you can get different colors, as noted on the
table below. For those who are interested, the appropriate code numbers
have also been included (equivalent to the codes used for POKEing to color
memory on the 40-column screen). They can be used with the POST command in
CONTROL80.
CODE COLOR R G B I CODE COLOR R G B I
0 Black - - - - 8 Dark Red X - - -
1 Dark Grey - - - X 9 Light Red X - - X
2 Dark Blue - - X - 10 Dark Purple X - X -
3 Light Blue - - X X 11 Light Purple X - X X
4 Dark