Skip to content

Commit

Permalink
Overscan removal
Browse files Browse the repository at this point in the history
* Missing lines are recovered on the right in CGA
  • Loading branch information
spark2k06 committed Aug 11, 2022
1 parent afd39c8 commit 37fead8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rtl/video/crtc6845.v
Expand Up @@ -139,6 +139,7 @@ module crtc6845(
reg hs = 1'b0;
reg hdisp = 1'b1;
reg vdisp = 1'b1;
reg [6:0] hdisp_del;

wire cur_on;
wire blink;
Expand All @@ -149,8 +150,8 @@ module crtc6845(
assign vsync = vs;
assign hsync = hs;
assign display_enable = hdisp & vdisp;
assign hblank = ~hdisp;
assign vblank = ~vdisp;
assign hblank = ~hdisp_del[5];
assign vblank = ~vdisp;

assign row_addr = v_scancount;

Expand All @@ -161,6 +162,7 @@ module crtc6845(
// Horizontal counter
always @ (posedge clk)
begin
hdisp_del <= {hdisp_del[5], hdisp_del[4], hdisp_del[3], hdisp_del[2], hdisp_del[1], hdisp_del[0], hdisp};
if (divclk) begin
if (h_count == h_total) begin
h_count <= 8'd0;
Expand Down

2 comments on commit 37fead8

@somhi
Copy link
Contributor

@somhi somhi commented on 37fead8 Aug 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muy ingenioso!

@spark2k06
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sí, este truco de pipelines lo emplea el autor de Graphics Gremlin en otras partes del proyecto. La verdad es que está muy bien :-)

Please sign in to comment.