118 User Defined Graphics Characters

Authors

Dennis Jurries

Publication

Publication Details

Volume: 2 Issue: 11

Date

 

Pages

4-5
See all articles from The Plotter v2 n11

According to Chapter 18, page 163 of the TS 2068 User Manual, you can create and use 21 user defined graphic symbols. Some people may not be aware of the fact that you can do far more than that 21. That chapter goes into how you can, by using BIN, create those graphic character. This article will show you how to create your symbols faster and easier and how to do more than 21.

 The first step is to either get some graph paper or create your own with small 8×8 grid patterns. The 8×8 box should be small (1/2 square max). The reason for this is that the smaller the box, the closer your character will resemble the character on the screen. At the top of each column of 8 small boxes, write these numbers, from left to right: 128, 64, 32, 16, 8, 4, 2, 1. This is the 2’s complement representation of the columns.

Next, draw in your character, as shown in the manual, filling in the small boxes that your lines pass through. The next step is to, at the right of each row, add up the total value of all the filled boxes in that row.

Use the following program to assign your character to one of the 21 user defined graphics, from A to U.

1000 FOR a=USR"e" to USR"e"+7
1010 READ b: POKE a,b
1020 NEXT a
1030 DATA 64,68,72,80,42,74,15,2

The above 21 user defined graphics characters are, along with the standard character set, controlled by a ROM subroutine. In order to use more than the 21 UDGs, you will have to bypass the ROM routine for the standard character set and instead use RAM.

According to the 2068 manual, addresses 23606-7 contain an address that is 256 less than the address of the character set. If you PEEK these address, you will get 0 and 60, respectively. This corresponds to address 15360 in ROM; add 256 to it to get 15616, the starting address of the standard character set.

If you use this method, you must retain in RAM all characters that you want to display, from space to the copyright symbol. The following is an example method for replacing the upper and lower case letters while retaining all the other characters.

5 REM Lower RAMTOP to protect the new character set
10 CLEAR 64499
20 LET a=PEEK 23606+255*PEEK 23607+256
25 REM Take 33 characters from ROM and put them in RAM
30 FOR n=0 to 32
40 FOR i=0 to 7
50 POKE 64500+i+8*n,PEEK (a+i+8*n)
60 NEXT i
70 NEXT n
75 REM Read in characters to replace upper case letters
80 FOR n=33 TO 58
90 FOR i=0 TO 7
100 READ x
110 POKE 64500+i+8*n,x
120 NEXT i
130 NEXT n
135 REM Take 6 characters from ROM and put in RAM
140 FOR n=59 TO 64
150 FOR i=0 TO 7
160 POKE 6450+i+8*n,PEEK (a+I+8*n)
170 NEXT i
180 NEXT n
185 REM Read in characters to replace 26 lower case letters
200 FOR n=65 TO 90
210 FOR i=0 TO 7
220 READ x
230 POKE 6450+i+8*n,x
240 NEXT i
250 NEXT n
8000 DATA ....

It is possible that with just the 21 UDGs and the new character set redefined to have a total of 118 user defined graphic characters. Make the DATA statements as necessary, as you did for the the 21 UDGs.

To use after running, POKE 23606,244: POKE 23607,250. To go back to the standard character set, POKE 23606,0: POKE 23607,60.

Products

 

Downloadable Media

 
Scroll to Top