All Projects → gergoerdi → clash-spaceinvaders

gergoerdi / clash-spaceinvaders

Licence: MIT license
Intel 8080-based Space Invaders arcade machine implemented on an FPGA, written in CLaSH

Programming Languages

haskell
3896 projects
Verilog
626 projects

Projects that are alternatives of or similar to clash-spaceinvaders

Echomods
Open source ultrasound processing modules and building blocks
Stars: ✭ 200 (+344.44%)
Mutual labels:  fpga, hardware
basic-ecp5-pcb
Reference design for Lattice ECP5 FPGA. Featuring Raspberry Pi interface and 6 PMODs
Stars: ✭ 71 (+57.78%)
Mutual labels:  fpga, hardware
Hastlayer Sdk
Turning .NET assemblies into FPGA hardware for faster execution and lower power usage. See the Readme and https://hastlayer.com.
Stars: ✭ 226 (+402.22%)
Mutual labels:  fpga, hardware
Connectal
Connectal is a framework for software-driven hardware development.
Stars: ✭ 117 (+160%)
Mutual labels:  fpga, hardware
clash-compucolor2
Clash implementation of the Compucolor II home computer
Stars: ✭ 25 (-44.44%)
Mutual labels:  fpga, clash
Openfpgaduino
All open source file and project for OpenFPGAduino project
Stars: ✭ 137 (+204.44%)
Mutual labels:  fpga, hardware
awesome-hwd-tools
A curated list of awesome open source hardware design tools
Stars: ✭ 42 (-6.67%)
Mutual labels:  fpga, hardware
Kactus2dev
Kactus2 is a graphical EDA tool based on the IP-XACT standard.
Stars: ✭ 82 (+82.22%)
Mutual labels:  fpga, hardware
gateware-ts
Hardware definition library and environment for designing and building digital hardware for FPGAs, using only open source tools
Stars: ✭ 83 (+84.44%)
Mutual labels:  fpga, hardware
tapasco
The Task Parallel System Composer (TaPaSCo)
Stars: ✭ 66 (+46.67%)
Mutual labels:  fpga, hardware
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+135.56%)
Mutual labels:  fpga, hardware
DomesdayDuplicator
High-speed LaserDisc RF sampler
Stars: ✭ 39 (-13.33%)
Mutual labels:  fpga, hardware
Glasgow
Scots Army Knife for electronics
Stars: ✭ 1,374 (+2953.33%)
Mutual labels:  fpga, hardware
Space Invaders Vhdl
Space Invaders game implemented with VHDL
Stars: ✭ 142 (+215.56%)
Mutual labels:  fpga, hardware
Nyuziprocessor
GPGPU microprocessor architecture
Stars: ✭ 1,351 (+2902.22%)
Mutual labels:  fpga, hardware
Axi
AXI SystemVerilog synthesizable IP modules and verification infrastructure for high-performance on-chip communication
Stars: ✭ 227 (+404.44%)
Mutual labels:  fpga, hardware
Tenyr
Simple, orthogonal 32-bit computer architecture and environment
Stars: ✭ 24 (-46.67%)
Mutual labels:  fpga, hardware
Haddoc2
Caffe to VHDL
Stars: ✭ 57 (+26.67%)
Mutual labels:  fpga, hardware
xeda
Cross EDA Abstraction and Automation
Stars: ✭ 25 (-44.44%)
Mutual labels:  fpga, hardware
icebreaker-amaranth-examples
This repository contains iCEBreaker examples for Amaranth HDL.
Stars: ✭ 26 (-42.22%)
Mutual labels:  fpga, hardware

Space Invaders arcade machine

This is a Clash implementation of the 1978 Space Invaders arcade machine by Taito.

This code is part of the book Retrocomputing with Clash: Haskell for FPGA Hardware Design at https://unsafePerform.IO/retroclash/.

Click to play YouTube video

Hardware architecture

  • CPU: Intel 8080.
  • Video: 256x224 monochrome at 60 FPS, backed by a 7168x8 bit framebuffer. IRQs triggered on lines 96 and 224. The screen was rotated 90 degrees to be in portrait orientation.
  • Sound: TI SN76477 connected to the CPU via two 8-bit ports
  • Inputs: coin deposit detector, two sets of buttons for starting the game, and moving and firing, for two-player mode.

Clash implementation

  • CPU: Implemented based on abstract descriptions of Intel 8080 ISA, with no reference to real implementation. Not cycle-accurate, but aims to pass various functional tests.
  • Video: Standard 640x480@60Hz VGA, with 25.175MHz pixel clock. Logical "pixels" are scaled 2x2, but the layout is not rotated to keep interrupt timings.
  • Framebuffer: The video system has priority over the CPU: memory reads from the framebuffer area will block the CPU until the video system is done reading.
  • Sound: Unimplemented.
  • Inputs:
    • Direct pushbuttons
    • PS/2 keyboard: C to deposit a coin, Enter to start 1P game, and Left / Right / RCtrl to move and fire with P1.

Limitations

This implementation doesn't aim to be cycle-accurate; it wouldn't matter for much anyway, since the CPU runs at the VGA output pixel clock of 25 MHz, whereas the real cabinet ran at 2 MHz. Luckily, Space Invaders does all animations keyed to two 60 Hz timers triggered by the video system.

Sound is not implemented at all.

The back-panel DIP switches are not yet mapped to anything.

Building

Included are rudimentary Shake rules to build for various hobbyist FPGA dev boards:

  • The Xilinx Spartan-6 based Papilio Pro or the Spartan-3 based Papilio One, both with the Arcade mega-wing. These use the Xilinx ISE toolchain.

  • The Xilinx Artrix-7 based Nexys A7. This uses the Xilinx Vivado toolchain.

Make a file called build.mk with content similar to the following:

TARGET = papilio-pro-arcade
CLASH = stack exec --
ISE = ~/prog/docker/xilinx-14.7-ubuntu-12.04/run
VIVADO = ~/prog/docker/xilinx-2019.1-ubuntu-18.04/run

The CLASH, ISE and VIVADO fields are to optionally wrap invocations of the Clash compiler and the Xilinx ISE / Vivado toolchain in case you want to run them via Stack, Docker, Nix, etc.

Then you can build for the Papilio Pro by running the included mk script.

Useful links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].