Space Invaders Hardware Contact Journal Home Arcade Space Invaders Hardware Site Page Amiga Rainbow Islands 1loader-dec 1loader boot orig-boot Journal Arcade Asteroids 80% Hardware RAMUse Code DVG VectorROM Journal Centipede Hardware RAMUse Code Crazy Climber 1% BigSpriteGraphics.pdf Buildings.pdf cclimber.asm CharEnc.inc CrazyClimberMemoryMapInfo.pdf GraphicsAndCharacterAssetInfo.pdf MemoryMap.inc Defender 75% RAMUse Hardware Bank1 Bank2 Bank3 Bank7 BankFixed Mapping.txt SoundHardware SoundRAMUse SoundCode Defender-Theory-Early.pdf Defender-Theory-Later.pdf Defender.CPU.jpg Defender.ROM.B&W.jpg Defender.Vid.B&W.jpg SoundROM.txt Donkey Kong (AI) Hardware RAMUse Code Frogger (Sound) SoundHardware SoundRAMUse SoundCode Hardware RAMUse Code GFX Journal Galaga 5% CPU1 (Main) CPU2 (Secondary) CPU3 (Sound) GFX1 (Characters) GFX2 (Sprites) PROMcolors PROMpaletteChar PROMpaletteSprite CPU1Fix Journal Moon Patrol 75% Hardware RAMUse Code GFX1 (Text) GFX2 (Sprites) GFX3 (Mountains) GFX4 (Hills) GFX5 (City) ImageBackgroundColors SpriteColors SpriteColorSets TextColors MoonPatrolSound SoundHardware SoundRAMUse SoundCode Journal Omega Race 10% Hardware RAMUse MainBoard SoundHardware SoundRAMUse SoundBoard DVGPROM VectorROM Journal Pooyan (AI) Hardware RAMUse Code Phoenix 90% Hardware RAMUse Code Background Foreground Journal Scramble HHi phoenixj-func-main2.pdf phoenixj-func-main2.scap phoenixj.asm-may2025.txt phoenixj.asm-may2025.txt.pdf Space Invaders invaders.asm Hardware RAMUse Code Journal Tempest Hardware RAMUse Code The Pit (AI) Hardware RAMUse Code Time Pilot (Sound) SoundHardware SoundRAMUse SoundCode Hardware RAMUse Code Journal Sea Wolf 1% Hardware RAMUse Code Journal Scramble 1% SoundHardware SoundRAMUse SoundCode Journal Atari2600 Stella (Hardware Info) Asteroids 5% RAMUse Code Journal Battle Zone 1% RAMUse Code Journal Chess 1% RAMUse Code Journal Combat 10% RAMUse Code CodePAL Journal Double Gap Code DoubleGap.asm Journal Entombed 1% RAMUse Code Journal ET 1% RAMUse Code Journal Burger Time 1% RAMUse CodeBank0 CodeBank1 CodeBank2 CodeBank3 CodeBank4 CodeBank5 CodeBank6 CodeBank7 Journal Missile Command 1% RAMUse Code Journal Space Invaders 1% RAMUse Code Journal ColossalCave CodeOrg DataOrg Code350 Data350 CoCo Hardware Early Work Pyramid RAMUse Code Journal Raaka Tu RAMUse Code Journal Bedlam RAMUse Code Journal Madness & Minotaur Walk Through after_start.txt after_start.cas after_1.txt after_1.cas after_2.txt after_2.cas after_3.txt after_3.cas after_4.txt after_4.cas after_5.txt after_5.cas after_6.txt after_6.cas after_7.txt after_7.cas after_8.txt after_8.cas after_9.txt after_9.cas after_10.txt after_10.cas after_11.txt after_11.cas after_12.txt after_12.cas after_13.txt after_13.cas after_14.txt after_14.cas after_15.txt after_15.cas after_16.txt after_16.cas after_17.txt after_17.cas after_18.txt after_18.cas after_19.txt after_19.cas after_20.txt after_20.cas after_21.txt after_21.cas after_22.txt after_22.cas after_23.txt after_23.cas after_24.txt after_24.cas after_25.txt after_25.cas RAMUse Code SaveGameViewer Journal Mega-Bug RAMUse Code Journal Popcorn RAMUse Code Journal Daggorath RAMUse Code Level Maps Journal Downland 5% RAMUse Code Journal Audio Analyzer 5% RAMUse Code Journal Doubleback RAMUse Code Journal NES Zelda 5% Hardware RAMUse Bank0 Bank1 Bank2 Bank3 Bank4 Bank5 Bank6 Bank7 Journal Kid Icarus 1% Hardware RAMUse Bank0 Bank1 Bank2 Bank3 Bank4 Bank5 Bank6 Bank7 Journal Gameboy Hardware Link's Awakening 1% RAMUse Bank00 Bank01 Bank02 Bank03 Bank04 Bank05 Bank06 Bank07 Bank08 Bank09 Bank0A Bank0B Bank0C Bank0D Bank0E Bank0F Bank10 Bank11 Bank12 Bank13 Bank14 Bank15 Bank16 Bank17 Bank18 Bank19 Bank1A Bank1B Bank1C Bank1D Bank1E Bank1F Journal Tetris 1% RAMUse Code Journal TRS80 HardwareLevel2 HardwareLevel1 HardwareDisk HauntedHouse RAMUse1 Code1 RAMUse2 Code2 Journal Pyramid RAMUse Code RAMUse1 Code1 Journal RaakaTu RAMUse Code Journal Bedlam RAMUse Code Journal Xenos RAMUse Code Section1 Section2 Section3 Section4 Section5 Section6 Section7 Section8 Section9 SSVDOBJS USVDOBJS Journal Virus Morris Worm 1% Journal Stoned Journal Tools Blend blend.zip Journal Hardware Interrupts Video Memory Map I/O Ports Dedicated Shift Hardware Inputs Output Screen Geometry Hardware Much of this comes from the comments in the MAME emulator. invaders.h 0000-07FF invaders.g 0800-0FFF invaders.f 1000-17FF invaders.e 1800-1FFF Interrupts The mame/drivers/mw8080bw.c comments have the following information about the interrupts: The CPU's INT line is asserted via a D flip-flop at E3. The flip-flop is clocked by the expression (!(64V | !128V) | VBLANK). According to this, the LO to HI transition happens when the vertical sync chain is 0x80 and 0xda and VBLANK is 0 and 1, respectively. These correspond to lines 96 and 224 as displayed. The interrupt vector is provided by the expression: 0xc7 | (64V << 4) | (!64V << 3), giving 0xcf and 0xd7 for the vectors. The flip-flop, thus the INT line, is later cleared by the CPU via one of its memory access control signals. The value CF is RST 8 and D7 is RST 10. If I understand this right then the system gets RST 8 when the beam is *near* the middle of the screen and RST 10 when it is at the end (start of VBLANK). Video The raster resolution is 256x224 at 60Hz. The monitor is rotated in the cabinet 90 degrees counter-clockwise. The screens pixels are on/off (1 bit each). 256*224/8 = 7168 (7K) bytes. Memory Map 0000-1FFF 8K ROM 2000-23FF 1K RAM 2400-3FFF 7K Video RAM 4000- RAM mirror I/O Ports 0000pr INP0 See below 0001pr INP1 See below 0002pr INP2 See below 0003pr SHFT_IN See below 0002pw SHFTAMNT See below 0003pw SOUND1 See below 0004pw SHFT_DATA See below 0005pw SOUND2 See below 0006pw WATCHDOG See below These ports are mapped into the 8080's I/O address space (not the memory space): Read 00 INPUTS (Mapped in hardware but never used by the code) 01 INPUTS 02 INPUTS 03 bit shift register read Write 02 shift amount (3 bits) 03 sound bits 04 shift data 05 sound bits 06 watch-dog Port 07 is also demultiplexed. The schematics say the select signal is wired directly to input-port-0's bit 7. This doesn't make sense. Dedicated Shift Hardware The 8080 instruction set does not include opcodes for shifting. An 8-bit pixel image must be shifted into a 16-bit word for the desired bit-position on the screen. Space Invaders adds a hardware shift register to help with the math. 16 bit shift register: f 0 bit xxxxxxxxyyyyyyyy Writing to port 4 shifts x into y, and the new value into x, eg. $0000, write $aa -> $aa00, write $ff -> $ffaa, write $12 -> $12ff, .. Writing to port 2 (bits 0,1,2) sets the offset for the 8 bit result, eg. offset 0: rrrrrrrr result=xxxxxxxx xxxxxxxxyyyyyyyy offset 2: rrrrrrrr result=xxxxxxyy xxxxxxxxyyyyyyyy offset 7: rrrrrrrr result=xyyyyyyy xxxxxxxxyyyyyyyy Reading from port 3 returns said result. Inputs Port 0 bit 0 DIP4 (Seems to be self-test-request read at power up) bit 1 Always 1 bit 2 Always 1 bit 3 Always 1 bit 4 Fire bit 5 Left bit 6 Right bit 7 ? tied to demux port 7 ? Port 1 bit 0 = CREDIT (1 if deposit) bit 1 = 2P start (1 if pressed) bit 2 = 1P start (1 if pressed) bit 3 = Always 1 bit 4 = 1P shot (1 if pressed) bit 5 = 1P left (1 if pressed) bit 6 = 1P right (1 if pressed) bit 7 = Not connected Port 2 bit 0 = DIP3 00 = 3 ships 10 = 5 ships bit 1 = DIP5 01 = 4 ships 11 = 6 ships bit 2 = Tilt bit 3 = DIP6 0 = extra ship at 1500, 1 = extra ship at 1000 bit 4 = P2 shot (1 if pressed) bit 5 = P2 left (1 if pressed) bit 6 = P2 right (1 if pressed) bit 7 = DIP7 Coin info displayed in demo screen 0=ON Port 3 bit 0-7 Shift register data Output Port 2: bit 0,1,2 Shift amount Port 3: (discrete sounds) bit 0=UFO (repeats) SX0 0.raw bit 1=Shot SX1 1.raw bit 2=Flash (player die) SX2 2.raw bit 3=Invader die SX3 3.raw bit 4=Extended play SX4 bit 5= AMP enable SX5 bit 6= NC (not wired) bit 7= NC (not wired) Port 4: (discrete sounds) bit 0-7 shift data (LSB on 1st write, MSB on 2nd) Port 5: bit 0=Fleet movement 1 SX6 4.raw bit 1=Fleet movement 2 SX7 5.raw bit 2=Fleet movement 3 SX8 6.raw bit 3=Fleet movement 4 SX9 7.raw bit 4=UFO Hit SX10 8.raw bit 5= NC (Cocktail mode control ... to flip screen) bit 6= NC (not wired) bit 7= NC (not wired) Port 6: Watchdog ... read or write to reset Screen Geometry 2400 - 3FFF (1C00 bytes = 32 * 224) 32 * 8 = 256. Screen is 256x224 pixels. The map below shows the raster layout. Take this map and rotate it counter clockwise once. Thus the first byte is lower left. First "row" ends upper left. Last byte is upper right. 2400 2401 2402 .... 241F 01234567 01234567 01234567 .... 01234567 2420 2421 2422 .... 243F 01234567 01234567 01234567 .... 01234567 . . . . . . . . 3FE0 3FE1 3FE2 .... 3FFF 01234567 01234567 01234567 .... 01234567