X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2FCyclone%2FOpLogic.cpp;h=d0eafecfd16b510f8579329aaa38a9cc88113e00;hb=d5d119243c9e1086e1e6cb34ea05bfd6ab18c200;hp=4a795e40a685402bb062b0046821704e7a539ec8;hpb=cc68a136aa179a5f32fe40208371eb9c2b0aadae;p=picodrive.git diff --git a/cpu/Cyclone/OpLogic.cpp b/cpu/Cyclone/OpLogic.cpp index 4a795e4..d0eafec 100644 --- a/cpu/Cyclone/OpLogic.cpp +++ b/cpu/Cyclone/OpLogic.cpp @@ -632,7 +632,7 @@ int OpAsrEa(int op) return 0; } -int OpTas(int op) +int OpTas(int op, int gen_special) { int ea=0; int use=0; @@ -645,7 +645,11 @@ int OpTas(int op) use=OpBase(op); if (op!=use) { OpUse(op,use); return 0; } // Use existing handler - OpStart(op); Cycles=4; + if (!gen_special) OpStart(op); + else + ot("Op%.4x_%s\n", op, ms?"":":"); + + Cycles=4; if(ea>=8) Cycles+=10; EaCalc (10,0x003f,ea,0,1); @@ -657,7 +661,7 @@ int OpTas(int op) #if CYCLONE_FOR_GENESIS // the original Sega hardware ignores write-back phase (to memory only) - if (ea < 0x10) { + if (ea < 0x10 || gen_special) { #endif ot(" orr r1,r1,#0x80000000 ;@ set bit7\n"); @@ -667,6 +671,13 @@ int OpTas(int op) #endif OpEnd(); + +#if CYCLONE_FOR_GENESIS + if (!gen_special && ea >= 0x10) { + OpTas(op, 1); + } +#endif + return 0; }