forked from luluzheng1/space-invaders
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomprehensive_NES_controller_guide.vhd
More file actions
52 lines (38 loc) · 1.15 KB
/
comprehensive_NES_controller_guide.vhd
File metadata and controls
52 lines (38 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-- COMPONENT DECLARATION
component NES_controller_top is
port(
clk_full : in std_logic;
data : in std_logic;
latch : out std_logic;
controller_clk : out std_logic;
A_p : out std_logic;
start_p : out std_logic;
left_p : out std_logic;
right_p : out std_logic
);
end NES_controller_top;
-- PORT MAP
NES_buttons : NES_controller_top
port map (
clk_full => inputclk,
data => NES_data,
latch => NES_latch,
controller_clk => NES_controller_clk,
A_p => a_button,
start_p => resetbutton,
left_p => leftbutton,
right_p => rightbutton
);
end component;
-- NOTES for top and using the NES controller ----------------
-- NES controller physical pin connections
-- RED: Power (3.3 V)
-- YELLOW: Ground
-- BLUE: NES_controller_clk
-- BLACK: NES_latch
-- GREEN: NES_data
-- Remove all button ports from top and make them signals instead
-- Add ports to top:
NES_data : in std_logic;
NES_latch : out std_logic;
NES_controller_clk : out std_logic;