From: astoria-d Date: Sun, 15 Sep 2013 03:26:35 +0000 (+0900) Subject: prefetch boundary address bug fixed X-Git-Tag: motonesfpga-gate-0.2.0~142 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=47ce63a559dd92e06c88ba156b09134961c6cbbd;p=motonesfpga%2Fmotonesfpga.git prefetch boundary address bug fixed --- diff --git a/simulation/ppu/render.vhd b/simulation/ppu/render.vhd index 5bfd21a..ab5f07b 100644 --- a/simulation/ppu/render.vhd +++ b/simulation/ppu/render.vhd @@ -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