From c978469c62955212adf32c18eba650c34c642813 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Mon, 16 Mar 2020 19:21:40 +0100 Subject: [PATCH] IremM62: sprite/tilemap position adjust --- Arcade_MiST/IremM62 Hardware/rtl/spritectl.vhd | 2 +- Arcade_MiST/IremM62 Hardware/rtl/tilemapctl.vhd | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Arcade_MiST/IremM62 Hardware/rtl/spritectl.vhd b/Arcade_MiST/IremM62 Hardware/rtl/spritectl.vhd index d6b3d8d1..f8b55288 100644 --- a/Arcade_MiST/IremM62 Hardware/rtl/spritectl.vhd +++ b/Arcade_MiST/IremM62 Hardware/rtl/spritectl.vhd @@ -149,7 +149,7 @@ begin end if; if video_ctl.stb = '1' then - x := unsigned(reg_i.x) + 256 - 64 + PACE_VIDEO_PIPELINE_DELAY; + x := unsigned(reg_i.x) + 256 - 64 + PACE_VIDEO_PIPELINE_DELAY + 1; if hwsel /= HW_KIDNIKI then x:=x-8; end if; if hires = '0' then x := x - 64; end if; diff --git a/Arcade_MiST/IremM62 Hardware/rtl/tilemapctl.vhd b/Arcade_MiST/IremM62 Hardware/rtl/tilemapctl.vhd index a1454861..40273437 100644 --- a/Arcade_MiST/IremM62 Hardware/rtl/tilemapctl.vhd +++ b/Arcade_MiST/IremM62 Hardware/rtl/tilemapctl.vhd @@ -61,7 +61,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 + 128 + 8) when unsigned(y) < 6*8 and HWSEL = HW_KUNGFUM else + 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 + 10) when hwsel = HW_LDRUN4 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