Created
March 4, 2016 23:08
-
-
Save dekuNukem/765f9725f7542d47c64d to your computer and use it in GitHub Desktop.
test for FAP text mode display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
always @(*) | |
begin | |
// inside active region | |
if ((vc >= vbp && vc < vfp) && (hc >= hbp && hc < hfp)) | |
begin | |
vram_rd_low = 0; | |
hpos = hc - hbp; | |
vpos = vc - vbp; | |
hdot = hpos[2:0]; | |
vdot = vpos[3:0]; | |
hchar = hpos[9:3]; | |
vchar = vpos[9:4]; | |
vram_addr = 80 * vchar + hchar; | |
red = vram_data[1:0]; | |
green = vram_data[3:2]; | |
blue = vram_data[5:4]; | |
end | |
// outside active region | |
else | |
begin | |
vram_rd_low = 1; | |
red = 0; | |
green = 0; | |
blue = 0; | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment