From 134cd25c658246ebfcea759fae6ebd7a7c69027d Mon Sep 17 00:00:00 2001 From: byrtolet Date: Sat, 27 Oct 2018 19:56:14 +0300 Subject: [PATCH] extra keys added to keyboard --- cores/Oric/source/keyboard/keyboard.vhd | 37 +++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/cores/Oric/source/keyboard/keyboard.vhd b/cores/Oric/source/keyboard/keyboard.vhd index 68be1ed..1a5f7af 100644 --- a/cores/Oric/source/keyboard/keyboard.vhd +++ b/cores/Oric/source/keyboard/keyboard.vhd @@ -27,7 +27,12 @@ port( PS2DATA : in std_logic; COL : in std_logic_vector(2 downto 0); - ROWbit : out std_logic_vector(7 downto 0) + ROWbit : out std_logic_vector(7 downto 0) ; + KEY_PG_UP : out std_logic; + KEY_PG_DOWN : out std_logic; + KEY_S_LOCK : out std_logic; + KEY_HOME : out std_logic; + KEY_END : out std_logic ); end keyboard; @@ -43,6 +48,34 @@ architecture arch of keyboard is begin + decode: process (CLK) + begin + if RESETn = '0' then + KEY_PG_UP <= '0'; + KEY_PG_DOWN <= '0'; + KEY_S_LOCK <= '0'; + KEY_HOME <= '0'; + KEY_END <= '0'; + elsif rising_edge(CLK) then + if (MAT_WE = '1') then + if (ROM_A = x"7e") then + KEY_S_LOCK <=not MAT_wVAL; + elsif (ROM_A = x"fd") then + KEY_PG_UP <= not MAT_wVAL; + elsif (ROM_A = x"fa") then + KEY_PG_DOWN <= not MAT_wVAL; + elsif (ROM_A = x"ec") then + KEY_HOME <= not MAT_wVAL; + elsif (ROM_A = x"e9") then + KEY_END <= not MAT_wVAL; + end if; + end if; + end if; + end process; + + + + PS2 : entity work.ps2key port map( CLK => CLK, RESETn => RESETn, @@ -82,4 +115,4 @@ begin rROWbit => ROWbit ); -end arch; \ No newline at end of file +end arch;