From 7693765c78e2ec4088ce15798c716751c6ea2302 Mon Sep 17 00:00:00 2001 From: Till Harbaum Date: Fri, 3 Jun 2016 11:21:42 +0200 Subject: [PATCH 1/2] TG68K fix, fixing EmuTOS problems --- cores/mist/TG68KdotC_Kernel.vhd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cores/mist/TG68KdotC_Kernel.vhd b/cores/mist/TG68KdotC_Kernel.vhd index 876376a..4df6c55 100644 --- a/cores/mist/TG68KdotC_Kernel.vhd +++ b/cores/mist/TG68KdotC_Kernel.vhd @@ -1133,11 +1133,15 @@ PROCESS (clk, IPL, setstate, state, exec_write_back, set_direct_data, next_micro end if; nextpass <= '0'; + elsif setopcode='1' THEN + opcode <= X"4E71"; --nop + elsif setinterrupt = '1' then opcode(15 downto 12) <= X"7"; --moveq opcode(8 downto 6) <= "001"; --word nextpass <= '0'; else + -- if setnextpass='1' or (regdirectsource='1' and state="00") then if setnextpass = '1' or regdirectsource = '1' then nextpass <= '1'; From c58dd82d42d466775aa01a24307d1236856f013c Mon Sep 17 00:00:00 2001 From: Till Harbaum Date: Fri, 3 Jun 2016 13:48:41 +0200 Subject: [PATCH 2/2] Fix the previous fix ... --- cores/mist/TG68KdotC_Kernel.vhd | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cores/mist/TG68KdotC_Kernel.vhd b/cores/mist/TG68KdotC_Kernel.vhd index 4df6c55..c637451 100644 --- a/cores/mist/TG68KdotC_Kernel.vhd +++ b/cores/mist/TG68KdotC_Kernel.vhd @@ -1133,13 +1133,15 @@ PROCESS (clk, IPL, setstate, state, exec_write_back, set_direct_data, next_micro end if; nextpass <= '0'; - elsif setopcode='1' THEN - opcode <= X"4E71"; --nop +-- elsif setinterrupt = '1' then +-- opcode(15 downto 12) <= X"7"; --moveq +-- opcode(8 downto 6) <= "001"; --word +-- nextpass <= '0'; + + elsif setinterrupt = '1' or setopcode='1' THEN + opcode <= X"4E71"; --nop + nextpass <= '0'; - elsif setinterrupt = '1' then - opcode(15 downto 12) <= X"7"; --moveq - opcode(8 downto 6) <= "001"; --word - nextpass <= '0'; else -- if setnextpass='1' or (regdirectsource='1' and state="00") then