Skip to content

Commit

Permalink
Adjust opcode timing as reported by pi1541.
Browse files Browse the repository at this point in the history
  • Loading branch information
bearoso committed Oct 21, 2022
1 parent 28be1a1 commit a33f0f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion cpuaddr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions cpuops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ******************************************************* */
Expand Down Expand Up @@ -2851,6 +2853,7 @@ static void Op22E1 (void)
PushW(Registers.PCw - 1);
Registers.SH = 1;
S9xSetPCBase(addr);
AddCycles(ONE_CYCLE);
}

static void Op22E0 (void)
Expand All @@ -2859,6 +2862,7 @@ static void Op22E0 (void)
PushB(Registers.PB);
PushW(Registers.PCw - 1);
S9xSetPCBase(addr);
AddCycles(ONE_CYCLE);
}

static void Op22Slow (void)
Expand All @@ -2869,6 +2873,7 @@ static void Op22Slow (void)
if (CheckEmulation())
Registers.SH = 1;
S9xSetPCBase(addr);
AddCycles(ONE_CYCLE);
}

static void Op6BE1 (void)
Expand Down

0 comments on commit a33f0f3

Please sign in to comment.