home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / utility / blink30 / blink30.doc next >
Encoding:
Text File  |  1990-12-09  |  22.5 KB  |  328 lines

  1.                            BLINK Utilities v3.0
  2.                 Blink, Palette Switcher, BlinkSet, BlinkMgr
  3.  
  4.                      Copyright (c)1990 by Bill Aycock
  5.  
  6.  
  7. The Blink Utilities give you quick, easy control over the palettes used in
  8. your ST. Rather than using the Control Panel accessory and setting your screen
  9. colors one by one, Blink and Palette Switcher let you install an entire custom
  10. palette with the click of a mouse. What's more, each uses less than half the
  11. memory taken up by the Control Panel. Both Blink and Palette Switcher come
  12. with a set of palettes already installed, but in case you want to create`your
  13. own custom palettes, the BlinkSet accessory and BlinkMgr will let you do so.
  14.  
  15. Blink, BlinKSet, and Palette Switcher will run as either programs or desk
  16. accessorhes by simply renaming the files. They will work in any resolutio^ on
  17. any ST. The BlinkMgr Librarian runs as a program in eithdr medium or high    
  18. resolution.
  19.  
  20.  
  21.       Blink...
  22.  
  23. BLINK is a small desk accessory that permp out software-hoarding!  */
  24.  
  25. #include <stdio.h>
  26. #include "machine.h"
  27.  
  28.  
  29. /* given n by n matrix of bits R, modify its contents
  30.    to be the transive closure of what was given.  */
  31.  
  32. TC(R, n)
  33. unsigned *R;
  34. int n;
  35. {
  36.   register int rowsize;
  37.   register unsigned mask;
  38.   register unsigned *rowj;
  39.   register unsigned *rp;
  40.   register unsigned *rend;
  41.   register unsigned *ccol;
  42.  
  43.   unsigned *relend;
  44.   unsigned *cword;
  45.   unsigned *rowi;
  46.  
  47.   rowsize = WORDSIZE(n) * sizeof(unsigned);
  48.   relend = (unsigned *) ((char *) R + (n k = 1;
  49.   rowi = R;
  50.   while (rowi < relend)
  51.     {
  52.       ccol = cword;
  53.       rowj = R;
  54.  
  55.       while (rowj < reldnd)
  56.     {
  57.       if (*ccol & mask)
  58.         {
  59.           rp =árowi;
  60.           rend = (unsigned *) ((char *) rowj + rowsize);
  61.  
  62.           while (rowj < rend)
  63.         *rowj++ |= *rp++;
  64.         }
  65.       else
  66.         {
  67.           rowΩ = (unsigned *) ((char ¬)árowj + rowsize);
  68.         }
  69.  
  70.       ccol = (unsigned *)  (char *) ccol + rowsize⌐;
  71.     }
  72.  
  73.       mask <<= 1;
  74.      if (mask == 0)
  75.     {
  76.       mask = 1;
  77.       cword++;
  78.     }
  79.  
  80.       rowi = (unsigned *) ((unsigned) rowi + rowsize);
  81.     }
  82. }
  83.  
  84.  
  85. /* Reflexive Transitive Closure.  Same as TC
  86.    and then set all the bits on the diagonal of R.  */
  87.  
  88. RTC(R, n)
  89. unsigned *R;
  90. int n;
  91. {
  92.   register int rowsize;
  93.   register unsigned mask;
  94.   register unsigned *rp;
  95.   register unsigned *relend;
  96.  
  97.   TC(R, n);
  98.  
  99.   rowsize = WORDSIZE(n) * sizeof(unsigned);
  100.   relend = (unsigned *) ((unsigned) R + n*rowsize);
  101.  
  102.   mask = 1;
  103.   rp = R;
  104.   while (rp < relend)
  105.     {
  106.       *rp |= mask;
  107.  
  108.       mask <<= 1;
  109.       if (mask == 0)
  110.     {
  111.       mask = 1;
  112.       rp++;
  113.     }
  114.  
  115.       rp = (unsigned *) ((unsigned) rp + rowsize);
  116.     }
  117. }
  118.  you
  119. just want to restore your palette to normal, use the "reset" button.
  120.  
  121.  
  122.       Hiding or Showing the Text Cursor
  123.  
  124. Under the Color Box is a box labeled "text cursor". This box contains three
  125. radio buttons: "as is", "show", and "hide". If a poorly-behaved program leaves
  126. an errant text cursor on your desktop or in other applications, select the
  127. Hide button to turn the cursor back off. Or, if you need the cursor but it
  128. isn't showing up, select the Show button to turn it on. In most other cases
  129. you should leave the as-is button selected.
  130.  
  131.  
  132.       Installing Your New Settings
  133.  
  134. After you've selected the options you want, either click on the "do it!"
  135. button or hit Return and your changes will take effect. (If you prefer, you
  136. can also double-click on a palette; this has the same effect.) You can click
  137. on the Cancel button at any time to exit Blink without changing your current
  138. settings.
  139.  
  140. If you aren't sure the palette you choose is the one you really want, hold
  141. down the Alternate key when you exit the program. Instead of leaving, you'll
  142. return to the Blink dialog box, ready to try out another palette.
  143.  
  144. NOTE: Some programs maintain their own cursors and key functions in software
  145. rather than using the ST's built-in functions. Likewise, some programs install
  146. their own color settings when they start up. Changes you make with Blink may
  147. not "take" with these programs. Also, some programs which change the screen
  148. colors may not restore the palette properly when you exit - in this case, just
  149. run Blink right after you leave the program.
  150.  
  151. ==============================================
  152.  
  153.  
  154.       USING PALETTE SWITCHER...
  155.  
  156.  
  157. Palette Switcher is essentially a 32-palette version of Blink. You can run
  158. PS as a program by double-clicking its icon, or as a fesk accessory by
  159. selecting"PaletteSwitcher" from the Desk menu. In either case, if you've
  160. defined a default palette for tha current resolution, PS iNstalls the palette
  161. as soon as it loads. To override this default, hold down the Control key as Prowi = (unsigned *) ((unsigned) rowi + rowsize);
  162.     }
  163. }
  164.  
  165.  
  166. /* Reflexive Transitive Closure.  Same as TC
  167.    and then set all the bits on the diagonal of R.  */
  168.  
  169. RTC(R, n)
  170. unsigned *R;
  171. int n;
  172. {
  173.   register int rowsize;
  174.   register unsigned mask;
  175.   register unsigned *rp;
  176.   register unsigned *relend;
  177.  
  178.   TC(R, n);
  179.  
  180.   rowsize = WORDSIZE(n) * sizeof(unsigned);
  181.   relend = (unsigned *) ((unsigned) R + n*rowsize);
  182.  
  183.   mask = 1;
  184.   rp = R;
  185.   while (rp < relend)
  186.     {
  187.       *rp |= mask;
  188.  
  189.       mask <<= 1;
  190.       if (mask == 0)
  191.     {
  192.       mask = 1;
  193.       rp++;
  194.     }
  195.  
  196.       rp = (unsigned *) ((unsigned) rp + rowsize);
  197.     }
  198. }
  199. ant to have one of the ST's
  200. standard palettes available in Blink or PS, you can click one of the Standard
  201. Palette buttons and drag it where you want.
  202.  
  203. When you're preparing a group of palettes to be installed in Palette
  204. Switcher, remember that the _last three_ palettes in the Library are special -
  205. one of these palettes will be installed in your ST at boot time, depending on
  206. the current resolution. The bottom three slots in the Library are marked
  207. "Default Low-Rez", Default Medium", and "Default Hi-Rez" to remind you of
  208. this. Simply drag the desired palettes into these three locations, or leave
  209. the slot empty if you don't want a palette automatically installed for that
  210. rez. Then use the "Install into Switcher" item to store your palettes into PS.
  211. (Remember, you can override the defaults by holding down the Control key when
  212. PS loads; see the Palette Switcher section above.)
  213.  
  214. As an added feature, you can click on one of the filenames in the File
  215. Section at the bottom of the screen. When you do this, the Message Box will
  216. display that file's full drive, path, and filename. (If you store your
  217. palettes in a folder five or six levels deep, the complete filespec may not
  218. fit in the Message Box - if this happens, only the first part of the filespec
  219. will show up.)
  220.  
  221.  
  222.       The BlinkMgr Menus...
  223.  
  224. BlinkMgr's menus control the loading and saving of files, special editing
  225. features, and whether or not you receive warnings for some actions. Most of
  226. these features have command-key equivalents as well, which are listed in the
  227. menu. These functions are fairly straightforward.
  228.  
  229.  
  230. The Desk menu gives you access to the desk accessories installed in your
  231. system. There is also an About BlinkMgr selection; choosing this will display
  232. a dialog box showing you the program's version number and some other important
  233. information.
  234.  
  235.  
  236. The File menu allows you to read and write files and exit the program.
  237.  
  238. There are four different ways to store palette information; you can have
  239. library files of up to 32 palettes each or smaller .PAL files containing eight
  240. palettes, or you can install a set of palettes into Blink or Palette Switcher.
  241. There are separate menu entries for reading and writing each of these forms,
  242. and command-key equivalents for each.
  243.  
  244. Note that Blink palettes are read into and written from the Subset, and
  245. Palette Switcher palettes are read into and written from the Library. Also,
  246. the Blink and PS palettes are stored _in the program files themselves_. The
  247. palette information is only read _once_, when the programs load. This means
  248. that after you install a new set of palettes into Blink or PS, they won't be
  249. available until you reboot!
  250.  
  251.  
  252. The Edit menu has choices for editing a selected palette or editing the
  253. Blink boot parameters.
  254.  
  255. When editing a palette, you have the option of changing the palette's name,
  256. deleting it from the Library or Subset, or installing it in your ST
  257. immediately. (In case you install a palette and end up with a screen you
  258. can't read, hold down the Alternate key and press Return; that will install
  259. the standard red/green palette so you can go on with your work.) You can also
  260. access the edit-palette dialog by shift-clicking on one of the palette
  261. buttons.
  262.  
  263. If you choose to edit the Blink boot parameters, you'll see a special dialog
  264. box. The top section lists the names of the palettes in the Palette Subset,
  265. and has a column of radio buttons for each resolution. For each resolution,
  266. select the button next to the palette you want installed at boot time; if you
  267. don't want a palette installed for that rez, select the bottom button marked
  268. "do not install palette".
  269.  
  270. The bottom section of the dialog allows you to specify other values for
  271. Blink to install at boot time. You can set the mouse double-click speed, key
  272. repeat rate, key repeat delay, and text cursor blink rate. The dialog tells
  273. you the normal setting for this parameter and the range of values which are
  274. acceptable. In each case, enter a value in the space provided; leave the space
  275. empty and Blink will not alter the setting at boot time.
  276.  
  277. Note: these values, along with the Palette Subset, are saved in the Blink
  278. file itself. In order to have these values take effect, you must choose the
  279. "Install into Blink" option from the File menu to save the information, then
  280. reboot your ST to have the new values installed automatically. If you only
  281. want to change these temporarily, you can do so from the Blink accessory.
  282. Also, if you want to override these defaults, hold down the Control key when
  283. Blink loads. See the section on Using Blink above for more information.
  284.  
  285.  
  286. The Options menu controls the warnings you receive for potentially
  287. destructive actions.
  288.  
  289. This menu has two entries: Verify Deletes and Verify Overwrites. If Verify
  290. Deletes is checked, whenever you try to delete a palette you'll see an alert
  291. asking if you're sure. Click Yes to go ahead and delete the palette, or No! if
  292. you want to keep the palette. Once a palette is deleted, it is _gone_ - be
  293. careful if you decide not to receive these warnings.
  294.  
  295. If Verify Overwrites is checked, you will be asked to make sure each time
  296. one of these actions occurs: you try to save a file, and the file you specify
  297. already exists; you try to load a library file or extract from Palette
  298. Switcher, and the Library has not been saved; you try to load a .PAL file or
  299. extract from Blink, and the Subset has not been changed; you try to copy one
  300. palette on top of another that already exists. In each case, click Yes to go
  301. ahead or No! to cancel the operation.
  302.  
  303. ==============================================
  304.  
  305.  
  306. All the Blink Utilities were written in 100% assembly language using the
  307. HiSoft DevpacST assembler. The resource files were constructed using WERCS.
  308. Both of these products are available from MichTron. Many thanks to Charles
  309. Johnson, Robert Birmingham, and Carl Barron for programming tips, and to Rob
  310. Rasmussen for inspiration.
  311.  
  312. Versions 3.0a of Blink and PS (Palette Switcher) are operationally identical
  313. to earlier versions; some initialization was rearranged because the Desk menu
  314. entries did not show up on some users' systems. No other changes were made.
  315. The latest versions of these programs are always available in CompuServe's
  316. ATARIPRO Forum.
  317.  
  318. If you use these programs, how about letting me know? Send a postcard to me
  319. at the address below. Questions, comments, suggestions, or problem reports are
  320. also welcome. Of course, if you'd like to send a donation too, it will be
  321. gratefully accepted!
  322.  
  323.       Bill Aycock
  324.       2310 North Elm Street
  325.       Greensboro, NC 27408
  326.  
  327.       Compuserve ID: 76703,4061
  328.