Space Invaders as described on the Wikipedia was one of the very first video arcade games. Released in 1978 by Taito, it ushered in the Golden Age of Arcade Games. Most video games before SI used dedicated circuit boards without a CPU. SI uses an 8080 CPU (the primitive forerunner of the Z80). The CPU board carried forward into several other games.
The game uses colored transparencies that overlay certain areas of the monitor. The player’s area is green and the flying saucer line is red. The overlays are obvious when you see shots changing colors at the top and bottom of the screen.
SI uses a black-and-white raster display (grid of pixels). Interestingly, vector graphics like in Atari Asteroids did not hit the market until 1979. In SI the hardware paints the monitor in the usual way: from left to right and top to bottom with a vertical retrace at the end. But the monitor is rotated counterclockwise 90 degrees counter-clockwise in the game cabinet. The rotation makes the code comments and screen coordinates a bit confusing. Here and in the code comments I’ll use the terms “rotated” and “non-rotated” to help.
Screen memory is organized as one-pixel-per-bit – eight pixels per byte. All sprites in the game are one byte wide but many rows long (on the rotated screen they are all 8 bits tall but 8, 16, or more bits wide). Rarely does a game sprite align perfectly to a byte boundary in screen memory. Most of the time the image pixels have to be shifted. Some of the pixels fall in the first byte of screen memory and some spill over into the next byte. The 8080 instruction-set lacks multi-bit shifts to make sprite rendering practical. But the SI hardware includes a 2-byte shift register mapped into port memory. The sprite drawing hardware runs all images through the shift register for a very fast bit-mapping.
The Space Invaders sounds are all discrete analog circuitry. Opamps and decaying RC networks create an eerie realism that digital sound chips fall short of today. The individual sound circuits are triggered by bits in two output ports.
In the early eighties you would have found the Space Invaders cabinet in an arcade right next to the pinball machines. So a “tilt” switch, like you would find in a pinball machine, would not have seemed as strange as it does today. If you shake, slap, or otherwise physically abuse an SI cabinet you will get a TILT message and your game will end.
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Maker Business — A list of companies owned by Amazon. It’s big.
Wearables — Raid the kitchen
Electronics — Capacitor ESR
Biohacking — Vitamin-C + Gelatin for Accelerated Recovery
Python for Microcontrollers — Python snakes its way to the STM32, Serpente, and more!
Adafruit IoT Monthly — Adafruit IO Updates, RGB Stream Deck Message Panel, and more
Microsoft MakeCode — Welcome to the MakeCode Newsletter!
No comments yet.
Sorry, the comment form is closed at this time.