mirror of https://github.com/zxdos/zxuno.git
extra keys added to keyboard
This commit is contained in:
parent
7563cdb021
commit
134cd25c65
|
|
@ -27,7 +27,12 @@ port(
|
||||||
PS2DATA : in std_logic;
|
PS2DATA : in std_logic;
|
||||||
|
|
||||||
COL : in std_logic_vector(2 downto 0);
|
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;
|
end keyboard;
|
||||||
|
|
||||||
|
|
@ -43,6 +48,34 @@ architecture arch of keyboard is
|
||||||
|
|
||||||
begin
|
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(
|
PS2 : entity work.ps2key port map(
|
||||||
CLK => CLK,
|
CLK => CLK,
|
||||||
RESETn => RESETn,
|
RESETn => RESETn,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue