65C02: Implement single cycle NOPs

Change-Id: I9e37b42dcce4ee57359e5d3298f38f2eb70663af
This commit is contained in:
David Banks 2021-03-11 19:02:10 +00:00
parent 0aa58bb25c
commit 340f7e33f9
1 changed files with 7 additions and 2 deletions

View File

@ -979,12 +979,17 @@ calcTheOpcode: process(clk)
-- Determine the next cpu cycle. After the last cycle we always
-- go to opcodeFetch to get the next opcode.
calcNextCpuCycle: process(theCpuCycle, opcInfo, theOpcode, indexOut, T, N, V, C, Z)
calcNextCpuCycle: process(theCpuCycle, opcInfo, theOpcode, nextOpcode, indexOut, T, N, V, C, Z)
begin
nextCpuCycle <= opcodeFetch;
case theCpuCycle is
when opcodeFetch => nextCpuCycle <= cycle2;
when opcodeFetch =>
if nextOpcode(1 downto 0) = "11" then
nextCpuCycle <= opcodeFetch;
else
nextCpuCycle <= cycle2;
end if;
when cycle2 => if opcInfo(opcBranch) = '1' then
if (N = theOpcode(5) and theOpcode(7 downto 6) = "00")
or (V = theOpcode(5) and theOpcode(7 downto 6) = "01")