From 2c31a097cda261a3da99de5512b00a348c2d0683 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Mon, 10 Aug 2020 01:42:01 +0200 Subject: [PATCH] GB: fix INC ss cycles --- T80_MCode.vhd | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/T80_MCode.vhd b/T80_MCode.vhd index 20cf340..0eacbe0 100644 --- a/T80_MCode.vhd +++ b/T80_MCode.vhd @@ -886,9 +886,19 @@ begin end case; when "00000011"|"00010011"|"00100011"|"00110011" => -- INC ss - TStates <= "110"; - IncDec_16(3 downto 2) <= "01"; - IncDec_16(1 downto 0) <= DPair; + if Mode = 3 then + MCycles <= "010"; + case to_integer(unsigned(MCycle)) is + when 2 => + IncDec_16(3 downto 2) <= "01"; + IncDec_16(1 downto 0) <= DPair; + when others => + end case; + else + TStates <= "110"; + IncDec_16(3 downto 2) <= "01"; + IncDec_16(1 downto 0) <= DPair; + end if; when "00001011"|"00011011"|"00101011"|"00111011" => -- DEC ss if Mode = 3 then