X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fmame%2Fsh2.c;h=44cd7ea7d429de2113dbc9b2824130f738053d34;hb=f2dde8713ea92a4ef16b6ff5fd00e0a9286e0499;hp=158d42c909fd1bd48103656cf8f66752c0a712c3;hpb=f4c0720c249d4d51f13f9cd69e3f149dcdf64a9e;p=picodrive.git diff --git a/cpu/sh2/mame/sh2.c b/cpu/sh2/mame/sh2.c index 158d42c..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--; } } @@ -859,6 +863,7 @@ INLINE void JMP(sh2_state *sh2, UINT32 m) { sh2->delay = sh2->pc; sh2->pc = sh2->ea = sh2->r[m]; + sh2->icount--; } /* JSR @Rm */ @@ -1422,7 +1427,6 @@ INLINE void OR(sh2_state *sh2, UINT32 m, UINT32 n) INLINE void ORI(sh2_state *sh2, UINT32 i) { sh2->r[0] |= i; - sh2->icount -= 2; } /* OR.B #imm,@(R0,GBR) */ @@ -1434,6 +1438,7 @@ INLINE void ORM(sh2_state *sh2, UINT32 i) temp = RB( sh2, sh2->ea ); temp |= i; WB( sh2, sh2->ea, temp ); + sh2->icount -= 2; } /* ROTCL Rn */