void DozeRun() { TryInt(); // Try the interrupt before we begin if (nDozeCycles<0) return; if (DozeAsmRead(Doze.pc)==0x76) { // cpu is halted (repeatedly doing halt inst.) int nDid=0; nDid=(nDozeCycles>>2)+1; Doze.ir= (unsigned short)( ((Doze.ir+nDid)&0x7f) | (Doze.ir&0xff80) ); // Increase R register nDozeCycles-=nDid; return; }
void __cdecl DozeRun() { TryInt(); // Try the interrupt before we begin if (Doze.nCyclesLeft < 0) { return; } if (DozeAsmRead(Doze.pc) == 0x76) { // cpu is halted (repeatedly doing halt inst.) int nDid = (Doze.nCyclesLeft >> 2) + 1; Doze.ir = (unsigned short)(((Doze.ir + nDid) & 0x7F) | (Doze.ir & 0xFF80)); // Increase R register Doze.nCyclesLeft -= nDid; return; }