Bally Astrocade

The Bally Astrocade (also known as Bally Arcade and initially as Bally ABA-1000 ) is a second-generation home video game console and simple computer system designed by a team at Midway, at that time the videogame division of Bally. It was originally announced as the "Bally Home Library Computer" in October 1977 and initially made available for mail order in December 1977. But due to production delays, the units were first released to stores in April 1978 and its branding changed to "Bally Professional Arcade". It was marketed only for a limited time before Bally decided to exit the market. The rights were later picked up by a third-party company, who re-released it and sold it until around 1984. The Astrocade is particularly notable for its very powerful graphics capabilities for the time of release, and for the difficulty in accessing those capabilities.

Nutting and Midway
In the late 1970s, Midway contracted Dave Nutting Associates to design a video display chip that could be used in all of their videogame systems, from standup arcade games, to a home computer system. The system Nutting delivered was used in most of Midway's classic arcade games of the era, including Gorf and Wizard of Wor. The chipset supported what was at that time relatively high resolution of 320×204 in four colours per line, although to access this mode required memory that could be accessed at a faster rate than the common 2 MHz dynamic RAM of the era.

Console use
Originally referred to as the Bally Home Library Computer, it was released in 1977 but available only through mail order. Delays in the production meant none of the units actually shipped until 1978, and by this time the machine had been renamed the Bally Professional Arcade. In this form it sold mostly at computer stores and had little retail exposure (unlike the Atari VCS). In 1979, Bally grew less interested in the arcade market and decided to sell off their Consumer Products Division, including development and production of the game console.

At about the same time, a third-party group had been unsuccessfully attempting to bring their own console design to market as the Astrovision. A corporate buyer from Montgomery Ward who was in charge of the Bally system put the two groups in contact, and a deal was eventually arranged. In 1981 they re-released the unit with the BASIC cartridge included for free, this time known as the Bally Computer System, with the name changing again, in 1982, to Astrocade. It sold under this name until the video game crash of 1983, and then disappeared around 1985.

Midway had long been planning to release an expansion system for the unit, known as the ZGRASS-100. The system was being developed by a group of computer artists at the University of Illinois at Chicago known as the 'Circle Graphics Habitat', along with programmers at Nutting. Midway felt that such a system, in an external box, would make the Astrocade more interesting to the market. However it was still not ready for release when Bally sold off the division. A small handful may have been produced as the ZGRASS-32 after the machine was re-released by Astrovision.

The system, combined into a single box, would eventually be released as the Datamax UV-1. Aimed at the home computer market while being designed, the machine was now re-targeted as a system for outputting high-quality graphics to videotape. These were offered for sale some time between 1980 and 1982, but it is unknown how many were built.

Description
The basic system was powered by a Zilog Z80 driving the display chip with a RAM buffer in between the two. The display chip had two modes, a low-resolution mode at 160 × 102, and a high-resolution mode at 320 × 204, both with 2-bits per pixel for four colors. This sort of color/resolution was normally beyond the capabilities of RAM of the era, which could not read out the data fast enough to keep up with the TV display. The system used page mode addressing allowing them to read one "line" at a time at very high speed into a buffer inside the display chip. The line could then be read out to the screen at a more leisurely rate, while also interfering less with the CPU, which was also trying to use the same memory.

On the Astrocade the pins needed to use this "trick" were not connected. Thus the Astrocade system was left with just the lower resolution 160 × 102 mode. In this mode the system used up 160 × 102 × 2bits = 4080 bytes of memory to hold the screen. Since the machine had only 4kiB (4096 bytes) of RAM, this left very little room for program functions such as keeping score and game options. The rest of the program would have to be placed in ROM.

The Astrocade used color registers, or color indirection, so the four colors could be picked from a palette of 256 colors. Color animation was possible by changing the values of the registers, and using a horizontal blank interrupt they could be changed from line to line. An additional set of four color registers could be "swapped in" at any point along the line, allowing the creation of two screen "halves", split vertically. Originally intended to allow creation of a score area on the side of the screen, programmers also used this feature to emulate 8 color modes.

Unlike the VCS, the Astrocade did not include hardware sprite support. It did, however, include a blitter-like system and software to drive it. Memory above 0x4000 was dedicated to the display, and memory below that to the ROM. If a program wrote to the ROM space (normally impossible, it is "read only" after all) the video chip would take the data, apply a function to it, and then copy the result into the corresponding location in the RAM. Which function to use was stored in a register in the display chip, and included common instructions like XOR and bit-shift. This allowed the Astrocade to support any number of sprite-like objects independent of hardware, with the downside that it was up to the software to re-draw them when they moved.

The Astrocade was one of the early cartridge-based systems, using cartridges known as Videocades that were designed to be as close in size and shape as possible to a cassette tape. The unit also included two games built into the ROM, Gunfight and Checkmate, along with the simple but useful Calculator and a "doodle" program called Scribbling. Most cartridges included two games, and when they were inserted the machine would reset and display a menu starting with the programs on the cartridge and then listing the four built-in programs.

The Astrocade featured a relatively complex input device incorporating several types of control mechanisms: the controller was shaped as a pistol-style grip with trigger switch on the front; a small 4-switch/8-way joystick was placed on top of the grip, and the shaft of the joystick connected to a potentiometer, meaning that the stick could be rotated to double as a paddle controller.

On the front of the unit was a 24-key "hex-pad" keyboard used for selecting games and options as well as operating the calculator. On the back were a number of ports, including connectors for power, the controllers, and an expansion port. One oddity was that the top rear of the unit was empty, and could be opened to store up to 15 cartridges. The system's ability to be upgraded from a video game console to personal computer along with its library of nearly 30 games in 1982 are some reasons that made it more versatile than its main competitors, and was listed by Jeff Rovin as one of the seven major video game suppliers.

Astro BASIC
The Astrocade also included a BASIC programming language cartridge, written by Jamie Fenton, who expanded Li-Chen Wang's Palo Alto Tiny BASIC. First published as Bally BASIC in 1978.

Developing a BASIC interpreter on the system was difficult, because the display alone used up almost all the available RAM. The solution to this problem was to store the BASIC program code in the video RAM.

This was accomplished by interleaving every bit of the program along with the display itself; BASIC used all the even-numbered bits, and the display the odd-numbered bits. The interpreter would read out two bytes, drop all the odd-numbered bits, and assemble the results into a single byte of code. This was rendered invisible by setting two of the colors to be the same as the other two, such that colors  and   would be the same (white), so the presence, or lack, of a bit for BASIC had no effect on the screen. Additional memory was scavenged by using fewer lines vertically, only 88 instead of the full 102. This managed to squeeze out 1760 bytes of RAM for BASIC programs. The downside was that most of the graphics system's power was unavailable.

Programs were entered via the calculator keypad, with a plastic overlay displaying letters, symbols, and BASIC keywords. These were selected through a set of 4 colored shift keys. For example; typing "WORD"(gold) shift then the "+" key would result in.

A simple line editor was supported. After typing the line number corresponding to an existing program, each press of the PAUSE key would load the next character from memory.

An Astro BASIC program that later became commercialized is Artillery Duel. John Perkins wrote the game first and submitted it to The Arcadian fanzine, from which it was adapted for the Astro BASIC manual. Perkins subsequently developed the Astrocade cartridge of the game.

Language features
Astro BASIC supported the following keywords:
 * Commands:,  ,  ,
 * Statements: ,
 * Structure:,  ,  ,   (but no   and no  ),
 * Graphics:,  ,
 * Tape Commands:,  ,  ,
 * Functions:,  ,   (specified joystick's horizontal position),   (joystick vertical position),   (knob status),   (pixel on or off),  ,   (trigger status)
 * Built-in variables
 * (read only):  (key press),   (remainder of last division),   (memory size),   (last LINE position)
 * (write only):  (scroll mode),   (display ASCII character)
 * (read/write):  (background color),     (cursor position),   (foreground color),   (note time),
 * Math: + - × ÷
 * Relational operators: < > = # [not equal] [the language did not support: <= => <>]
 * Logical operators: × [AND] + [OR]

A period  at the start of the line was equivalent to   in other BASIC implementations. Certain commands were handled by the keypad instead of by keywords: the RESET button was equivalent to  in other interpreters.

The language supported 26 integer variables  to , and two pre-defined arrays,   - which was stored starting after the program, ascending - and   - which was stored from the top of memory, descending. The language lacked a  statement for dimensioning the arrays, the size of which was determined by available memory  not used by the program listing (2 bytes per item). Ports were accessed via the array, and memory was accessed via the array  , rather than using PEEK and POKE. While the language lacked strings,  would provide the ASCII value of a key press, which could be output to , meaning that characters could be read in from the keyboard, stored in an array, and then output.

The character display was 11 lines of 26 characters across. The resolution for the graphic commands is 88x160, with X ranging from -80 to 79 and Y ranging from -44 to 43.

Music could be produced in four ways:
 * 1) The   command, as a side effect, produced a unique tone for each character or keyword displayed.
 * 2) The   variable converted numbers into notes.
 * 3) Ports 16 through 23 accessed a music synthesizer.
 * 4) The sound-synthesizer variables   (master oscillator),   (Noise Mode),   (Noise Volume),   (Tone A),   (Tone B),   (Tone C),   (Voice A volume),   (Voice B volume),   (Voice C volume),   (Vibrato Frequency),   (VibRato). (Added to Astro BASIC but not in Bally BASIC.)

Sample code
The following sample program from the manual demonstrates the joystick input and graphics functions. "Try your skill... The first player's knob moves the phaser left or right and the trigger shoots... Player two controls the target while player one shoots." 1 .PHASER PHUN 2 .BY DICK AINSWORTH 10 20  30 CLEAR 40 X=X+JX(2)×3 50 Y=Y+JY(2)×3 60 BOX X,Y,4,4,3 70 K=KN(1)÷2 80 BOX K,-40,3,8,1 90 100 N=1 110 120 130 BOX K,0,1,80,3 140 MU="4" 150 BC=A×8 160 170 FC=7 180 BC=8 190 This listing illustrates how keywords, which were tokenized, were always displayed with a following space.

ZGRASS
The ZGRASS unit sat under the Astrocade and turned it into a "real" computer, including a full keyboard, a math co-processor (FPU), 32k of RAM, and a new 32k ROM containing the GRASS programming language (sometimes referred to as GRAFIX on this machine). The unit also added I/O ports for a cassette and floppy disk, allowing it to be used with CP/M.

Reception
Games magazine included Bally Professional Astrocade in their "Top 100 Games of 1981", noting that "Our favorite cartridges are the classic Gunfight, Red Baron air war, and Demolition Derby."

Danny Goodman of Creative Computing Video & Arcade Games stated in 1983 that Astrocade "has one of the best graphics and sound packages of any home video game".

Circuit board and cartridges

 * CPU: Zilog Z80, 1.789 MHz
 * RAM: 4 kB (up to 64 kB with external modules in the expansion port)
 * ROM: 8 kB
 * Cart ROM: 8 kB
 * Expansion: 64 kB total
 * Ports: 4 controller, 1 expansion, 1 light pen

Audio

 * Sound chip model: 0066-117XX, also known as the Music Processor, or a custom I/O chip since the sound chip also performs I/O functions.
 * Channel capabilities: There are 3 square wave channels, all with a pitch accuracy of 8-bits (256 possible frequencies from which to choose), which can all play square waves. The chip also has a noise generator, which can be independent from the other 3 square wave channels, or it can add its value to the master oscillator that drives the 3 square wave channels. The master oscillator can be set to different frequencies, which means that the frequency range can be changed for the 3 square wave channels.
 * Volume control: Each channel has independent 4-bit volume control.
 * Miscellaneous features concerning sound: There are hardware registers for vibrato, with two bits for the vibrato speed and 6 bits for vibrato depth. This means that it wouldn't be necessary for vibrato to be done entirely with software.

Video

 * Resolution:    True 160×102 / Basic 160×88 / Expanded RAM 320×204
 * Colors:        True 8* / Basic 2
 * The bitmap structure of the Bally actually only allows for 4 color settings. However, through the use of 2 color palettes and a left/right boundary control byte you could have the left section of screen (this could be the play field) use 1 set of colors while the right side (this could show information such as lives and score) used an entirely different set of colors, thus 8 total colors were possible.
 * Graphic type:  Bitmap, 2 bit per pixel bit map.

Game library
There are 28 officially released video games for the system.


 * Gun Fight / Checkmate (1977) (Built into Console)
 * 280 Zzzap / Dodgem (1978)
 * Amazing Maze / Tic Tac Toe (1978)
 * Blackjack / Poker / Acey-Deucey (1978)
 * Dog Patch (1978)
 * Elementary Math and Speed Math (1978)
 * Football (1978)
 * Grand Prix / Demolition Derby (1978)
 * Panzer Attack / Red Baron (1978)
 * Seawolf / Missile (1978)
 * Star Battle (1978)
 * Tornado Baseball / Tennis / Hockey / Handball (1978)
 * Clowns / Brickyard (1979)
 * Space Invaders (1979) (later retitled Astro Battle)
 * Astro Battle (1981) (originally titled Space Invaders)
 * Bally Pin (1981)
 * Biorhythm (1981)
 * Galactic Invasion (1981) (originally titled Galaxian)
 * Galaxian (1981) (later retitled Galactic Invasion)
 * The Incredible Wizard (1981)
 * Letter Match / Spell'n Score / Crosswords (1981)
 * Pirates Chase (1981)
 * Solar Conqueror (1981)
 * Space Fortress (1981)
 * Artillery Duel (1982)
 * Cosmic Raiders (1982)
 * Ms. CandyMan (1983) (very rare)
 * Sea Devil (1983) (rare)

Other cartridges
 * BASIC
 * Machine Language Manager

Prototypes
 * Conan the Barbarian
 * Mazeman
 * Soccer
 * Fawn Dungeon

Unlicensed
 * ICBM Attack (1982) (Spectre Systems) With the Spectre Systems handle (Extremely rare)
 * Blast Droids (1983) (Esoterica)
 * Sneaky Snake (1983) (New Image)
 * Treasure Cove (1983) (Spectre Systems)

Homebrew
 * Muncher (1981)
 * War
 * Crazy Climber