1
0
mirror of https://github.com/mist-devel/mist-board.git synced 2026-02-05 07:34:41 +00:00

Merge pull request #117 from gyurco/c16

C16: couple of TED fixes
This commit is contained in:
gyurco
2019-09-21 01:37:56 +02:00
committed by GitHub

View File

@@ -634,7 +634,7 @@ always @(posedge clk) // DMA and Charpos latch delay trick
always @(posedge clk)
begin
if(latch_charposition)
if(hpos_392)
begin
if(VertSubCount==6)
CharPosLatch<=1; // CharPosLatch signal activates in line 6 and signals that videocounter (DMA counter) has been latched. It is used in line 7 for character position latch.
@@ -651,7 +651,7 @@ always @(posedge clk) // Character Position Reload register $FF1A/$FF1B
CharPosReload[7:0]<=data_in;
else if(hpos_392 & videoline==EOS) // clear character position reload at last line
CharPosReload<=0;
else if(CharPosLatch & latch_charposition & VertSubActive) // latch character position at 7th line of a character row if videocunter was latched in previous 6th row
else if(CharPosLatch & latch_charposition & enabledisplay) // latch character position at 7th line of a character row if videocunter was latched in previous 6th row
CharPosReload<=CharPosition;
end
@@ -741,7 +741,9 @@ always @(posedge clk)
begin
if(hpos_392 & videoline==EOS) // clear videocounter reload register at last line
videocounter_reload<=0;
else if(VertSubCount==6 && latch_charposition && VertSubActive) // Latch videocounter position at 6th line of a character row
else if(inc_videocounter && hcounter_next == 9'd432 && tick8) // if the videocounter running when it's reloaded, that affects the reload value (HSP in Alpharay)
videocounter_reload<=videocounter+1'd1;
else if(VertSubCount==6 && latch_charposition && enabledisplay) // Latch videocounter position at 6th line of a character row
videocounter_reload<=videocounter;
end