OSDN Git Service

prefetch boundary address bug fixed
authorastoria-d <astoria-d@mail.goo.ne.jp>
Sun, 15 Sep 2013 03:26:35 +0000 (12:26 +0900)
committerastoria-d <astoria-d@mail.goo.ne.jp>
Sun, 15 Sep 2013 03:26:35 +0000 (12:26 +0900)
simulation/ppu/render.vhd

index 5bfd21a..ab5f07b 100644 (file)
@@ -400,7 +400,8 @@ begin
 
     ---prefetch x pos is 16 + scroll cycle ahead of current pos.
     prf_x <= cur_x + ppu_scroll_x + "000010000" 
-                    when cur_x <  conv_std_logic_vector(HSCAN_NEXT_START, X_SIZE) else
+                    when cur_x + ppu_scroll_x + "000010000" <
+                            conv_std_logic_vector(HSCAN_MAX, X_SIZE) else
               cur_x + ppu_scroll_x + "010111011"; -- +16 -341
     prf_y <= cur_y + ppu_scroll_y
                     when prf_x <=  conv_std_logic_vector(HSCAN, X_SIZE) and prf_x > cur_x else