X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fmame%2Fsh2.c;h=2fb964b6c8edd3748175f3250ad5b38b1ea6e251;hb=4835077e00c2cf7e3dba7bf7801c6aafd9d00dbe;hp=0010a696014596a61f8c26b7f08aa36b4f98b7a0;hpb=d3524932fadaea45167f6feab8b8ef612f6a92de;p=picodrive.git diff --git a/cpu/sh2/mame/sh2.c b/cpu/sh2/mame/sh2.c index 0010a69..2fb964b 100644 --- a/cpu/sh2/mame/sh2.c +++ b/cpu/sh2/mame/sh2.c @@ -108,6 +108,7 @@ //#include "debugger.h" //#include "sh2.h" //#include "sh2comn.h" +#undef INLINE #define INLINE static //CPU_DISASSEMBLE( sh2 ); @@ -115,7 +116,7 @@ #ifndef USE_SH2DRC /* speed up delay loops, bail out of tight loops */ -#define BUSY_LOOP_HACKS 1 +//#define BUSY_LOOP_HACKS 1 #define VERBOSE 0 @@ -349,11 +350,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 +442,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--; } }