mirror of
https://github.com/MiSTer-devel/MacPlus_MiSTer.git
synced 2024-09-28 12:54:48 +00:00
Tweaks for direct video.
This commit is contained in:
parent
1d4a67559e
commit
4f0e9230b9
7
video.v
7
video.v
@ -23,7 +23,7 @@ localparam kVisibleWidth = 128,
|
|||||||
kVisibleHeightEnd = 362,
|
kVisibleHeightEnd = 362,
|
||||||
kTotalHeight = 370,
|
kTotalHeight = 370,
|
||||||
kHsyncStart = 135,
|
kHsyncStart = 135,
|
||||||
kHsyncEnd = 151,
|
kHsyncEnd = 152,
|
||||||
kVsyncStart = 365,
|
kVsyncStart = 365,
|
||||||
kVsyncEnd = 369,
|
kVsyncEnd = 369,
|
||||||
kPixelLatency = 1; // number of clk8 cycles from xpos==0 to when pixel data actually exits the video shift register
|
kPixelLatency = 1; // number of clk8 cycles from xpos==0 to when pixel data actually exits the video shift register
|
||||||
@ -73,9 +73,12 @@ always @(posedge clk) begin
|
|||||||
xpos <= xpos + 1'b1;
|
xpos <= xpos + 1'b1;
|
||||||
end
|
end
|
||||||
|
|
||||||
hsync <= (xpos >= kHsyncStart+kPixelLatency && xpos <= kHsyncEnd+kPixelLatency);
|
if(xpos == kHsyncStart+kPixelLatency) begin
|
||||||
|
hsync <= 1;
|
||||||
vsync <= (ypos >= kVsyncStart && ypos <= kVsyncEnd);
|
vsync <= (ypos >= kVsyncStart && ypos <= kVsyncEnd);
|
||||||
end
|
end
|
||||||
|
if(xpos == kHsyncEnd+kPixelLatency) hsync <= 0;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
// a 0 bit is white, and a 1 bit is black
|
// a 0 bit is white, and a 1 bit is black
|
||||||
|
Loading…
Reference in New Issue
Block a user