Skip to content

emadb/space_invade.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Invaders Emulator

A Space Invaders arcade game emulator written in Rust, featuring a complete Intel 8080 CPU emulation.

Description

This project is a faithful emulation of the classic 1978 Space Invaders arcade game. It implements a complete Intel 8080 microprocessor emulator that runs the original Space Invaders ROM. The emulator includes:

  • Full Intel 8080 CPU instruction set implementation
  • Accurate cycle timing for authentic gameplay
  • Graphics rendering using the ggez game framework
  • Original arcade cabinet display rotation (90° counter-clockwise)
  • Input handling for player controls

How to Run

Prerequisites

  • Rust (latest stable version)
  • Cargo (comes with Rust)
  • Space Invaders ROM file (place in roms/invaders.rom)

Building and Running

  1. Clone the repository:
git clone https://github.com/emadb/space_invade.rs.git
cd space_invade.rs
  1. Ensure you have the Space Invaders ROM file in the roms directory:
roms/invaders.rom
  1. Build and run the emulator:
cargo run --release

Game Controls

Key Action
0 Insert Coin
1 Start 1 Player Game
2 Start 2 Players Game
j P1 Move Left
l P1 Move Right
x P1 Fire
a P2 Move Left
d P2 Move Right
v P2 Fire

Technical Details

The emulator implements the Intel 8080 microprocessor with:

  • 8-bit data bus and 16-bit address bus
  • Full instruction set including arithmetic, logical, and control flow operations
  • Interrupt handling for display refresh timing
  • Memory-mapped video RAM (0x2400-0x3FFF)
  • I/O ports for input handling

References

License

This is an educational project for learning about CPU emulation and classic arcade hardware.

About

A space invaders emulator written in Rust

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages