INTRODUCTION

Beam Software produced a version of Space Invaders for the ZX80 named Super Invasion and released it in 1981. It was sold on pre-recorded cassette and contained both 1K and 2K versions of the game. It was later released for the ZX81 and ZX80 with the 8K BASIC ROM upgrade. This page provides a detailed analysis of the three versions of the game. Note that the different versions of the game will only work with a UK (50 Hz) version of the ZX80, but it can easily be modified to run on a USA model (60 Hz) as detailed later.

The ZX80 and ZX81 Super Invasion cassettes can be seen in the photos below:

ZX80 Super Invasion Cassette ZX81 Super Invasion Cassette

The game files are available from the downloads section.


DESCRIPTION

The 1K version of Super Invasion implements a 16 row by 24 column cut-down version of the arcade classic, where as the 2K version implements a larger 21 row by 32 column display.


Screenshot of ZX80 1K Super Invasion Screenshot of ZX80 2K Super Invasion
ZX80 1K Super Invasion ZX80 2K Super Invasion

In the 1K version, there are 12 invaders to destroy where as in the 2K version there are 20 invaders. In both versions the player has five lives per game. The player moves left using keys 5 or 6 and right using keys 8 or 3. A missile is fired using keys 0 or 1. Only one missile may be fired at a time, and the invaders can only drop one bomb at a time. It is sometimes possible for a missile and a bomb to annihilate each other. Once a wave has been destroyed, it is replaced by new wave identical to the previous one. The 2K version of the game keeps a note of the number of waves completed and displays this as a frames count. If all of the invaders land then the game is lost. Whenever a game ends, the next game begins immediately in both 1K and 2K ZX80 versions of the game, but after a 4 second pause in the ZX81 version. The 1K versions of the game supports three skill levels (expert, average and beginner), where as the 2K version supports 50 levels (very fast to very slow).

An advert for the game appears below (source: Your Computer magazine, Vol. 1 No. 1, June/July 1981):


The game was also sold by SoftSync Inc. and a review was published in Sync magazine (Vol 1. No. 3, May/June 1981, page 5) which described both 1K and 2K versions of the game. An advert by SoftSync Inc. for the game appeared in Sync magazine (Vol 1. No. 6, Novemeber/December 1981, page 3) and dropped the reference to the 2K version of Super Invasion. The advert also mentions that the Double Breakout game was renamed to Wall Busters.


DISPLAY ROUTINE

The video generation routine for the different versions of Super Invasion are very similar, as shown below:

OUT  ($FD),A   ; Vertical sync generator off.

; Generate the top border and main display area.

LD   A,$EC     ; First scan line timing counter.
LD   B,$19     ; 24 rows and 1 for the top border.
LD   HL,$C269  ; Display file address (bit 15 set).
LD   C,$30     ; 48 lines in the top border.
CALL $02B5     ; Produce the top border and main area.

; Generate the bottom border.

LD   A,$E8     ; First scan line timing counter.
INC  B         ; Set the row count to $01.
DEC  HL        ; Point back to the last HALT.
LD   C,$2F     ; 47 lines in the bottom border.
CALL $02B5     ; Produce the bottom border.









OUT  ($FF),A   ; Vertical sync generator off.

; Generate the top border and main display area.

LD   A,$EC     ; First scan line timing counter.
LD   B,$19     ; 24 rows and 1 for the top border.
LD   HL,$C265  ; Display file address (bit 15 set).
LD   C,$30     ; 48 lines in the top border.
CALL $4020     ; Produce the top border and main area.

; Generate the bottom border.

LD   A,$E8     ; First scan line timing counter.
INC  B         ; Set the row count to $01.
DEC  HL        ; Point back to the last HALT.
LD   C,$2F     ; 47 lines in the bottom border.
CALL $4020     ; Produce the bottom border.

...

; $4020 - Scan line generation routine.

LD   R,A       ; Left border width of the first line.
LD   A,$DD     ; Border timing for subsequent lines.
EI             ; Enable interupts.
JP   (HL)      ; Execute the display file echo.
Super Invasion Video Routine - 1K ZX81 Version Super Invasion Video Routine - 1K ZX80 Version

The 2K ZX80 version has its display file located at $4269 and hence its video generation routine specifies the display file address as $C269. Note that the ZX80 versions could have called the ROM routine at $01B0 instead of reproducing it at $4020.

It would have seemed logical to keep the game code identical between the 1K ZX80 and 1K ZX81 versions, with only changes to the video generation routine as necessary. However, this is not the case and so the game code, although similar, deviates between the two machine versions.


BASIC PROGRAM

The BASIC program listings differ between the 1K ZX80, 2K ZX80 and 1K ZX81 versions, as shown below.


Program Listing of ZX80 1K Super Invasion Program Listing of ZX80 2K Super Invasion Program Listing of ZX81 Super Invasion
ZX80 1K Version ZX80 2K Version ZX81 1K Version

Each program listing stores the game machine code within one or two numeric arrays, and includes a small transfer routine to relocate the game code to address $4000. The 1K ZX80 version holds the game code in arrays A(255) and B(57) and the 2K ZX80 version stores the game code in arrays A(255) and B(90). An array in the ZX80 can contain at most 256 elements (indexed from 0) and each consists of a 2 byte integer. This yields code sizes of (256+58)*2=628 bytes and (256+91)*2=694 bytes respectively. The ZX81 version holds the game code in array A(126), which is indexed from 1. Each element consists of a 5 byte floating point number and so yields 5*126=630 bytes.

The 1K ZX80 and ZX81 versions only support 3 skill levels, whereas the 2K ZX80 version supports 50 levels. The 2K ZX80 version also displays a title screen with control key instructions.

Note that there is a technical bug in the ZX81's BASIC program. Line 1000 which calls the transfer at 17267 should actually have called 17269. However, the bytes at 17267 and 17268 are fortunately interpreted as instructions that are harmless to the program and so simply introduce a small delay before the transfer routine is reached. Note also that the BASIC program assumes a collapsed display file, which will only be the case on a machine fitted with less than 3.25K. To run the game on a ZX81 fitted with 16K it is necessary to either lower RAMTOP before loading the game, or to modify line 1000 to find the start of the variables area using the system variable VARS and then apply an offset to the start of the transfer routine, e.g. as done in Macronics' 1K Space Invaders.

The games can be modified to run on USA (60 Hz) models of the ZX80 and ZX81:


GAME OPERATION

Each version of the game is structured to execute in three blocks of program functionality. These blocks are cycled through, with one block executed per TV field. The functionality blocks perform the following actions:

Move missile base and invader bomb - The keyboard is read as part of a video generation subroutine. This functionality block checks the previously read key data, and moves the player left or right as appropriate. It then moves the current invader bomb if active, and checks whether it has hit the player. If it has then the lives remaining are decremented and a check made to see if all lives have been lost. If they have then the game is over and will be restarted immediately (or in 4 seconds time for the ZX81 version). If there is no active invader bomb then the three/four possible rows positions above the player are examined and if an invader is present then it is selected to drop a bomb. The three/four rows are checked from the highest first, and in this way the lowest invader present will be the one that is ultimately chosen to drop the bomb.

Move missile - If there is an active player missile then it is moved and a check made to see if it has hit an invader or an invader bomb. If it has not hit anything then it is drawn in its new location. If it hit an invader bomb then the bomb is removed from the display but remains active and will be drawn on the next cycle, i.e. an invader bomb destroys a player missile. If an invader was hit then it is erased and a check made to see if all invaders have been destroyed. If they have then in the 1K versions the game is deemed over and will be restarted immediately (or in 4 seconds time for the ZX81 version). In the 2K version of the game, the frame counter is updated before a new wave commences. Only a single digit is maintained for the frame counter and so once frame 9 has been completed, the display will show as frame 0. If there is no active missile then the fire key is tested and if it is being pressed then a new missile will be launched.

Shift invaders - The program contains a counter than clocks down and upon reaching zero the invaders are moved left or right. After a fixed number of shifts left or right, the invaders direction is reversed and they are moved down a row. A test is then made to see whether all of the invaders have landed, and if they have then the game is over and will be restarted immediately (or in 4 seconds time for the ZX81 version). The manner in which the invaders are shifted is ingenious and it exploits the manner in which the ZX81 and ZX80 produce their displays. Every time the driver mechanism encounters a NEWLINE character it will output white for the rest of the scan lines for that character. The game deliberate replaces all row termination NEWLINE characters with spaces and then re-inserts them one column to the left or right. In effect, an extra space has been added to the start of each row (shifting the invaders to the right) or the end of each row (shifting the invaders to the left). The top row of the display file initially contains only 16 spaces (or 19 in the 2K ZX80 version) and so is shorter then the 24 characters (32 characters in the 2K ZX80 version) found on every other row. However, when shifting the invaders to the left the top row will gain additional spaces, and when shifting the invaders to the right the top row will contract again. To shift the invaders down a row, the first space character within the top row is replaced by a NEWLINE character. This will be displayed as a complete blank row and so all subsequent rows will be drawn lower down.


DOWNLOADS

Click here to download 1K ZX80 (4K ROM) Super Invasion in .O program format. Run the game using GO TO 1.
Click here to download 2K ZX80 (4K ROM) Super Invasion in .O program format. Run the game using GO TO 1.
Click here to download a scan of the original ZX80 (4K ROM) Super Invasion instructions sheet (front) and instructions sheet (back).
Click here to download a disassembly of the 1K ZX80 (4K ROM) Super Invasion game.
Click here to download a disassembly of the 2K ZX80 (4K ROM) Super Invasion game.
Click here to download 1K ZX80 (8K ROM) / ZX81 Super Invasion in .P and .P81 program formats (requires less than 3.25K). The file name is "INVADE". Run the game using GOTO 1.
Click here to download a disassembly of the 1K ZX80 (8K ROM) / ZX81 Super Invasion game.

Contact Me
  -   Disclaimer