1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-01-19 17:27:59 +00:00

IremM62: try to fix sprite-background layer alignment

This commit is contained in:
Gyorgy Szombathelyi 2020-03-12 22:07:14 +01:00
parent 4645083652
commit d91917d43b
3 changed files with 8 additions and 8 deletions

View File

@ -122,8 +122,7 @@ begin
video_o.hsync <= hsync;
video_o.vsync <= vsync;
hblank <= hblank2 when hwsel = HW_BATTROAD or hwsel = HW_SPELUNKR or hwsel = HW_SPELUNK2 or hwsel = HW_KIDNIKI or hwsel = HW_HORIZON or hwsel = HW_YOUJYUDN
else hblank1;
hblank <= hblank2 when hwsel = HW_KIDNIKI else hblank1;
video_o.hblank <= hblank;
video_o.vblank <= vblank;
video_ctl_o.stb <= '1';

View File

@ -147,7 +147,8 @@ begin
end if;
if video_ctl.stb = '1' then
x := unsigned(reg_i.x) + 256 - 64 + PACE_VIDEO_PIPELINE_DELAY - 2;
x := unsigned(reg_i.x) + 256 - 64 + PACE_VIDEO_PIPELINE_DELAY;
if hwsel /= HW_KIDNIKI then x:=x-8; end if;
if hires = '0' then x := x - 64; end if;
if x = unsigned(video_ctl.x) then

View File

@ -61,9 +61,9 @@ begin
ctl_o.tile_a(ctl_o.tile_a'left downto 15) <= (others => '0');
-- tilemap scroll
x <= std_logic_vector(unsigned(video_ctl.x) - 256 + 128) when unsigned(y) < 6*8 and HWSEL = HW_KUNGFUM else
std_logic_vector(unsigned(video_ctl.x) - 256 + unsigned(hscroll(8 downto 0)) + 64) when hires = '1' else
std_logic_vector(unsigned(video_ctl.x) - 256 + unsigned(hscroll(8 downto 0)) + 128);
x <= std_logic_vector(unsigned(video_ctl.x) - 256 + 128 + 8) when unsigned(y) < 6*8 and HWSEL = HW_KUNGFUM else
std_logic_vector(unsigned(video_ctl.x) - 256 + unsigned(hscroll(8 downto 0)) + 64 + 8) when hires = '1' else
std_logic_vector(unsigned(video_ctl.x) - 256 + unsigned(hscroll(8 downto 0)) + 128 + 8);
y <= std_logic_vector(unsigned(video_ctl.y) - 256 + unsigned(vscroll(8 downto 0)) + 128) when hwsel = HW_SPELUNKR or hwsel = HW_SPELUNK2 else
std_logic_vector(unsigned(video_ctl.y) - 256 + unsigned(vscroll(8 downto 0)));
@ -221,8 +221,8 @@ begin
ctl_o.tile_a(ctl_o.tile_a'left downto 15) <= (others => '0');
-- tilemap scroll
x <= std_logic_vector(unsigned(video_ctl.x) - 256 + 64) when hires = '1' else
std_logic_vector(unsigned(video_ctl.x) - 256);
x <= std_logic_vector(unsigned(video_ctl.x) - 256 + 64 + 8) when hires = '1' else
std_logic_vector(unsigned(video_ctl.x) - 256 + 8);
y <= std_logic_vector(unsigned(video_ctl.y) - 256 + 128) when hwsel = HW_SPELUNKR or hwsel = HW_SPELUNK2 else
std_logic_vector(unsigned(video_ctl.y) - 256);