From 6602ca87952ed1bced7cb30b7ed4673cb9d62dc4 Mon Sep 17 00:00:00 2001 From: Bruno Duarte Gouveia Date: Fri, 19 Jun 2020 18:23:21 +0100 Subject: [PATCH] T80: skip byte after a stop opcode, fixes the Konami Collection Startup bugs --- rtl/T80/T80_MCode.vhd | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtl/T80/T80_MCode.vhd b/rtl/T80/T80_MCode.vhd index 8e85dbd..6985f57 100644 --- a/rtl/T80/T80_MCode.vhd +++ b/rtl/T80/T80_MCode.vhd @@ -1170,9 +1170,15 @@ begin when "11101001" => -- JP (HL) JumpXY <= '1'; - when "00010000" => - if Mode = 3 then + when "00010000" => + if Mode = 3 then -- STOP and skip next byte + MCycles <= "010"; I_DJNZ <= '1'; + case to_integer(unsigned(MCycle)) is + when 2 => + Inc_PC <= '1'; + when others => null; + end case; elsif Mode < 2 then -- DJNZ,e MCycles <= "011";