1
0
Fork 0

adjust cycles for short-running string loops (thanks to ripsaw for pointing this out); fixes some gunship2000 flaws

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3229
This commit is contained in:
Sebastian Strohhäcker 2008-10-09 20:37:08 +00:00
parent fa4aadc31d
commit 02cafbb3f0
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@
LoadIP();
} else {
/* Won't interrupt scas and cmps instruction since they can interrupt themselves */
if (inst.code.op<R_SCASB) CPU_Cycles-=count;
count_left=0;
}
}

View file

@ -34,8 +34,9 @@ static void DoString(STRING_OP type) {
CPU_Cycles=0;
LOADIP; //RESET IP to the start
} else {
if ((count<=1) && (CPU_Cycles<=1)) CPU_Cycles--;
/* Won't interrupt scas and cmps instruction since they can interrupt themselves */
if ((count<=1) && (CPU_Cycles<=1)) CPU_Cycles--;
else if (type<R_SCASB) CPU_Cycles-=count;
count_left=0;
}
}