Back to Projects

Line's War — Light Cycle Game on RISC-V

Platform Nios V (RISC-V) on DE1-SoC FPGA
Language Bare-metal C
Date November 2025
Source GitHub ↗

Overview

A Tron-style two-player Light Cycle game written in bare-metal C, running on a Nios V (RISC-V) soft-core processor instantiated on the Intel DE1-SoC FPGA. Players race trails across a 320×240 VGA frame buffer; touching any wall, obstacle, or trail loses the round. Includes a player-vs-AI mode driven by a simple wall-avoiding heuristic, multi-round scoring on the HEX displays, and an animated title screen rendered with a custom 8×8 bitmap font.


RISC-V Platform

The entire game runs on a Nios V/m soft processor — Intel's RISC-V (RV32I) soft-core that replaces the legacy Nios II on Quartus. All graphics, input polling, and game state are driven directly from C through memory-mapped I/O: the VGA pixel buffer at 0x08000000, push buttons, slide switches, seven-segment HEX displays, and the RISC-V mtime machine timer at 0xFF202100. No OS, no HAL, no driver layer — just RISC-V instructions writing directly to peripheral addresses.


Gameplay Demo

Live gameplay on the DE1-SoC — two-player race with AI opponent and round counter

RISC-V (RV32I) Nios V Soft Processor Bare-metal C DE1-SoC FPGA Memory-Mapped I/O VGA Frame Buffer Quartus