OSDN Git Service

ale bug fix..
[motonesfpga/motonesfpga.git] / de1_nes / dummy-ppu.vhd
1 -------------------------------
2 -- LS373 transparent D-latch---
3 -------------------------------
4 library ieee;
5 use ieee.std_logic_1164.all;
6
7 entity ls373 is 
8     generic (
9         dsize : integer := 8
10     );
11     port (  c         : in std_logic;
12             we_n      : in std_logic;
13             oc_n      : in std_logic;
14             d         : in std_logic_vector(dsize - 1 downto 0);
15             q         : out std_logic_vector(dsize - 1 downto 0)
16     );
17 end ls373;
18
19 architecture rtl of ls373 is
20 begin
21     q <= (others => 'Z');
22 end rtl;
23
24
25
26
27 -------------------------------------------------------------
28
29 library ieee;
30 use ieee.std_logic_1164.all;
31
32 entity ppu is 
33     port (  
34     signal dbg_ppu_ce_n    : out std_logic;
35     signal dbg_ppu_ctrl, dbg_ppu_mask, dbg_ppu_status : out std_logic_vector (7 downto 0);
36     signal dbg_ppu_addr : out std_logic_vector (13 downto 0);
37     signal dbg_ppu_data, dbg_ppu_scrl_x, dbg_ppu_scrl_y : out std_logic_vector (7 downto 0);
38
39     signal dbg_nes_x                        : out std_logic_vector (8 downto 0);
40     signal dbg_vga_x                        : out std_logic_vector (9 downto 0);
41     signal dbg_nes_y                        : out std_logic_vector (8 downto 0);
42     signal dbg_vga_y                        : out std_logic_vector (9 downto 0);
43     signal dbg_disp_nt, dbg_disp_attr       : out std_logic_vector (7 downto 0);
44     signal dbg_disp_ptn_h, dbg_disp_ptn_l   : out std_logic_vector (15 downto 0);
45     signal dbg_plt_ce_rn_wn                 : out std_logic_vector (2 downto 0);
46     signal dbg_plt_addr                     : out std_logic_vector (4 downto 0);
47     signal dbg_plt_data                     : out std_logic_vector (7 downto 0);
48     signal dbg_p_oam_ce_rn_wn               : out std_logic_vector (2 downto 0);
49     signal dbg_p_oam_addr                   : out std_logic_vector (7 downto 0);
50     signal dbg_p_oam_data                   : out std_logic_vector (7 downto 0);
51     signal dbg_s_oam_ce_rn_wn               : out std_logic_vector (2 downto 0);
52     signal dbg_s_oam_addr                   : out std_logic_vector (4 downto 0);
53     signal dbg_s_oam_data                   : out std_logic_vector (7 downto 0);
54
55     signal dbg_ppu_addr_we_n                : out std_logic;
56     signal dbg_ppu_clk_cnt                  : out std_logic_vector(1 downto 0);
57
58     
59             ppu_clk     : in std_logic;
60             vga_clk     : in std_logic;
61             emu_ppu_clk : in std_logic;
62             ce_n        : in std_logic;
63             rst_n       : in std_logic;
64             r_nw        : in std_logic;
65             cpu_addr    : in std_logic_vector (2 downto 0);
66             cpu_d       : inout std_logic_vector (7 downto 0);
67
68             vblank_n    : out std_logic;
69             rd_n        : out std_logic;
70             wr_n        : out std_logic;
71             ale         : out std_logic;
72             vram_ad     : inout std_logic_vector (7 downto 0);
73             vram_a      : out std_logic_vector (13 downto 8);
74
75             h_sync_n    : out std_logic;
76             v_sync_n    : out std_logic;
77             r           : out std_logic_vector(3 downto 0);
78             g           : out std_logic_vector(3 downto 0);
79             b           : out std_logic_vector(3 downto 0)
80
81     );
82 end ppu;
83
84 architecture rtl of ppu is
85
86 begin
87     cpu_d       <= (others => 'Z');
88     vblank_n    <= 'Z';
89     rd_n        <= 'Z';
90     wr_n        <= 'Z';
91     ale         <= 'Z';
92     vram_ad     <= (others => 'Z');
93     vram_a      <= (others => 'Z');
94     h_sync_n    <= 'Z';
95     v_sync_n    <= 'Z';
96     r           <= (others => 'Z');
97     g           <= (others => 'Z');
98     b           <= (others => 'Z');
99 end rtl;
100
101
102
103
104 -------------------------------------
105 library ieee;
106 use ieee.std_logic_1164.all;
107
108 --asyncronous rom
109 entity chr_rom is 
110     generic (abus_size : integer := 13; dbus_size : integer := 8);
111     port (  
112             clk             : in std_logic;
113             ce_n            : in std_logic;     --active low.
114             addr            : in std_logic_vector (abus_size - 1 downto 0);
115             data            : out std_logic_vector (dbus_size - 1 downto 0)
116         );
117 end chr_rom;
118
119 architecture rtl of chr_rom is
120 begin
121     data     <= (others => 'Z');
122 end rtl;
123