Close

Bresenham line drawing

A project log for Spartan-6 FPGA Retro System

A complete retro computer system on a single Spartan-6 FPGA. Integrates VGA (640x480), text & sprite engines, PS/2, UART, SD Card, and a cus

rick1961plrick1961pl • 5 hours ago•0 Comments

CMD_DRAW_LINE (23) implements Bresenham's algorithm with support for line thickness and dashed style. The command takes 5 parameters: start X/Y, end X/Y, color, thickness, and dash style.

Fixed two bugs:
- thick_step: stray pixels when drawing thick lines — used $unsigned casting instead of truncating the sign bits.
- thick_begin: added clearing of wr_req before starting a new thickness block.

Discussions