From 491e71d63e60b52a12b05d8c5acb1f29a08bcd3c Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Tue, 17 Mar 2020 18:33:56 +0100 Subject: [PATCH] C64: [VIC2] fix yraster reset condition Fixes Baby Blues+2 demo I wonder why was it done like that - maybe sprites 0-2 on the first line will break now --- cores/c64/rtl/video_vicII_656x_a.vhd | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cores/c64/rtl/video_vicII_656x_a.vhd b/cores/c64/rtl/video_vicII_656x_a.vhd index ab15e7c..9507285 100644 --- a/cores/c64/rtl/video_vicII_656x_a.vhd +++ b/cores/c64/rtl/video_vicII_656x_a.vhd @@ -42,7 +42,6 @@ architecture rtl of video_vicii_656x is -- State machine signal lastLineFlag : boolean; -- True for on last line of the frame. - signal beyondFrameFlag : boolean; -- Y>frame lines signal vicCycle : vicCycles := cycleRefresh1; signal sprite : unsigned(2 downto 0) := "000"; signal shiftChars : boolean; @@ -662,14 +661,12 @@ rasterCounters: process(clk) if phi = '1' and enaData = '1' and baSync = '0' then - beyondFrameFlag <= false; if (vicCycle = cycleSpriteB) and (sprite = 2) then rasterY <= rasterY + 1; - beyondFrameFlag <= lastLineFlag; - end if; - if beyondFrameFlag then - rasterY <= (others => '0'); + if lastLineFlag then + rasterY <= (others => '0'); + end if; end if; end if; end if;