Merge pull request #29 from brNX/master

GB Mode sprite regression Fix
This commit is contained in:
sorgelig
2019-02-12 13:15:52 +08:00
committed by GitHub
2 changed files with 18 additions and 8 deletions

View File

@@ -942,9 +942,19 @@ begin
end if;
when "00001011"|"00011011"|"00101011"|"00111011" =>
-- DEC ss
TStates <= "110";
IncDec_16(3 downto 2) <= "11";
IncDec_16(1 downto 0) <= DPair;
if Mode = 3 then
MCycles <= "010";
case to_integer(unsigned(MCycle)) is
when 2 =>
IncDec_16(3 downto 2) <= "11";
IncDec_16(1 downto 0) <= DPair;
when others =>
end case;
else
TStates <= "110";
IncDec_16(3 downto 2) <= "11";
IncDec_16(1 downto 0) <= DPair;
end if;
-- ROTATE AND SHIFT GROUP
when "00000111"

10
video.v
View File

@@ -90,11 +90,11 @@ sprites sprites (
.pixel_cmap ( sprite_pixel_cmap ),
.pixel_prio ( sprite_pixel_prio ),
.index ( sprite_index ),
.addr ( sprite_addr ),
.dvalid ( sprite_dvalid),
.data ( vram_data ),
.data1 ( vram1_data ),
.index ( sprite_index ),
.addr ( sprite_addr ),
.dvalid ( sprite_dvalid ),
.data ( vram_data ),
.data1 ( isGBC?vram1_data:vram_data ),
//gbc
.pixel_cmap_gbc ( sprite_pixel_cmap_gbc ),