OSDN Git Service

ppu scroll x display bug fix
authorastoria-d <astoria-d@mail.goo.ne.jp>
Wed, 18 Sep 2013 08:04:36 +0000 (17:04 +0900)
committerastoria-d <astoria-d@mail.goo.ne.jp>
Wed, 18 Sep 2013 08:04:36 +0000 (17:04 +0900)
simulation/ppu/render.vhd

index 2d4083c..e1f130e 100644 (file)
@@ -707,7 +707,10 @@ end;
                 end if;
 
                 if (clk = '0' and 
-                        cur_x = conv_std_logic_vector(HSCAN - 1, X_SIZE)) then
+                        ppu_scroll_x(0) = '0' and cur_x = conv_std_logic_vector(HSCAN, X_SIZE)) then
+                    bg_cnt_res_n <= '0';
+                elsif (clk = '0' and 
+                        ppu_scroll_x(0) = '1' and cur_x = conv_std_logic_vector(HSCAN - 1, X_SIZE)) then
                     bg_cnt_res_n <= '0';
                 else
                     bg_cnt_res_n <= '1';