Pong on Assembly
Classic Pong rebuilt from the ground up in hardware and low-level assembly, showing full-stack systems engineering in action.
Overview
This project demonstrates deep technical ownership by implementing the same game in two demanding ways: hardware logic on FPGA and software in assembly. It is impressive because it goes far beyond game development; it proves control over timing, input handling, rendering, and low-level architecture. The result is a playable experience that doubles as a serious systems showcase.
Demo
Description
Hardware implementation
vga_controller.v holds game state in registers: ball position and direction, paddle Y positions, and scores. Tunable parameters include BALL_SIZE=10, PADDLE_H=40, BALL_SPEED=3, PADDLE_SPEED=4. On each vertical sync (cVS) edge, the controller updates paddles from keyboard inputs (W/S left, O/L right, clamped to the play area), advances the ball, handles wall bounce and paddle collision, and applies scoring (ball past paddle resets position; first to 5 wins and freezes the game). Pixel output is derived from the sync generator and game registers. PS2_Interface.v receives scan codes and maps W/S/O/L to key-down state; skeleton.v wires the PLL, stub processor, PS/2, LCD, and VGA controller so that keyboard inputs drive the game directly—the processor is not used for gameplay in this design.Assembly version (pong.s) The assembly program uses MMIO: $20=2000 (keyboard), $21=3000 (VGA base). Registers hold ball position ($1,$2), velocity ($3,$4), and paddle Y ($5,$6). The main game loop reads the keyboard, moves paddles (with clamping), updates ball position, handles bounces and paddle hits, checks for goals and resets the ball, then writes ball and paddle data to 3000–3003 and branches back. This version is the software counterpart to the hardware Pong and runs on the custom processor from the Custom-Single-Cycle-32-Bit-Processor repo.
Tech & tools
- Verilog
- RISC-V / custom ISA assembly
- FPGA
- VGA
- PS/2 keyboard
Highlights
- Hardware implementation: VGA controller, PS/2 interface, game FSM
- Playable on FPGA with keyboard input
- Software equivalent: pong.s assembly for custom 32-bit ISA
- Duke ECE 550 project
More projects
tinyTemp
Custom tiny temperature monitor that evolved from an ATmega328P prototype into a compact ATtiny85 OLED PCB.
WorldWide Rover
Award-winning internet-controlled rover that lets users drive and monitor a physical robot from anywhere in real time.
BareTag Tool Tracker
Smart tool tracking that helps teams instantly find equipment, prevent loss, and stay coordinated in real time.
Buffet
Automated trading system that tests strategies, learns from market behavior, and executes decisions with built-in risk controls.
HeadHunter
AI-powered job search assistant that helps people find better-fit roles faster, with smarter resume matching and cleaner tracking.
Meal Planner
Personal meal planning app that turns “what should I cook?” into a clear weekly routine with pantry awareness and shopping support.
BrickVision
Turns ideas or 3D models into buildable LEGO-style instructions, making custom creations faster and more accessible.
Custom Single-Cycle 32-Bit Processor
From-scratch 32-bit processor design that brings core computer architecture concepts to life in working hardware.
ThreadLib Disk Scheduler
C++ user-level threading library paired with a concurrent disk scheduler that coordinates requester threads and SSTF service.
Multilateration 3D Positioning
3D location engine that estimates where an object is in space and validates accuracy through realistic simulation.
RISC-V Encryption
Encryption concepts implemented at the hardware-software boundary, showing security logic at instruction level detail.
PUF Tester
Hardware security testing toolkit for measuring unique device fingerprints and reliability under real test conditions.
tinyTemp
Custom tiny temperature monitor that evolved from an ATmega328P prototype into a compact ATtiny85 OLED PCB.
WorldWide Rover
Award-winning internet-controlled rover that lets users drive and monitor a physical robot from anywhere in real time.