From a33f0f3540f807c0da4f40ecf34562fb27625170 Mon Sep 17 00:00:00 2001 From: BearOso Date: Fri, 21 Oct 2022 17:42:40 -0500 Subject: [PATCH] Adjust opcode timing as reported by pi1541. --- cpuaddr.h | 1 - cpuops.cpp | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpuaddr.h b/cpuaddr.h index 47e1aa65..bef687e2 100644 --- a/cpuaddr.h +++ b/cpuaddr.h @@ -513,7 +513,6 @@ static inline uint32 StackRelativeIndirectIndexed (AccessMode a) // (d,S),Y if (a & READ) OpenBus = (uint8) (addr >> 8); addr = (addr + Registers.Y.W + ICPU.ShiftedDB) & 0xffffff; - AddCycles(ONE_CYCLE); return (addr); } diff --git a/cpuops.cpp b/cpuops.cpp index b2342bae..a3e7fd10 100644 --- a/cpuops.cpp +++ b/cpuops.cpp @@ -1406,11 +1406,13 @@ bOP(70Slow, RelativeSlow, CheckOverflow(), 0, CheckEmulation()) static void Op82 (void) { S9xSetPCBase(ICPU.ShiftedPB + RelativeLong(JUMP)); + AddCycles(ONE_CYCLE); } static void Op82Slow (void) { S9xSetPCBase(ICPU.ShiftedPB + RelativeLongSlow(JUMP)); + AddCycles(ONE_CYCLE); } /* Flag Instructions ******************************************************* */ @@ -2851,6 +2853,7 @@ static void Op22E1 (void) PushW(Registers.PCw - 1); Registers.SH = 1; S9xSetPCBase(addr); + AddCycles(ONE_CYCLE); } static void Op22E0 (void) @@ -2859,6 +2862,7 @@ static void Op22E0 (void) PushB(Registers.PB); PushW(Registers.PCw - 1); S9xSetPCBase(addr); + AddCycles(ONE_CYCLE); } static void Op22Slow (void) @@ -2869,6 +2873,7 @@ static void Op22Slow (void) if (CheckEmulation()) Registers.SH = 1; S9xSetPCBase(addr); + AddCycles(ONE_CYCLE); } static void Op6BE1 (void)