From ef227c1d96510356a2f2c4e11b800939ad89aa71 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Mon, 19 Apr 2021 20:47:00 +0200 Subject: [PATCH] IremM62: add Lode Runner 3 topbottom mask ...for vertical scroll garbage supression --- Arcade_MiST/IremM62 Hardware/rtl/Graphics.VHD | 1 + .../IremM62 Hardware/rtl/iremm62_video_controller.vhd | 9 ++++++++- Arcade_MiST/IremM62 Hardware/rtl/platform.vhd | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Arcade_MiST/IremM62 Hardware/rtl/Graphics.VHD b/Arcade_MiST/IremM62 Hardware/rtl/Graphics.VHD index 5e70698a..8e3b91e3 100644 --- a/Arcade_MiST/IremM62 Hardware/rtl/Graphics.VHD +++ b/Arcade_MiST/IremM62 Hardware/rtl/Graphics.VHD @@ -83,6 +83,7 @@ begin -- video data signals (in) rgb_i => rgb_data, + topbottom_mask => graphics_i.bit16(3)(0), -- video control signals (out) video_ctl_o => from_video_ctl, diff --git a/Arcade_MiST/IremM62 Hardware/rtl/iremm62_video_controller.vhd b/Arcade_MiST/IremM62 Hardware/rtl/iremm62_video_controller.vhd index 0279faa7..e83db2fa 100644 --- a/Arcade_MiST/IremM62 Hardware/rtl/iremm62_video_controller.vhd +++ b/Arcade_MiST/IremM62 Hardware/rtl/iremm62_video_controller.vhd @@ -17,6 +17,7 @@ entity iremm62_video_controller is -- video input data rgb_i : in RGB_t; + topbottom_mask: in std_logic; -- control signals (out) video_ctl_o : out from_VIDEO_CTL_t; @@ -82,7 +83,10 @@ begin -- display blank if hcnt = "00"&x"FF" then hblank1 <= '0'; - if vcnt = '1'&x"00" then + if vcnt = '1'&x"00" and topbottom_mask = '0' then + vblank <= '0'; + end if; + if vcnt = '1'&x"08" then vblank <= '0'; end if; end if; @@ -95,6 +99,9 @@ begin end if; if hcnt = "00"&x"87" then hblank2 <= '1'; + if vcnt = '1'&x"F7" and topbottom_mask = '1' then + vblank <= '1'; + end if; if vcnt = '1'&x"FF" then vblank <= '1'; end if; diff --git a/Arcade_MiST/IremM62 Hardware/rtl/platform.vhd b/Arcade_MiST/IremM62 Hardware/rtl/platform.vhd index e5aceaf8..16aff7c5 100644 --- a/Arcade_MiST/IremM62 Hardware/rtl/platform.vhd +++ b/Arcade_MiST/IremM62 Hardware/rtl/platform.vhd @@ -552,6 +552,7 @@ begin graphics_o.bit16(0) <= scrollram_d_o when hwsel = HW_HORIZON else m62_hscroll; graphics_o.bit16(1) <= m62_vscroll; graphics_o.bit16(2) <= m62_vscroll2; + graphics_o.bit16(3)(0) <= m62_topbottom_mask; end block BLK_SCROLL;