2 // Copyright (C) 2008 Tomasz Malesinski <tmal@mimuw.edu.pl>
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 reg key_shift
, key_break
;
30 reg key_start
, key_select
, key_option
;
34 parameter monitor
= 0;
37 $readmemh("os/atarios.memh", u_atari.u_rom.memory
);
50 $monitor("%g\t pc=%h a=%h x=%h y=%h f=%b s=%h",
63 $writememh("ram.memh", u_atari.u_ram.memory
);
67 always @ (posedge clk
) begin
68 if (u_atari.adr
>= 'hd000
&& u_atari.adr
< 'hd800
) begin
70 $display("hardware write %h = %h at %h",
71 u_atari.adr
, u_atari.masterdat_o
, u_atari.u_cpu.pc
);
73 $display("hardware read %h = %h at %h",
74 u_atari.adr
, u_atari.slavedat_o
, u_atari.u_cpu.pc
);
78 clkgen
u_clkgen(.
clk_o(clk
), .
clk2_o(clk2
));
79 atari
u_atari(.
clk_i(clk
), .
clk2_i(clk2
), .
rst_i(rst_o
),
81 .
key_pressed(key_pressed
),
82 .
key_shift(key_shift
), .
key_break(key_break
),
83 .
key_start(key_start
), .
key_select(key_select
),
84 .
key_option(key_option
),
85 .
joystick(joystick
), .
trig(trig
));