OSDN Git Service

sprite vram bug fixed.
authorastoria-d@fc <astoria-d@fc>
Wed, 5 Oct 2016 04:15:04 +0000 (13:15 +0900)
committerastoria-d@fc <astoria-d@fc>
Wed, 5 Oct 2016 04:15:04 +0000 (13:15 +0900)
de0_cv_nes/ppu/render.vhd

index 49c1850..68085df 100644 (file)
@@ -470,7 +470,13 @@ begin
                 end if;\r
             when AD_SET3 =>\r
                 if (is_v_access(pi_ppu_mask(PPUSBG), pi_ppu_mask(PPUSSP), reg_nes_x, reg_nes_y) = 1) then\r
-                    reg_v_next_state <= REG_SET0;\r
+                    if (reg_nes_x = HSCAN and reg_prf_x mod 2 /= reg_nes_x mod 2) then\r
+                        --scroll reg is odd case.\r
+                        --reset for sprite.\r
+                        reg_v_next_state <= AD_SET0;\r
+                    else\r
+                        reg_v_next_state <= REG_SET0;\r
+                    end if;\r
                 else\r
                     reg_v_next_state <= IDLE;\r
                 end if;\r