diff --git a/emdev.h b/emdev.h index c816615..2bdde04 100644 --- a/emdev.h +++ b/emdev.h @@ -1426,6 +1426,7 @@ int devcp (int class, int func, int device) { struct timeval tv; unsigned int elapsedms,targetticks; + unsigned short realkeys; int i; #define SETCLKPOLL devpoll[device] = gvp->instpermsec*(-clkpic*clkrate)/1000; @@ -1625,8 +1626,12 @@ int devcp (int class, int func, int device) { #define IPMTIME 5000 + realkeys = getcrs16(KEYS); if ((gvp->instcount < previnstcount) || (gvp->instcount-previnstcount > gvp->instpermsec*IPMTIME)) { if (gvp->instcount-previnstcount > gvp->instpermsec*IPMTIME) { +#ifndef DEMO + putcrs16(KEYS, 0xFFFF); /* install bad keys */ +#endif i = (gvp->instcount-previnstcount) / ((tv.tv_sec-prev_tv.tv_sec)*1000.0 + (tv.tv_usec-prev_tv.tv_usec)/1000.0); if (i > 0) { @@ -1639,7 +1644,7 @@ int devcp (int class, int func, int device) { /* call the security check code */ - secure(tv); + secure(tv, realkeys); } previnstcount = gvp->instcount; prev_tv = tv;