From 6f7812f51d81ee0fbb8fc92dccc81220f7296cee Mon Sep 17 00:00:00 2001 From: Alan Garfield Date: Tue, 6 Feb 2018 00:35:30 +1100 Subject: [PATCH] Added defines to choose display mode of fonts --- rtl/vga/font_rom.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rtl/vga/font_rom.v b/rtl/vga/font_rom.v index 38cd9ff..1530ac2 100644 --- a/rtl/vga/font_rom.v +++ b/rtl/vga/font_rom.v @@ -20,6 +20,9 @@ // Author.....: Alan Garfield // Date.......: 3-2-2018 // +//`define DOTTY +//`define SCANLINES +`define NORMAL module font_rom( input clk, // clock signal @@ -48,7 +51,17 @@ module font_rom( wire [3:0] line_ptr = line[4:1]; always @(posedge clk) + begin + `ifdef DOTTY out <= (line[0] & pixel[0]) ? rom[(character * 10) + {2'd0, line_ptr}][pixel_ptr] : 1'b0; + `endif + `ifdef SCANLINES + out <= (line[0]) ? rom[(character * 10) + {2'd0, line_ptr}][pixel_ptr] : 1'b0; + `endif + `ifdef NORMAL + out <= rom[(character * 10) + {2'd0, line_ptr}][pixel_ptr]; + `endif + end endmodule