"Have a Ball with Bally" By Richard J. Nitto KILOBAUD MICROCOMPUTING (November 1979): 142-144 When a leading maker of pinball machines turns its attention to microcomputers, the result is a very unusual machine. The Bally Manufacturing Corporation, producer of the Bally Professional Arcade, began making delivery of their much-awaited plug-in ROM Bally BASIC in autumn, 1978. As many of you already know, the Bally Arcade is a TV video game with a Z-80-based microprocessor unit utilizing plug-in cartridges for instant game changes. Included with the base unit are two multi-function remote hand controllers, each with an 8-position joystick, a trigger and a rheostat-type knob for analog input. The Arcade attaches to any TV set, preferably color, through a TV/game switch box. A slide switch on the side of the main console permits use of either channel 3 or 4. The main on-off switch is located rather inconveniently on the back of the set alongside the four hand-controller sockets, the audio tape interface socket and the future expansion bus. A 24-key calculator with ten memory registers is built into the front deck. This keypad is used to select the built-in games, perform typical five- function calculations and enter programs with the Bally BASIC. Remote game selection is also obtained with the No. 1 controller. Adjacent to the keypad is the cartridge slot where the pre-programmed games or the BASIC ROM is inserted. Your extra cartridges or recorded BASIC program cassettes can be stored in the clear plastic-covered 12-slot holder located on the top of the Arcade. A non-detachable ac power adapter provides the power to the Arcade. It works, but I can't help thinking of similar types of adapters that have quickly failed. The console is constructed of wood-grained plastic, so the usual precautions to prevent excessive heat and sunlight should be observed. The built-in games and the optional game cartridges are colorful, imaginative and downright fun. However, the real reason I bought the Arcade was the exciting prospect of programming my own audio-video games. Bally BASIC is a version of Palo Alto Tiny BASIC and was written by Jay Fenton. In addition to the normal Tiny BASIC commands, Bally has included commands to control graphics, color, sound and also to address each function of the pistol-grip hand controls. Once the ROM cartridge is inserted and the reset button depressed, you are able to enter your own program of up to 1800 bytes via the console's 24-key calculator keyboard. Four different shift keys expand the 24-key layout to provide access to 103 separate letters, numbers, punctuations, operators and commands (see Table 1). A plastic color-coded keypad overlay allows input of three separate kinds of information: numbers, alphanumerics, and commands words (see Fig. 1). Numbers and operators are accessed directly by depressing the appropriate keys. Letters, punctuation, symbols, etc., are accessed by first depressing one of the three colored (green, red, blue) shift keys and then the key under the desired letter. A fourth shift key is colored gold and permits you to enter an entire command word such as PRINT, GOTO, LINE, etc., in similar fashion. When a colored shift key is depressed, the TV screen displays the corresponding color. Initially, it is all very confusing, but, surprisingly, becomes second nature after a couple of hours. Unfortunately, the keypad does not have a distinctive click to indicate a depression, but Bally was nice enough to include musical tones to indicate contact completion. These tones can be deleted if desired. Color Graphics 256 colors are accessible to you, but only two are permitted on the screen at one time. These are selected by variables BC (background color) and FC (foreground color). Screen resolution is 159 points wide and 87 points high, with each dot capable of being individually addressed. Coordinate point 0,0 is in the center of the screen. Line X,Y,Z draws a line from the end of the last line (or from 0,0 if no line has been drawn) to the coordinates X,Y. Z designates whether the line is to be drawn in the foreground color, a reverse color... or no line at all (Z = 1,2,3 or 4). Box X,Y,A,B,Z places a box of A width and B height with its center at coordinates X,Y. Z permits the same color designation as the Z in LINE. A single point is plotted at X,Y coordinates with this command by setting A and B equal to 1. PX (X,Y) is used to determine the color (background or foreground) of a particular screen coordinate. Hand Controllers KN (A) produces a number between -128 and +127, depending on the position of the A hand-controller rheostat knob. TR (A) produces a number, either 0 or 1, depending on the position of the A hand-control trigger. JX (A) produces a number, -1, 0 or 1, depending on whether the A knob is left, center or right. JY(A) is similar but is dependent on whether the A knob is back, center or forward. A print command preceding the above will display the number being generated by that command (i.e., print JX (A) ). All controller functions can be used to vary color, motion, sound and graphics. Typical commands might include: IF TR(1) = 1 MU = A - If trigger 1 is pulled, sound the musical tone A. BC = KN(2) + 127 - Set background color according to the knob 2 position. LINE X,Y,JX(1)+ 1 - Draw a line of background color, or foreground color, dependent on joystick 1 position. Music Musical tones are produced with either the PRINT command or the MU = command. Setting MU equal to numbers between 33 and 88 will produce a full range of tones. However, music is more easily programmed with the PRINT command. PRINT operates in the normal BASIC fashion, except that musical tones accompany each printed character. The duration of these tones is controlled by the command NT (note time), with NT = 0 producing zero duration. As NT increases, so does the duration of the tones. NT can be changed at any time. The tones span three octaves and are complete with flats and sharps. Text Print formatting is accomplished by the use of Print # A,B. (In a field of A spaces, print the number in the B register.) CX is the horizontal tab cursor control (i.e., CX = 10). CY is the vertical tab cursor control (i.e., CY=20). Print SZ will display the number of unused memory locations. Characters may be placed on the screen with the use of the TV = command. Only numbers are recognized, and they are identical to the ASCII character representations for decimal numbers between 32 and 94. Other numbers up to 119 designate other characters and command words such as GOSUB, LIST, etc. Recognition of any depressed key is accomplished with the KP command. Normal use would be A = KP. The number of the pressed key is stored in the A register. It can also be used in other statements (i.e., IF KP = 116 GOTO 320: If the PRINT key was pressed, go to 320). String Functions Individual subscripted variables are accessed via the @ (X) command, where X is a number between 1 and 900. Letters and other characters may be stored and recalled with this command. For example, the following program will produce and display the complete alphabet. 10 FOR A = 1 to 26 20 @(A) = A+64 30 TV = @(A) 40 NEXT A Characters stored via strings are supposedly stored in a separate memory bank and do not affect program storage. However, mine seems to have 900 variables with no program in memory and less than 900 with a stored program. Processing Speed The timing benchmarks in the October 1977 Kilobaud ("BASIC Timing Comparisons," p. 20) were run on the Bally BASIC with the following results. Benchmark# 2 3 4 5 6 7 Time in sec. 3.2 39 66 67 86 117 201 This is not fast in comparison to other published results, but it is certainly respectable. A converted Shell Sort program with 100 random numbers consistently gave results under two minutes. All arithmetical operations are performed in Integer BASIC, somewhat limited for calculation, but adequate for programming games. Conclusion All in all, the Bally Arcade with the BASIC ROM has proven to be a fun machine. I purchased mine at Montgomery Ward for $269 plus $50 for the BASIC cartridge. Although my first Arcade suffered from overheating problems (quickly exchanged by Ward's personnel), my second has given undying performance. Of course, I am looking forward to having the full-blown processor (Bally now promises delivery of their full-size keyboard in early spring of 1980), but for now the Tiny BASIC will suffice. I must give praise to Dick Ainsworth for his well-written instruction manual. It is an easy-to-follow guide to Tiny BASIC and includes a number of simple programs detailing the capacity of the Arcade. I have included one of my family's favorite programs (see the program listing) to give you an idea of the diversity and creative use of the special BALLY commands. It is based on the TV show "Battlestar Galactica" and utilizes one joystick for operation. It is both challenging and fun. Be the first on your block to become a fleet commander. This information is NOT included in the text version of this article: Table 1. - Commands, Standard Statements and Special-Purpose Statements Fig. 1. - Picture of Bally's 24-Key Calculator Keypad Overlay Program Listing - "Battlestar Galactica" by Richard Nitto ---------------------------------------------------------------------- "Have a Ball with Bally" Corrections KILOBAUD MICROCOMPUTING (February 1980): 212 Somewhere between the corrected proof and the published article, "Have a Ball with Bally," in the November 1979 issue, p. 142, a couple of important program segments were lost. The corrected lines are as follows: 270 GOSUB 440;IF G=1 GOTO 330 280 IF S=0R=R+1;GOTO330 To those who asked for an easier version, substitute the following lines: 260 IF X<3 IF X>-3 IF Y<3 IF Y>-3 GOTO 300 440 IF X<4 IF X>-4 IF Y<4 IF Y>-4 A=520;G=1;GOTO 460 My thanks to everyone who telephoned and wrote to me. Your compliments were appreciated. - Richard J. Nitto Note: Originally the short four-line program that displays the complete alphabet has line 40 as: 40 NEXT I. It should be: 40 NEXT A