Projects / fpga-platformer · 2025 · Solo

Bare-Metal FPGA Platformer

A 2D platformer in pure C running with no OS on an SoC FPGA dev board - hand-driven memory-mapped I/O: dual PS/2 input, double-buffered VGA framebuffer, audio DAC, hex displays.

What it is: A playable 2D platformer written in C that boots straight on an SoC FPGA development board - no operating system, no drivers, no game engine. What it does: a player sprite runs and jumps across the screen controlled by a PS/2 keyboard while a mouse sprite follows a second PS/2 mouse; score shows on the seven-segment hex displays, and a synthesized blip plays through the audio DAC on every jump.

Everything is a memory address

The whole game is about 700 lines of talking to hardware directly:

  • Dual PS/2 ports - two PS/2 controllers read from raw peripheral addresses each frame, packet reassembled from raw scancodes. The protocol was validated first in a standalone test harness (ps2test.c) before touching the game loop - same habit I keep everywhere: test the interface before you build on it.
  • Double-buffered VGA - a 320x240 16-bit color framebuffer drawn into back buffers and swapped on wait_for_vsync(), so animation never tears. Pixels are written by address arithmetic.
  • Audio DAC - square-wave blips synthesized by writing 24-bit amplitude values, with timing counters instead of an OS scheduler.
  • Switches, LEDs, hex displays - slide switches and LEDs wired into the game loop for difficulty/state control, score rendered digit by digit.

Why it's on a portfolio

Because it is the cleanest proof I can offer that "Computer Engineering" on my transcript means something: when the sprite moves, nobody abstracted it for me - I wrote the frame buffer math, the scancode parser, the vsync wait, and the sound. It maps every concept from computer organization courses onto a blinking, beeping artifact.

Hardware details stay intentionally vague on this page; the source does not. If you want to talk about memory maps and scancode edge cases, I am your person.

← all projectsQuestions? Email me