X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2FCyclone%2FOpLogic.cpp;h=94b00172d77e14ceb4cd3a2c2393947217f3dea0;hb=8b99ab90aa519639a87c302c9a26fef526febde9;hp=a081605eca532adeda0ea2f4146260ff5e1acabf;hpb=ee5e024ce624b4a5e5efc38e5d7c6a040a48a8b0;p=picodrive.git diff --git a/cpu/Cyclone/OpLogic.cpp b/cpu/Cyclone/OpLogic.cpp index a081605..94b0017 100644 --- a/cpu/Cyclone/OpLogic.cpp +++ b/cpu/Cyclone/OpLogic.cpp @@ -143,16 +143,8 @@ int OpNeg(int op) use=OpBase(op,size); if (op!=use) { OpUse(op,use); return 0; } // Use existing handler - OpStart(op,ea); Cycles=size<2?4:6; - if(ea >= 0x10) { - Cycles*=2; -#if CYCLONE_FOR_GENESIS - // This is same as in Starscream core, CLR uses only 6 cycles for memory EAs. - // May be this is similar case as with TAS opcode, but this time the dummy - // read is ignored somehow? Without this hack Fatal Rewind hangs even in Gens. - if(type==1&&size<2) Cycles-=2; -#endif - } + OpStart(op,ea); Cycles=size<2?4:6; + if(ea >= 0x10) Cycles*=2; EaCalc (10,0x003f,ea,size,0,0); @@ -207,6 +199,7 @@ int OpNeg(int op) ot("\n"); } + if (type==1) eawrite_check_addrerr=1; EaWrite(10, 1,ea,size,0x003f,0,0); OpEnd(ea); @@ -360,10 +353,12 @@ int OpSet(int op) ot("\n"); + eawrite_check_addrerr=1; EaCalc (0,0x003f, ea,size,0,0); EaWrite(0, 1, ea,size,0x003f,0,0); - OpEnd(ea,0,changed_cycles); + opend_op_changes_cycles=changed_cycles; + OpEnd(ea,0); return 0; } @@ -614,7 +609,8 @@ int OpAsr(int op) EaWrite(10, 0, ea,size,0x0007,1); - OpEnd(ea,0,count<0); + opend_op_changes_cycles = (count<0); + OpEnd(ea,0); return 0; }