X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fmame%2Fsh2.c;h=44cd7ea7d429de2113dbc9b2824130f738053d34;hb=00faec9cdbc073199fa984a0450e1a961994b058;hp=0010a696014596a61f8c26b7f08aa36b4f98b7a0;hpb=d3524932fadaea45167f6feab8b8ef612f6a92de;p=picodrive.git diff --git a/cpu/sh2/mame/sh2.c b/cpu/sh2/mame/sh2.c index 0010a69..44cd7ea 100644 --- a/cpu/sh2/mame/sh2.c +++ b/cpu/sh2/mame/sh2.c @@ -349,11 +349,13 @@ INLINE void BF(sh2_state *sh2, UINT32 d) */ INLINE void BFS(sh2_state *sh2, UINT32 d) { + sh2->delay = sh2->pc; + sh2->pc += 2; + if ((sh2->sr & T) == 0) { INT32 disp = ((INT32)d << 24) >> 24; - sh2->delay = sh2->pc; - sh2->pc = sh2->ea = sh2->pc + disp * 2 + 2; + sh2->pc = sh2->ea = sh2->pc + disp * 2; sh2->icount--; } } @@ -439,11 +441,13 @@ INLINE void BT(sh2_state *sh2, UINT32 d) */ INLINE void BTS(sh2_state *sh2, UINT32 d) { + sh2->delay = sh2->pc; + sh2->pc += 2; + if ((sh2->sr & T) != 0) { INT32 disp = ((INT32)d << 24) >> 24; - sh2->delay = sh2->pc; - sh2->pc = sh2->ea = sh2->pc + disp * 2 + 2; + sh2->pc = sh2->ea = sh2->pc + disp * 2; sh2->icount--; } }