library ieee;
use ieee.std_logic_1164.all;
-use std.textio.all;
use ieee.std_logic_arith.conv_std_logic_vector;
+use ieee.std_logic_unsigned.all;
+
+---for debug....
+use std.textio.all;
entity mos6502 is
generic ( dsize : integer := 8;
phi2 <= not input_clk;
set_clk <= input_clk;
trigger_clk <= not input_clk;
+ instruction <= d_io;
--addr(asize - 1 downto dsize) <= internal_abus_h;
--addr(dsize - 1 downto 0) <= internal_abus_l;
cur_status <= reset0;
pc <= conv_std_logic_vector(16#8000#, asize);
end if;
+
if (set_clk'event and set_clk = '1') then
---one byte instruction decoding.
if instruction = conv_std_logic_vector(16#78#, dsize) then
addr <= pc;
when sei =>
cur_status <= fetch;
+ pc <= pc + 1;
d_print(string'("sei 0"));
when others =>
null;