X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fcz80%2Fcz80_op.c;h=f84f8e754f703408e0ba37cb0847a6d532177f25;hb=9db6a54485501b56b0f2f5db4d093c38fe495bda;hp=ed13c9e7a46e7495135ac08f16de4d96716babc6;hpb=a4221917e147ba303f2cf6c09d12362bf2802084;p=picodrive.git diff --git a/cpu/cz80/cz80_op.c b/cpu/cz80/cz80_op.c index ed13c9e..f84f8e7 100644 --- a/cpu/cz80/cz80_op.c +++ b/cpu/cz80/cz80_op.c @@ -712,14 +712,12 @@ OP_EI: if (CPU->IRQState) { afterEI = 1; - } - if (CPU->ICount <= 0) - { + CPU->ExtraCycles += 1 - CPU->ICount; CPU->ICount = 1; } } else zIFF2 = (1 << 2); - goto Cz80_Exec; + goto Cz80_Exec_nocheck; /*----------------------------------------- INC r16 @@ -919,7 +917,7 @@ OP_DJNZ: OP(0x18): // JR n OP_JR: adr = (INT8)READ_ARG(); - PC += adr; + PC += (INT8)adr; RET(12) OP(0x20): // JR NZ,n