From a020e3c358c687fccd8e7a35929041cf550ed50a Mon Sep 17 00:00:00 2001 From: Alexey Melnikov Date: Tue, 4 Aug 2020 07:25:56 +0800 Subject: [PATCH] Fixed bug affecting undocumented opcode IM 2 (ED 7E). It was swapped by an undocumented NOP (ED 77). Found by McLeod_ideafix. Detected crashing on MQM3 demo because this bug Co-authored-by: antoniovillena <_@antoniovillena.es> --- rtl/T80/T80_MCode.vhd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/T80/T80_MCode.vhd b/rtl/T80/T80_MCode.vhd index f5312bd..a60b902 100644 --- a/rtl/T80/T80_MCode.vhd +++ b/rtl/T80/T80_MCode.vhd @@ -1598,7 +1598,7 @@ begin |"11110000"|"11110001"|"11110010"|"11110011"|"11110100"|"11110101"|"11110110"|"11110111" |"11111000"|"11111001"|"11111010"|"11111011"|"11111100"|"11111101"|"11111110"|"11111111" => null; -- NOP, undocumented - when "01111110"|"01111111" => + when "01110111"|"01111111" => -- NOP, undocumented null; -- 8 BIT LOAD GROUP @@ -1754,7 +1754,7 @@ begin when "01010110"|"01110110" => -- IM 1 IMode <= "01"; - when "01011110"|"01110111" => + when "01011110"|"01111110" => -- IM 2 IMode <= "10"; -- 16 bit arithmetic