- assign lcdvs = (posy == 153) && (posx == 455);
- assign lcdhs = (posx == 455);
- assign lcdr = display ? {pixdata[1] ? 3'b111 : 3'b000} : 3'b000;
- assign lcdg = display ? {pixdata[0] ? 3'b111 : 3'b000} : 3'b000;
- assign lcdb = display ? {(vypos < 8 || vxpos < 8) ? 2'b11 : 2'b00} : 2'b00;
+ assign lcdvs = (posy == 153) && (posx == 2) && rLCDC[7];
+ assign lcdhs = (posx == 2) && rLCDC[7];
+ assign lcdclk = clk4;
+
+ wire [2:0] lcdr_ = display ? {pixdata[1] ? 3'b111 : 3'b000} : 3'b000;
+ wire [2:0] lcdg_ = display ? {pixdata[0] ? 3'b111 : 3'b000} : 3'b000;
+ wire [1:0] lcdb_ = display ? {(vypos < 8 || vxpos < 8) ? 2'b11 : 2'b00} : 2'b00;