From d6dabc882d9765da16dc11d4fc69ac278ca68765 Mon Sep 17 00:00:00 2001 From: nino-porcino Date: Sun, 2 Jan 2022 10:42:07 +0100 Subject: [PATCH] remove custom display colors --- rtl/apple1.v | 4 +--- rtl/display.v | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/rtl/apple1.v b/rtl/apple1.v index 7fb33ab..6dbf583 100644 --- a/rtl/apple1.v +++ b/rtl/apple1.v @@ -125,7 +125,7 @@ assign ram_wr = we & ram_cs; ); display display( - .clk14(clk14), + .clk(clk14), .enable(display_cs & cpu_clken), .rst(rst), @@ -139,8 +139,6 @@ assign ram_wr = we & ram_cs; .w_en(we & display_cs), .din(cpu_dout), .mode(2'b0), - .fg_colour(3'd7), - .bg_colour(3'd0), .clr_screen(vga_cls) ); diff --git a/rtl/display.v b/rtl/display.v index 555c814..de5286b 100644 --- a/rtl/display.v +++ b/rtl/display.v @@ -1,19 +1,22 @@ module display ( input clk, // 14 MHz clock signal + input rst, // active high reset signal input enable, // clock enable strobe, - input rst, // active high reset signal + + input clr_screen, // clear screen button + + // video output output vga_h_sync, // horizontal VGA sync pulse output vga_v_sync, // vertical VGA sync pulse output vga_red, // red VGA signal output vga_grn, // green VGA signal output vga_blu, // blue VGA signal + + // cpu interface input address, // address bus input w_en, // active high write enable strobe input [7:0] din, // 8-bit data bus (input) - input [1:0] mode, // 2-bit mode setting for pixel doubling - input [2:0] fg_colour, // 3 bit background colour - input [2:0] bg_colour, // 3 bit foreground colour - input clr_screen // clear screen button + input [1:0] mode // 2-bit mode setting for pixel doubling ); ////////////////////////////////////////////////////////////////////////// @@ -183,9 +186,9 @@ module display ( assign font_line = v_dot * 2 + 4; // vga signals out to monitor - assign vga_red = (h_active & v_active) ? (font_out ? fg_colour[2] : bg_colour[2]) : 1'b0; - assign vga_grn = (h_active & v_active) ? (font_out ? fg_colour[1] : bg_colour[1]) : 1'b0; - assign vga_blu = (h_active & v_active) ? (font_out ? fg_colour[0] : bg_colour[0]) : 1'b0; + assign vga_red = (h_active & v_active) ? font_out : 1'b0; + assign vga_grn = (h_active & v_active) ? font_out : 1'b0; + assign vga_blu = (h_active & v_active) ? font_out : 1'b0; assign vga_h_sync = (h_cnt < h_pulse) ? 0 : 1; assign vga_v_sync = (v_cnt < v_pulse) ? 0 : 1;