In and Out of SYNC

See all articles from SYNC v3 n6

What’s a Brand X doing in SYNC Magazine?

With improving technology and intensifying competition in the small computer market, more and more computers are available at prices within a few steps of the Timex/Sinclair units. Our sister publication, Creative Computing, evaluates many of these systems. We would like to share these reviews with those of you considering another computer.

In addition, we will sometimes take a program or two and show what it would be like to write and run the program on the Brand X computer compared to the Timex/Sinclair. You will probably find these tutorials a useful aid for converting programs from other sources to your Timex/Sinclair computer.

The Video Technology VZ200

David H. Ahl

The Video Technology VZ200 is a compact microcomputer with a great deal of capability and many unexpected features at a very attractive price.

The VZ200 with 16K RAM memory pack
The VZ200 with 16K RAM memory pack

The VZ200 is based on the 6502 microprocessor (used in the Apple, Commodore, and Atari computers). It comes with a 12K ROM and a sparse 4K RAM. The ROM includes the monitor and an excellent implementation of Microsoft Basic. The RAM can be expanded with either a 16K or 64K module.

The computer is 11.4″ x 6.3″ x 2″. Two-thirds of the top is taken up by the keyboard. The 45 keys are “Chiclet” style rubber with a very short throw. Touch typing is possible only in a rather limited way. Although the key spacing is the same as on a regular typewriter, the feel is different. Much more disasterous for touch typing is the use of a single shift key and a space key instead of a space bar. Several keys do not have the expected characters; e.g., the question mark is on the L key.

On the brighter side, each key provides several functions in addition to typing a character. All the Basic commands, keywords, and functions can be produced by holding the control key (or control and RETURN) while the key is pressed. Each key produces two Basic keywords and one or two regular characters. This is most welcome since on the computers which use a single keystroke the number of Basic keywords is limited to the number of keys.

When a key is pressed, a short “beep” indicates one keystroke. If the key is held down, it automatically repeats with a beep indicating each key entry.

The computer has an on/off light on top and an on/off switch on the side.

The Basic Language

The Basic includes 9 commands, 27 statements, 11 arithmetic functions, 9 string functions, 7 graphics and sound functions, and the expected arithmetic, relational, and Boolean operators.

Among the statements that we do not always see in a computer in this price range are: INP (reads the contents of input ports); OUT (sends values to output ports); USR (calls an assembly language subroutine); and COPY (copies the content of the screen to a printer).

We were also pleased to find both PRINT USING and PRINT @ implemented. The latter is useful for printing at different screen locations without having to use blank print lines or tabs. However, a tab function is also available.

On-Screen Editing

Full on-screen editing makes it a pleasure to program on the VZ200. The line to be edited is listed, by itself, with the whole program or with a group of lines. The cursor is moved by the directional keys to the character to be changed. Type the change, move the cursor to the end of the line, and type RETURN. Voila! The change is made. On-screen editing can also use DELETE, INSERT, and RUBOUT.

We had two small problems with on-screen editing. First, it was all too easy to hit the shift key instead of the control key because the cursor directional keys are activated by pressing the control key on the left and a directional key on the right. Probably the user can adapt to this after some practice. Second, after a while the editing buffer seemed to overflow and further editing was not accepted. Admittedly, we were trying to push the computer over the brink, so it is unlikely that this will be a problem in normal use.

Video Display

The VZ200 produces a composite video signal for a monitor and an RF signal on Channel 2 or 3. We found the monitor signal rock steady, whereas the RF signal required very precise fine tuning.

Output is in one of two modes: low-resolution text and graphics or medium-resolution graphics only. In the mixed mode, the display has 16 lines of 32 characters each. Alphabetic characters are available in uppercase only. Graphics are made from 16 characters which divide each screen location into four boxes with all combinations as on the ZX/TS computers.

Each of these characters can be turned on in any of eight colors. The off portion shows as black which can be considered a ninth color. Alphanumerics are displayed either as yellow on green or yellow on buff. Individual characters or the entire screen can be changed to inverse. Only one background color, green or buff, can be used at a time, and it does not affect the color of the graphics characters.

Low-resolution graphics characters can be typed into programs directly from the keyboard or called with CHR$(128) to CHR$(255) from a program.

In medium-resolution graphics mode, the screen is 128 x 64 pixels. Each pixel is turned on by the command SET (x,y) and turned off by RESET (x,y); POINT (x,y) examines whether a pixel is on or off. The first two commands are equivalent to PSET and PRESET in some other computers.

In this graphics mode, only three colors plus the background color are available simultaneously.

Any RAM location, including screen locations, can also be changed and examined by POKE and PEEK.

Musical Sounds

The single sound channel can produce 31 frequencies (2 1/2 octaves) and nine note durations (from a dotted half note to a thirty-second note). The command takes the structure: SOUND (p,d) where p is the pitch (1 to 31; 0 for a rest) and d is the duration.

Problems

In pushing the computer to the brink, we found several situations in which the only way of recovery was to turn the computer off. Even BREAK (the equivalent of RESET on some other machines) failed to return control to the user.

The most common irrevocable condition was LLIST which normally lists a program on the line printer. However, if no printer is attached, the computer hangs. This is particularly bad because the rubberized keys tend to bounce a bit, and it is easy to type LLIST instead of just plain LIST. If you have a long program in the computer and have to turn it off because it hangs up, as we did four or five times, you are forgiven if you become a bit surly toward the machine. The surest cure is to use Control/4 to list a program. After a while we learned to do this.

Other things that would hang the machine are in the same family, i.e., trying to use a peripheral device that is not attached. In some cases the VZ200 gave an error message, but in others it went into never-never land.

We also had a problem loading the programs from the demo tape. We tried three recorders, including a high quality digital unit, but all the VZ200 would say was “FOUND T: Program Name.” Since we saw the programs load at CES, we assume we got a faulty demo tape.

Peripherals

The interface to a standard cassette recorder operates at a Baud rate of 600 bps. Although this is somewhat slower than other new computers which have rates up to 2400 bps, nevertheless it is twice as fast as machines of just a few years ago. A program that fills the entire 4K of memory loads in about 54 seconds; a 16K program loads in about four minutes. Bear in mind, however, that most 16K programs do not use 16K of code because much of the RAM is taken by dimensioned arrays and the like.

The manufacturer specifications note that a peripheral expansion bus is built-in; however, we are not quite sure what this means. It appears that expansion modules, presumably, to be connected to printers, modems, or other external devices, can be plugged into the back of the computer.

The V-Tech printer is a Seikosha unit which we have previously found to be satisfactory and cost effective. It requires an interface module which plugs into the interface bus. Since the Seikosha printer uses a standard Centronics parallel signal, presumably other printers with similar signal requirements could be used, although they will probably not reproduce the screen graphics correctly.

Documentation

Included with the VZ200 are a 149-page Basic Reference Manual, a 24-page booklet of 21 Basic Application Programs, and an eight-page User Manual describing how to set up the system.

While some of the documentation obviously shows its Chinese (Hong Kong) heritage, the majority is well written, if not awfully well edited. The Basic manual provides a good introduction to the rudiments of the language although some of the sample programs leave something to be desired (the one to illustrate arrays is particularly bad). POKE and PEEK are explained in only the most cursory way, and we have no idea what the “New Characters Code” chart on p. 104 is for. Also, sadly lacking is an index which is very useful in a reference manual.

On the other hand, the manual is as good as most and better than many. It is just a shame that documentation is the weak spot of so many otherwise excellent computers.

Summary

All in all, the Video Technology folks in Hong Kong have done an excellent job producing a versatile small computer. We were impressed with the excellent implementation of Microsoft Basic, full on-screen editing, repeat keys, and easy-to-use graphics features. The idiosyncrasies were a bit annoying, but owners will get used to them and probably not notice them after a week or two of use. Bottom line: the VZ200 is a great value for the suggested price of under $100.

Video Technology (U.S.), Inc., 2633 Greenleaf, Elk Grove Village, IL 60007.


Plotting a Projectile

David Grosjean

In this issue we will compare programming the VZ200, the color and sound computer by Video Techonology, and the TS1000. The project we will undertake is the plotting of a projectile.

Starting with a Clear Screen

Let’s start with a simple clear screen and plot statement.

TS1000:

 10 CLS
200 PLOT X,Y

VZ200:

5 CLS
40 MODE(1):COLOR 4
200 SET(X,Y)

If you look at the VZ200 program, you will notice that the computer has to be put into a special graphics mode with line 40. This means that you cannot have the medium resolution graphics and text on the screen at the same time. This will become a problem when we try to turn this into a game.

The Projectile Equations

The equations for the horizontal and vertical position of a projectile are:

X=V*COS(A)*T
Y=V*SIN(A)*T-1/2*G*(T*T)

V is the velocity; T is the time; G is the effect of gravity. These equations can be worked into the program like this:

TS1000:

 20 LET V=1000
30 LET D=57.3
40 LET A=45
50 LET C=V*SIN (A/D)
60 LET C1=V*COS (A/D)
80 FOR T=0 TO 44 STEP .5
90 LET X=C1*T
100 LET Y=C*T-16*T*T
180 LET X=X/500
190 LET Y=Y/500
220 NEXT T

VZ200:

10 A=45
20 V=1000:G=32
30 D=57.3
50 C=V*SIN(A/D)
60 C1=Y*COS(A/D)
80 FOR T=0 TO 45 STEP .5
90 X=C1*T
100 Y=C*T-16*T*T
180 X=X/250
190 Y=Y/250
220 NEXT T

As you will notice, the range on the VZ200 increased due to the higher resolution of the graphics, but we did not change the velocity of the projectile. Instead, we changed the number which we divide X and Y by to fit the projectile on the different screen size.

In these programs, D is a factor that converts degrees to radians which are what the computer wants. C and C1 are constants for each firing angle. When you RUN this program on the VZ200, you will notice that the plot is upside down. This is because the vertical distances are measured from top to bottom instead of bottom to top as on the TS1000. Change line 190 in the VZ200 program to

190 Y=61-Y/250

Setting the Gun Angle

Now we can modify the programs to accept a gun angle from 1 to 90 degrees.

TS1000:

 40 PRINT "ANGLE OF GUN?"
45 INPUT A
70 LET T1=2*C/32
80 FOR T=0 TO T1 STEP .5
230 GOTO 50

VZ200:

10 INPUT "ANGLE OF GUN";A
70 T1=2*C/G
80 FOR T=0 TO T1 STEP .5
230 GOTO 50

Making a Game

Now that we have a working, however simple, projectile program, let’s try to make a game out of it. The following games are our projectile programs tightened up a bit and with the provisions for a target.

Setting up the Target

On the VZ200 the range is 127,000 yards, and on the TS1000 32,000 yards (1000 yards for every horizontal position on the screen). This will throw the equation off a little since the gun cannot shoot the projectile 127,000 yards. (If this bothers you, think of the yards on the VZ200 as 11-inch feet.)

Although there are 64 pixel positions on the TS1000, the target is a T which takes up two pixels. You can hit the left or the right of the T so the number of effective horizontal positions is reduced to half. Notice that, since the VZ200 cannot have text and graphics on the screen at once, line 100 forms a special target, while on the TS1000, a simple PRINT AT command in line 60 does the same thing.

TS1000:

 20 LET V=1000
40 LET K=INT (20000*RND)+12000
50 CLS
52 PRINT "RANGE = 32000 YDS"
60 PRINT AT 21,INT (K/1000);"T
"
70 PRINT AT 1,0;"ANGLE OF GUN?
"
80 INPUT A
90 IF A<1 OR A>90 THEN GOTO 90
120 LET C=V*SIN (A/57.3)
130 LET C1=V*COS (A/57.3)
140 LET T1=2*C/32
150 FOR T=0 TO T1 STEP .5
160 LET X=C1*T/500
170 LET Y=T*(C-16*T)/500
180 PLOT X,Y
190 NEXT T

VZ200:

20 V=1000
40 K=INT(97000*RND(0))+30000
50 PRINT "RANGE = 127000 YDS"
60 PRINT "TARGET AT";K;"YDS"
70 INPUT "ANGLE OF GUN";A
80 IF A<1 OR A>89 THEN 70
90 MODE(1):COLOR4
100 FORL=1 TO 4:FORL1=1 TO 4:SET
(INT(K/1000-4)+L1,59+L):NEXT:NEXT
130 C=V*SIN(A/57.3)
140 C1=V*COS(A/57.3)
150 T1=2*C/32
160 FOR T=0 TO T1 STEP .5
170 X=C1+T/250
180 Y=61-(T*(C-16*T)/250)
190 SET(X,Y)
210 GOTO 210

Detecting a Hit

We now have a target, but it is of no use unless the computer can detect its destruction. The following lines detect a hit. Notice how the techniques of detecting a hit target differ. The VZ200 must compare each position of the target, which is four positions wide, with the last position of the projectile; the TS1000 does the same thing but uses the PRINT AT position used by the target to compare to the last position of the projectile. This is, of course, simpler. Line 300 in the VZ200 version is a special “explosion” accompanied with some sounds. You can experiment at this point to find a better explosion.

TS1000:

200 IF INT (X/2)=INT (K/1000) T
HEN GOTO 300
250 GOTO 50
300 PRINT AT 21,INT (K/1000)-2;
"[inv HIT]"
310 PAUSE 250
340 GOTO 30

VZ200:

220 FOR L=1 TO 4:IF INT(K/1000)-
L=INT(X) THEN 300
225 NEXT L
250 GOTO 50
300 FORL=1 TO 30:SET(40+87*RND(0
),40+22*RND(0)):SOUND31,1:NEXT L
310 PRINT "HIT! HIT! HIT!"
340 GOTO 30

Making the Next Shot

Now we can add the response the computer will make to a missed target. The following lines tell how far away your shot was from the target and lets you try again. Line 210 in the VZ200 version is a delay loop so you have time to see the last position of the projectile.

TS1000:

210 LET E=INT (K-(32000*SIN (.0
35*A)))
220 IF E<100 THEN PRINT AT 0,0;
"OVER BY ";ABS E;" YDS"
230 IF E>100 THEN PRINT AT 0,0;
"UNDER BY ";ABS E;" YDS"
240 PAUSE 250

VZ200:

210 FOR L=1 TO 3000:NEXT L
230 IF INT(K/1000)>X THEN PRINT
"UNDER BY";K-X*1000;"YDS"
240 IF INT(K/1000)<X THEN PRINT
"OVER BY";X*1000-K;"YDS"

Providing Your Shots

The computer can now detect hits and misses. This is where the game part comes in. The following lines provide you with 5 individual targets with a maximum of 5 attempts to hit each target. If you fail to hit a target in 5 shots, you lose. S is the number of shots you have taken per target; S1 is your total number of shots; and Z is the total number of targets.

TS1000:

  5 LET Z=0
10 LET S1=0
30 LET S=0
55 IF S=5 THEN GOTO 260
100 LET S1=S1+1
110 LET S=S+1
260 PRINT AT 0,0;"ENEMY GOT YOU
FIRST"
270 GOTO 370
320 LET Z=Z+1
330 IF Z=5 THEN GOTO 350

VZ200:

10 S1=0:Z=0
30 S=0
55 IF S=5 THEN 260
110 S=S+1
120 S1=S1+1
260 PRINT "THE ENEMY GOT YOU FIR
ST!"
270 GOTO 370
320 Z=Z+1
330 IF Z=5 THEN 350

Evaluation and Restart

Finally, we need an evaluation and a mechanism to restart the game. The following lines do this.

TS1000:

350 PRINT AT 0,0;S1;" ROUNDS US
ED "
355 IF S1<10 THEN PRINT "GREAT
JOB"
360 IF S1>15 THEN PRINT "YOU CA
N DO BETTER"
370 PRINT "PLAY AGAIN? "
380 INPUT Z$
390 IF Z$="Y" THEN RUN

VZ200:

350 PRINT S1;"ROUNDS USED"
355 IF S1<10 THEN PRINT "GREAT J
OB!"
360 IF S1>15 THEN PRINT "YOU COU
LD HAVE DONE BETTER"
370 INPUT "PLAY AGAIN";Z$
380 IF Z$="Y" THEN RUN

Improving on the Game

Of course, these artillery-type games are very simple. They provide a basic game which you can elaborate on or experiment with to develop different possibilities. You might want to improve on the graphics or sound on the VZ200 or perhaps make a really BIG explosion. Although the TS1000 has no color or sound, the program can still be greatly improved. You could add hi-res graphics through either a hardware add-on or a software program. You might want to add a sound unit which will give the sound effects or add a routine to provide some sound (e.g., AUDISY).

TS1000 screen showing ANGLE OF GUN? and projectile paths
TS1000 screen showing ANGLE OF GUN? and projectile paths

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.