An enhanced keyboard and screen mode for the Color Computer: part 2. (Tandy gram) Jake Commander.
An Enhanced Keyboard and Screen Mode for the Color Computer: Part 2
This month we have the final installment of Chroma-Key for the Color Computer, the first half of which appeared in the May Tandy Gram. One of the problems with covering a program in two parts like this is that the other projects get put on the back burner--like the reviews I promised. Don't kick me though; they're still coming. I especially like the look of Dotwriter 4.0 from Prosoft in California and I'm looking forward to reviewing it here. It is amazing how much TRS-80 stuff there is to write about. I'll keep doing my best to please everybody, but in the meantime, let me know what you want to read about.
Another thing I have not had much room for is the Tandy rumor mill. Hopefully, I have about enough room to get just one in, and that is the fact that Tandy has cancelled a whole bunch of their shows for 1985. Bad news that. I went to the one in New York City and found it encouraging to see actual third-party support flourishing for all models of TRS-80. Now, amidst rumors (emphasize rumors) of disappointing profits, Tandy has cut back on certain expenditures --the main one being shows. Well, stick at it, you guys in Fort Worth; for heaven's sake don't let Apple and IBM be the only choices open to tomorrow's computerist.
Well, back to today. Here is the second half of the listing for Chroma-Key. Once you have purged the source code of all typos, assemble the program with the name CKEY or something similar. The version I have published is for 32K, but you can make it a 16K version by changing line 130 to read 3C00 instead of 7C00. Apart from that and clearing a lower amount of memory, everything will work the same. The notes for using the program, assuming you assembled an output filename of CKEY, follow.
Loading the Program
To load, use the CLOADM command. If required, the filename is CKEY.
Prior to loading, high memory must be protected via the CLEAR command. For the 32K version, a figure of 31744 is allowable, but this will leave no extra room for the keyboard definition table other than the predefined keys; somewhere around 31700 or less is better. For the 16K version, CLEAR 15360 is OK; but CLEAR 15300 will leave room for an extra 60 bytes.
When loaded, the program is initialized by typing EXEC followed by ENTER.
After the program has initialized, the following keyboard functions are enabled:
automatically all
The whole definition table can be toggled in and out of operation by hitting SHIFT-ENTER while in key definition mode. This allows typing of the entire character set without worrying about whether a particular key is redefined.
wholesaved arescreen.
Key Definitions
To redefine a key, you'll need to go into key definition mode. First press BREAK. This starts a small black flashing cursor which indicates that the computer is in definition mode. This mode can only be entered while at the start of a line when at the Basic prompt. Next, press the character to be defined; this will be printed followed by an equal sign. The definition can now be entered. The ENTER Key can be used as part of the definition. To end the definition, press BREAK once more; this will exit back to the Basic prompt. To remove a definition from the table, press BREAK immediately after the equal sign.
If there is no room for the definition in the table due to insufficient memory, an OM ERROR will occur, and the definition will be truncated. To overcome this problem, clear more memory via the CLEAR command.
To save the definition table, press the CLEAR key. This will not clear the screen but will leave the computer waiting for another key. "O' will cause the table to be output to the cassette with a filename of KEYDEF. "I' will cause the table to be imput from a cassette file of the same name. The same warning applies to memory space as described above. Sufficient memory space must exist or an OM ERROR will result and the table will be truncated.
Screen Editor
The secreen editor is entered by pressing SHIFT-BREAK. A large black cursor flashes to indicate operation in this mode. The cursor can be moved all around the screen without destroying any character it passes over. The four arrow keys are used for this purpose.
A character can be inserted at the cursor by pressing SHIFT-RIGHT-ARROW. This will open a gap for the new character.
A character can be deleted from the current cursor position by pressing SHIFT-LEFT-ARROW.
to return a line to the computer, just press ENTER. The whole line will then be input to the computer as if it were typed in from the keyboard. When initially entered, the screen editor assumes a line length of 32 character; however, this can be changed as follows. Move the cursor to the desired line-end and press BREAK. This will start another slower-flashing cursor to indicate the line end position. To enter the line (remember Basic can't swallow more than 250 characters), move the main cursor back to the start line and press ENTER (the cursor merely has to be on the correct start line, not necessarily at the beginning of that line).
To enter graphics while in screen edit mode, just press CLEAR. This will clear a black square at the cursor position. Individual pixels can be turned on or off by pressing Q, W, A, or S, keys which affect the pixel at the top-left, top-right, bottom-left, or bottom-right respectively within the cursor block.
Initially the graphic color is white. This can be changed by pressing a number key from 1 to 8. The block will then change to the color-number pressed as described in the Color Basic manual.
Whenever the cursor is over a graphic character rather than a text character, an inverted plus sign is flashed instead of a black block. Any of the above graphic options can then be used.
Table: 1.
Table: Color TRS-80 Chroma key listing.