aboutsummaryrefslogtreecommitdiffstats
path: root/display.v
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@trantor.hos.anvin.org>2008-12-27 16:06:55 -0800
committerH. Peter Anvin <hpa@trantor.hos.anvin.org>2008-12-27 16:06:55 -0800
commit74a8fa54402b6c05848d8c3f464280fda201719e (patch)
tree6ca94e884305ccf8b26c8d861a6a5571269e77db /display.v
parentce618230885d4a84acd8b037942f3832b833cd23 (diff)
downloadabc80-74a8fa54402b6c05848d8c3f464280fda201719e.tar.gz
abc80-74a8fa54402b6c05848d8c3f464280fda201719e.tar.xz
abc80-74a8fa54402b6c05848d8c3f464280fda201719e.zip
Test pattern on SW5, move printer/V.24 to SW3abc80-de1-6
Diffstat (limited to 'display.v')
-rw-r--r--display.v48
1 files changed, 20 insertions, 28 deletions
diff --git a/display.v b/display.v
index 3856def..b01c8b2 100644
--- a/display.v
+++ b/display.v
@@ -1,32 +1,21 @@
module display (
- clk,
- width,
- reverse,
- noblink,
- reveal,
- a,
- d,
- ga,
- gd,
- rgb,
- vsync,
- hsync
+ input clk,
+
+ input width,
+ input reverse,
+ input noblink,
+ input testpattern,
+ input reveal,
+
+ output [10:0] a,
+ input [7:0] d,
+ output [10:0] ga,
+ input [7:0] gd,
+
+ output reg [2:0] rgb,
+ output reg vsync,
+ output reg hsync
);
- input clk;
- input width;
- input reverse;
- input noblink;
- input reveal;
- output [10:0] a;
- input [7:0] d;
- output [10:0] ga;
- input [7:0] gd;
- output [2:0] rgb;
- reg [2:0] rgb;
- output vsync;
- reg vsync;
- output hsync;
- reg hsync;
// We use the standard VGA "text" monitor timings mode,
// htime = 31.77 us (31.47 kHz), vtime = 14.27 ms (70 Hz)
@@ -160,7 +149,10 @@ module display (
// The x[9:4] means ignore the first character prefetch. We really
// should realign the counters, here.
if ( xvideo & yvideo & ~prefetch )
- if ( pixrow[7] & ~(do_flsh & ~flash_on) & ~(do_hide & ~reveal) )
+ if ( testpattern )
+ // Pixel test pattern for LCD monitor calibration
+ rgb <= {3{x[0] ^ y[0]}};
+ else if ( pixrow[7] & ~(do_flsh & ~flash_on) & ~(do_hide & ~reveal) )
rgb <= fg ^ {3{invert}};
else
rgb <= bg ^ {3{invert}};