TRS-80 strings. (computer graphic aids) (column) Stephen B. Gray.
TRS-80 Strings
At the 47th rising of the TRS-80 moon, we look out over the frosty landscape and catch sight of some comments on high-resolution graphics and hard disk drives, find out how to restore the silvery shine of our keyboard surrounds, and examine the word/graphics CopyArt processor and a short program that determines the day of any given date.
High Resolution
High-resolution graphics for the Model III was first mentioned in the September 1982 column (p. 211), after I'd heard in London that it was forthcoming from Fort Worth. The second mention was in the October 1982 column (p. 284), in which I described the Mikeeangelo Graphic System ($369 for up to 512 X 192 pixels; recently renamed Mikee-graphic and reduced to $340), and Micro-Lab's Grafyx Solution ($299.95 for up to 512 X 192 pixels), and said readers might want to wait for Radio Shack's offering.
Last September, Radio Shack's new RSC-8 catalog included several new products, among them high-resolution graphics for the Model III, at $369.95 (plus installation) for 640 X 240 pixels (Figure 1). That comes out to about 85.33 pixels per inch horizontally, 36.23 per inch vertically, which does indeed sound like it could provide what the catalog calls "amazingly fine detail,' for "sophisticated business graphs, tables, charts, maps, illustrations, geometric patterns--and animation!'
The package includes a 32K RAM board, manual and diskette with Graphics Basic and a library of assembly language subroutines. The Graphics Basic includes commands for drawing a circle, arc or ellipse; drawing a line between points; shading an area in one of several available patterns; turning an individual pixel on or off (with PRESET); putting the bit-pattern contents of an array onto the screen (useful for animation); and turning the graphics screen on or off.
The RSC-8 catalog says the Model III hi-res graphics package is "available 12/30/82.' Mebbe. Anyway, it offers almost 55,300 more pixels than either Mikeegraphic or Grafyx Solution, for $30 more than the first, and $70 more than the second. However, let's wait to see how the Radio Shack hi-res software compares. Byron Mumford's Rescom (Oct. 1982, p. 286) has 14 commands for Mikeegraphic; and the software supplied with Grafyx Solution looks even better, with just about every one of the Radio Shack Graphics Basic commands, plus some others that Fort Worth doesn't seem to have included: complement every point on the hi-res screen for an inverse display; draw a box whose diagonal's ends are at two given points; and copy the contents of the hi-res and text screen to a printer with graphics capabilities. (However, it may be possible to create an inverse display by using the POINT and PRESET commands). We'll see, as soon as I can get the Radio Shack hi-res graphics board installed in my Model III.
Note that the high resolution (640 X 240) provides exactly five times as many pixels in both the horizontal and vertical directions as does the standard resolution (128 X 48). Which would mean, if the hi-res graphics area is the same rectangular shape, with the same aspect ratio, 3:7, but only a fifth as large. However, looking very closely at Figure 1, you can see that the pixels are almost square (rounded, in the photo), which makes graphics easier to create. And one of Radio Shack's software people confirms that the hi-res pixel is indeed almost square, with a 4:5 aspect ratio. How come? Well, he says the hi-res graphics area may be bigger than the lo-res graphics area. We'll check that out later, after acquiring a hi-res board.
The 153,000 pixels take 153,000 bits of memory to store. If Radio Shack uses a 32K graphics memory board, that means it provides 32,000 times 8 bits, or 256,000 bits, which means there are 102,400 unused bits on that board. So why not put only 20K, or 160,000 bits of RAM memory, on the graphics board? According to a Radio Shack source, it may simply be more economical "to use the chips we chose,' which must mean they need stock only one size of RAM chip, perhaps a 64K chip, for the hi-res board. Somebody will undoubtedly find a way to use the 102,400 idle RAM bits.
The graphics memory, by the way, is independent, and can overlay text in the regular video memory, so graphics and text can be combined in one display.
The assembly language subroutines are there only if and when you want to use the graphics commands from a language other than Basic, such as Fortran or Cobol. If you use only Basic, you'll never need those subroutines.
Hard Disk Drive for Models I and III
Forecasting some Radio Shack products isn't all that difficult After all, the RSC-7 catalog included hi-res graphics for the Model II, with exactly the same resolution and Graphics Basic commands as for what was to come later for the Model III (but at $499).
It was only a matter of time before Radio Shack offered such a highly desirable item as hi-res graphics for the Model III. The RSC-6 catalog offered a hard disk system for Models II and 16 with 8.4 megabytes of storage for $4495. Again, it was only a matter of time before a similar hard disk system was available for the Model III; the RSC-8 catalog has it, for the III (and I, with an adapter), at $2495 for 5 megabytes of storage (Figure 2). I had known quite some time before this writing that Radio Shack had ordered hard disk drives for the Model III (no, I didn't get the information from Fort Worth), but there was no point saying anything before now, because Radio Shack has enough problems without people calling up to ask when the hard disk drives are coming. The RSC-8 catalog gives all the details, plus an availability date of 11/15/82.
Incidentally, those prices for the hard disk drives are for the primary drives, which include a hard disk operating system. The secondary drives are less ($3485 for the II, $1995 for the III); up to four hard disk drives can be attached to a Model I, II, III, or 16 TRS-80, for a total of 20 or over 30 megabytes of storage, depending on the model.
Why use a hard disk (also called a Winchester) system? You can eliminate most, if not all, of the tiresome business of having to put one floppy disk after another into your drives (except when it comes to backup disks). This may not be a big deal if you are a hobbyist, but for a business with many records, hard disks save a lot of time, not only because most floppy disk programs and data can be transferred to hard disk, but because they are then available much, much faster. On the Model II floppy disk drive, for example, the transfer rate is 500 kilobits per second. The Model II hard disk transfer rate is 4.34 megabits per second, providing what the catalog calls "extremely fast access to programs and data.'
Aluminum Sprayed on Plastic II
The problem of the aluminum paint wearing off the keyboard of your TRS-80 if you rest your hands on it too much was mentioned in June 1982 (p. 217). The question was asked, "Has anybody found a spray-on or brush-on paint that matches the TRS-80's aluminum color?'
Michael B. Rowe, P.E., of Simplified Software Systems, which sells computers, accessories and software out of Hickory, NC, wrote:
"In one of your recent columns, you addressed the problem of the paint being rubbed off the TRS-80. Being in the software business, we use our machines constantly, and as a result we had the same problem. Our solution was arrived at by buying several different brands of aerosol-type aluminum sprays, and using molded-plastic outlet boxes for tests. What we decided on proved to be a satisfactory color match, and probably a better finish than the original. The procedure requires that you follow these steps carefully.
1. If the computer is out of warranty, remove the aluminum shell from the keyboard--or, in the case of the Model III, the whole top--as a unit. Caution: Be extremely careful when removing the top from the III to be sure you do not damage the neck of the CRT.
2. Use extra-fine (220 to 600 grit) sandpaper to slightly roughen the surface to be coated. Carefully remove all sanding dust!
3. Apply Krylon, Dull Aluminum 1403, to the area to be coated, in several light coats rather than one heavy coat. It dries quite rapidly, so only 20 to 30 seconds is required between these light coats.
4. After the dull aluminum spray has dried for several minutes--preferably not more than four or five--apply several light coats of K-Mart brand Fast-Drying Spray Enamel in CLEAR U3733. This may result in slightly more surface sheen than the original, but generally blends nicely. On our Model IIIs we did not have to paint the whole top to get a satisfactory appearance.
"I might add that the black plastic keyboard bezel on both the I and III can be removed and recoated if necessary (someone got white paint on one of ours), using Martin-Senour Vinyl Color Spray #7977, Jet Black. Note that is Jet black, not Gloss black.
Before trying this on your TRS-80, you might want to work up a good spraying technique (slow and steady) on some scrap plastic or whatever. If you try the above solution, or have others, please let us know.
CopyArt Word/Graphics Processor
According to the ads, CopyArt provides "the new dimension in word processing,' which is graphics; you can put words and pictures on the same screen or page (Figure 3). That is, if you have a Model I or III IRS-80, 48K of memory, and at least one disk. And CopyArt, which is $149.95 from Simutek Computer Products Inc. (4877 E. Speedway, Tucson, AZ 85712).
CopyArt combines a word processor very much like Radio Shack's Scripsit, a graphics mode for using the cursor like a pen, drawing lines with the four directional arrows (similar to Etch-A-Sketch); a second graphics mode that creates large-size letters and numbers; and extensive printout capabilities. CopyArt was written with a special version of Simutek's ZBasic compiler, which is advertised as "the world's fastest TRS-80 Basic compiler,' and which will be reviewed here at a later date.
CopyArt Word Processing
If you have used Scripsit, CopyArt's word processing capabilities will be very familiar. Some are just about the same, many are new or improved, and only a couple are not quite as good as their Scripsit counterparts.
As in Scripsit, you use CN=Y for centering, JU=Y for justifying text, LM=5 for left margin at 5, RM=65 for right margin at 65, HD=2 for using the next two lines as headings, PG=10 for starting page numbers on page 10, etc. As in Scripsit, you can scroll text (roll the screen up or down the text), move to the top or bottom of text (or to the left or right side of text) using combinations of arrow keys and the shift key, and do global search and replace.
Moving text around is simpler: you just put any text to be moved into a buffer, move the cursor to a new position, and unload the buffer, which places the text in the new position. With the down-arrow, you can move down a screenful at a time, instead of just a line at a time.
To emphasize text, you can simply put SE=Y in the format line (for single emphasis), which double-prints a line and thus makes it darker, or use DE=Y (for double emphasis), which will quadruple-print a line and make it extra dark. To underline text, simply put a + at the beginning and end of phrases you want underlined.
Two of the best CopyArt word processing features are for deleting or inserting characters, and operate more as they do in commercial word processors. Press D, and everything to the right of the cursor moves to the left and disappears, as though swallowed up by the cursor. Press I, and blank spaces pour from the right side of the cursor.
A Directory feature calls up a menu allowing you to get a listing of all the various files on as many as four disk drives, or find out how much space you have left on a diskette.
Hitting the H key calls up help: four pages of display listing the various commands for word processing and printer format, plus some tips. As the manual puts it, "To help you remember the various commands we've included a reference cards.' On the screen, that is. Fine, but I would still like a separate card, rather than having to call Help every time I need a simple assist. For me, the lack of a reference card is the only serious problem with CopyArt. The index to the 104-page manual is quite good, but using a manual to look up commands takes too much time.
The only CopyArt commands that seem to work better in Scripsit are two of the simplest: cursor movements left and right, which don't operate as smoothly. Generally speaking, Scripsit seems more professional and tidier in operation than CopyArt.
CopyArt Line Graphics
Hit the break key and then G, and you are into graphics mode. Now you can use the cursor like a pen (or an eraser), drawing lines (or deleting them). Hit D, and as you move the cursor with the arrow keys, it leaves a trail. Use E to get into erase mode. By switching back and forth from D to E, you create graphics. To move the cursor around without drawing or erasing anything, use M. To speed up the cursor, hit F. That's all there is to the draw-a-line graphics, but you can do a great deal with these four commands.
CopyArt Character Graphics
Hit @ and Y, and you can create big graphic characters automatically, for headlines or banners or whatever you need. The CopyArt disk includes a basic set of characters, including the alphabet and numerals, which you can display and print out in various sizes.
After you hit Y, you type in a letter, word or phrase at the bottom of the screen. You specify the height and width of the characters, whether you want them printed horizontally or vertically, and in black on white or inverted (white on black).
These characters can be printed out quite large, especially vertically, where you can print fairly long banners. If you have a printer--such as the Okidata Microline or Epson--that supports the TRS-80 graphics character set, then your banners will be printed with letters of solid black.
On other printers, CopyArt uses "pseudo-graphics,' by printing, instead of a solid black rectangle (which is equivalent to a white rectangle on the screen), a # overprinted by a 0.
Although at this moment I have three printers on hand, not one of them can print a graphics block. So I had to use pseudo-graphics to see what CopyArt can do. In the first example (Figure 4), I put a row of pigeonholes below Creative's address, with the first line printed normally, the second with single emphasis (printed twice), and the third using double emphasis (printed four times) and underlined. Although the four boxes were exactly the same size in the original, the printout is a pseudo-graphics approximation, with two sizes of boxes.
The second example (Figure 5) shows my first name printed horizontally with small pseudo-graphic characters. The third example (Figure 6), shown horizontally, was originally printed vertically and inversely.
Actually, in that last example, three sets of the name were printed vertically. You can put a word on the screen, then move it over to the right using the insert command to insert blanks, then put another word on the screen, push that into the middle, and add a third word alongside. Incidentally, as the manual notes, the CopyArt graphic characters are meant to be used as a framework; you can use the graphics mode to change the basic letters into almost any style you want. "For example, once you have the characters on the screen, you might patch them so they look a little more like Old English type.
Advanced CopyArt
The imaginative manual has a section on some fancy features, such as killing the linefeed for creating new characters with overstrikes, turning off printing so as to print only a portion of a document, using CopyArt as an editor, and, if your printer uses special control codes, inserting them directly into text.
When you want to use a control code, you hit @ and C. A message appears at the bottom of the screen:
Cntrl codes?
At which point you simply enter the code. The Cetnronics 737, for example, will start underlining if it is given control code 14. So you type 14, and hit the enter key. Depending on the printer and the code, a character (sometimes a rather strange one not in the regular set) may or may not appear on the screen. It won't be printed out, but will affect the text following it.
That's most of the CopyArt features, which are many and varied, and which you can take days or weeks exploring before you find out all the program can do. (It can simulate a page up to 255 characters wide, for one thing.) If the price seems high, consider that Radio Shack's Scripsit alone is $99.95; for an extra $50 you get a word processor with many features not found in Scripsit, plus a graphics generator with a great many fascinating capabilities. If you want to combine words and pictures, CopyArt provides what may well be the only way to do it directly.
Short Program #35: Calendar
Max Seim of Stillwater, MN wrote to say he "recently picked up the latest issue of Omni magazine and quickly flipped to my favorite section: Games.'
"I was very interested in the unique mathematical way they showed to determine the day of any given date. I decided to use this method to produce what I think is the shortest Basic program ever written that does it.
"Note: The data are important and must be correct. These twelve numbers are the key numbers for each month used in the formula in lines 29-32. That's the complete listing . . . all nine lines of it!'
The program as it sits will determine the day during the 1900's only. Line 50 must be changed for the 1800's and 2000's:
For the 1800's: 50 T2=T2+2
For the 2000's: 50 T2=T2-1
"The program could be easily modified to make these adjustments automatically. Simply input the year as four digits instead of two.'
"1900 and 1800, although divisible by four, are not leap years. The program allows for this in the last part of line 32. Years such as 2000 and 4000 are leap years because they are divisible by 400. If you wish to input the year 2000, make sure the last part of line 32 is removed. The last part of line 32 simply jumps over the leap-year determiner if you input 00 for the year.
"If you have any questions, see pages 152-3 of the November 1981 Omni magazine.'
Max's original program (which of course he submitted some time ago) did contain only nine lines, but I stretched it out a little to make it more readable and to fit this column.
The calendar item Max refers to in Omni is called "You too can be an idiot savant,' and tells how, by memorizing a method and certain numbers, including those in DATA line 100, you can amaze people by giving the day for any particular date, with just a few moments of mental calculation. The method is fairly simple, but you'd have to use it quite often to be able to remember it for any length of time.
Photo: Figure 1. High-resolution graphics, as offered for the Model III TRS-80, provides 153,600 pixels for fine detail.
Photo: Figure 2. The hard-disk drive for the TRS-80 Model III or I TRS-80 adds 5 megabytes of storage.
Photo: Figure 3. This partial illustration from the CopyArt manual, showing how to set up an Okidata Microline printer, was created with CopyArt.
Photo: Figure 4. CopyArt can print with varying degrees of emphasis, underline, and can approximate graphics blocks with 0 over #.
Photo: Figure 5. Using pseudo-graphics, CopyArt can print a good approximation of solid letters.
Photo: Figure 6. These inverted characters were originally printed vertically with CopyArt.