home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 11 / q11.d81 / t.screensketch < prev    next >
Text File  |  2022-08-28  |  14KB  |  293 lines

  1.                         S C R E E N S K E T C H    8 0
  2.  
  3.                                 by Jon Mattson
  4.  
  5.  
  6.       If you're anything like me, you find yourself designing custom screens
  7. for programs all the time.   Title screens, help screens, background
  8. screens...  the list is endless.  And the work can seem pretty endless, too,
  9. sometimes.  If you have ever designed a nifty screen and then hit RETURN -
  10. or, worse yet, CLR - and screwed up the whole thing, you know the true
  11. meaning of frustration.
  12.  
  13.     Fortunately, a number of useful utilities exist to make the task of
  14. creating 40-column screens much easier.  Unfortunately, few, if any, such
  15. routines exist for the 80-column screen - pretty unfair, considering that
  16. you have twice as much area to fill!  This is not surprising when you
  17. consider how tricky it can be to manipulate VDC data with machine language. 
  18. Saving the result from BASIC is impossible.
  19.  
  20.     Enter SCREENSKETCH 80.  It uses the power of the CONTROL80 language
  21. extension to make screen design not only possible, but easy.  For those
  22. interested in CONTROL80, it is also a good demonstration of how best to use
  23. that utility.  Of course, you don't need to have CONTROL80 to use
  24. SCREENSKETCH - a version of it is already built into the program in the
  25. guise of the ML file "SS.C80".
  26.  
  27.     SCREENSKETCH is totally menu-driven, so you will be using it like a pro
  28. in no time.  Plug your joystick into Port 2 or use the CRSR keys (RETURN =
  29. FIRE).  Since the CRSR keys do not allow diagonal movement, I have also
  30. included an extra method of keyboard control:
  31.  
  32.                                        I
  33.                                      U   O
  34.                                    J       K
  35.                                      N   ,
  36.                                        M
  37.  
  38.     You can freely switch between input methods at any time, since the
  39. program continually scans both the joystick port and the keyboard.  For
  40. purposes of brevity, the rest of this article will refer to the joystick and
  41. FIRE button, but the keyboard methods are always allowed, as well.
  42.  
  43.     There is only one other key you need to remember: ESC.  The ESCape key
  44. is used to switch between the Command and Drawing Modes, and also allows you
  45. to exit a menu without making any choices.
  46.  
  47.     When you first run the program, you will be in Command Mode.  A blue
  48. menu bar will be at the top of the screen, with four choices: Character,
  49. Screen, Files and Command.  The Character choice will be highlighted, and
  50. moving the joystick will allow you to select from the four menus.  Pressing
  51. FIRE will open the appropriate menu, allowing you to make specific choices
  52. as noted below.  Pressing ESC will switch to Drawing Mode.
  53.  
  54.     In Drawing Mode, the menu bar disappears, allowing you access to the
  55. whole screen.  The joystick moves a flashing cursor, and the FIRE button
  56. draws the currently selected Character and Attribute (see below) at that
  57. location.  By pressing the button and moving the stick simultaneously, you
  58. can draw lines of characters.  Note that this particular trick will not work
  59. for the keyboard, since several keys cannot be scanned simultaneously. 
  60. Pressing ESC takes you back to Command Mode, causing the menu bar to
  61. reappear over top of your work of art - don't worry, it was saved to memory
  62. first.
  63.  
  64.     There is also one shortcut in the Drawing Mode that allows you to erase
  65. characters without going back to Command Mode.  Just press the DEL key, and
  66. the currently selected Character will automatically become a space, although
  67. the current Attribute will be unchanged.
  68.  
  69.     Now let's take a closer look at the Command Mode.  When you press the
  70. FIRE button, the menu of your choice will pop open, giving you a more
  71. specific list of options.  Move the joystick up and down to choose a
  72. function, then press FIRE to activate it.  The sub-menu window will then
  73. close automatically.  The ESC key can be used to close a window at any time
  74. without making a choice.
  75.  
  76.     There is one exception to this standard procedure: since the Character
  77. window often requires several selections, the FIRE button will NOT
  78. automatically close that window when a choice is made.  You must use ESC to
  79. exit the Character sub-menu.
  80.  
  81.     All of the sub-menu selections are listed below with brief explanations.
  82. Most of them are actually self-explanatory, so you will probably never have
  83. to refer to this article again.
  84.  
  85.  
  86.  CHARACTER
  87.  ---------
  88.  
  89.     Before describing this sub-menu, I should probably do a quick
  90. explanation of how the 80-column screen uses characters.  This must, per
  91. force, be a brief explanation, but what you don't understand will quickly
  92. become clear through experimentation.
  93.  
  94.     If you have tinkered with POKEs to the regular 40-column VIC screen, you
  95. will know that each "square" is made up of two pieces of data: the actual
  96. character code and the color.  You must POKE to two different locations to
  97. alter both the character and the color, starting at 1024 (any bank) and
  98. 55296 (bank 15) respectively.
  99.  
  100.     On the 80-column VDC screen, the character code concept is unchanged. 
  101. However, color must be extended to include other video effects, such as
  102. reverse, flash and underline.  Furthermore, since the VDC can display two
  103. different character sets simultaneously (termed "normal" and "alternate"
  104. herein), there must be some way to tell which set any given character should
  105. be taken from.  Collectively, these effects are called Attributes.
  106.  
  107.     Like the VIC, the VDC has two separate sections of memory: one for
  108. character codes (pictures) and one for attributes (color and other video
  109. effects).  You don't need to worry about this memory management:
  110. SCREENSKETCH does that for you.  When you SAVE a picture, all of its
  111. necessary components will automatically be saved with it - even flashing
  112. areas!  All you need to remember while designing a screen is that each
  113. "paint brush" or "stamp" that you pick to draw with will be composed of a
  114. Character and an Attribute grouping.
  115.  
  116.  
  117. CHARACTER: While this selection is highlighted, moving the joystick left and
  118. right will allow you to view all of the characters and pick one to draw with
  119. - the "currently selected Character" previously mentioned.  Note that the
  120. sample character shows only the current choice - not its color or other
  121. attributes.  Watch the "Attributes" line to see what you will actually be
  122. drawing.
  123.  
  124. ATTRIBUTES: You cannot actually highlight this selection; instead, you will
  125. be able to highlight each of the items which compose it (see below). 
  126. However, the Attribute line shows you a picture of what the currently
  127. selected Character will look like with the currently selected Attributes -
  128. in other words, this picture shows what you will actually be drawing.
  129.  
  130.     The following 8 sub-choices are all portions of the total Attribute
  131. code.  In each case, moving the joystick or pressing FIRE will simply toggle
  132. the attribute between off (-) and on (X).  Watch the sample character on the
  133. attributes line to see what effects each change has.
  134.  
  135. ALTERNATE: Chooses between each of the two character sets available - normal
  136. (off) and alternate (on).
  137.  
  138. REVERSE: Reverses the foreground and background colors of the corresponding
  139. character.  This is similar to toggling the RVS ON and RVS OFF keys.
  140.  
  141. UNDERLINE: This simply causes the character to be underlined.
  142.  
  143. FLASH (or Blink): Causes the character to flash on and off automatically. 
  144. This is independent from program control, being a function of the VDC.
  145.  
  146. RED, GREEN, BLUE, INTENSITY: These four attributes set the color of the
  147. character.  By mixing them, you can get different colors, as noted on the
  148. table below.  For those who are interested, the appropriate code numbers
  149. have also been included (equivalent to the codes used for POKEing to color
  150. memory on the 40-column screen).  They can be used with the POST command in
  151. CONTROL80.
  152.  
  153.      CODE   COLOR         R G B I      CODE   COLOR         R G B I
  154.        0    Black         - - - -        8    Dark Red      X - - -
  155.        1    Dark Grey     - - - X        9    Light Red     X - - X
  156.        2    Dark Blue     - - X -       10    Dark Purple   X - X -
  157.        3    Light Blue    - - X X       11    Light Purple  X - X X
  158.        4    Dark